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 uint32) (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) 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, gameAddr 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
- func (c *PreimageOracleContract) AddGlobalDataTx(data *types.PreimageOracleData) (txmgr.TxCandidate, error)
- func (c *PreimageOracleContract) AddLeaves(uuid *big.Int, startingBlockIndex *big.Int, input []byte, ...) (txmgr.TxCandidate, error)
- func (c *PreimageOracleContract) Addr() common.Address
- func (c *PreimageOracleContract) CallSqueeze(ctx context.Context, claimant common.Address, uuid *big.Int, ...) error
- func (c *PreimageOracleContract) ChallengePeriod(ctx context.Context) (uint64, error)
- func (c *PreimageOracleContract) ChallengeTx(ident keccakTypes.LargePreimageIdent, challenge keccakTypes.Challenge) (txmgr.TxCandidate, error)
- func (c *PreimageOracleContract) DecodeInputData(data []byte) (*big.Int, keccakTypes.InputData, error)
- func (c *PreimageOracleContract) GetActivePreimages(ctx context.Context, blockHash common.Hash) ([]keccakTypes.LargePreimageMetaData, error)
- func (c *PreimageOracleContract) GetInputDataBlocks(ctx context.Context, block rpcblock.Block, ...) ([]uint64, error)
- func (c *PreimageOracleContract) GetMinBondLPP(ctx context.Context) (*big.Int, error)
- func (c *PreimageOracleContract) GetProposalMetadata(ctx context.Context, block rpcblock.Block, ...) ([]keccakTypes.LargePreimageMetaData, error)
- func (c *PreimageOracleContract) GetProposalTreeRoot(ctx context.Context, block rpcblock.Block, ...) (common.Hash, error)
- func (c *PreimageOracleContract) GlobalDataExists(ctx context.Context, data *types.PreimageOracleData) (bool, error)
- func (c *PreimageOracleContract) InitLargePreimage(uuid *big.Int, partOffset uint32, claimedSize uint32) (txmgr.TxCandidate, error)
- func (c *PreimageOracleContract) MinLargePreimageSize(ctx context.Context) (uint64, error)
- func (c *PreimageOracleContract) Squeeze(claimant common.Address, uuid *big.Int, ...) (txmgr.TxCandidate, error)
- type Proposal
- type VMContract
- 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 ¶
type DelayedWETHContract struct {
// contains filtered or unexported fields
}
func NewDelayedWETHContract ¶
func NewDelayedWETHContract(metrics metrics.ContractMetricer, addr common.Address, caller *batching.MultiCaller) *DelayedWETHContract
func (*DelayedWETHContract) Addr ¶
func (d *DelayedWETHContract) Addr() common.Address
func (*DelayedWETHContract) GetBalanceAndDelay ¶
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 ¶
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 ¶
func (f *DisputeGameFactoryContract) CreateTx(ctx context.Context, traceType uint32, outputRoot common.Hash, l2BlockNum uint64) (txmgr.TxCandidate, error)
func (*DisputeGameFactoryContract) DecodeDisputeGameCreatedLog ¶
func (*DisputeGameFactoryContract) GetAllGames ¶
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 ¶
func (*DisputeGameFactoryContract) GetGameImpl ¶
func (*DisputeGameFactoryContract) GetGamesAtOrAfter ¶
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) 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, gameAddr common.Address, 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 ¶
type FaultDisputeGameContract0180 struct {
FaultDisputeGameContractLatest
}
func (*FaultDisputeGameContract0180) AttackTx ¶
func (f *FaultDisputeGameContract0180) AttackTx(ctx context.Context, parent types.Claim, pivot common.Hash) (txmgr.TxCandidate, error)
func (*FaultDisputeGameContract0180) ChallengeL2BlockNumberTx ¶
func (f *FaultDisputeGameContract0180) ChallengeL2BlockNumberTx(_ *types.InvalidL2BlockNumberChallenge) (txmgr.TxCandidate, error)
func (*FaultDisputeGameContract0180) DefendTx ¶
func (f *FaultDisputeGameContract0180) DefendTx(ctx context.Context, parent types.Claim, pivot common.Hash) (txmgr.TxCandidate, error)
func (*FaultDisputeGameContract0180) GetGameMetadata ¶
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 ¶
type FaultDisputeGameContract080 ¶
type FaultDisputeGameContract080 struct {
FaultDisputeGameContractLatest
}
func (*FaultDisputeGameContract080) AttackTx ¶
func (f *FaultDisputeGameContract080) AttackTx(ctx context.Context, parent types.Claim, pivot common.Hash) (txmgr.TxCandidate, error)
func (*FaultDisputeGameContract080) CallResolveClaim ¶
func (f *FaultDisputeGameContract080) CallResolveClaim(ctx context.Context, claimIdx uint64) error
func (*FaultDisputeGameContract080) ChallengeL2BlockNumberTx ¶
func (f *FaultDisputeGameContract080) ChallengeL2BlockNumberTx(_ *types.InvalidL2BlockNumberChallenge) (txmgr.TxCandidate, error)
func (*FaultDisputeGameContract080) DefendTx ¶
func (f *FaultDisputeGameContract080) DefendTx(ctx context.Context, parent types.Claim, pivot common.Hash) (txmgr.TxCandidate, error)
func (*FaultDisputeGameContract080) GetAllClaims ¶
func (*FaultDisputeGameContract080) GetGameMetadata ¶
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 ¶
func (*FaultDisputeGameContract080) IsL2BlockNumberChallenged ¶
func (*FaultDisputeGameContract080) IsResolved ¶
func (*FaultDisputeGameContract080) ResolveClaimTx ¶
func (f *FaultDisputeGameContract080) ResolveClaimTx(claimIdx uint64) (txmgr.TxCandidate, error)
type FaultDisputeGameContract111 ¶
type FaultDisputeGameContract111 struct {
FaultDisputeGameContractLatest
}
type FaultDisputeGameContractLatest ¶
type FaultDisputeGameContractLatest struct {
// contains filtered or unexported fields
}
func (*FaultDisputeGameContractLatest) AttackTx ¶
func (f *FaultDisputeGameContractLatest) AttackTx(ctx context.Context, parent types.Claim, pivot common.Hash) (txmgr.TxCandidate, error)
func (*FaultDisputeGameContractLatest) CallResolve ¶
func (f *FaultDisputeGameContractLatest) CallResolve(ctx context.Context) (gameTypes.GameStatus, error)
func (*FaultDisputeGameContractLatest) CallResolveClaim ¶
func (f *FaultDisputeGameContractLatest) CallResolveClaim(ctx context.Context, claimIdx uint64) error
func (*FaultDisputeGameContractLatest) ChallengeL2BlockNumberTx ¶
func (f *FaultDisputeGameContractLatest) ChallengeL2BlockNumberTx(challenge *types.InvalidL2BlockNumberChallenge) (txmgr.TxCandidate, error)
func (*FaultDisputeGameContractLatest) ClaimCreditTx ¶
func (f *FaultDisputeGameContractLatest) ClaimCreditTx(ctx context.Context, recipient common.Address) (txmgr.TxCandidate, error)
func (*FaultDisputeGameContractLatest) DefendTx ¶
func (f *FaultDisputeGameContractLatest) DefendTx(ctx context.Context, parent types.Claim, pivot common.Hash) (txmgr.TxCandidate, error)
func (*FaultDisputeGameContractLatest) GetAbsolutePrestateHash ¶
func (*FaultDisputeGameContractLatest) GetAllClaims ¶
func (*FaultDisputeGameContractLatest) GetBalanceAndDelay ¶
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 ¶
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 ¶
func (f *FaultDisputeGameContractLatest) GetClaimCount(ctx context.Context) (uint64, error)
func (*FaultDisputeGameContractLatest) GetCredit ¶
func (f *FaultDisputeGameContractLatest) GetCredit(ctx context.Context, recipient common.Address) (*big.Int, gameTypes.GameStatus, error)
func (*FaultDisputeGameContractLatest) GetCredits ¶
func (*FaultDisputeGameContractLatest) GetGameMetadata ¶
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 ¶
func (*FaultDisputeGameContractLatest) GetMaxGameDepth ¶
func (*FaultDisputeGameContractLatest) GetOracle ¶
func (f *FaultDisputeGameContractLatest) GetOracle(ctx context.Context) (*PreimageOracleContract, error)
func (*FaultDisputeGameContractLatest) GetRequiredBond ¶
func (*FaultDisputeGameContractLatest) GetRequiredBonds ¶
func (*FaultDisputeGameContractLatest) GetSplitDepth ¶
func (*FaultDisputeGameContractLatest) GetStartingRootHash ¶
func (*FaultDisputeGameContractLatest) GetStatus ¶
func (f *FaultDisputeGameContractLatest) GetStatus(ctx context.Context) (gameTypes.GameStatus, error)
func (*FaultDisputeGameContractLatest) GetWithdrawals ¶
func (*FaultDisputeGameContractLatest) IsL2BlockNumberChallenged ¶
func (*FaultDisputeGameContractLatest) IsResolved ¶
func (*FaultDisputeGameContractLatest) ResolveClaimTx ¶
func (f *FaultDisputeGameContractLatest) ResolveClaimTx(claimIdx uint64) (txmgr.TxCandidate, error)
func (*FaultDisputeGameContractLatest) ResolveTx ¶
func (f *FaultDisputeGameContractLatest) ResolveTx() (txmgr.TxCandidate, error)
func (*FaultDisputeGameContractLatest) StepTx ¶
func (f *FaultDisputeGameContractLatest) StepTx(claimIdx uint64, isAttack bool, stateData []byte, proof []byte) (txmgr.TxCandidate, error)
func (*FaultDisputeGameContractLatest) UpdateOracleTx ¶
func (f *FaultDisputeGameContractLatest) UpdateOracleTx(ctx context.Context, claimIdx uint64, data *types.PreimageOracleData) (txmgr.TxCandidate, error)
func (*FaultDisputeGameContractLatest) Vm ¶
func (f *FaultDisputeGameContractLatest) Vm(ctx context.Context) (*VMContract, error)
type GameMetadata ¶
type PreimageOracleContract ¶
type PreimageOracleContract struct {
// contains filtered or unexported fields
}
PreimageOracleContract is a binding that works with contracts implementing the IPreimageOracle interface
func NewPreimageOracleContract ¶
func NewPreimageOracleContract(addr common.Address, caller *batching.MultiCaller) *PreimageOracleContract
func (*PreimageOracleContract) AddGlobalDataTx ¶
func (c *PreimageOracleContract) AddGlobalDataTx(data *types.PreimageOracleData) (txmgr.TxCandidate, error)
func (*PreimageOracleContract) Addr ¶
func (c *PreimageOracleContract) Addr() common.Address
func (*PreimageOracleContract) CallSqueeze ¶
func (c *PreimageOracleContract) 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 (*PreimageOracleContract) ChallengePeriod ¶
func (c *PreimageOracleContract) ChallengePeriod(ctx context.Context) (uint64, error)
ChallengePeriod returns the challenge period for large preimages.
func (*PreimageOracleContract) ChallengeTx ¶
func (c *PreimageOracleContract) ChallengeTx(ident keccakTypes.LargePreimageIdent, challenge keccakTypes.Challenge) (txmgr.TxCandidate, error)
func (*PreimageOracleContract) DecodeInputData ¶
func (c *PreimageOracleContract) 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 (*PreimageOracleContract) GetActivePreimages ¶
func (c *PreimageOracleContract) GetActivePreimages(ctx context.Context, blockHash common.Hash) ([]keccakTypes.LargePreimageMetaData, error)
func (*PreimageOracleContract) GetInputDataBlocks ¶
func (c *PreimageOracleContract) GetInputDataBlocks(ctx context.Context, block rpcblock.Block, ident keccakTypes.LargePreimageIdent) ([]uint64, error)
func (*PreimageOracleContract) GetMinBondLPP ¶
func (*PreimageOracleContract) GetProposalMetadata ¶
func (c *PreimageOracleContract) GetProposalMetadata(ctx context.Context, block rpcblock.Block, idents ...keccakTypes.LargePreimageIdent) ([]keccakTypes.LargePreimageMetaData, error)
func (*PreimageOracleContract) GetProposalTreeRoot ¶
func (c *PreimageOracleContract) GetProposalTreeRoot(ctx context.Context, block rpcblock.Block, ident keccakTypes.LargePreimageIdent) (common.Hash, error)
func (*PreimageOracleContract) GlobalDataExists ¶
func (c *PreimageOracleContract) GlobalDataExists(ctx context.Context, data *types.PreimageOracleData) (bool, error)
func (*PreimageOracleContract) InitLargePreimage ¶
func (c *PreimageOracleContract) InitLargePreimage(uuid *big.Int, partOffset uint32, claimedSize uint32) (txmgr.TxCandidate, error)
func (*PreimageOracleContract) MinLargePreimageSize ¶
func (c *PreimageOracleContract) MinLargePreimageSize(ctx context.Context) (uint64, error)
MinLargePreimageSize returns the minimum size of a large preimage.
func (*PreimageOracleContract) Squeeze ¶
func (c *PreimageOracleContract) 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 ¶
func (c *VMContract) Addr() common.Address
func (*VMContract) Oracle ¶
func (c *VMContract) Oracle(ctx context.Context) (*PreimageOracleContract, error)