swcontracts

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: May 22, 2025 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ToUint256 added in v1.0.0

func ToUint256(address common.Address) *big.Int

Types

type BeaconDepositContract added in v1.2.0

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

func NewBeaconDepositContract added in v1.2.0

func NewBeaconDepositContract(address common.Address, ec eth.IExecutionClient, txMgr *eth.TransactionManager) (*BeaconDepositContract, error)

Create a new contract instance

func (*BeaconDepositContract) Deposit added in v1.2.0

func (c *BeaconDepositContract) Deposit(pubkey beacon.ValidatorPubkey, withdrawalCredentials common.Hash, signature beacon.ValidatorSignature, depositDataRoot common.Hash, opts *bind.TransactOpts) (*eth.TransactionInfo, error)

Creates a deposit to the Beacon deposit contract. Note that the amount deposited must be set in opts.Value, and must match the deposit amount provided in the deposit data.

func (*BeaconDepositContract) DepositEvent added in v1.2.0

func (c *BeaconDepositContract) DepositEvent(startBlock *big.Int, endBlock *big.Int, intervalSize *big.Int) ([]DepositEvent, error)

Get the deposit events for the provided block range.

func (*BeaconDepositContract) DepositEventsForPubkeys added in v1.2.0

func (c *BeaconDepositContract) DepositEventsForPubkeys(pubkeys []beacon.ValidatorPubkey, startBlock *big.Int, endBlock *big.Int, intervalSize *big.Int) (map[beacon.ValidatorPubkey][]DepositEvent, error)

Get the deposit events for the provided block range. If pubkeys is provided, only deposits for those pubkeys will be returned.

func (*BeaconDepositContract) GetDepositCount added in v1.2.0

func (c *BeaconDepositContract) GetDepositCount(mc *batch.MultiCaller) func() uint64

func (*BeaconDepositContract) GetDepositRoot added in v1.2.0

func (c *BeaconDepositContract) GetDepositRoot(mc *batch.MultiCaller, out *common.Hash)

type ConfigUpdatedEvent added in v1.2.0

type ConfigUpdatedEvent struct {
	ConfigIPFSHash string `abi:"configIpfsHash" json:"configIpfsHash"`
}

type DepositEvent added in v1.2.0

type DepositEvent struct {
	Pubkey                beacon.ValidatorPubkey    `json:"pubkey"`
	WithdrawalCredentials common.Hash               `json:"withdrawalCredentials"`
	Amount                uint64                    `json:"amount"`
	Signature             beacon.ValidatorSignature `json:"signature"`
	TxHash                common.Hash               `json:"txHash"`
	BlockNumber           uint64                    `json:"blockNumber"`
	TxIndex               uint                      `json:"txIndex"`
}

Deposit event

type IEthVault added in v1.2.0

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

Binding for Stakewise vaults

func NewIEthVault added in v1.2.0

func NewIEthVault(address common.Address, ec eth.IExecutionClient, txMgr *eth.TransactionManager) (*IEthVault, error)

Create a new IEthVault binding

func (*IEthVault) WithdrawableAssets added in v1.2.0

func (c *IEthVault) WithdrawableAssets(mc *batch.MultiCaller, out **big.Int)

Total assets available in the Vault. They can be staked or withdrawn.

type IKeeper added in v1.2.0

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

Binding for StakeWise's keeper contract

func NewIKeeper added in v1.2.0

func NewIKeeper(address common.Address, ec eth.IExecutionClient, txMgr *eth.TransactionManager) (*IKeeper, error)

Create a new IKeeper binding

func (*IKeeper) ConfigUpdated added in v1.2.0

func (c *IKeeper) ConfigUpdated(startBlock *big.Int, endBlock *big.Int, intervalSize *big.Int) ([]ConfigUpdatedEvent, error)

Get the ConfigUpdated events for the provided block range

type SplitWarehouse added in v1.0.0

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

func NewSplitWarehouse added in v1.0.0

func NewSplitWarehouse(address common.Address, ec eth.IExecutionClient, txMgr *eth.TransactionManager) (*SplitWarehouse, error)

Create a new SplitWarehouse instance

func (*SplitWarehouse) BalanceOf added in v1.0.0

func (c *SplitWarehouse) BalanceOf(mc *batch.MultiCaller, out **big.Int, account common.Address, token common.Address)

func (*SplitWarehouse) NativeToken added in v1.0.0

func (c *SplitWarehouse) NativeToken(mc *batch.MultiCaller, out *common.Address)

func (*SplitWarehouse) Withdraw added in v1.0.0

func (c *SplitWarehouse) Withdraw(address common.Address, claimTokenList []common.Address, amountWithdraw []*big.Int, opts *bind.TransactOpts) (*eth.TransactionInfo, error)

type StakewiseVault

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

Binding for Stakewise vaults

func NewStakewiseVault

func NewStakewiseVault(address common.Address, ec eth.IExecutionClient, txMgr *eth.TransactionManager) (*StakewiseVault, error)

Create a new Stakewise vault instance

func (*StakewiseVault) GetValidatorsRoot

func (c *StakewiseVault) GetValidatorsRoot(mc *batch.MultiCaller, out *common.Hash)

Get the current validators root in the contracts

func (*StakewiseVault) SetDepositDataRoot

func (c *StakewiseVault) SetDepositDataRoot(dataRoot common.Hash, opts *bind.TransactOpts) (*eth.TransactionInfo, error)

Set the validator deposit data root for the vault

Jump to

Keyboard shortcuts

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