Documentation ¶
Index ¶
- Constants
- func EthAddrLessThan(e, o string) bool
- func ValidateEthAddress(a string) error
- func ValidatePeggyCoin(v sdk.Coin) (string, error)
- type BoundContract
- func (c *BoundContract) ABI() abi.ABI
- func (c *BoundContract) Address() common.Address
- func (c *BoundContract) Client() *ethclient.Client
- func (c *BoundContract) DeployContract(opts *bind.TransactOpts, params ...interface{}) (common.Address, *types.Transaction, error)
- func (c *BoundContract) SetAddress(address common.Address)
- func (c *BoundContract) SetClient(client *ethclient.Client)
- func (c *BoundContract) SetTransact(fn TransactFunc)
- func (c *BoundContract) Source() *Contract
- func (c *BoundContract) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error)
- func (c *BoundContract) Transfer(opts *bind.TransactOpts) (*types.Transaction, error)
- type Contract
- type ERC20Token
- type NonceCache
- type TransactFunc
Constants ¶
View Source
const ( // PeggyDenomPrefix indicates the prefix for all assests minted by this module PeggyDenomPrefix = "umee" // PeggyDenomSeperator is the separator for peggy denoms PeggyDenomSeperator = "/" ETHContractAddressLen = 42 // PeggyDenomLen is the length of the denoms generated by the peggy module PeggyDenomLen = len(PeggyDenomPrefix) + len(PeggyDenomSeperator) + ETHContractAddressLen )
Variables ¶
This section is empty.
Functions ¶
func EthAddrLessThan ¶
EthAddrLessThan migrates the Ethereum address less than function
func ValidateEthAddress ¶
ValidateEthAddress validates the ethereum address string
Types ¶
type BoundContract ¶
type BoundContract struct { *bind.BoundContract // contains filtered or unexported fields }
func BindContract ¶
func BindContract(client *ethclient.Client, contract *Contract) (*BoundContract, error)
func (*BoundContract) ABI ¶
func (c *BoundContract) ABI() abi.ABI
func (*BoundContract) Address ¶
func (c *BoundContract) Address() common.Address
func (*BoundContract) Client ¶
func (c *BoundContract) Client() *ethclient.Client
func (*BoundContract) DeployContract ¶
func (c *BoundContract) DeployContract( opts *bind.TransactOpts, params ...interface{}, ) ( common.Address, *types.Transaction, error, )
func (*BoundContract) SetAddress ¶
func (c *BoundContract) SetAddress(address common.Address)
func (*BoundContract) SetClient ¶
func (c *BoundContract) SetClient(client *ethclient.Client)
func (*BoundContract) SetTransact ¶
func (c *BoundContract) SetTransact(fn TransactFunc)
func (*BoundContract) Source ¶
func (c *BoundContract) Source() *Contract
func (*BoundContract) Transact ¶
func (c *BoundContract) Transact( opts *bind.TransactOpts, method string, params ...interface{}, ) ( *types.Transaction, error, )
func (*BoundContract) Transfer ¶
func (c *BoundContract) Transfer(opts *bind.TransactOpts) (*types.Transaction, error)
type ERC20Token ¶
type ERC20Token struct { Amount *big.Int `json:"amount"` Contract common.Address `json:"contract,omitempty"` }
func ERC20FromPeggyCoin ¶
func ERC20FromPeggyCoin(v sdk.Coin) (*ERC20Token, error)
ERC20FromPeggyCoin returns the ERC20 representation of a given peggy coin
func NewERC20Token ¶
func NewERC20Token(amount uint64, contract string) *ERC20Token
NewERC20Token returns a new instance of an ERC20
func (*ERC20Token) Add ¶
func (e *ERC20Token) Add(o *ERC20Token) *ERC20Token
Add adds one ERC20 to another
func (*ERC20Token) PeggyCoin ¶
func (e *ERC20Token) PeggyCoin() sdk.Coin
PeggyCoin returns the peggy representation of the ERC20
func (*ERC20Token) ValidateBasic ¶
func (e *ERC20Token) ValidateBasic() error
ValidateBasic permforms stateless validation
type NonceCache ¶
type NonceCache interface { Serialize(account common.Address, fn func() error) error Sync(account common.Address, syncFn func() (uint64, error)) Set(account common.Address, nonce int64) Get(account common.Address) (nonce int64, loaded bool) Incr(account common.Address) int64 Decr(account common.Address) int64 }
func NewNonceCache ¶
func NewNonceCache() NonceCache
type TransactFunc ¶
type TransactFunc func(opts *bind.TransactOpts, contract *common.Address, input []byte) (*types.Transaction, error)
Click to show internal directories.
Click to hide internal directories.