Documentation ¶
Index ¶
- Variables
- type DisputeGameFactoryContract
- 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) GetGameImpl(ctx context.Context, gameType uint32) (common.Address, error)
- type FaultDisputeGameContract
- func (f *FaultDisputeGameContract) AttackTx(parentContractIndex uint64, pivot common.Hash) (txmgr.TxCandidate, error)
- func (f *FaultDisputeGameContract) CallResolve(ctx context.Context) (gameTypes.GameStatus, error)
- func (f *FaultDisputeGameContract) CallResolveClaim(ctx context.Context, claimIdx uint64) error
- func (f *FaultDisputeGameContract) DefendTx(parentContractIndex uint64, pivot common.Hash) (txmgr.TxCandidate, error)
- func (f *FaultDisputeGameContract) GetAbsolutePrestateHash(ctx context.Context) (common.Hash, error)
- func (f *FaultDisputeGameContract) GetAllClaims(ctx context.Context) ([]types.Claim, error)
- func (c *FaultDisputeGameContract) GetBlockRange(ctx context.Context) (prestateBlock uint64, poststateBlock uint64, retErr error)
- func (f *FaultDisputeGameContract) GetClaim(ctx context.Context, idx uint64) (types.Claim, error)
- func (f *FaultDisputeGameContract) GetClaimCount(ctx context.Context) (uint64, error)
- func (f *FaultDisputeGameContract) GetGameDuration(ctx context.Context) (uint64, error)
- func (c *FaultDisputeGameContract) GetGenesisOutputRoot(ctx context.Context) (common.Hash, error)
- func (f *FaultDisputeGameContract) GetL1Head(ctx context.Context) (common.Hash, error)
- func (f *FaultDisputeGameContract) GetMaxGameDepth(ctx context.Context) (types.Depth, error)
- func (f *FaultDisputeGameContract) GetOracle(ctx context.Context) (*PreimageOracleContract, error)
- func (c *FaultDisputeGameContract) GetRequiredBond(ctx context.Context, position types.Position) (*big.Int, error)
- func (c *FaultDisputeGameContract) GetSplitDepth(ctx context.Context) (types.Depth, error)
- func (f *FaultDisputeGameContract) GetStatus(ctx context.Context) (gameTypes.GameStatus, error)
- func (f *FaultDisputeGameContract) ResolveClaimTx(claimIdx uint64) (txmgr.TxCandidate, error)
- func (f *FaultDisputeGameContract) ResolveTx() (txmgr.TxCandidate, error)
- func (f *FaultDisputeGameContract) StepTx(claimIdx uint64, isAttack bool, stateData []byte, proof []byte) (txmgr.TxCandidate, error)
- func (f *FaultDisputeGameContract) UpdateOracleTx(ctx context.Context, claimIdx uint64, data *types.PreimageOracleData) (txmgr.TxCandidate, error)
- 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 batching.Block, ...) ([]uint64, error)
- func (c *PreimageOracleContract) GetProposalMetadata(ctx context.Context, block batching.Block, ...) ([]keccakTypes.LargePreimageMetaData, 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, stateMatrix *matrix.StateMatrix, ...) (txmgr.TxCandidate, error)
- type Proposal
- type VMContract
Constants ¶
This section is empty.
Variables ¶
var (
ErrInvalidAddLeavesCall = errors.New("tx is not a valid addLeaves call")
)
Functions ¶
This section is empty.
Types ¶
type DisputeGameFactoryContract ¶
type DisputeGameFactoryContract struct {
// contains filtered or unexported fields
}
func NewDisputeGameFactoryContract ¶
func NewDisputeGameFactoryContract(addr common.Address, caller *batching.MultiCaller) (*DisputeGameFactoryContract, error)
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) GetGameImpl ¶ added in v1.5.0
type FaultDisputeGameContract ¶
type FaultDisputeGameContract struct {
// contains filtered or unexported fields
}
func NewFaultDisputeGameContract ¶
func NewFaultDisputeGameContract(addr common.Address, caller *batching.MultiCaller) (*FaultDisputeGameContract, error)
func (*FaultDisputeGameContract) AttackTx ¶
func (f *FaultDisputeGameContract) AttackTx(parentContractIndex uint64, pivot common.Hash) (txmgr.TxCandidate, error)
func (*FaultDisputeGameContract) CallResolve ¶
func (f *FaultDisputeGameContract) CallResolve(ctx context.Context) (gameTypes.GameStatus, error)
func (*FaultDisputeGameContract) CallResolveClaim ¶
func (f *FaultDisputeGameContract) CallResolveClaim(ctx context.Context, claimIdx uint64) error
func (*FaultDisputeGameContract) DefendTx ¶
func (f *FaultDisputeGameContract) DefendTx(parentContractIndex uint64, pivot common.Hash) (txmgr.TxCandidate, error)
func (*FaultDisputeGameContract) GetAbsolutePrestateHash ¶
func (*FaultDisputeGameContract) GetAllClaims ¶
func (*FaultDisputeGameContract) GetBlockRange ¶ added in v1.4.3
func (c *FaultDisputeGameContract) 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 (*FaultDisputeGameContract) GetClaimCount ¶
func (f *FaultDisputeGameContract) GetClaimCount(ctx context.Context) (uint64, error)
func (*FaultDisputeGameContract) GetGameDuration ¶
func (f *FaultDisputeGameContract) GetGameDuration(ctx context.Context) (uint64, error)
func (*FaultDisputeGameContract) GetGenesisOutputRoot ¶ added in v1.4.3
func (*FaultDisputeGameContract) GetMaxGameDepth ¶
func (*FaultDisputeGameContract) GetOracle ¶ added in v1.5.0
func (f *FaultDisputeGameContract) GetOracle(ctx context.Context) (*PreimageOracleContract, error)
func (*FaultDisputeGameContract) GetRequiredBond ¶ added in v1.4.3
func (*FaultDisputeGameContract) GetSplitDepth ¶ added in v1.4.3
func (*FaultDisputeGameContract) GetStatus ¶
func (f *FaultDisputeGameContract) GetStatus(ctx context.Context) (gameTypes.GameStatus, error)
func (*FaultDisputeGameContract) ResolveClaimTx ¶
func (f *FaultDisputeGameContract) ResolveClaimTx(claimIdx uint64) (txmgr.TxCandidate, error)
func (*FaultDisputeGameContract) ResolveTx ¶
func (f *FaultDisputeGameContract) ResolveTx() (txmgr.TxCandidate, error)
func (*FaultDisputeGameContract) StepTx ¶
func (f *FaultDisputeGameContract) StepTx(claimIdx uint64, isAttack bool, stateData []byte, proof []byte) (txmgr.TxCandidate, error)
func (*FaultDisputeGameContract) UpdateOracleTx ¶
func (f *FaultDisputeGameContract) UpdateOracleTx(ctx context.Context, claimIdx uint64, data *types.PreimageOracleData) (txmgr.TxCandidate, error)
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, error)
func (*PreimageOracleContract) AddGlobalDataTx ¶
func (c *PreimageOracleContract) AddGlobalDataTx(data *types.PreimageOracleData) (txmgr.TxCandidate, error)
func (*PreimageOracleContract) Addr ¶ added in v1.5.0
func (c *PreimageOracleContract) Addr() common.Address
func (*PreimageOracleContract) CallSqueeze ¶ added in v1.5.0
func (c *PreimageOracleContract) CallSqueeze( ctx context.Context, claimant common.Address, uuid *big.Int, stateMatrix *matrix.StateMatrix, preState keccakTypes.Leaf, preStateProof merkle.Proof, postState keccakTypes.Leaf, postStateProof merkle.Proof, ) error
func (*PreimageOracleContract) ChallengePeriod ¶ added in v1.5.0
func (c *PreimageOracleContract) ChallengePeriod(ctx context.Context) (uint64, error)
ChallengePeriod returns the challenge period for large preimages.
func (*PreimageOracleContract) ChallengeTx ¶ added in v1.5.0
func (c *PreimageOracleContract) ChallengeTx(ident keccakTypes.LargePreimageIdent, challenge keccakTypes.Challenge) (txmgr.TxCandidate, error)
func (*PreimageOracleContract) DecodeInputData ¶ added in v1.5.0
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 ¶ added in v1.5.0
func (c *PreimageOracleContract) GetActivePreimages(ctx context.Context, blockHash common.Hash) ([]keccakTypes.LargePreimageMetaData, error)
func (*PreimageOracleContract) GetInputDataBlocks ¶ added in v1.5.0
func (c *PreimageOracleContract) GetInputDataBlocks(ctx context.Context, block batching.Block, ident keccakTypes.LargePreimageIdent) ([]uint64, error)
func (*PreimageOracleContract) GetProposalMetadata ¶ added in v1.5.0
func (c *PreimageOracleContract) GetProposalMetadata(ctx context.Context, block batching.Block, idents ...keccakTypes.LargePreimageIdent) ([]keccakTypes.LargePreimageMetaData, error)
func (*PreimageOracleContract) GlobalDataExists ¶ added in v1.5.0
func (c *PreimageOracleContract) GlobalDataExists(ctx context.Context, data *types.PreimageOracleData) (bool, error)
func (*PreimageOracleContract) InitLargePreimage ¶ added in v1.5.0
func (c *PreimageOracleContract) InitLargePreimage(uuid *big.Int, partOffset uint32, claimedSize uint32) (txmgr.TxCandidate, error)
func (*PreimageOracleContract) MinLargePreimageSize ¶ added in v1.5.0
func (c *PreimageOracleContract) MinLargePreimageSize(ctx context.Context) (uint64, error)
MinLargePreimageSize returns the minimum size of a large preimage.
func (*PreimageOracleContract) Squeeze ¶ added in v1.5.0
func (c *PreimageOracleContract) Squeeze( claimant common.Address, uuid *big.Int, stateMatrix *matrix.StateMatrix, 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, error)
func (*VMContract) Oracle ¶
func (c *VMContract) Oracle(ctx context.Context) (*PreimageOracleContract, error)