Documentation ¶
Index ¶
- Variables
- func New(log *logging.Logger, cfg Config, ts TimeService, broker Broker, ...) (*Accounting, *StakeVerifier, *Checkpoint)
- type Account
- type Accounting
- func (a *Accounting) AddEvent(ctx context.Context, evt *types.StakeLinking)
- func (a *Accounting) GetAllAvailableBalances() map[string]*num.Uint
- func (a *Accounting) GetAvailableBalance(party string) (*num.Uint, error)
- func (a *Accounting) GetAvailableBalanceAt(party string, at time.Time) (*num.Uint, error)
- func (a *Accounting) GetAvailableBalanceInRange(party string, from, to time.Time) (*num.Uint, error)
- func (a *Accounting) GetStakingAssetTotalSupply() *num.Uint
- func (a *Accounting) GetState(k string) ([]byte, []types.StateProvider, error)
- func (a *Accounting) Hash() []byte
- func (a *Accounting) Keys() []string
- func (a *Accounting) LoadState(ctx context.Context, payload *types.Payload) ([]types.StateProvider, error)
- func (a *Accounting) Namespace() types.SnapshotNamespace
- func (a *Accounting) OnStateLoadStarts(_ context.Context) error
- func (a *Accounting) OnStateLoaded(_ context.Context) error
- func (a *Accounting) ProcessStakeTotalSupply(_ context.Context, evt *types.StakeTotalSupply) error
- func (a *Accounting) Stopped() bool
- func (a *Accounting) UpdateStakingBridgeAddress(ethCfg *types.EthereumConfig) error
- type AllEthereumClient
- type Broker
- type Checkpoint
- type Config
- type EthConfirmations
- type EthOnChainVerifier
- type EthereumClient
- type EthereumClientCaller
- type EthereumClientConfirmations
- type EthereumEventSource
- type EvtForwarder
- type OnChainVerifier
- type StakeVerifier
- func (s *StakeVerifier) GetState(k string) ([]byte, []types.StateProvider, error)
- func (s *StakeVerifier) Keys() []string
- func (s *StakeVerifier) LoadState(ctx context.Context, payload *types.Payload) ([]types.StateProvider, error)
- func (s *StakeVerifier) Namespace() types.SnapshotNamespace
- func (s *StakeVerifier) OnStateLoaded(ctx context.Context) error
- func (s *StakeVerifier) OnTick(ctx context.Context, t time.Time)
- func (s *StakeVerifier) ProcessStakeDeposited(ctx context.Context, event *types.StakeDeposited) error
- func (s *StakeVerifier) ProcessStakeRemoved(ctx context.Context, event *types.StakeRemoved) error
- func (s *StakeVerifier) Stopped() bool
- type Staking
- type StakingCaller
- func (_Staking *StakingCaller) StakeBalance(opts *bind.CallOpts, target common.Address, vega_public_key [32]byte) (*big.Int, error)
- func (_Staking *StakingCaller) StakingToken(opts *bind.CallOpts) (common.Address, error)
- func (_Staking *StakingCaller) TotalStaked(opts *bind.CallOpts) (*big.Int, error)
- type StakingCallerRaw
- type StakingCallerSession
- type StakingFilterer
- func (_Staking *StakingFilterer) FilterStakeDeposited(opts *bind.FilterOpts, user []common.Address, vega_public_key [][32]byte) (*StakingStakeDepositedIterator, error)
- func (_Staking *StakingFilterer) FilterStakeRemoved(opts *bind.FilterOpts, user []common.Address, vega_public_key [][32]byte) (*StakingStakeRemovedIterator, error)
- func (_Staking *StakingFilterer) FilterStakeTransferred(opts *bind.FilterOpts, from []common.Address, to []common.Address, ...) (*StakingStakeTransferredIterator, error)
- func (_Staking *StakingFilterer) ParseStakeDeposited(log types.Log) (*StakingStakeDeposited, error)
- func (_Staking *StakingFilterer) ParseStakeRemoved(log types.Log) (*StakingStakeRemoved, error)
- func (_Staking *StakingFilterer) ParseStakeTransferred(log types.Log) (*StakingStakeTransferred, error)
- func (_Staking *StakingFilterer) WatchStakeDeposited(opts *bind.WatchOpts, sink chan<- *StakingStakeDeposited, ...) (event.Subscription, error)
- func (_Staking *StakingFilterer) WatchStakeRemoved(opts *bind.WatchOpts, sink chan<- *StakingStakeRemoved, user []common.Address, ...) (event.Subscription, error)
- func (_Staking *StakingFilterer) WatchStakeTransferred(opts *bind.WatchOpts, sink chan<- *StakingStakeTransferred, ...) (event.Subscription, error)
- type StakingRaw
- func (_Staking *StakingRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, ...) error
- func (_Staking *StakingRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error)
- func (_Staking *StakingRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error)
- type StakingSession
- type StakingStakeDeposited
- type StakingStakeDepositedIterator
- type StakingStakeRemoved
- type StakingStakeRemovedIterator
- type StakingStakeTransferred
- type StakingStakeTransferredIterator
- type StakingTransactor
- type StakingTransactorRaw
- type StakingTransactorSession
- type TimeService
- type Witness
Constants ¶
This section is empty.
Variables ¶
var ( ErrEventAlreadyExists = errors.New("event already exists") ErrInvalidAmount = errors.New("invalid amount") ErrInvalidEventKind = errors.New("invalid event kind") ErrMissingEventID = errors.New("missing event id") ErrMissingTimestamp = errors.New("missing timestamp") ErrNegativeBalance = errors.New("negative balance") ErrInvalidParty = errors.New("invalid party") )
var ( ErrNoBalanceForParty = errors.New("no balance for party") ErrStakeTotalSupplyAlreadyProcessed = errors.New("stake total supply already processed") ErrStakeTotalSupplyBeingProcessed = errors.New("stake total supply being processed") )
var ( ErrNoStakeDepositedEventFound = errors.New("no stake deposited event found") ErrNoStakeRemovedEventFound = errors.New("no stake removed event found") ErrMissingConfirmations = errors.New("not enough confirmations") ErrInvalidStakeRemovedEventID = errors.New("invalid stake removed event ID") ErrInvalidStakeDepositedEventID = errors.New("invalid stake deposited event ID") ErrDuplicatedStakeDepositedEvent = errors.New("duplicated stake deposited event") ErrDuplicatedStakeRemovedEvent = errors.New("duplicated stake deposited event") )
var StakingABI = StakingMetaData.ABI
StakingABI is the input ABI used to generate the binding from. Deprecated: Use StakingMetaData.ABI instead.
var StakingMetaData = &bind.MetaData{
ABI: "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"vega_public_key\",\"type\":\"bytes32\"}],\"name\":\"Stake_Deposited\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"vega_public_key\",\"type\":\"bytes32\"}],\"name\":\"Stake_Removed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"vega_public_key\",\"type\":\"bytes32\"}],\"name\":\"Stake_Transferred\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"staking_token\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"vega_public_key\",\"type\":\"bytes32\"}],\"name\":\"stake_balance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"total_staked\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]",
}
StakingMetaData contains all meta data concerning the Staking contract.
Functions ¶
func New ¶
func New( log *logging.Logger, cfg Config, ts TimeService, broker Broker, witness Witness, ethClient AllEthereumClient, netp *netparams.Store, evtFwd EvtForwarder, isValidator bool, ethCfns EthConfirmations, ethEventSource EthereumEventSource, ) (*Accounting, *StakeVerifier, *Checkpoint)
Types ¶
type Account ¶ added in v0.55.0
type Account struct { Party string Balance *num.Uint Events []*types.StakeLinking }
func NewStakingAccount ¶
func (*Account) AddEvent ¶ added in v0.55.0
func (s *Account) AddEvent(evt *types.StakeLinking) error
AddEvent will add a new event to the account.
func (*Account) GetAvailableBalance ¶ added in v0.55.0
func (*Account) GetAvailableBalanceAt ¶ added in v0.55.0
type Accounting ¶
type Accounting struct {
// contains filtered or unexported fields
}
func NewAccounting ¶
func NewAccounting( log *logging.Logger, cfg Config, ts TimeService, broker Broker, ethClient EthereumClientCaller, evtForward EvtForwarder, witness Witness, isValidator bool, ) (acc *Accounting)
func (*Accounting) AddEvent ¶
func (a *Accounting) AddEvent(ctx context.Context, evt *types.StakeLinking)
func (*Accounting) GetAllAvailableBalances ¶
func (a *Accounting) GetAllAvailableBalances() map[string]*num.Uint
GetAllAvailableBalances returns the staking balance for all parties.
func (*Accounting) GetAvailableBalance ¶
func (a *Accounting) GetAvailableBalance(party string) (*num.Uint, error)
func (*Accounting) GetAvailableBalanceAt ¶
func (*Accounting) GetAvailableBalanceInRange ¶
func (*Accounting) GetStakingAssetTotalSupply ¶
func (a *Accounting) GetStakingAssetTotalSupply() *num.Uint
func (*Accounting) GetState ¶
func (a *Accounting) GetState(k string) ([]byte, []types.StateProvider, error)
func (*Accounting) Hash ¶
func (a *Accounting) Hash() []byte
func (*Accounting) Keys ¶
func (a *Accounting) Keys() []string
func (*Accounting) LoadState ¶
func (a *Accounting) LoadState(ctx context.Context, payload *types.Payload) ([]types.StateProvider, error)
func (*Accounting) Namespace ¶
func (a *Accounting) Namespace() types.SnapshotNamespace
func (*Accounting) OnStateLoadStarts ¶
func (a *Accounting) OnStateLoadStarts(_ context.Context) error
func (*Accounting) OnStateLoaded ¶
func (a *Accounting) OnStateLoaded(_ context.Context) error
func (*Accounting) ProcessStakeTotalSupply ¶
func (a *Accounting) ProcessStakeTotalSupply(_ context.Context, evt *types.StakeTotalSupply) error
func (*Accounting) Stopped ¶
func (a *Accounting) Stopped() bool
func (*Accounting) UpdateStakingBridgeAddress ¶
func (a *Accounting) UpdateStakingBridgeAddress(ethCfg *types.EthereumConfig) error
type AllEthereumClient ¶
type AllEthereumClient interface { EthereumClient EthereumClientConfirmations EthereumClientCaller }
type Checkpoint ¶
type Checkpoint struct {
// contains filtered or unexported fields
}
func NewCheckpoint ¶
func NewCheckpoint( log *logging.Logger, accounting *Accounting, stakeVerifier *StakeVerifier, ethEventSource EthereumEventSource, ) *Checkpoint
func (*Checkpoint) Checkpoint ¶
func (c *Checkpoint) Checkpoint() ([]byte, error)
func (*Checkpoint) Name ¶
func (c *Checkpoint) Name() types.CheckpointName
type Config ¶
Config represents the configuration of the position engine.
func NewDefaultConfig ¶
func NewDefaultConfig() Config
NewDefaultConfig creates an instance of the package specific configuration, given a pointer to a logger instance to be used for logging within the package.
type EthConfirmations ¶
type EthOnChainVerifier ¶
type EthOnChainVerifier interface { CheckStakeDeposited(*types.StakeDeposited) error CheckStakeRemoved(*types.StakeRemoved) error }
type EthereumClient ¶
type EthereumClient interface { bind.ContractFilterer }
type EthereumClientCaller ¶
type EthereumClientCaller interface { bind.ContractCaller }
type EthereumEventSource ¶
type EthereumEventSource interface {
UpdateStakingStartingBlock(uint64)
}
type EvtForwarder ¶
type EvtForwarder interface {
ForwardFromSelf(evt *commandspb.ChainEvent)
}
EvtForwarder forwarder information to the tendermint chain to be agreed on by validators.
type OnChainVerifier ¶
type OnChainVerifier struct {
// contains filtered or unexported fields
}
func NewOnChainVerifier ¶
func NewOnChainVerifier( cfg Config, log *logging.Logger, ethClient EthereumClient, ethConfirmations EthConfirmations, ) *OnChainVerifier
func (*OnChainVerifier) CheckStakeDeposited ¶
func (o *OnChainVerifier) CheckStakeDeposited( event *types.StakeDeposited, ) error
func (*OnChainVerifier) CheckStakeRemoved ¶
func (o *OnChainVerifier) CheckStakeRemoved(event *types.StakeRemoved) error
func (*OnChainVerifier) UpdateStakingBridgeAddresses ¶
func (o *OnChainVerifier) UpdateStakingBridgeAddresses(stakingBridgeAddresses []ethcmn.Address)
type StakeVerifier ¶
type StakeVerifier struct {
// contains filtered or unexported fields
}
func NewStakeVerifier ¶
func NewStakeVerifier( log *logging.Logger, cfg Config, accs *Accounting, witness Witness, ts TimeService, broker Broker, onChainVerifier EthOnChainVerifier, ethEventSource EthereumEventSource, ) (sv *StakeVerifier)
func (*StakeVerifier) GetState ¶
func (s *StakeVerifier) GetState(k string) ([]byte, []types.StateProvider, error)
func (*StakeVerifier) Keys ¶
func (s *StakeVerifier) Keys() []string
func (*StakeVerifier) LoadState ¶
func (s *StakeVerifier) LoadState(ctx context.Context, payload *types.Payload) ([]types.StateProvider, error)
func (*StakeVerifier) Namespace ¶
func (s *StakeVerifier) Namespace() types.SnapshotNamespace
func (*StakeVerifier) OnStateLoaded ¶
func (s *StakeVerifier) OnStateLoaded(ctx context.Context) error
func (*StakeVerifier) ProcessStakeDeposited ¶
func (s *StakeVerifier) ProcessStakeDeposited( ctx context.Context, event *types.StakeDeposited, ) error
func (*StakeVerifier) ProcessStakeRemoved ¶
func (s *StakeVerifier) ProcessStakeRemoved( ctx context.Context, event *types.StakeRemoved, ) error
func (*StakeVerifier) Stopped ¶
func (s *StakeVerifier) Stopped() bool
type Staking ¶
type Staking struct { StakingCaller // Read-only binding to the contract StakingTransactor // Write-only binding to the contract StakingFilterer // Log filterer for contract events }
Staking is an auto generated Go binding around an Ethereum contract.
func NewStaking ¶
NewStaking creates a new instance of Staking, bound to a specific deployed contract.
type StakingCaller ¶
type StakingCaller struct {
// contains filtered or unexported fields
}
StakingCaller is an auto generated read-only Go binding around an Ethereum contract.
func NewStakingCaller ¶
func NewStakingCaller(address common.Address, caller bind.ContractCaller) (*StakingCaller, error)
NewStakingCaller creates a new read-only instance of Staking, bound to a specific deployed contract.
func (*StakingCaller) StakeBalance ¶
func (_Staking *StakingCaller) StakeBalance(opts *bind.CallOpts, target common.Address, vega_public_key [32]byte) (*big.Int, error)
StakeBalance is a free data retrieval call binding the contract method 0x274abf34.
Solidity: function stake_balance(address target, bytes32 vega_public_key) view returns(uint256)
func (*StakingCaller) StakingToken ¶
StakingToken is a free data retrieval call binding the contract method 0x2dc7d74c.
Solidity: function staking_token() view returns(address)
func (*StakingCaller) TotalStaked ¶
TotalStaked is a free data retrieval call binding the contract method 0xaf7568dd.
Solidity: function total_staked() view returns(uint256)
type StakingCallerRaw ¶
type StakingCallerRaw struct {
Contract *StakingCaller // Generic read-only contract binding to access the raw methods on
}
StakingCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.
func (*StakingCallerRaw) Call ¶
func (_Staking *StakingCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error
Call invokes the (constant) contract method with params as input values and sets the output to result. The result type might be a single field for simple returns, a slice of interfaces for anonymous returns and a struct for named returns.
type StakingCallerSession ¶
type StakingCallerSession struct { Contract *StakingCaller // Generic contract caller binding to set the session for CallOpts bind.CallOpts // Call options to use throughout this session }
StakingCallerSession is an auto generated read-only Go binding around an Ethereum contract, with pre-set call options.
func (*StakingCallerSession) StakeBalance ¶
func (_Staking *StakingCallerSession) StakeBalance(target common.Address, vega_public_key [32]byte) (*big.Int, error)
StakeBalance is a free data retrieval call binding the contract method 0x274abf34.
Solidity: function stake_balance(address target, bytes32 vega_public_key) view returns(uint256)
func (*StakingCallerSession) StakingToken ¶
func (_Staking *StakingCallerSession) StakingToken() (common.Address, error)
StakingToken is a free data retrieval call binding the contract method 0x2dc7d74c.
Solidity: function staking_token() view returns(address)
func (*StakingCallerSession) TotalStaked ¶
func (_Staking *StakingCallerSession) TotalStaked() (*big.Int, error)
TotalStaked is a free data retrieval call binding the contract method 0xaf7568dd.
Solidity: function total_staked() view returns(uint256)
type StakingFilterer ¶
type StakingFilterer struct {
// contains filtered or unexported fields
}
StakingFilterer is an auto generated log filtering Go binding around an Ethereum contract events.
func NewStakingFilterer ¶
func NewStakingFilterer(address common.Address, filterer bind.ContractFilterer) (*StakingFilterer, error)
NewStakingFilterer creates a new log filterer instance of Staking, bound to a specific deployed contract.
func (*StakingFilterer) FilterStakeDeposited ¶
func (_Staking *StakingFilterer) FilterStakeDeposited(opts *bind.FilterOpts, user []common.Address, vega_public_key [][32]byte) (*StakingStakeDepositedIterator, error)
FilterStakeDeposited is a free log retrieval operation binding the contract event 0x9e3e33edf5dcded4adabc51b1266225d00fa41516bfcad69513fa4eca69519da.
Solidity: event Stake_Deposited(address indexed user, uint256 amount, bytes32 indexed vega_public_key)
func (*StakingFilterer) FilterStakeRemoved ¶
func (_Staking *StakingFilterer) FilterStakeRemoved(opts *bind.FilterOpts, user []common.Address, vega_public_key [][32]byte) (*StakingStakeRemovedIterator, error)
FilterStakeRemoved is a free log retrieval operation binding the contract event 0xa131d16963736e4c641f27a7f82f2e350b5971e555ae06ae906892bbba0a0939.
Solidity: event Stake_Removed(address indexed user, uint256 amount, bytes32 indexed vega_public_key)
func (*StakingFilterer) FilterStakeTransferred ¶
func (_Staking *StakingFilterer) FilterStakeTransferred(opts *bind.FilterOpts, from []common.Address, to []common.Address, vega_public_key [][32]byte) (*StakingStakeTransferredIterator, error)
FilterStakeTransferred is a free log retrieval operation binding the contract event 0x296aca09e6f616abedcd9cd45ac378207310452b7a713289374fd1b35e2c2fbe.
Solidity: event Stake_Transferred(address indexed from, uint256 amount, address indexed to, bytes32 indexed vega_public_key)
func (*StakingFilterer) ParseStakeDeposited ¶
func (_Staking *StakingFilterer) ParseStakeDeposited(log types.Log) (*StakingStakeDeposited, error)
ParseStakeDeposited is a log parse operation binding the contract event 0x9e3e33edf5dcded4adabc51b1266225d00fa41516bfcad69513fa4eca69519da.
Solidity: event Stake_Deposited(address indexed user, uint256 amount, bytes32 indexed vega_public_key)
func (*StakingFilterer) ParseStakeRemoved ¶
func (_Staking *StakingFilterer) ParseStakeRemoved(log types.Log) (*StakingStakeRemoved, error)
ParseStakeRemoved is a log parse operation binding the contract event 0xa131d16963736e4c641f27a7f82f2e350b5971e555ae06ae906892bbba0a0939.
Solidity: event Stake_Removed(address indexed user, uint256 amount, bytes32 indexed vega_public_key)
func (*StakingFilterer) ParseStakeTransferred ¶
func (_Staking *StakingFilterer) ParseStakeTransferred(log types.Log) (*StakingStakeTransferred, error)
ParseStakeTransferred is a log parse operation binding the contract event 0x296aca09e6f616abedcd9cd45ac378207310452b7a713289374fd1b35e2c2fbe.
Solidity: event Stake_Transferred(address indexed from, uint256 amount, address indexed to, bytes32 indexed vega_public_key)
func (*StakingFilterer) WatchStakeDeposited ¶
func (_Staking *StakingFilterer) WatchStakeDeposited(opts *bind.WatchOpts, sink chan<- *StakingStakeDeposited, user []common.Address, vega_public_key [][32]byte) (event.Subscription, error)
WatchStakeDeposited is a free log subscription operation binding the contract event 0x9e3e33edf5dcded4adabc51b1266225d00fa41516bfcad69513fa4eca69519da.
Solidity: event Stake_Deposited(address indexed user, uint256 amount, bytes32 indexed vega_public_key)
func (*StakingFilterer) WatchStakeRemoved ¶
func (_Staking *StakingFilterer) WatchStakeRemoved(opts *bind.WatchOpts, sink chan<- *StakingStakeRemoved, user []common.Address, vega_public_key [][32]byte) (event.Subscription, error)
WatchStakeRemoved is a free log subscription operation binding the contract event 0xa131d16963736e4c641f27a7f82f2e350b5971e555ae06ae906892bbba0a0939.
Solidity: event Stake_Removed(address indexed user, uint256 amount, bytes32 indexed vega_public_key)
func (*StakingFilterer) WatchStakeTransferred ¶
func (_Staking *StakingFilterer) WatchStakeTransferred(opts *bind.WatchOpts, sink chan<- *StakingStakeTransferred, from []common.Address, to []common.Address, vega_public_key [][32]byte) (event.Subscription, error)
WatchStakeTransferred is a free log subscription operation binding the contract event 0x296aca09e6f616abedcd9cd45ac378207310452b7a713289374fd1b35e2c2fbe.
Solidity: event Stake_Transferred(address indexed from, uint256 amount, address indexed to, bytes32 indexed vega_public_key)
type StakingRaw ¶
type StakingRaw struct {
Contract *Staking // Generic contract binding to access the raw methods on
}
StakingRaw is an auto generated low-level Go binding around an Ethereum contract.
func (*StakingRaw) Call ¶
func (_Staking *StakingRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error
Call invokes the (constant) contract method with params as input values and sets the output to result. The result type might be a single field for simple returns, a slice of interfaces for anonymous returns and a struct for named returns.
func (*StakingRaw) Transact ¶
func (_Staking *StakingRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error)
Transact invokes the (paid) contract method with params as input values.
func (*StakingRaw) Transfer ¶
func (_Staking *StakingRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error)
Transfer initiates a plain transaction to move funds to the contract, calling its default method if one is available.
type StakingSession ¶
type StakingSession struct { Contract *Staking // Generic contract binding to set the session for CallOpts bind.CallOpts // Call options to use throughout this session TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session }
StakingSession is an auto generated Go binding around an Ethereum contract, with pre-set call and transact options.
func (*StakingSession) StakeBalance ¶
func (_Staking *StakingSession) StakeBalance(target common.Address, vega_public_key [32]byte) (*big.Int, error)
StakeBalance is a free data retrieval call binding the contract method 0x274abf34.
Solidity: function stake_balance(address target, bytes32 vega_public_key) view returns(uint256)
func (*StakingSession) StakingToken ¶
func (_Staking *StakingSession) StakingToken() (common.Address, error)
StakingToken is a free data retrieval call binding the contract method 0x2dc7d74c.
Solidity: function staking_token() view returns(address)
func (*StakingSession) TotalStaked ¶
func (_Staking *StakingSession) TotalStaked() (*big.Int, error)
TotalStaked is a free data retrieval call binding the contract method 0xaf7568dd.
Solidity: function total_staked() view returns(uint256)
type StakingStakeDeposited ¶
type StakingStakeDeposited struct { User common.Address Amount *big.Int VegaPublicKey [32]byte Raw types.Log // Blockchain specific contextual infos }
StakingStakeDeposited represents a StakeDeposited event raised by the Staking contract.
type StakingStakeDepositedIterator ¶
type StakingStakeDepositedIterator struct { Event *StakingStakeDeposited // Event containing the contract specifics and raw log // contains filtered or unexported fields }
StakingStakeDepositedIterator is returned from FilterStakeDeposited and is used to iterate over the raw logs and unpacked data for StakeDeposited events raised by the Staking contract.
func (*StakingStakeDepositedIterator) Close ¶
func (it *StakingStakeDepositedIterator) Close() error
Close terminates the iteration process, releasing any pending underlying resources.
func (*StakingStakeDepositedIterator) Error ¶
func (it *StakingStakeDepositedIterator) Error() error
Error returns any retrieval or parsing error occurred during filtering.
func (*StakingStakeDepositedIterator) Next ¶
func (it *StakingStakeDepositedIterator) Next() bool
Next advances the iterator to the subsequent event, returning whether there are any more events found. In case of a retrieval or parsing error, false is returned and Error() can be queried for the exact failure.
type StakingStakeRemoved ¶
type StakingStakeRemoved struct { User common.Address Amount *big.Int VegaPublicKey [32]byte Raw types.Log // Blockchain specific contextual infos }
StakingStakeRemoved represents a StakeRemoved event raised by the Staking contract.
type StakingStakeRemovedIterator ¶
type StakingStakeRemovedIterator struct { Event *StakingStakeRemoved // Event containing the contract specifics and raw log // contains filtered or unexported fields }
StakingStakeRemovedIterator is returned from FilterStakeRemoved and is used to iterate over the raw logs and unpacked data for StakeRemoved events raised by the Staking contract.
func (*StakingStakeRemovedIterator) Close ¶
func (it *StakingStakeRemovedIterator) Close() error
Close terminates the iteration process, releasing any pending underlying resources.
func (*StakingStakeRemovedIterator) Error ¶
func (it *StakingStakeRemovedIterator) Error() error
Error returns any retrieval or parsing error occurred during filtering.
func (*StakingStakeRemovedIterator) Next ¶
func (it *StakingStakeRemovedIterator) Next() bool
Next advances the iterator to the subsequent event, returning whether there are any more events found. In case of a retrieval or parsing error, false is returned and Error() can be queried for the exact failure.
type StakingStakeTransferred ¶
type StakingStakeTransferred struct { From common.Address Amount *big.Int To common.Address VegaPublicKey [32]byte Raw types.Log // Blockchain specific contextual infos }
StakingStakeTransferred represents a StakeTransferred event raised by the Staking contract.
type StakingStakeTransferredIterator ¶
type StakingStakeTransferredIterator struct { Event *StakingStakeTransferred // Event containing the contract specifics and raw log // contains filtered or unexported fields }
StakingStakeTransferredIterator is returned from FilterStakeTransferred and is used to iterate over the raw logs and unpacked data for StakeTransferred events raised by the Staking contract.
func (*StakingStakeTransferredIterator) Close ¶
func (it *StakingStakeTransferredIterator) Close() error
Close terminates the iteration process, releasing any pending underlying resources.
func (*StakingStakeTransferredIterator) Error ¶
func (it *StakingStakeTransferredIterator) Error() error
Error returns any retrieval or parsing error occurred during filtering.
func (*StakingStakeTransferredIterator) Next ¶
func (it *StakingStakeTransferredIterator) Next() bool
Next advances the iterator to the subsequent event, returning whether there are any more events found. In case of a retrieval or parsing error, false is returned and Error() can be queried for the exact failure.
type StakingTransactor ¶
type StakingTransactor struct {
// contains filtered or unexported fields
}
StakingTransactor is an auto generated write-only Go binding around an Ethereum contract.
func NewStakingTransactor ¶
func NewStakingTransactor(address common.Address, transactor bind.ContractTransactor) (*StakingTransactor, error)
NewStakingTransactor creates a new write-only instance of Staking, bound to a specific deployed contract.
type StakingTransactorRaw ¶
type StakingTransactorRaw struct {
Contract *StakingTransactor // Generic write-only contract binding to access the raw methods on
}
StakingTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.
func (*StakingTransactorRaw) Transact ¶
func (_Staking *StakingTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error)
Transact invokes the (paid) contract method with params as input values.
func (*StakingTransactorRaw) Transfer ¶
func (_Staking *StakingTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error)
Transfer initiates a plain transaction to move funds to the contract, calling its default method if one is available.
type StakingTransactorSession ¶
type StakingTransactorSession struct { Contract *StakingTransactor // Generic contract transactor binding to set the session for TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session }
StakingTransactorSession is an auto generated write-only Go binding around an Ethereum contract, with pre-set transact options.