contracts

package
v2.0.0-prerelease3 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2024 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ArbitrumMessenger

type ArbitrumMessenger struct {
	// contains filtered or unexported fields
}

Binding for the Arbitrum Messenger

func NewArbitrumMessenger

func NewArbitrumMessenger(address common.Address, client eth.IExecutionClient, txMgr *eth.TransactionManager) (*ArbitrumMessenger, error)

Creates a new Arbitrum Messenger contract binding

func (*ArbitrumMessenger) IsRateStale

func (c *ArbitrumMessenger) IsRateStale(mc *batch.MultiCaller, out *bool)

Check if the RPL rate is stale and needs to be updated

func (*ArbitrumMessenger) SubmitRate

func (c *ArbitrumMessenger) SubmitRate(maxSubmissionCost *big.Int, gasLimit *big.Int, gasPriceBid *big.Int, opts *bind.TransactOpts) (*eth.TransactionInfo, error)

Send the latest RPL rate to the L2

type OptimismMessenger

type OptimismMessenger struct {
	// contains filtered or unexported fields
}

Binding for the Optimism Messenger

func NewOptimismMessenger

func NewOptimismMessenger(address common.Address, client eth.IExecutionClient, txMgr *eth.TransactionManager) (*OptimismMessenger, error)

Creates a new Optimism Messenger contract binding

func (*OptimismMessenger) IsRateStale

func (c *OptimismMessenger) IsRateStale(mc *batch.MultiCaller, out *bool)

Check if the RPL rate is stale and needs to be updated

func (*OptimismMessenger) SubmitRate

func (c *OptimismMessenger) SubmitRate(opts *bind.TransactOpts) (*eth.TransactionInfo, error)

Send the latest RPL rate to the L2

type PolygonMessenger

type PolygonMessenger struct {
	// contains filtered or unexported fields
}

Binding for the Polygon Messenger

func NewPolygonMessenger

func NewPolygonMessenger(address common.Address, client eth.IExecutionClient, txMgr *eth.TransactionManager) (*PolygonMessenger, error)

Creates a new Polygon Messenger contract binding

func (*PolygonMessenger) IsRateStale

func (c *PolygonMessenger) IsRateStale(mc *batch.MultiCaller, out *bool)

Check if the RPL rate is stale and needs to be updated

func (*PolygonMessenger) SubmitRate

func (c *PolygonMessenger) SubmitRate(opts *bind.TransactOpts) (*eth.TransactionInfo, error)

Send the latest RPL rate to the L2

type PoolObserveResponse

type PoolObserveResponse struct {
	TickCumulatives                    []*big.Int `abi:"tickCumulatives"`
	SecondsPerLiquidityCumulativeX128s []*big.Int `abi:"secondsPerLiquidityCumulativeX128s"`
}

Response from the Observe function

type RplFaucet

type RplFaucet struct {
	// The max amount of RPL that can be withdrawn (in total) per withdrawal period
	MaxWithdrawalPerPeriod *core.SimpleField[*big.Int]

	// The withdrawal fee, in ETH, for pulling RPL out of the faucet
	WithdrawalFee *core.SimpleField[*big.Int]

	// The owner of the faucet that can perform administrative duties
	Owner *core.SimpleField[common.Address]

	// The length of a withdrawal period before it resets, in blocks
	WithdrawalPeriod *core.FormattedUint256Field[uint64]

	// The remaining RPL balance of the faucet
	Balance *core.SimpleField[*big.Int]

	// The amount of RPL that can be withdrawn per address in each withdrawal period
	Allowance *core.SimpleField[*big.Int]

	// The block number the current withdrawal period started
	WithdrawalPeriodStart *core.FormattedUint256Field[uint64]
	// contains filtered or unexported fields
}

Binding for RPL Faucet

func NewRplFaucet

func NewRplFaucet(address common.Address, client eth.IExecutionClient, txMgr *eth.TransactionManager) (*RplFaucet, error)

Creates a new RPL Faucet contract binding

func (*RplFaucet) GetAllowanceFor

func (c *RplFaucet) GetAllowanceFor(mc *batch.MultiCaller, allowance **big.Int, address common.Address)

Get the amount of RPL that can be withdrawn by the given address in the current withdrawal period

func (*RplFaucet) SetMaxWithdrawalPerPeriod

func (c *RplFaucet) SetMaxWithdrawalPerPeriod(max *big.Int, opts *bind.TransactOpts) (*eth.TransactionInfo, error)

Set the max total withdrawal amount per period

func (*RplFaucet) SetWithdrawalFee

func (c *RplFaucet) SetWithdrawalFee(fee *big.Int, opts *bind.TransactOpts) (*eth.TransactionInfo, error)

Set the withdrawal fee

