Documentation ¶
Index ¶
- Constants
- type Bridge
- func (ctrct *Bridge) Contract() *contract.Bridge
- func (ctrct *Bridge) ContractAddr() common.Address
- func (ctrct *Bridge) DepositToken(ctx context.Context, chainID *big.Int, fromPriv *ecdsa.PrivateKey, ...) (txHash, rawTx string, err error)
- func (ctrct *Bridge) GetBalance(ctx context.Context, from common.Address) (*big.Int, error)
- func (ctrct *Bridge) GetIn(ctx context.Context, from common.Address, offset *big.Int) (contract.BridgeTokenIn, error)
- func (ctrct *Bridge) GetInLength(ctx context.Context, from common.Address) (*big.Int, error)
- func (ctrct *Bridge) GetOut(ctx context.Context, from common.Address, offset *big.Int) (contract.BridgeTokenOut, error)
- func (ctrct *Bridge) Operator1(ctx context.Context, from common.Address) (common.Address, error)
- func (ctrct *Bridge) Operator2(ctx context.Context, from common.Address) (common.Address, error)
- func (ctrct *Bridge) Owner(ctx context.Context, from common.Address) (common.Address, error)
- func (ctrct *Bridge) PauseToken(ctx context.Context, chainID *big.Int, fromPriv *ecdsa.PrivateKey, ...) (txHash, rawTx string, err error)
- func (ctrct *Bridge) SendToken(ctx context.Context, chainID *big.Int, fromPriv *ecdsa.PrivateKey, ...) (txHash, rawTx string, err error)
- func (ctrct *Bridge) SetOperator(ctx context.Context, chainID *big.Int, fromPriv *ecdsa.PrivateKey, ...) (txHash, rawTx string, err error)
- func (ctrct *Bridge) UnpauseToken(ctx context.Context, chainID *big.Int, fromPriv *ecdsa.PrivateKey, ...) (txHash, rawTx string, err error)
- func (ctrct *Bridge) Withdraw(ctx context.Context, chainID *big.Int, fromPriv *ecdsa.PrivateKey, ...) (txHash, rawTx string, err error)
Constants ¶
View Source
const ( // 合约函数 BridgeSetOperator = "bridge_setoperator" BridgePause = "bridge_pause" BridgeUnpause = "bridge_unpause" BridgePauseToken = "bridge_pause_token" BridgeUnpauseToken = "bridge_unpause_token" BridgeWithdraw = "bridge_withdraw" BridgeSendTokenApproval = "bridge_sendtoken_approval" BridgeSendToken = "bridge_sendtoken" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bridge ¶
type Bridge struct {
// contains filtered or unexported fields
}
Bridge is a Go wrapper around an on-chain checkpoint oracle contract.
func (*Bridge) ContractAddr ¶
ContractAddr returns the address of contract.
func (*Bridge) DepositToken ¶
func (*Bridge) GetBalance ¶
GetBalance 获取主币余额
func (*Bridge) GetInLength ¶
func (*Bridge) PauseToken ¶
func (*Bridge) SetOperator ¶
func (*Bridge) UnpauseToken ¶
Click to show internal directories.
Click to hide internal directories.