Documentation ¶
Index ¶
- type Community
- func (c *Community) CreateAccount(owner common.Address) (*common.Address, error)
- func (c *Community) CreateGratitudeApp(owner common.Address) (*common.Address, error)
- func (c *Community) CreateProfile(owner common.Address) (*common.Address, error)
- func (c *Community) DeployAccountFactory() error
- func (c *Community) DeployGateway() error
- func (c *Community) DeployGratitudeFactory() error
- func (c *Community) DeployPaymaster() error
- func (c *Community) DeployProfileFactory() error
- func (c *Community) ExportAddress() CommunityAddress
- func (c *Community) FundPaymaster(amount *big.Int) error
- func (c *Community) GetAccount(owner common.Address) (*account.Account, error)
- func (c *Community) GetProfile(owner common.Address) (*profile.Profile, error)
- func (c *Community) NewTransactor() (*bind.TransactOpts, error)
- func (c *Community) NextNonce() (uint64, error)
- func (c *Community) SubmitOp(sender common.Address, data []byte) error
- type CommunityAddress
- type Handlers
- type SubmitOpRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Community ¶
type Community struct { Chain cw.ChainConfig EntryPoint common.Address Gateway *gateway.Gateway Paymaster *paymaster.Paymaster AccountFactory *accfactory.Accfactory GratitudeFactory *grfactory.Grfactory ProfileFactory *profactory.Profactory // contains filtered or unexported fields }
func Deploy ¶
func Deploy(es *ethrequest.EthService, key *ecdsa.PrivateKey, address common.Address, chain cw.ChainConfig) (*Community, error)
Deploy instantiates a community struct and deploys the contracts
func New ¶
func New(es *ethrequest.EthService, key *ecdsa.PrivateKey, address common.Address, addr CommunityAddress) (*Community, error)
New instantiates a community struct using the provided addresses for the contracts
func (*Community) CreateAccount ¶
CreateAccount creates an account for the provided owner
func (*Community) CreateGratitudeApp ¶
CreateGratitudeApp creates a gratitude app for the provided owner
func (*Community) CreateProfile ¶
CreateProfile creates a profile for the provided owner
func (*Community) DeployAccountFactory ¶
DeployAccountFactory deploys the account factory contract
func (*Community) DeployGateway ¶
DeployGateway deploys the gateway contract
func (*Community) DeployGratitudeFactory ¶
DeployGratitudeFactory deploys the gratitude factory contract
func (*Community) DeployPaymaster ¶
DeployPaymaster deploys the paymaster contract
func (*Community) DeployProfileFactory ¶
DeployProfileFactory deploys the profile factory contract
func (*Community) ExportAddress ¶
func (c *Community) ExportAddress() CommunityAddress
func (*Community) FundPaymaster ¶
FundPaymaster funds the paymaster contract
func (*Community) GetAccount ¶
GetAccount returns the account for the provided owner
func (*Community) GetProfile ¶
GetProfile returns the profile for the provided owner
func (*Community) NewTransactor ¶
func (c *Community) NewTransactor() (*bind.TransactOpts, error)
NewTransactor returns a new transactor for the community
type CommunityAddress ¶
type CommunityAddress struct { Gateway common.Address `json:"gateway"` Paymaster common.Address `json:"paymaster"` AccountFactory common.Address `json:"accountFactory"` GratitudeFactory common.Address `json:"gratitudeFactory"` ProfileFactory common.Address `json:"profileFactory"` Chain cw.ChainConfig `json:"chain"` }
type Handlers ¶
type Handlers struct {
// contains filtered or unexported fields
}
func (*Handlers) Config ¶
func (h *Handlers) Config(w http.ResponseWriter, r *http.Request)
Config returns the community config of addresses and chain info
func (*Handlers) CreateAccount ¶
func (h *Handlers) CreateAccount(w http.ResponseWriter, r *http.Request)
CreateAccount creates an account in the community and returns the address
type SubmitOpRequest ¶
type SubmitOpRequest struct {
Data []byte `json:"data"`
}