Documentation ¶
Index ¶
- Variables
- type DelayedWETHContract
- func (d *DelayedWETHContract) Addr() common.Address
- func (d *DelayedWETHContract) GetBalanceAndDelay(ctx context.Context, block rpcblock.Block) (*big.Int, time.Duration, error)
- func (d *DelayedWETHContract) GetWithdrawals(ctx context.Context, block rpcblock.Block, gameAddr common.Address, ...) ([]*WithdrawalRequest, error)
- type DisputeGameFactoryContract
- func (f *DisputeGameFactoryContract) CreateTx(ctx context.Context, traceType uint32, outputRoot common.Hash, ...) (txmgr.TxCandidate, error)
- func (f *DisputeGameFactoryContract) DecodeDisputeGameCreatedLog(rcpt *ethTypes.Receipt) (common.Address, uint32, common.Hash, error)
- func (f *DisputeGameFactoryContract) GetAllGames(ctx context.Context, blockHash common.Hash) ([]types.GameMetadata, error)
- func (f *DisputeGameFactoryContract) GetGame(ctx context.Context, idx uint64, blockHash common.Hash) (types.GameMetadata, error)
- func (f *DisputeGameFactoryContract) GetGameCount(ctx context.Context, blockHash common.Hash) (uint64, error)
- func (f *DisputeGameFactoryContract) GetGameFromParameters(ctx context.Context, traceType uint32, outputRoot common.Hash, ...) (common.Address, error)
- func (f *DisputeGameFactoryContract) GetGameImpl(ctx context.Context, gameType faultTypes.GameType) (common.Address, error)
- func (f *DisputeGameFactoryContract) GetGamesAtOrAfter(ctx context.Context, blockHash common.Hash, earliestTimestamp uint64) ([]types.GameMetadata, error)
- type FaultDisputeGameContract
- type FaultDisputeGameContract0180
- func (f *FaultDisputeGameContract0180) AttackTx(ctx context.Context, parent types.Claim, pivot common.Hash) (txmgr.TxCandidate, error)
- func (f *FaultDisputeGameContract0180) ChallengeL2BlockNumberTx(_ *types.InvalidL2BlockNumberChallenge) (txmgr.TxCandidate, error)
- func (f *FaultDisputeGameContract0180) DefendTx(ctx context.Context, parent types.Claim, pivot common.Hash) (txmgr.TxCandidate, error)
- func (f *FaultDisputeGameContract0180) GetGameMetadata(ctx context.Context, block rpcblock.Block) (GameMetadata, error)
- func (f *FaultDisputeGameContract0180) IsL2BlockNumberChallenged(_ context.Context, _ rpcblock.Block) (bool, error)
- type FaultDisputeGameContract080
- func (f *FaultDisputeGameContract080) AttackTx(ctx context.Context, parent types.Claim, pivot common.Hash) (txmgr.TxCandidate, error)
- func (f *FaultDisputeGameContract080) CallResolveClaim(ctx context.Context, claimIdx uint64) error
- func (f *FaultDisputeGameContract080) ChallengeL2BlockNumberTx(_ *types.InvalidL2BlockNumberChallenge) (txmgr.TxCandidate, error)
- func (f *FaultDisputeGameContract080) DefendTx(ctx context.Context, parent types.Claim, pivot common.Hash) (txmgr.TxCandidate, error)
- func (f *FaultDisputeGameContract080) GetAllClaims(ctx context.Context, block rpcblock.Block) ([]types.Claim, error)
- func (f *FaultDisputeGameContract080) GetClaim(ctx context.Context, idx uint64) (types.Claim, error)
- func (f *FaultDisputeGameContract080) GetGameMetadata(ctx context.Context, block rpcblock.Block) (GameMetadata, error)
- func (f *FaultDisputeGameContract080) GetMaxClockDuration(ctx context.Context) (time.Duration, error)
- func (f *FaultDisputeGameContract080) IsL2BlockNumberChallenged(_ context.Context, _ rpcblock.Block) (bool, error)
- func (f *FaultDisputeGameContract080) IsResolved(ctx context.Context, block rpcblock.Block, claims ...types.Claim) ([]bool, error)
- func (f *FaultDisputeGameContract080) ResolveClaimTx(claimIdx uint64) (txmgr.TxCandidate, error)
- type FaultDisputeGameContract111
- type FaultDisputeGameContractLatest
- func (f *FaultDisputeGameContractLatest) AttackTx(ctx context.Context, parent types.Claim, pivot common.Hash) (txmgr.TxCandidate, error)
- func (f *FaultDisputeGameContractLatest) CallResolve(ctx context.Context) (gameTypes.GameStatus, error)
- func (f *FaultDisputeGameContractLatest) CallResolveClaim(ctx context.Context, claimIdx uint64) error
- func (f *FaultDisputeGameContractLatest) ChallengeL2BlockNumberTx(challenge *types.InvalidL2BlockNumberChallenge) (txmgr.TxCandidate, error)
- func (f *FaultDisputeGameContractLatest) ClaimCreditTx(ctx context.Context, recipient common.Address) (txmgr.TxCandidate, error)
- func (f *FaultDisputeGameContractLatest) DefendTx(ctx context.Context, parent types.Claim, pivot common.Hash) (txmgr.TxCandidate, error)
- func (f *FaultDisputeGameContractLatest) GetAbsolutePrestateHash(ctx context.Context) (common.Hash, error)
- func (f *FaultDisputeGameContractLatest) GetAllClaims(ctx context.Context, block rpcblock.Block) ([]types.Claim, error)
- func (f *FaultDisputeGameContractLatest) GetBalanceAndDelay(ctx context.Context, block rpcblock.Block) (*big.Int, time.Duration, common.Address, error)
- func (f *FaultDisputeGameContractLatest) GetBlockRange(ctx context.Context) (prestateBlock uint64, poststateBlock uint64, retErr error)
- func (f *FaultDisputeGameContractLatest) GetClaim(ctx context.Context, idx uint64) (types.Claim, error)
- func (f *FaultDisputeGameContractLatest) GetClaimCount(ctx context.Context) (uint64, error)
- func (f *FaultDisputeGameContractLatest) GetCredit(ctx context.Context, recipient common.Address) (*big.Int, gameTypes.GameStatus, error)
- func (f *FaultDisputeGameContractLatest) GetCredits(ctx context.Context, block rpcblock.Block, recipients ...common.Address) ([]*big.Int, error)
- func (f *FaultDisputeGameContractLatest) GetGameMetadata(ctx context.Context, block rpcblock.Block) (GameMetadata, error)
- func (f *FaultDisputeGameContractLatest) GetL1Head(ctx context.Context) (common.Hash, error)
- func (f *FaultDisputeGameContractLatest) GetMaxClockDuration(ctx context.Context) (time.Duration, error)
- func (f *FaultDisputeGameContractLatest) GetMaxGameDepth(ctx context.Context) (types.Depth, error)
- func (f *FaultDisputeGameContractLatest) GetOracle(ctx context.Context) (PreimageOracleContract, error)
- func (f *FaultDisputeGameContractLatest) GetRequiredBond(ctx context.Context, position types.Position) (*big.Int, error)
- func (f *FaultDisputeGameContractLatest) GetRequiredBonds(ctx context.Context, block rpcblock.Block, positions ...*big.Int) ([]*big.Int, error)
- func (f *FaultDisputeGameContractLatest) GetResolvedAt(ctx context.Context, block rpcblock.Block) (time.Time, error)
- func (f *FaultDisputeGameContractLatest) GetSplitDepth(ctx context.Context) (types.Depth, error)
- func (f *FaultDisputeGameContractLatest) GetStartingRootHash(ctx context.Context) (common.Hash, error)
- func (f *FaultDisputeGameContractLatest) GetStatus(ctx context.Context) (gameTypes.GameStatus, error)
- func (f *FaultDisputeGameContractLatest) GetWithdrawals(ctx context.Context, block rpcblock.Block, recipients ...common.Address) ([]*WithdrawalRequest, error)
- func (f *FaultDisputeGameContractLatest) IsL2BlockNumberChallenged(ctx context.Context, block rpcblock.Block) (bool, error)
- func (f *FaultDisputeGameContractLatest) IsResolved(ctx context.Context, block rpcblock.Block, claims ...types.Claim) ([]bool, error)
- func (f *FaultDisputeGameContractLatest) ResolveClaimTx(claimIdx uint64) (txmgr.TxCandidate, error)
- func (f *FaultDisputeGameContractLatest) ResolveTx() (txmgr.TxCandidate, error)
- func (f *FaultDisputeGameContractLatest) StepTx(claimIdx uint64, isAttack bool, stateData []byte, proof []byte) (txmgr.TxCandidate, error)
- func (f *FaultDisputeGameContractLatest) UpdateOracleTx(ctx context.Context, claimIdx uint64, data *types.PreimageOracleData) (txmgr.TxCandidate, error)
- func (f *FaultDisputeGameContractLatest) Vm(ctx context.Context) (*VMContract, error)
- type GameMetadata
- type PreimageOracleContract
- type PreimageOracleContract100
- type PreimageOracleContractLatest
- func (c *PreimageOracleContractLatest) AddGlobalDataTx(data *types.PreimageOracleData) (txmgr.TxCandidate, error)
- func (c *PreimageOracleContractLatest) AddLeaves(uuid *big.Int, startingBlockIndex *big.Int, input []byte, ...) (txmgr.TxCandidate, error)
- func (c *PreimageOracleContractLatest) Addr() common.Address
- func (c *PreimageOracleContractLatest) CallSqueeze(ctx context.Context, claimant common.Address, uuid *big.Int, ...) error
- func (c *PreimageOracleContractLatest) ChallengePeriod(ctx context.Context) (uint64, error)
- func (c *PreimageOracleContractLatest) ChallengeTx(ident keccakTypes.LargePreimageIdent, challenge keccakTypes.Challenge) (txmgr.TxCandidate, error)
- func (c *PreimageOracleContractLatest) DecodeInputData(data []byte) (*big.Int, keccakTypes.InputData, error)
- func (c *PreimageOracleContractLatest) GetActivePreimages(ctx context.Context, blockHash common.Hash) ([]keccakTypes.LargePreimageMetaData, error)
- func (c *PreimageOracleContractLatest) GetInputDataBlocks(ctx context.Context, block rpcblock.Block, ...) ([]uint64, error)
- func (c *PreimageOracleContractLatest) GetMinBondLPP(ctx context.Context) (*big.Int, error)
- func (c *PreimageOracleContractLatest) GetProposalMetadata(ctx context.Context, block rpcblock.Block, ...) ([]keccakTypes.LargePreimageMetaData, error)
- func (c *PreimageOracleContractLatest) GetProposalTreeRoot(ctx context.Context, block rpcblock.Block, ...) (common.Hash, error)
- func (c *PreimageOracleContractLatest) GlobalDataExists(ctx context.Context, data *types.PreimageOracleData) (bool, error)
- func (c *PreimageOracleContractLatest) InitLargePreimage(uuid *big.Int, partOffset uint32, claimedSize uint32) (txmgr.TxCandidate, error)
- func (c *PreimageOracleContractLatest) MinLargePreimageSize(ctx context.Context) (uint64, error)
- func (c *PreimageOracleContractLatest) Squeeze(claimant common.Address, uuid *big.Int, ...) (txmgr.TxCandidate, error)
- type Proposal
- type VMContract
- type VersionedBuilder
- type WithdrawalRequest
Constants ¶
This section is empty.
Variables ¶
var ( ErrSimulationFailed = errors.New("tx simulation failed") ErrChallengeL2BlockNotSupported = errors.New("contract version does not support challenging L2 block number") )
var ( ErrInvalidAddLeavesCall = errors.New("tx is not a valid addLeaves call") ErrInvalidPreimageKey = errors.New("invalid preimage key") ErrUnsupportedKeyType = errors.New("unsupported preimage key type") )
var (
ErrEventNotFound = errors.New("event not found")
)
Functions ¶
This section is empty.
Types ¶
type DelayedWETHContract ¶ added in v1.7.3
type DelayedWETHContract struct {
// contains filtered or unexported fields
}
func NewDelayedWETHContract ¶ added in v1.7.3
func NewDelayedWETHContract(metrics metrics.ContractMetricer, addr common.Address, caller *batching.MultiCaller) *DelayedWETHContract
func (*DelayedWETHContract) Addr ¶ added in v1.7.7
func (d *DelayedWETHContract) Addr() common.Address
func (*DelayedWETHContract) GetBalanceAndDelay ¶ added in v1.7.7
func (d *DelayedWETHContract) GetBalanceAndDelay(ctx context.Context, block rpcblock.Block) (*big.Int, time.Duration, error)
GetBalanceAndDelay returns the total amount of ETH controlled by this contract and the configured withdrawal delay.
func (*DelayedWETHContract) GetWithdrawals ¶ added in v1.7.3
func (d *DelayedWETHContract) GetWithdrawals(ctx context.Context, block rpcblock.Block, gameAddr common.Address, recipients ...common.Address) ([]*WithdrawalRequest, error)
GetWithdrawals returns all withdrawals made from the contract since the given block.
type DisputeGameFactoryContract ¶
type DisputeGameFactoryContract struct {
// contains filtered or unexported fields
}
func NewDisputeGameFactoryContract ¶
func NewDisputeGameFactoryContract(m metrics.ContractMetricer, addr common.Address, caller *batching.MultiCaller) *DisputeGameFactoryContract
func (*DisputeGameFactoryContract) CreateTx ¶ added in v1.5.1
func (f *DisputeGameFactoryContract) CreateTx(ctx context.Context, traceType uint32, outputRoot common.Hash, l2BlockNum uint64) (txmgr.TxCandidate, error)
func (*DisputeGameFactoryContract) DecodeDisputeGameCreatedLog ¶ added in v1.7.6
func (*DisputeGameFactoryContract) GetAllGames ¶ added in v1.5.0
func (f *DisputeGameFactoryContract) GetAllGames(ctx context.Context, blockHash common.Hash) ([]types.GameMetadata, error)
func (*DisputeGameFactoryContract) GetGame ¶
func (f *DisputeGameFactoryContract) GetGame(ctx context.Context, idx uint64, blockHash common.Hash) (types.GameMetadata, error)
func (*DisputeGameFactoryContract) GetGameCount ¶
func (*DisputeGameFactoryContract) GetGameFromParameters ¶ added in v1.5.1
func (*DisputeGameFactoryContract) GetGameImpl ¶ added in v1.5.0
func (f *DisputeGameFactoryContract) GetGameImpl(ctx context.Context, gameType faultTypes.GameType) (common.Address, error)
func (*DisputeGameFactoryContract) GetGamesAtOrAfter ¶ added in v1.5.1
func (f *DisputeGameFactoryContract) GetGamesAtOrAfter(ctx context.Context, blockHash common.Hash, earliestTimestamp uint64) ([]types.GameMetadata, error)
type FaultDisputeGameContract ¶
type FaultDisputeGameContract interface { GetBalanceAndDelay(ctx context.Context, block rpcblock.Block) (*big.Int, time.Duration, common.Address, error) GetBlockRange(ctx context.Context) (prestateBlock uint64, poststateBlock uint64, retErr error) GetGameMetadata(ctx context.Context, block rpcblock.Block) (GameMetadata, error) GetResolvedAt(ctx context.Context, block rpcblock.Block) (time.Time, error) GetStartingRootHash(ctx context.Context) (common.Hash, error) GetSplitDepth(ctx context.Context) (types.Depth, error) GetCredit(ctx context.Context, recipient common.Address) (*big.Int, gameTypes.GameStatus, error) GetRequiredBonds(ctx context.Context, block rpcblock.Block, positions ...*big.Int) ([]*big.Int, error) GetCredits(ctx context.Context, block rpcblock.Block, recipients ...common.Address) ([]*big.Int, error) ClaimCreditTx(ctx context.Context, recipient common.Address) (txmgr.TxCandidate, error) GetRequiredBond(ctx context.Context, position types.Position) (*big.Int, error) UpdateOracleTx(ctx context.Context, claimIdx uint64, data *types.PreimageOracleData) (txmgr.TxCandidate, error) GetWithdrawals(ctx context.Context, block rpcblock.Block, recipients ...common.Address) ([]*WithdrawalRequest, error) GetOracle(ctx context.Context) (PreimageOracleContract, error) GetMaxClockDuration(ctx context.Context) (time.Duration, error) GetMaxGameDepth(ctx context.Context) (types.Depth, error) GetAbsolutePrestateHash(ctx context.Context) (common.Hash, error) GetL1Head(ctx context.Context) (common.Hash, error) GetStatus(ctx context.Context) (gameTypes.GameStatus, error) GetClaimCount(ctx context.Context) (uint64, error) GetClaim(ctx context.Context, idx uint64) (types.Claim, error) GetAllClaims(ctx context.Context, block rpcblock.Block) ([]types.Claim, error) IsResolved(ctx context.Context, block rpcblock.Block, claims ...types.Claim) ([]bool, error) IsL2BlockNumberChallenged(ctx context.Context, block rpcblock.Block) (bool, error) ChallengeL2BlockNumberTx(challenge *types.InvalidL2BlockNumberChallenge) (txmgr.TxCandidate, error) AttackTx(ctx context.Context, parent types.Claim, pivot common.Hash) (txmgr.TxCandidate, error) DefendTx(ctx context.Context, parent types.Claim, pivot common.Hash) (txmgr.TxCandidate, error) StepTx(claimIdx uint64, isAttack bool, stateData []byte, proof []byte) (txmgr.TxCandidate, error) CallResolveClaim(ctx context.Context, claimIdx uint64) error ResolveClaimTx(claimIdx uint64) (txmgr.TxCandidate, error) CallResolve(ctx context.Context) (gameTypes.GameStatus, error) ResolveTx() (txmgr.TxCandidate, error) Vm(ctx context.Context) (*VMContract, error) }
func NewFaultDisputeGameContract ¶
func NewFaultDisputeGameContract(ctx context.Context, metrics metrics.ContractMetricer, addr common.Address, caller *batching.MultiCaller) (FaultDisputeGameContract, error)
type FaultDisputeGameContract0180 ¶ added in v1.7.6
type FaultDisputeGameContract0180 struct {
FaultDisputeGameContractLatest
}
func (*FaultDisputeGameContract0180) AttackTx ¶ added in v1.7.6
func (f *FaultDisputeGameContract0180) AttackTx(ctx context.Context, parent types.Claim, pivot common.Hash) (txmgr.TxCandidate, error)
func (*FaultDisputeGameContract0180) ChallengeL2BlockNumberTx ¶ added in v1.7.6
func (f *FaultDisputeGameContract0180) ChallengeL2BlockNumberTx(_ *types.InvalidL2BlockNumberChallenge) (txmgr.TxCandidate, error)
func (*FaultDisputeGameContract0180) DefendTx ¶ added in v1.7.6
func (f *FaultDisputeGameContract0180) DefendTx(ctx context.Context, parent types.Claim, pivot common.Hash) (txmgr.TxCandidate, error)
func (*FaultDisputeGameContract0180) GetGameMetadata ¶ added in v1.7.6
func (f *FaultDisputeGameContract0180) GetGameMetadata(ctx context.Context, block rpcblock.Block) (GameMetadata, error)
GetGameMetadata returns the game's L1 head, L2 block number, root claim, status, and max clock duration.
func (*FaultDisputeGameContract0180) IsL2BlockNumberChallenged ¶ added in v1.7.6
type FaultDisputeGameContract080 ¶ added in v1.7.6
type FaultDisputeGameContract080 struct {
FaultDisputeGameContractLatest
}
func (*FaultDisputeGameContract080) AttackTx ¶ added in v1.7.6
func (f *FaultDisputeGameContract080) AttackTx(ctx context.Context, parent types.Claim, pivot common.Hash) (txmgr.TxCandidate, error)
func (*FaultDisputeGameContract080) CallResolveClaim ¶ added in v1.7.6
func (f *FaultDisputeGameContract080) CallResolveClaim(ctx context.Context, claimIdx uint64) error
func (*FaultDisputeGameContract080) ChallengeL2BlockNumberTx ¶ added in v1.7.6
func (f *FaultDisputeGameContract080) ChallengeL2BlockNumberTx(_ *types.InvalidL2BlockNumberChallenge) (txmgr.TxCandidate, error)
func (*FaultDisputeGameContract080) DefendTx ¶ added in v1.7.6
func (f *FaultDisputeGameContract080) DefendTx(ctx context.Context, parent types.Claim, pivot common.Hash) (txmgr.TxCandidate, error)
func (*FaultDisputeGameContract080) GetAllClaims ¶ added in v1.7.6
func (*FaultDisputeGameContract080) GetGameMetadata ¶ added in v1.7.6
func (f *FaultDisputeGameContract080) GetGameMetadata(ctx context.Context, block rpcblock.Block) (GameMetadata, error)
GetGameMetadata returns the game's L1 head, L2 block number, root claim, status, and max clock duration.
func (*FaultDisputeGameContract080) GetMaxClockDuration ¶ added in v1.7.6
func (*FaultDisputeGameContract080) IsL2BlockNumberChallenged ¶ added in v1.7.6
func (*FaultDisputeGameContract080) IsResolved ¶ added in v1.7.6
func (*FaultDisputeGameContract080) ResolveClaimTx ¶ added in v1.7.6
func (f *FaultDisputeGameContract080) ResolveClaimTx(claimIdx uint64) (txmgr.TxCandidate, error)
type FaultDisputeGameContract111 ¶ added in v1.7.6
type FaultDisputeGameContract111 struct {
FaultDisputeGameContractLatest
}
type FaultDisputeGameContractLatest ¶ added in v1.7.6
type FaultDisputeGameContractLatest struct {
// contains filtered or unexported fields
}
func (*FaultDisputeGameContractLatest) AttackTx ¶ added in v1.7.6
func (f *FaultDisputeGameContractLatest) AttackTx(ctx context.Context, parent types.Claim, pivot common.Hash) (txmgr.TxCandidate, error)
func (*FaultDisputeGameContractLatest) CallResolve ¶ added in v1.7.6
func (f *FaultDisputeGameContractLatest) CallResolve(ctx context.Context) (gameTypes.GameStatus, error)
func (*FaultDisputeGameContractLatest) CallResolveClaim ¶ added in v1.7.6
func (f *FaultDisputeGameContractLatest) CallResolveClaim(ctx context.Context, claimIdx uint64) error
func (*FaultDisputeGameContractLatest) ChallengeL2BlockNumberTx ¶ added in v1.7.6
func (f *FaultDisputeGameContractLatest) ChallengeL2BlockNumberTx(challenge *types.InvalidL2BlockNumberChallenge) (txmgr.TxCandidate, error)
func (*FaultDisputeGameContractLatest) ClaimCreditTx ¶ added in v1.7.6
func (f *FaultDisputeGameContractLatest) ClaimCreditTx(ctx context.Context, recipient common.Address) (txmgr.TxCandidate, error)
func (*FaultDisputeGameContractLatest) DefendTx ¶ added in v1.7.6
func (f *FaultDisputeGameContractLatest) DefendTx(ctx context.Context, parent types.Claim, pivot common.Hash) (txmgr.TxCandidate, error)
func (*FaultDisputeGameContractLatest) GetAbsolutePrestateHash ¶ added in v1.7.6
func (*FaultDisputeGameContractLatest) GetAllClaims ¶ added in v1.7.6
func (*FaultDisputeGameContractLatest) GetBalanceAndDelay ¶ added in v1.7.7
func (f *FaultDisputeGameContractLatest) GetBalanceAndDelay(ctx context.Context, block rpcblock.Block) (*big.Int, time.Duration, common.Address, error)
GetBalanceAndDelay returns the total amount of ETH controlled by this contract. Note that the ETH is actually held by the DelayedWETH contract which may be shared by multiple games. Returns the balance and the address of the contract that actually holds the balance.
func (*FaultDisputeGameContractLatest) GetBlockRange ¶ added in v1.7.6
func (f *FaultDisputeGameContractLatest) GetBlockRange(ctx context.Context) (prestateBlock uint64, poststateBlock uint64, retErr error)
GetBlockRange returns the block numbers of the absolute pre-state block (typically genesis or the bedrock activation block) and the post-state block (that the proposed output root is for).
func (*FaultDisputeGameContractLatest) GetClaimCount ¶ added in v1.7.6
func (f *FaultDisputeGameContractLatest) GetClaimCount(ctx context.Context) (uint64, error)
func (*FaultDisputeGameContractLatest) GetCredit ¶ added in v1.7.6
func (f *FaultDisputeGameContractLatest) GetCredit(ctx context.Context, recipient common.Address) (*big.Int, gameTypes.GameStatus, error)
func (*FaultDisputeGameContractLatest) GetCredits ¶ added in v1.7.6
func (*FaultDisputeGameContractLatest) GetGameMetadata ¶ added in v1.7.6
func (f *FaultDisputeGameContractLatest) GetGameMetadata(ctx context.Context, block rpcblock.Block) (GameMetadata, error)
GetGameMetadata returns the game's L1 head, L2 block number, root claim, status, max clock duration, and is l2 block number challenged.
func (*FaultDisputeGameContractLatest) GetMaxClockDuration ¶ added in v1.7.6
func (*FaultDisputeGameContractLatest) GetMaxGameDepth ¶ added in v1.7.6
func (*FaultDisputeGameContractLatest) GetOracle ¶ added in v1.7.6
func (f *FaultDisputeGameContractLatest) GetOracle(ctx context.Context) (PreimageOracleContract, error)
func (*FaultDisputeGameContractLatest) GetRequiredBond ¶ added in v1.7.6
func (*FaultDisputeGameContractLatest) GetRequiredBonds ¶ added in v1.7.6
func (*FaultDisputeGameContractLatest) GetResolvedAt ¶ added in v1.8.0
func (*FaultDisputeGameContractLatest) GetSplitDepth ¶ added in v1.7.6
func (*FaultDisputeGameContractLatest) GetStartingRootHash ¶ added in v1.7.6
func (*FaultDisputeGameContractLatest) GetStatus ¶ added in v1.7.6
func (f *FaultDisputeGameContractLatest) GetStatus(ctx context.Context) (gameTypes.GameStatus, error)
func (*FaultDisputeGameContractLatest) GetWithdrawals ¶ added in v1.7.6
func (f *FaultDisputeGameContractLatest) GetWithdrawals(ctx context.Context, block rpcblock.Block, recipients ...common.Address) ([]*WithdrawalRequest, error)
func (*FaultDisputeGameContractLatest) IsL2BlockNumberChallenged ¶ added in v1.7.6
func (*FaultDisputeGameContractLatest) IsResolved ¶ added in v1.7.6
func (*FaultDisputeGameContractLatest) ResolveClaimTx ¶ added in v1.7.6
func (f *FaultDisputeGameContractLatest) ResolveClaimTx(claimIdx uint64) (txmgr.TxCandidate, error)
func (*FaultDisputeGameContractLatest) ResolveTx ¶ added in v1.7.6
func (f *FaultDisputeGameContractLatest) ResolveTx() (txmgr.TxCandidate, error)
func (*FaultDisputeGameContractLatest) StepTx ¶ added in v1.7.6
func (f *FaultDisputeGameContractLatest) StepTx(claimIdx uint64, isAttack bool, stateData []byte, proof []byte) (txmgr.TxCandidate, error)
func (*FaultDisputeGameContractLatest) UpdateOracleTx ¶ added in v1.7.6
func (f *FaultDisputeGameContractLatest) UpdateOracleTx(ctx context.Context, claimIdx uint64, data *types.PreimageOracleData) (txmgr.TxCandidate, error)
func (*FaultDisputeGameContractLatest) Vm ¶ added in v1.7.7
func (f *FaultDisputeGameContractLatest) Vm(ctx context.Context) (*VMContract, error)
type GameMetadata ¶ added in v1.7.6
type PreimageOracleContract ¶
type PreimageOracleContract interface { Addr() common.Address AddGlobalDataTx(data *types.PreimageOracleData) (txmgr.TxCandidate, error) InitLargePreimage(uuid *big.Int, partOffset uint32, claimedSize uint32) (txmgr.TxCandidate, error) AddLeaves(uuid *big.Int, startingBlockIndex *big.Int, input []byte, commitments []common.Hash, finalize bool) (txmgr.TxCandidate, error) MinLargePreimageSize(ctx context.Context) (uint64, error) ChallengePeriod(ctx context.Context) (uint64, error) CallSqueeze( ctx context.Context, claimant common.Address, uuid *big.Int, prestateMatrix keccakTypes.StateSnapshot, preState keccakTypes.Leaf, preStateProof merkle.Proof, postState keccakTypes.Leaf, postStateProof merkle.Proof, ) error Squeeze( claimant common.Address, uuid *big.Int, prestateMatrix keccakTypes.StateSnapshot, preState keccakTypes.Leaf, preStateProof merkle.Proof, postState keccakTypes.Leaf, postStateProof merkle.Proof, ) (txmgr.TxCandidate, error) GetActivePreimages(ctx context.Context, blockHash common.Hash) ([]keccakTypes.LargePreimageMetaData, error) GetProposalMetadata(ctx context.Context, block rpcblock.Block, idents ...keccakTypes.LargePreimageIdent) ([]keccakTypes.LargePreimageMetaData, error) GetProposalTreeRoot(ctx context.Context, block rpcblock.Block, ident keccakTypes.LargePreimageIdent) (common.Hash, error) GetInputDataBlocks(ctx context.Context, block rpcblock.Block, ident keccakTypes.LargePreimageIdent) ([]uint64, error) DecodeInputData(data []byte) (*big.Int, keccakTypes.InputData, error) GlobalDataExists(ctx context.Context, data *types.PreimageOracleData) (bool, error) ChallengeTx(ident keccakTypes.LargePreimageIdent, challenge keccakTypes.Challenge) (txmgr.TxCandidate, error) GetMinBondLPP(ctx context.Context) (*big.Int, error) }
func NewPreimageOracleContract ¶
func NewPreimageOracleContract(ctx context.Context, addr common.Address, caller *batching.MultiCaller) (PreimageOracleContract, error)
type PreimageOracleContract100 ¶ added in v1.9.1
type PreimageOracleContract100 struct {
PreimageOracleContractLatest
}
func (*PreimageOracleContract100) AddGlobalDataTx ¶ added in v1.9.1
func (c *PreimageOracleContract100) AddGlobalDataTx(data *types.PreimageOracleData) (txmgr.TxCandidate, error)
type PreimageOracleContractLatest ¶ added in v1.9.1
type PreimageOracleContractLatest struct {
// contains filtered or unexported fields
}
PreimageOracleContractLatest is a binding that works with contracts implementing the IPreimageOracle interface
func (*PreimageOracleContractLatest) AddGlobalDataTx ¶ added in v1.9.1
func (c *PreimageOracleContractLatest) AddGlobalDataTx(data *types.PreimageOracleData) (txmgr.TxCandidate, error)
func (*PreimageOracleContractLatest) Addr ¶ added in v1.9.1
func (c *PreimageOracleContractLatest) Addr() common.Address
func (*PreimageOracleContractLatest) CallSqueeze ¶ added in v1.9.1
func (c *PreimageOracleContractLatest) CallSqueeze( ctx context.Context, claimant common.Address, uuid *big.Int, prestateMatrix keccakTypes.StateSnapshot, preState keccakTypes.Leaf, preStateProof merkle.Proof, postState keccakTypes.Leaf, postStateProof merkle.Proof, ) error
func (*PreimageOracleContractLatest) ChallengePeriod ¶ added in v1.9.1
func (c *PreimageOracleContractLatest) ChallengePeriod(ctx context.Context) (uint64, error)
ChallengePeriod returns the challenge period for large preimages.
func (*PreimageOracleContractLatest) ChallengeTx ¶ added in v1.9.1
func (c *PreimageOracleContractLatest) ChallengeTx(ident keccakTypes.LargePreimageIdent, challenge keccakTypes.Challenge) (txmgr.TxCandidate, error)
func (*PreimageOracleContractLatest) DecodeInputData ¶ added in v1.9.1
func (c *PreimageOracleContractLatest) DecodeInputData(data []byte) (*big.Int, keccakTypes.InputData, error)
DecodeInputData returns the UUID and keccakTypes.InputData being added to the preimage via a addLeavesLPP call. An ErrInvalidAddLeavesCall error is returned if the call is not a valid call to addLeavesLPP. Otherwise, the uuid and input data is returned. The raw data supplied is returned so long as it can be parsed. Specifically the length of the input data is not validated to ensure it is consistent with the number of commitments.
func (*PreimageOracleContractLatest) GetActivePreimages ¶ added in v1.9.1
func (c *PreimageOracleContractLatest) GetActivePreimages(ctx context.Context, blockHash common.Hash) ([]keccakTypes.LargePreimageMetaData, error)
func (*PreimageOracleContractLatest) GetInputDataBlocks ¶ added in v1.9.1
func (c *PreimageOracleContractLatest) GetInputDataBlocks(ctx context.Context, block rpcblock.Block, ident keccakTypes.LargePreimageIdent) ([]uint64, error)
func (*PreimageOracleContractLatest) GetMinBondLPP ¶ added in v1.9.1
func (*PreimageOracleContractLatest) GetProposalMetadata ¶ added in v1.9.1
func (c *PreimageOracleContractLatest) GetProposalMetadata(ctx context.Context, block rpcblock.Block, idents ...keccakTypes.LargePreimageIdent) ([]keccakTypes.LargePreimageMetaData, error)
func (*PreimageOracleContractLatest) GetProposalTreeRoot ¶ added in v1.9.1
func (c *PreimageOracleContractLatest) GetProposalTreeRoot(ctx context.Context, block rpcblock.Block, ident keccakTypes.LargePreimageIdent) (common.Hash, error)
func (*PreimageOracleContractLatest) GlobalDataExists ¶ added in v1.9.1
func (c *PreimageOracleContractLatest) GlobalDataExists(ctx context.Context, data *types.PreimageOracleData) (bool, error)
func (*PreimageOracleContractLatest) InitLargePreimage ¶ added in v1.9.1
func (c *PreimageOracleContractLatest) InitLargePreimage(uuid *big.Int, partOffset uint32, claimedSize uint32) (txmgr.TxCandidate, error)
func (*PreimageOracleContractLatest) MinLargePreimageSize ¶ added in v1.9.1
func (c *PreimageOracleContractLatest) MinLargePreimageSize(ctx context.Context) (uint64, error)
MinLargePreimageSize returns the minimum size of a large preimage.
func (*PreimageOracleContractLatest) Squeeze ¶ added in v1.9.1
func (c *PreimageOracleContractLatest) Squeeze( claimant common.Address, uuid *big.Int, prestateMatrix keccakTypes.StateSnapshot, preState keccakTypes.Leaf, preStateProof merkle.Proof, postState keccakTypes.Leaf, postStateProof merkle.Proof, ) (txmgr.TxCandidate, error)
type VMContract ¶
type VMContract struct {
// contains filtered or unexported fields
}
VMContract is a binding that works with contracts implementing the IBigStepper interface
func NewVMContract ¶
func NewVMContract(addr common.Address, caller *batching.MultiCaller) *VMContract
func (*VMContract) Addr ¶ added in v1.7.7
func (c *VMContract) Addr() common.Address
func (*VMContract) Oracle ¶
func (c *VMContract) Oracle(ctx context.Context) (PreimageOracleContract, error)
type VersionedBuilder ¶ added in v1.9.1
type VersionedBuilder[C any] struct { // contains filtered or unexported fields }
func (*VersionedBuilder[C]) AddVersion ¶ added in v1.9.1
func (v *VersionedBuilder[C]) AddVersion(major int, minor int, factory func() (C, error))