internalcontract

package
v1.5.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 25, 2024 License: LGPL-3.0 Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AdminControl

type AdminControl struct {
	sdk.Contract
}

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

func (*AdminControl) SetAdmin

func (ac *AdminControl) SetAdmin(option *types.ContractMethodSendOption, contractAddr types.Address, newAdmin types.Address) (types.Hash, error)

SetAdmin sets the administrator of contract `contractAddr` to `newAdmin`.

type CrossSpaceCall added in v1.4.3

type CrossSpaceCall struct {
	sdk.Contract
}

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 (*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 CrossSpaceCallCall struct {
	Sender   common.Address
	Receiver common.Address
	Value    *big.Int
	Nonce    *big.Int
	Data     []byte
	Raw      types.Log // Blockchain specific contextual infos
}

type CrossSpaceCallCreate added in v1.4.3

type CrossSpaceCallCreate struct {
	Sender          [20]byte
	ContractAddress [20]byte
	Value           *big.Int
	Nonce           *big.Int
	Init            []byte
	Raw             types.Log // Blockchain specific contextual infos
}

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

type ParamsControl struct {
	sdk.Contract
}

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 (*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 ParamsControlVote struct {
	TopicIndex uint16
	Votes      [3]*big.Int
}

type PoSRegister added in v1.4.3

type PoSRegister struct {
	sdk.Contract
}

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 (*PoSRegister) Register added in v1.4.3

func (p *PoSRegister) Register(opts *bind.TransactOpts, identifier [32]byte, votePower uint64, blsPubKey []byte, vrfPubKey []byte, blsPubKeyProof [2][]byte) (types.Hash, error)

func (*PoSRegister) Retire added in v1.4.3

func (p *PoSRegister) Retire(opts *bind.TransactOpts, votePower uint64) (types.Hash, error)
type Sponsor struct {
	sdk.Contract
}

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 (s *Sponsor) GetAvailableStoragePoints(option *types.ContractMethodCallOption, address types.Address) (*big.Int, error)

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

type Staking struct {
	sdk.Contract
}

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

func (*Staking) VoteLock

func (s *Staking) VoteLock(option *types.ContractMethodSendOption, amount *big.Int, unlockBlockNumber *big.Int) (types.Hash, error)

VoteLock will locks `amount` cfx from current to next `unlockBlockNumber` blocks for obtain vote power

func (*Staking) Withdraw

func (s *Staking) Withdraw(option *types.ContractMethodSendOption, amount *big.Int) (types.Hash, error)

Withdraw `amount` cfx from this contract

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL