Documentation ¶
Index ¶
- type Contract
- func (c *Contract) Close() error
- func (c *Contract) GetLatestAvailableBlock() (*big.Int, error)
- func (c *Contract) GetMntpSwapEvent(blockFrom, blockTo *big.Int) (events []*MntpSwapEventWrapper, err error)
- func (c *Contract) GetTransactionStatus(hash string) (status TxStatus, err error)
- func (c *Contract) IsActive() (bool, error)
- func (c *Contract) MntpBalance() (*amount.Amount, error)
- func (c *Contract) SendMntp(dst common.Address, src mint.PublicKey, amo *amount.Amount) (hash common.Hash, err error)
- func (c *Contract) ServiceHasRights() (bool, error)
- type MntpSwapEvent
- type MntpSwapEventWrapper
- type TxStatus
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Contract ¶
type Contract struct {
// contains filtered or unexported fields
}
Contract data
func (*Contract) GetLatestAvailableBlock ¶
GetLatestAvailableBlock helper
func (*Contract) GetMntpSwapEvent ¶
func (c *Contract) GetMntpSwapEvent(blockFrom, blockTo *big.Int) (events []*MntpSwapEventWrapper, err error)
GetMntpSwapEvent reads contract logs and collects swap-events
func (*Contract) GetTransactionStatus ¶
GetTransactionStatus helper
func (*Contract) MntpBalance ¶
MntpBalance checks this contract's MNTP balance
func (*Contract) SendMntp ¶
func (c *Contract) SendMntp(dst common.Address, src mint.PublicKey, amo *amount.Amount) (hash common.Hash, err error)
SendMntp calls contract's sendMntp method, returns transaction hash
func (*Contract) ServiceHasRights ¶
ServiceHasRights checks service account address has rights on the contract
type MntpSwapEvent ¶
MntpSwapEvent contains related event data
type MntpSwapEventWrapper ¶
type MntpSwapEventWrapper struct { Event *MntpSwapEvent TransactionHash common.Hash }
MntpSwapEventWrapper wraps MntpSwapEvent with extra data
type TxStatus ¶
type TxStatus uint64
TxStatus describes Ethereum transaction status
const ( // EthTxUnknown means transaction wasn't found (possibly provider still hasn't received it) EthTxUnknown TxStatus = 0 // EthTxPending means transaction is in a queue EthTxPending TxStatus = 1 // EthTxSuccess means transaction is confirmed EthTxSuccess TxStatus = 2 // EthTxFailed means transaction is failed EthTxFailed TxStatus = 3 )
Click to show internal directories.
Click to hide internal directories.