Documentation ¶
Index ¶
- Variables
- type Client
- func (c *Client) CollateralBridgeAddress() ethcommon.Address
- func (c *Client) CollateralBridgeAddressHex() string
- func (c *Client) ConfirmationsRequired() uint64
- func (c *Client) CurrentHeight(ctx context.Context) (uint64, error)
- func (c *Client) UpdateEthereumConfig(ethConfig *types.EthereumConfig) error
- func (c *Client) VerifyContract(ctx context.Context, address ethcommon.Address, expectedHash string) error
- type Config
- type ETHClient
- type EthereumClientConfirmations
- type EthereumConfirmations
- type StdTime
- type Time
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrUnexpectedContractHash = errors.New("hash of contract bytecode not as expected") ErrUnexpectedSolidityFormat = errors.New("unexpected format of solidity bytecode") )
View Source
var ContractHashes = map[string]string{
"staking": "d66948e12817f8ae6ca94d56b43ca12e66416e7e9bc23bb09056957b25afc6bd",
"vesting": "5278802577f4aca315b9524bfa78790f8f0fae08939ec58bc9e8f0ea40123b09",
"collateral": "1cd7f315188baf26f70c77a764df361c5d01bd365b109b96033b8755ee2b2750",
"multisig": "5b7070e6159628455b38f5796e8d0dc08185aaaa1fb6073767c88552d396c6c2",
}
ContractHashes the sha3-256(contract-bytecode stripped of metadata).
View Source
var ErrMissingConfirmations = errors.New("not enough confirmations")
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { ETHClient // contains filtered or unexported fields }
func (*Client) CollateralBridgeAddress ¶
func (*Client) CollateralBridgeAddressHex ¶
func (*Client) ConfirmationsRequired ¶
func (*Client) UpdateEthereumConfig ¶
func (c *Client) UpdateEthereumConfig(ethConfig *types.EthereumConfig) error
type Config ¶
type Config struct { Level encoding.LogLevel `long:"log-level"` RPCEndpoint string RetryDelay encoding.Duration }
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 ETHClient ¶
type ETHClient interface { bind.ContractBackend ethereum.ChainReader ChainID(context.Context) (*big.Int, error) NetworkID(context.Context) (*big.Int, error) }
ETHClient ...
type EthereumConfirmations ¶
type EthereumConfirmations struct {
// contains filtered or unexported fields
}
func NewEthereumConfirmations ¶
func NewEthereumConfirmations( cfg Config, ethClient EthereumClientConfirmations, time Time, ) *EthereumConfirmations
func (*EthereumConfirmations) Check ¶
func (e *EthereumConfirmations) Check(block uint64) error
func (*EthereumConfirmations) CheckRequiredConfirmations ¶ added in v0.73.0
func (e *EthereumConfirmations) CheckRequiredConfirmations(block uint64, required uint64) error
func (*EthereumConfirmations) UpdateConfirmations ¶
func (e *EthereumConfirmations) UpdateConfirmations(confirmations uint64)
Click to show internal directories.
Click to hide internal directories.