Documentation ¶
Index ¶
- type AdminControl
- func (ac *AdminControl) Destroy(option *types.ContractMethodSendOption, contractAddr types.Address) (types.Hash, error)
- func (ac *AdminControl) GetAdmin(option *types.ContractMethodCallOption, contractAddr types.Address) (types.Address, error)
- func (ac *AdminControl) SetAdmin(option *types.ContractMethodSendOption, contractAddr types.Address, ...) (types.Hash, error)
- type CrossSpaceCall
- func (s *CrossSpaceCall) CallEVM(opts *types.ContractMethodSendOption, to common.Address, data []byte) (types.Hash, error)
- func (s *CrossSpaceCall) CreateEVM(opts *types.ContractMethodSendOption, init []byte) (types.Hash, error)
- func (s *CrossSpaceCall) DeployEip1820(opts *types.ContractMethodSendOption) (types.Hash, error)
- func (ac *CrossSpaceCall) MappedBalance(opts *types.ContractMethodCallOption, addr types.Address) (*big.Int, error)
- func (ac *CrossSpaceCall) MappedNonce(opts *types.ContractMethodCallOption, addr types.Address) (*big.Int, error)
- func (s *CrossSpaceCall) ParseCall(log types.Log) (*CrossSpaceCallCall, error)
- func (s *CrossSpaceCall) ParseCreate(log types.Log) (*CrossSpaceCallCreate, error)
- func (s *CrossSpaceCall) ParseOutcome(log types.Log) (*CrossSpaceCallOutcome, error)
- func (s *CrossSpaceCall) ParseWithdraw(log types.Log) (*CrossSpaceCallWithdraw, error)
- func (ac *CrossSpaceCall) StaticCallEVM(opts *types.ContractMethodCallOption, to common.Address, data []byte) ([]byte, error)
- func (s *CrossSpaceCall) TransferEVM(opts *types.ContractMethodSendOption, to common.Address) (types.Hash, error)
- func (s *CrossSpaceCall) WithdrawFromMapped(opts *types.ContractMethodSendOption, value *big.Int) (types.Hash, error)
- type CrossSpaceCallCall
- type CrossSpaceCallCreate
- type CrossSpaceCallOutcome
- type CrossSpaceCallWithdraw
- type ParamsControl
- func (p *ParamsControl) CastVote(opts *types.ContractMethodSendOption, vote_round uint64, ...) (types.Hash, error)
- func (p *ParamsControl) CurrentRound(opts *types.ContractMethodCallOption) (uint64, error)
- func (p *ParamsControl) PosStakeForVotes(opts *types.ContractMethodCallOption, arg0 uint64) (*big.Int, error)
- func (p *ParamsControl) ReadVote(opts *types.ContractMethodCallOption, addr types.Address) ([]ParamsControlVote, error)
- func (p *ParamsControl) TotalVotes(opts *types.ContractMethodCallOption, vote_round uint64) ([]ParamsControlVote, error)
- type ParamsControlVote
- type PoSRegister
- func (p *PoSRegister) AddressToIdentifier(opts *types.ContractMethodCallOption, addr common.Address) ([32]byte, error)
- func (p *PoSRegister) GetVotes(opts *types.ContractMethodCallOption, identifier [32]byte) (*big.Int, *big.Int, error)
- func (p *PoSRegister) IdentifierToAddress(opts *types.ContractMethodCallOption, identifier [32]byte) (common.Address, error)
- func (p *PoSRegister) IncreaseStake(opts *bind.TransactOpts, votePower uint64) (types.Hash, error)
- func (p *PoSRegister) ReadVote(opts *types.ContractMethodCallOption, addr types.Address) ([]ParamsControlVote, error)
- func (p *PoSRegister) Register(opts *bind.TransactOpts, identifier [32]byte, votePower uint64, ...) (types.Hash, error)
- func (p *PoSRegister) Retire(opts *bind.TransactOpts, votePower uint64) (types.Hash, error)
- type Sponsor
- func (s *Sponsor) AddPrivilegeByAdmin(option *types.ContractMethodSendOption, contractAddr types.Address, ...) (types.Hash, error)
- func (s *Sponsor) GetAvailableStoragePoints(option *types.ContractMethodCallOption, address types.Address) (*big.Int, error)
- func (s *Sponsor) GetSponsorForCollateral(option *types.ContractMethodCallOption, contractAddr types.Address) (address types.Address, err error)
- func (s *Sponsor) GetSponsorForGas(option *types.ContractMethodCallOption, contractAddr types.Address) (address types.Address, err error)
- func (s *Sponsor) GetSponsoredBalanceForCollateral(option *types.ContractMethodCallOption, contractAddr types.Address) (*big.Int, error)
- func (s *Sponsor) GetSponsoredBalanceForGas(option *types.ContractMethodCallOption, contractAddr types.Address) (*big.Int, error)
- func (s *Sponsor) GetSponsoredGasFeeUpperBound(option *types.ContractMethodCallOption, contractAddr types.Address) (*big.Int, error)
- func (s *Sponsor) IsAllWhitelisted(option *types.ContractMethodCallOption, contractAddr types.Address) (bool, error)
- func (s *Sponsor) IsWhitelisted(option *types.ContractMethodCallOption, contractAddr types.Address, ...) (bool, error)
- func (s *Sponsor) RemovePrivilegeByAdmin(option *types.ContractMethodSendOption, contractAddr types.Address, ...) (types.Hash, error)
- func (s *Sponsor) SetSponsorForCollateral(option *types.ContractMethodSendOption, contractAddr types.Address) (types.Hash, error)
- func (s *Sponsor) SetSponsorForGas(option *types.ContractMethodSendOption, contractAddr types.Address, ...) (types.Hash, error)
- type Staking
- func (s *Staking) Deposit(option *types.ContractMethodSendOption, amount *big.Int) (types.Hash, error)
- func (ac *Staking) GetLockedStakingBalance(option *types.ContractMethodCallOption, user types.Address, ...) (*big.Int, error)
- func (ac *Staking) GetStakingBalance(option *types.ContractMethodCallOption, user types.Address) (*big.Int, error)
- func (ac *Staking) GetVotePower(option *types.ContractMethodCallOption, user types.Address, ...) (*big.Int, error)
- func (s *Staking) VoteLock(option *types.ContractMethodSendOption, amount *big.Int, ...) (types.Hash, error)
- func (s *Staking) Withdraw(option *types.ContractMethodSendOption, amount *big.Int) (types.Hash, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AdminControl ¶
AdminControl contract
func NewAdminControl ¶
func NewAdminControl(client sdk.ClientOperator) (ac AdminControl, err error)
NewAdminControl gets the AdminControl contract object
func (*AdminControl) Destroy ¶
func (ac *AdminControl) Destroy(option *types.ContractMethodSendOption, contractAddr types.Address) (types.Hash, error)
Destroy destroies contract `contractAddr`.
func (*AdminControl) GetAdmin ¶
func (ac *AdminControl) GetAdmin(option *types.ContractMethodCallOption, contractAddr types.Address) (types.Address, error)
GetAdmin returns admin of specific contract
type CrossSpaceCall ¶ added in v1.4.3
CrossSpaceCall contract
func NewCrossSpaceCall ¶ added in v1.4.3
func NewCrossSpaceCall(client sdk.ClientOperator) (s CrossSpaceCall, err error)
NewCrossSpaceCall gets the CrossSpaceCall contract object
func (*CrossSpaceCall) CallEVM ¶ added in v1.4.3
func (s *CrossSpaceCall) CallEVM(opts *types.ContractMethodSendOption, to common.Address, data []byte) (types.Hash, error)
func (*CrossSpaceCall) CreateEVM ¶ added in v1.4.3
func (s *CrossSpaceCall) CreateEVM(opts *types.ContractMethodSendOption, init []byte) (types.Hash, error)
func (*CrossSpaceCall) DeployEip1820 ¶ added in v1.4.3
func (s *CrossSpaceCall) DeployEip1820(opts *types.ContractMethodSendOption) (types.Hash, error)
func (*CrossSpaceCall) MappedBalance ¶ added in v1.4.3
func (ac *CrossSpaceCall) MappedBalance(opts *types.ContractMethodCallOption, addr types.Address) (*big.Int, error)
func (*CrossSpaceCall) MappedNonce ¶ added in v1.4.3
func (ac *CrossSpaceCall) MappedNonce(opts *types.ContractMethodCallOption, addr types.Address) (*big.Int, error)
func (*CrossSpaceCall) ParseCall ¶ added in v1.4.3
func (s *CrossSpaceCall) ParseCall(log types.Log) (*CrossSpaceCallCall, error)
func (*CrossSpaceCall) ParseCreate ¶ added in v1.4.3
func (s *CrossSpaceCall) ParseCreate(log types.Log) (*CrossSpaceCallCreate, error)
func (*CrossSpaceCall) ParseOutcome ¶ added in v1.4.3
func (s *CrossSpaceCall) ParseOutcome(log types.Log) (*CrossSpaceCallOutcome, error)
ParseOutcome is a log parse operation binding the contract event 0xbc11eabb6efd378a0a489b58a574c6e0d0403060e8a8c7b8eab45db47900edfe.
Solidity: event Outcome(bool success)
func (*CrossSpaceCall) ParseWithdraw ¶ added in v1.4.3
func (s *CrossSpaceCall) ParseWithdraw(log types.Log) (*CrossSpaceCallWithdraw, error)
ParseWithdraw is a log parse operation binding the contract event 0x31328e08abcc622b23d8be96d45b371b10e42989dafc8ac56c85b33bb3584b92.
Solidity: event Withdraw(bytes20 indexed sender, address indexed receiver, uint256 value, uint256 nonce)
func (*CrossSpaceCall) StaticCallEVM ¶ added in v1.4.3
func (ac *CrossSpaceCall) StaticCallEVM(opts *types.ContractMethodCallOption, to common.Address, data []byte) ([]byte, error)
func (*CrossSpaceCall) TransferEVM ¶ added in v1.4.3
func (s *CrossSpaceCall) TransferEVM(opts *types.ContractMethodSendOption, to common.Address) (types.Hash, error)
func (*CrossSpaceCall) WithdrawFromMapped ¶ added in v1.4.3
func (s *CrossSpaceCall) WithdrawFromMapped(opts *types.ContractMethodSendOption, value *big.Int) (types.Hash, error)
type CrossSpaceCallCall ¶ added in v1.4.3
type CrossSpaceCallCreate ¶ added in v1.4.3
type CrossSpaceCallOutcome ¶ added in v1.4.3
type CrossSpaceCallOutcome struct { Success bool Raw types.Log // Blockchain specific contextual infos }
CrossSpaceCallOutcome represents a Outcome event raised by the CrossSpaceCall contract.
type CrossSpaceCallWithdraw ¶ added in v1.4.3
type CrossSpaceCallWithdraw struct { Sender [20]byte Receiver common.Address Value *big.Int Nonce *big.Int Raw types.Log // Blockchain specific contextual infos }
CrossSpaceCallWithdraw represents a Withdraw event raised by the CrossSpaceCall contract.
type ParamsControl ¶ added in v1.4.3
ParamsControl contract
func NewParamsControl ¶ added in v1.4.3
func NewParamsControl(client sdk.ClientOperator) (s ParamsControl, err error)
NewParamsControl gets the ParamsControl contract object
func (*ParamsControl) CastVote ¶ added in v1.4.3
func (p *ParamsControl) CastVote(opts *types.ContractMethodSendOption, vote_round uint64, vote_data []ParamsControlVote) (types.Hash, error)
func (*ParamsControl) CurrentRound ¶ added in v1.4.3
func (p *ParamsControl) CurrentRound(opts *types.ContractMethodCallOption) (uint64, error)
func (*ParamsControl) PosStakeForVotes ¶ added in v1.4.3
func (p *ParamsControl) PosStakeForVotes(opts *types.ContractMethodCallOption, arg0 uint64) (*big.Int, error)
func (*ParamsControl) ReadVote ¶ added in v1.4.3
func (p *ParamsControl) ReadVote(opts *types.ContractMethodCallOption, addr types.Address) ([]ParamsControlVote, error)
func (*ParamsControl) TotalVotes ¶ added in v1.4.3
func (p *ParamsControl) TotalVotes(opts *types.ContractMethodCallOption, vote_round uint64) ([]ParamsControlVote, error)
type ParamsControlVote ¶ added in v1.4.3
type PoSRegister ¶ added in v1.4.3
PoSRegister contract
func NewPoSRegister ¶ added in v1.4.3
func NewPoSRegister(client sdk.ClientOperator) (s PoSRegister, err error)
NewPoSRegister gets the PoSRegister contract object
func (*PoSRegister) AddressToIdentifier ¶ added in v1.4.3
func (p *PoSRegister) AddressToIdentifier(opts *types.ContractMethodCallOption, addr common.Address) ([32]byte, error)
func (*PoSRegister) GetVotes ¶ added in v1.4.3
func (p *PoSRegister) GetVotes(opts *types.ContractMethodCallOption, identifier [32]byte) (*big.Int, *big.Int, error)
GetVotes is a free data retrieval call binding the contract method 0x4c051100.
Solidity: function getVotes(bytes32 identifier) view returns(uint256, uint256)
func (*PoSRegister) IdentifierToAddress ¶ added in v1.4.3
func (p *PoSRegister) IdentifierToAddress(opts *types.ContractMethodCallOption, identifier [32]byte) (common.Address, error)
func (*PoSRegister) IncreaseStake ¶ added in v1.4.3
func (p *PoSRegister) IncreaseStake(opts *bind.TransactOpts, votePower uint64) (types.Hash, error)
func (*PoSRegister) ReadVote ¶ added in v1.4.3
func (p *PoSRegister) ReadVote(opts *types.ContractMethodCallOption, addr types.Address) ([]ParamsControlVote, error)
func (*PoSRegister) Retire ¶ added in v1.4.3
func (p *PoSRegister) Retire(opts *bind.TransactOpts, votePower uint64) (types.Hash, error)
type Sponsor ¶
Sponsor represents SponsorWhitelistControl contract
func NewSponsor ¶
func NewSponsor(client sdk.ClientOperator) (s Sponsor, err error)
NewSponsor gets the SponsorWhitelistControl contract object
func (*Sponsor) AddPrivilegeByAdmin ¶
func (s *Sponsor) AddPrivilegeByAdmin(option *types.ContractMethodSendOption, contractAddr types.Address, userAddresses []types.Address) (types.Hash, error)
AddPrivilegeByAdmin for admin adds user to whitelist
func (*Sponsor) GetAvailableStoragePoints ¶ added in v1.5.8
func (*Sponsor) GetSponsorForCollateral ¶
func (s *Sponsor) GetSponsorForCollateral(option *types.ContractMethodCallOption, contractAddr types.Address) (address types.Address, err error)
GetSponsorForCollateral gets collateral sponsor address
func (*Sponsor) GetSponsorForGas ¶
func (s *Sponsor) GetSponsorForGas(option *types.ContractMethodCallOption, contractAddr types.Address) (address types.Address, err error)
GetSponsorForGas gets gas sponsor address of specific contract
func (*Sponsor) GetSponsoredBalanceForCollateral ¶
func (s *Sponsor) GetSponsoredBalanceForCollateral(option *types.ContractMethodCallOption, contractAddr types.Address) (*big.Int, error)
GetSponsoredBalanceForCollateral gets current Sponsored Balance for collateral
func (*Sponsor) GetSponsoredBalanceForGas ¶
func (s *Sponsor) GetSponsoredBalanceForGas(option *types.ContractMethodCallOption, contractAddr types.Address) (*big.Int, error)
GetSponsoredBalanceForGas gets current Sponsored Balance for gas
func (*Sponsor) GetSponsoredGasFeeUpperBound ¶
func (s *Sponsor) GetSponsoredGasFeeUpperBound(option *types.ContractMethodCallOption, contractAddr types.Address) (*big.Int, error)
GetSponsoredGasFeeUpperBound gets current Sponsored Gas fee upper bound
func (*Sponsor) IsAllWhitelisted ¶
func (s *Sponsor) IsAllWhitelisted(option *types.ContractMethodCallOption, contractAddr types.Address) (bool, error)
IsAllWhitelisted checks if all users are in a contract's whitelist
func (*Sponsor) IsWhitelisted ¶
func (s *Sponsor) IsWhitelisted(option *types.ContractMethodCallOption, contractAddr types.Address, userAddr types.Address) (bool, error)
IsWhitelisted checks if a user is in a contract's whitelist
func (*Sponsor) RemovePrivilegeByAdmin ¶
func (s *Sponsor) RemovePrivilegeByAdmin(option *types.ContractMethodSendOption, contractAddr types.Address, userAddresses []types.Address) (types.Hash, error)
RemovePrivilegeByAdmin for admin removes user from whitelist
func (*Sponsor) SetSponsorForCollateral ¶
func (s *Sponsor) SetSponsorForCollateral(option *types.ContractMethodSendOption, contractAddr types.Address) (types.Hash, error)
SetSponsorForCollateral for someone sponsor the storage collateral for contract `contractAddr`, it is payable
func (*Sponsor) SetSponsorForGas ¶
func (s *Sponsor) SetSponsorForGas(option *types.ContractMethodSendOption, contractAddr types.Address, upperBound *big.Int) (types.Hash, error)
SetSponsorForGas for someone sponsor the gas cost for contract `contractAddr` with an `upper_bound` for a single transaction, it is payable
type Staking ¶
Staking contract
func NewStaking ¶
func NewStaking(client sdk.ClientOperator) (s Staking, err error)
NewStaking gets the Staking contract object
func (*Staking) Deposit ¶
func (s *Staking) Deposit(option *types.ContractMethodSendOption, amount *big.Int) (types.Hash, error)
Deposit `amount` cfx in this contract
func (*Staking) GetLockedStakingBalance ¶
func (ac *Staking) GetLockedStakingBalance(option *types.ContractMethodCallOption, user types.Address, blockNumber *big.Int) (*big.Int, error)
GetLockedStakingBalance returns user's locked staking balance at given blockNumber Note: if the blockNumber is less than the current block number, function will return current locked staking balance.
func (*Staking) GetStakingBalance ¶
func (ac *Staking) GetStakingBalance(option *types.ContractMethodCallOption, user types.Address) (*big.Int, error)
GetStakingBalance returns user's staking balance
func (*Staking) GetVotePower ¶
func (ac *Staking) GetVotePower(option *types.ContractMethodCallOption, user types.Address, blockNumber *big.Int) (*big.Int, error)
GetVotePower returns user's vote power staking balance at given blockNumber