Documentation ¶
Index ¶
- Constants
- func Amount32Eth() *big.Int
- func Amount33Eth() *big.Int
- func LessThan1Eth() *big.Int
- func UnpackDepositLogData(data []byte) (pubkey []byte, withdrawalCredentials []byte, amount []byte, signature []byte, ...)
- type DepositContract
- type DepositContractCaller
- func (_DepositContract *DepositContractCaller) DepositCount(opts *bind.CallOpts) (*big.Int, error)
- func (_DepositContract *DepositContractCaller) DrainAddress(opts *bind.CallOpts) (common.Address, error)
- func (_DepositContract *DepositContractCaller) GetDepositCount(opts *bind.CallOpts) ([]byte, error)
- func (_DepositContract *DepositContractCaller) GetHashTreeRoot(opts *bind.CallOpts) ([32]byte, error)
- func (_DepositContract *DepositContractCaller) MINDEPOSITAMOUNT(opts *bind.CallOpts) (*big.Int, error)
- type DepositContractCallerRaw
- type DepositContractCallerSession
- func (_DepositContract *DepositContractCallerSession) DepositCount() (*big.Int, error)
- func (_DepositContract *DepositContractCallerSession) DrainAddress() (common.Address, error)
- func (_DepositContract *DepositContractCallerSession) GetDepositCount() ([]byte, error)
- func (_DepositContract *DepositContractCallerSession) GetHashTreeRoot() ([32]byte, error)
- func (_DepositContract *DepositContractCallerSession) MINDEPOSITAMOUNT() (*big.Int, error)
- type DepositContractDepositEvent
- type DepositContractDepositEventIterator
- type DepositContractFilterer
- type DepositContractRaw
- func (_DepositContract *DepositContractRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error
- func (_DepositContract *DepositContractRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error)
- func (_DepositContract *DepositContractRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error)
- type DepositContractSession
- func (_DepositContract *DepositContractSession) Deposit(pubkey []byte, withdrawal_credentials []byte, signature []byte) (*types.Transaction, error)
- func (_DepositContract *DepositContractSession) DepositCount() (*big.Int, error)
- func (_DepositContract *DepositContractSession) Drain() (*types.Transaction, error)
- func (_DepositContract *DepositContractSession) DrainAddress() (common.Address, error)
- func (_DepositContract *DepositContractSession) GetDepositCount() ([]byte, error)
- func (_DepositContract *DepositContractSession) GetHashTreeRoot() ([32]byte, error)
- func (_DepositContract *DepositContractSession) MINDEPOSITAMOUNT() (*big.Int, error)
- type DepositContractTransactor
- type DepositContractTransactorRaw
- type DepositContractTransactorSession
- type TestAccount
Constants ¶
const DepositContractABI = "" /* 1825-byte string literal not displayed */
DepositContractABI is the input ABI used to generate the binding from.
const DepositContractBin = `` /* 10752-byte string literal not displayed */
DepositContractBin is the compiled bytecode used for deploying new contracts.
Variables ¶
This section is empty.
Functions ¶
func Amount32Eth ¶
Amount32Eth returns 32Eth(in wei) in terms of the big.Int type.
func Amount33Eth ¶
Amount33Eth returns 33Eth(in wei) in terms of the big.Int type.
func LessThan1Eth ¶
LessThan1Eth returns less than 1 Eth(in wei) in terms of the big.Int type.
Types ¶
type DepositContract ¶
type DepositContract struct { DepositContractCaller // Read-only binding to the contract DepositContractTransactor // Write-only binding to the contract DepositContractFilterer // Log filterer for contract events }
DepositContract is an auto generated Go binding around an Ethereum contract.
func DeployDepositContract ¶
func DeployDepositContract(auth *bind.TransactOpts, backend bind.ContractBackend, minDeposit *big.Int, _drain_address common.Address) (common.Address, *types.Transaction, *DepositContract, error)
DeployDepositContract deploys a new Ethereum contract, binding an instance of DepositContract to it.
func NewDepositContract ¶
func NewDepositContract(address common.Address, backend bind.ContractBackend) (*DepositContract, error)
NewDepositContract creates a new instance of DepositContract, bound to a specific deployed contract.
type DepositContractCaller ¶
type DepositContractCaller struct {
// contains filtered or unexported fields
}
DepositContractCaller is an auto generated read-only Go binding around an Ethereum contract.
func NewDepositContractCaller ¶
func NewDepositContractCaller(address common.Address, caller bind.ContractCaller) (*DepositContractCaller, error)
NewDepositContractCaller creates a new read-only instance of DepositContract, bound to a specific deployed contract.
func (*DepositContractCaller) DepositCount ¶
DepositCount is a free data retrieval call binding the contract method 0xeb8545ee.
Solidity: function deposit_count() constant returns(uint256 out)
func (*DepositContractCaller) DrainAddress ¶
func (_DepositContract *DepositContractCaller) DrainAddress(opts *bind.CallOpts) (common.Address, error)
DrainAddress is a free data retrieval call binding the contract method 0x8ba35cdf.
Solidity: function drain_address() constant returns(address out)
func (*DepositContractCaller) GetDepositCount ¶
func (_DepositContract *DepositContractCaller) GetDepositCount(opts *bind.CallOpts) ([]byte, error)
GetDepositCount is a free data retrieval call binding the contract method 0x621fd130.
Solidity: function get_deposit_count() constant returns(bytes out)
func (*DepositContractCaller) GetHashTreeRoot ¶
func (_DepositContract *DepositContractCaller) GetHashTreeRoot(opts *bind.CallOpts) ([32]byte, error)
GetHashTreeRoot is a free data retrieval call binding the contract method 0x863a311b.
Solidity: function get_hash_tree_root() constant returns(bytes32 out)
func (*DepositContractCaller) MINDEPOSITAMOUNT ¶
func (_DepositContract *DepositContractCaller) MINDEPOSITAMOUNT(opts *bind.CallOpts) (*big.Int, error)
MINDEPOSITAMOUNT is a free data retrieval call binding the contract method 0x1ea30fef.
Solidity: function MIN_DEPOSIT_AMOUNT() constant returns(uint256 out)
type DepositContractCallerRaw ¶
type DepositContractCallerRaw struct {
Contract *DepositContractCaller // Generic read-only contract binding to access the raw methods on
}
DepositContractCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.
func (*DepositContractCallerRaw) Call ¶
func (_DepositContract *DepositContractCallerRaw) 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 DepositContractCallerSession ¶
type DepositContractCallerSession struct { Contract *DepositContractCaller // Generic contract caller binding to set the session for CallOpts bind.CallOpts // Call options to use throughout this session }
DepositContractCallerSession is an auto generated read-only Go binding around an Ethereum contract, with pre-set call options.
func (*DepositContractCallerSession) DepositCount ¶
func (_DepositContract *DepositContractCallerSession) DepositCount() (*big.Int, error)
DepositCount is a free data retrieval call binding the contract method 0xeb8545ee.
Solidity: function deposit_count() constant returns(uint256 out)
func (*DepositContractCallerSession) DrainAddress ¶
func (_DepositContract *DepositContractCallerSession) DrainAddress() (common.Address, error)
DrainAddress is a free data retrieval call binding the contract method 0x8ba35cdf.
Solidity: function drain_address() constant returns(address out)
func (*DepositContractCallerSession) GetDepositCount ¶
func (_DepositContract *DepositContractCallerSession) GetDepositCount() ([]byte, error)
GetDepositCount is a free data retrieval call binding the contract method 0x621fd130.
Solidity: function get_deposit_count() constant returns(bytes out)
func (*DepositContractCallerSession) GetHashTreeRoot ¶
func (_DepositContract *DepositContractCallerSession) GetHashTreeRoot() ([32]byte, error)
GetHashTreeRoot is a free data retrieval call binding the contract method 0x863a311b.
Solidity: function get_hash_tree_root() constant returns(bytes32 out)
func (*DepositContractCallerSession) MINDEPOSITAMOUNT ¶
func (_DepositContract *DepositContractCallerSession) MINDEPOSITAMOUNT() (*big.Int, error)
MINDEPOSITAMOUNT is a free data retrieval call binding the contract method 0x1ea30fef.
Solidity: function MIN_DEPOSIT_AMOUNT() constant returns(uint256 out)
type DepositContractDepositEvent ¶
type DepositContractDepositEvent struct { Pubkey []byte WithdrawalCredentials []byte Amount []byte Signature []byte Index []byte Raw types.Log // Blockchain specific contextual infos }
DepositContractDepositEvent represents a DepositEvent event raised by the DepositContract contract.
type DepositContractDepositEventIterator ¶
type DepositContractDepositEventIterator struct { Event *DepositContractDepositEvent // Event containing the contract specifics and raw log // contains filtered or unexported fields }
DepositContractDepositEventIterator is returned from FilterDepositEvent and is used to iterate over the raw logs and unpacked data for DepositEvent events raised by the DepositContract contract.
func (*DepositContractDepositEventIterator) Close ¶
func (it *DepositContractDepositEventIterator) Close() error
Close terminates the iteration process, releasing any pending underlying resources.
func (*DepositContractDepositEventIterator) Error ¶
func (it *DepositContractDepositEventIterator) Error() error
Error returns any retrieval or parsing error occurred during filtering.
func (*DepositContractDepositEventIterator) Next ¶
func (it *DepositContractDepositEventIterator) 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 DepositContractFilterer ¶
type DepositContractFilterer struct {
// contains filtered or unexported fields
}
DepositContractFilterer is an auto generated log filtering Go binding around an Ethereum contract events.
func NewDepositContractFilterer ¶
func NewDepositContractFilterer(address common.Address, filterer bind.ContractFilterer) (*DepositContractFilterer, error)
NewDepositContractFilterer creates a new log filterer instance of DepositContract, bound to a specific deployed contract.
func (*DepositContractFilterer) FilterDepositEvent ¶
func (_DepositContract *DepositContractFilterer) FilterDepositEvent(opts *bind.FilterOpts) (*DepositContractDepositEventIterator, error)
FilterDepositEvent is a free log retrieval operation binding the contract event 0x649bbc62d0e31342afea4e5cd82d4049e7e1ee912fc0889aa790803be39038c5.
Solidity: event DepositEvent(bytes pubkey, bytes withdrawal_credentials, bytes amount, bytes signature, bytes index)
func (*DepositContractFilterer) WatchDepositEvent ¶
func (_DepositContract *DepositContractFilterer) WatchDepositEvent(opts *bind.WatchOpts, sink chan<- *DepositContractDepositEvent) (event.Subscription, error)
WatchDepositEvent is a free log subscription operation binding the contract event 0x649bbc62d0e31342afea4e5cd82d4049e7e1ee912fc0889aa790803be39038c5.
Solidity: event DepositEvent(bytes pubkey, bytes withdrawal_credentials, bytes amount, bytes signature, bytes index)
type DepositContractRaw ¶
type DepositContractRaw struct {
Contract *DepositContract // Generic contract binding to access the raw methods on
}
DepositContractRaw is an auto generated low-level Go binding around an Ethereum contract.
func (*DepositContractRaw) Call ¶
func (_DepositContract *DepositContractRaw) 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 (*DepositContractRaw) Transact ¶
func (_DepositContract *DepositContractRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error)
Transact invokes the (paid) contract method with params as input values.
func (*DepositContractRaw) Transfer ¶
func (_DepositContract *DepositContractRaw) 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 DepositContractSession ¶
type DepositContractSession struct { Contract *DepositContract // 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 }
DepositContractSession is an auto generated Go binding around an Ethereum contract, with pre-set call and transact options.
func (*DepositContractSession) Deposit ¶
func (_DepositContract *DepositContractSession) Deposit(pubkey []byte, withdrawal_credentials []byte, signature []byte) (*types.Transaction, error)
Deposit is a paid mutator transaction binding the contract method 0xc47e300d.
Solidity: function deposit(bytes pubkey, bytes withdrawal_credentials, bytes signature) returns()
func (*DepositContractSession) DepositCount ¶
func (_DepositContract *DepositContractSession) DepositCount() (*big.Int, error)
DepositCount is a free data retrieval call binding the contract method 0xeb8545ee.
Solidity: function deposit_count() constant returns(uint256 out)
func (*DepositContractSession) Drain ¶
func (_DepositContract *DepositContractSession) Drain() (*types.Transaction, error)
Drain is a paid mutator transaction binding the contract method 0x9890220b.
Solidity: function drain() returns()
func (*DepositContractSession) DrainAddress ¶
func (_DepositContract *DepositContractSession) DrainAddress() (common.Address, error)
DrainAddress is a free data retrieval call binding the contract method 0x8ba35cdf.
Solidity: function drain_address() constant returns(address out)
func (*DepositContractSession) GetDepositCount ¶
func (_DepositContract *DepositContractSession) GetDepositCount() ([]byte, error)
GetDepositCount is a free data retrieval call binding the contract method 0x621fd130.
Solidity: function get_deposit_count() constant returns(bytes out)
func (*DepositContractSession) GetHashTreeRoot ¶
func (_DepositContract *DepositContractSession) GetHashTreeRoot() ([32]byte, error)
GetHashTreeRoot is a free data retrieval call binding the contract method 0x863a311b.
Solidity: function get_hash_tree_root() constant returns(bytes32 out)
func (*DepositContractSession) MINDEPOSITAMOUNT ¶
func (_DepositContract *DepositContractSession) MINDEPOSITAMOUNT() (*big.Int, error)
MINDEPOSITAMOUNT is a free data retrieval call binding the contract method 0x1ea30fef.
Solidity: function MIN_DEPOSIT_AMOUNT() constant returns(uint256 out)
type DepositContractTransactor ¶
type DepositContractTransactor struct {
// contains filtered or unexported fields
}
DepositContractTransactor is an auto generated write-only Go binding around an Ethereum contract.
func NewDepositContractTransactor ¶
func NewDepositContractTransactor(address common.Address, transactor bind.ContractTransactor) (*DepositContractTransactor, error)
NewDepositContractTransactor creates a new write-only instance of DepositContract, bound to a specific deployed contract.
func (*DepositContractTransactor) Deposit ¶
func (_DepositContract *DepositContractTransactor) Deposit(opts *bind.TransactOpts, pubkey []byte, withdrawal_credentials []byte, signature []byte) (*types.Transaction, error)
Deposit is a paid mutator transaction binding the contract method 0xc47e300d.
Solidity: function deposit(bytes pubkey, bytes withdrawal_credentials, bytes signature) returns()
func (*DepositContractTransactor) Drain ¶
func (_DepositContract *DepositContractTransactor) Drain(opts *bind.TransactOpts) (*types.Transaction, error)
Drain is a paid mutator transaction binding the contract method 0x9890220b.
Solidity: function drain() returns()
type DepositContractTransactorRaw ¶
type DepositContractTransactorRaw struct {
Contract *DepositContractTransactor // Generic write-only contract binding to access the raw methods on
}
DepositContractTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.
func (*DepositContractTransactorRaw) Transact ¶
func (_DepositContract *DepositContractTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error)
Transact invokes the (paid) contract method with params as input values.
func (*DepositContractTransactorRaw) Transfer ¶
func (_DepositContract *DepositContractTransactorRaw) 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 DepositContractTransactorSession ¶
type DepositContractTransactorSession struct { Contract *DepositContractTransactor // Generic contract transactor binding to set the session for TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session }
DepositContractTransactorSession is an auto generated write-only Go binding around an Ethereum contract, with pre-set transact options.
func (*DepositContractTransactorSession) Deposit ¶
func (_DepositContract *DepositContractTransactorSession) Deposit(pubkey []byte, withdrawal_credentials []byte, signature []byte) (*types.Transaction, error)
Deposit is a paid mutator transaction binding the contract method 0xc47e300d.
Solidity: function deposit(bytes pubkey, bytes withdrawal_credentials, bytes signature) returns()
func (*DepositContractTransactorSession) Drain ¶
func (_DepositContract *DepositContractTransactorSession) Drain() (*types.Transaction, error)
Drain is a paid mutator transaction binding the contract method 0x9890220b.
Solidity: function drain() returns()
type TestAccount ¶
type TestAccount struct { Addr common.Address Contract *DepositContract ContractAddr common.Address Backend *backends.SimulatedBackend TxOpts *bind.TransactOpts }
TestAccount represents a test account in the simulated backend, through which we can perform actions on the eth1.0 chain.
func Setup ¶
func Setup() (*TestAccount, error)
Setup creates the simulated backedn with the deposit contract deployed