func (*RplFaucet) SetWithdrawalPeriod

func (c *RplFaucet) SetWithdrawalPeriod(period *big.Int, opts *bind.TransactOpts) (*eth.TransactionInfo, error)

Set the withdrawal period, in blocks

func (*RplFaucet) Withdraw

func (c *RplFaucet) Withdraw(amount *big.Int, opts *bind.TransactOpts) (*eth.TransactionInfo, error)

Get info for withdrawing RPL from the faucet

func (*RplFaucet) WithdrawTo

func (c *RplFaucet) WithdrawTo(to common.Address, amount *big.Int, opts *bind.TransactOpts) (*eth.TransactionInfo, error)

Get info for withdrawing RPL from the faucet to a specific address

type RplTwapPool

type RplTwapPool struct {
	// contains filtered or unexported fields
}

Binding for the zkSync Era Messenger

func NewRplTwapPool

func NewRplTwapPool(address common.Address, client eth.IExecutionClient) (*RplTwapPool, error)

Creates a new RPL TWAP Pool contract binding

func (*RplTwapPool) Observe

func (c *RplTwapPool) Observe(mc *batch.MultiCaller, out *PoolObserveResponse, secondsAgos []uint32)

Get the TWAP RPL price from the pool

type ScrollFeeEstimator

type ScrollFeeEstimator struct {
	// contains filtered or unexported fields
}

Binding for the Scroll Fee Estimator

func NewScrollFeeEstimator

func NewScrollFeeEstimator(address common.Address, client eth.IExecutionClient) (*ScrollFeeEstimator, error)

Creates a new Scroll Fee Estimator contract binding

func (*ScrollFeeEstimator) EstimateCrossDomainMessageFee

func (c *ScrollFeeEstimator) EstimateCrossDomainMessageFee(mc *batch.MultiCaller, out **big.Int, l2GasLimit *big.Int)

Estimate the fee for sending a message to the Scroll L2

type ScrollMessenger

type ScrollMessenger struct {
	// contains filtered or unexported fields
}

Binding for the Scroll Messenger

func NewScrollMessenger

func NewScrollMessenger(address common.Address, client eth.IExecutionClient, txMgr *eth.TransactionManager) (*ScrollMessenger, error)

Creates a new Scroll Messenger contract binding

func (*ScrollMessenger) IsRateStale

func (c *ScrollMessenger) IsRateStale(mc *batch.MultiCaller, out *bool)

Check if the RPL rate is stale and needs to be updated

func (*ScrollMessenger) SubmitRate

func (c *ScrollMessenger) SubmitRate(l2GasLimit *big.Int, opts *bind.TransactOpts) (*eth.TransactionInfo, error)

Send the latest RPL rate to the L2

type SnapshotDelegation

type SnapshotDelegation struct {
	// contains filtered or unexported fields
}

Binding for Snapshot Delegation

func NewSnapshotDelegation

func NewSnapshotDelegation(address common.Address, client eth.IExecutionClient, txMgr *eth.TransactionManager) (*SnapshotDelegation, error)

Creates a new Snapshot Delegation contract binding

func (*SnapshotDelegation) ClearDelegate

func (c *SnapshotDelegation) ClearDelegate(id common.Hash, opts *bind.TransactOpts) (*eth.TransactionInfo, error)

Get info for clearing the snapshot delegate

func (*SnapshotDelegation) Delegation

func (c *SnapshotDelegation) Delegation(mc *batch.MultiCaller, out *common.Address, address common.Address, id common.Hash)

Get the delegate for the provided address

func (*SnapshotDelegation) SetDelegate

func (c *SnapshotDelegation) SetDelegate(id common.Hash, delegate common.Address, opts *bind.TransactOpts) (*eth.TransactionInfo, error)

Get info for setting the snapshot delegate

type ZkSyncEraMessenger

type ZkSyncEraMessenger struct {
	// contains filtered or unexported fields
}

Binding for the zkSync Era Messenger

func NewZkSyncEraMessenger

func NewZkSyncEraMessenger(address common.Address, client eth.IExecutionClient, txMgr *eth.TransactionManager) (*ZkSyncEraMessenger, error)

Creates a new zkSync Era Messenger contract binding

func (*ZkSyncEraMessenger) IsRateStale

func (c *ZkSyncEraMessenger) IsRateStale(mc *batch.MultiCaller, out *bool)

Check if the RPL rate is stale and needs to be updated

func (*ZkSyncEraMessenger) SubmitRate

func (c *ZkSyncEraMessenger) SubmitRate(l2GasLimit *big.Int, l2GasPerPubdataByteLimit *big.Int, opts *bind.TransactOpts) (*eth.TransactionInfo, error)

Send the latest RPL rate to the L2

Jump to

Keyboard shortcuts

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