Documentation
¶
Index ¶
- func AssembleTestTx(client *rpc.EthClient, priv *ecdsa.PrivateKey, nonce uint64, ...) (*types.Transaction, error)
- func RandomBytes(size int) (b []byte)
- func RandomHash() common.Hash
- func RandomPort() int
- func SendDynamicFeeTx(client *rpc.EthClient, priv *ecdsa.PrivateKey, to *common.Address, ...) (*types.Transaction, error)
- func SignatureFromRSV(r, s string, v byte) []byte
- type BlobInfo
- type ChainSyncer
- type ClientTestSuite
- func (s *ClientTestSuite) ForkIntoPacaya(proposer Proposer, syncer ChainSyncer)
- func (s *ClientTestSuite) IncreaseTime(time uint64)
- func (s *ClientTestSuite) KeyFromEnv(envName string) *ecdsa.PrivateKey
- func (s *ClientTestSuite) ProposeAndInsertEmptyBlocks(proposer Proposer, chainSyncer ChainSyncer) []metadata.TaikoProposalMetaData
- func (s *ClientTestSuite) ProposeAndInsertValidBlock(proposer Proposer, chainSyncer ChainSyncer) metadata.TaikoProposalMetaData
- func (s *ClientTestSuite) ProposeValidBlock(proposer Proposer)
- func (s *ClientTestSuite) RevertL1Snapshot(snapshotID string)
- func (s *ClientTestSuite) SetL1Automine(automine bool)
- func (s *ClientTestSuite) SetL1Snapshot() string
- func (s *ClientTestSuite) SetNextBlockTimestamp(time uint64)
- func (s *ClientTestSuite) SetupTest()
- func (s *ClientTestSuite) TearDownTest()
- func (s *ClientTestSuite) TxMgr(name string, key *ecdsa.PrivateKey) txmgr.TxManager
- type MemoryBlobServer
- type MemoryBlobTxMgr
- func (m *MemoryBlobTxMgr) API() gethRPC.API
- func (m *MemoryBlobTxMgr) BlockNumber(ctx context.Context) (uint64, error)
- func (m *MemoryBlobTxMgr) Close()
- func (m *MemoryBlobTxMgr) From() common.Address
- func (m *MemoryBlobTxMgr) IsClosed() bool
- func (m *MemoryBlobTxMgr) Send(ctx context.Context, candidate txmgr.TxCandidate) (*types.Receipt, error)
- func (m *MemoryBlobTxMgr) SendAsync(ctx context.Context, candidate txmgr.TxCandidate, ch chan txmgr.SendResponse)
- func (m *MemoryBlobTxMgr) SuggestGasPriceCaps(ctx context.Context) (tipCap *big.Int, baseFee *big.Int, blobBaseFee *big.Int, err error)
- type Proposer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AssembleTestTx ¶
func AssembleTestTx( client *rpc.EthClient, priv *ecdsa.PrivateKey, nonce uint64, to *common.Address, value *big.Int, data []byte, ) (*types.Transaction, error)
AssembleTestTx assembles a test transaction.
func RandomHash ¶
RandomHash generates a random blob of data and returns it as a hash.
func SendDynamicFeeTx ¶
func SendDynamicFeeTx( client *rpc.EthClient, priv *ecdsa.PrivateKey, to *common.Address, value *big.Int, data []byte, ) (*types.Transaction, error)
SendDynamicFeeTx sends a dynamic transaction, used for tests.
func SignatureFromRSV ¶
SignatureFromRSV creates the signature bytes from r,s,v.
Types ¶
type ChainSyncer ¶
type ClientTestSuite ¶
type ClientTestSuite struct { suite.Suite RPCClient *rpc.Client TestAddrPrivKey *ecdsa.PrivateKey TestAddr common.Address AddressManager *ontakeBindings.AddressManager BlobServer *MemoryBlobServer // contains filtered or unexported fields }
func (*ClientTestSuite) ForkIntoPacaya ¶
func (s *ClientTestSuite) ForkIntoPacaya(proposer Proposer, syncer ChainSyncer)
func (*ClientTestSuite) IncreaseTime ¶
func (s *ClientTestSuite) IncreaseTime(time uint64)
func (*ClientTestSuite) KeyFromEnv ¶
func (s *ClientTestSuite) KeyFromEnv(envName string) *ecdsa.PrivateKey
func (*ClientTestSuite) ProposeAndInsertEmptyBlocks ¶
func (s *ClientTestSuite) ProposeAndInsertEmptyBlocks( proposer Proposer, chainSyncer ChainSyncer, ) []metadata.TaikoProposalMetaData
func (*ClientTestSuite) ProposeAndInsertValidBlock ¶
func (s *ClientTestSuite) ProposeAndInsertValidBlock( proposer Proposer, chainSyncer ChainSyncer, ) metadata.TaikoProposalMetaData
ProposeAndInsertValidBlock proposes a valid tx list and then insert it into L2 execution engine's local chain.
func (*ClientTestSuite) ProposeValidBlock ¶
func (s *ClientTestSuite) ProposeValidBlock(proposer Proposer)
func (*ClientTestSuite) RevertL1Snapshot ¶
func (s *ClientTestSuite) RevertL1Snapshot(snapshotID string)
func (*ClientTestSuite) SetL1Automine ¶
func (s *ClientTestSuite) SetL1Automine(automine bool)
func (*ClientTestSuite) SetL1Snapshot ¶
func (s *ClientTestSuite) SetL1Snapshot() string
func (*ClientTestSuite) SetNextBlockTimestamp ¶
func (s *ClientTestSuite) SetNextBlockTimestamp(time uint64)
func (*ClientTestSuite) SetupTest ¶
func (s *ClientTestSuite) SetupTest()
func (*ClientTestSuite) TearDownTest ¶
func (s *ClientTestSuite) TearDownTest()
func (*ClientTestSuite) TxMgr ¶
func (s *ClientTestSuite) TxMgr(name string, key *ecdsa.PrivateKey) txmgr.TxManager
type MemoryBlobServer ¶
type MemoryBlobServer struct {
// contains filtered or unexported fields
}
MemoryBlobServer is a mock blob server that stores blobs in memory.
func NewMemoryBlobServer ¶
func NewMemoryBlobServer() *MemoryBlobServer
NewMemoryBlobServer creates a new MemoryBlobServer.
func (*MemoryBlobServer) URL ¶
func (s *MemoryBlobServer) URL() *url.URL
URL returns the URL of the server.
type MemoryBlobTxMgr ¶
type MemoryBlobTxMgr struct {
// contains filtered or unexported fields
}
MemoryBlobTxMgr is a mock tx manager that stores blobs in memory.
func NewMemoryBlobTxMgr ¶
func NewMemoryBlobTxMgr(rpc *rpc.Client, mgr txmgr.TxManager, server *MemoryBlobServer) *MemoryBlobTxMgr
NewMemoryBlobTxMgr creates a new MemoryBlobTxMgr.
func (*MemoryBlobTxMgr) API ¶
func (m *MemoryBlobTxMgr) API() gethRPC.API
API implements TxManager interface.
func (*MemoryBlobTxMgr) BlockNumber ¶
func (m *MemoryBlobTxMgr) BlockNumber(ctx context.Context) (uint64, error)
BlockNumber implements TxManager interface.
func (*MemoryBlobTxMgr) Close ¶
func (m *MemoryBlobTxMgr) Close()
Close implements TxManager interface.
func (*MemoryBlobTxMgr) From ¶
func (m *MemoryBlobTxMgr) From() common.Address
From implements TxManager interface.
func (*MemoryBlobTxMgr) IsClosed ¶
func (m *MemoryBlobTxMgr) IsClosed() bool
IsClosed implements TxManager interface.
func (*MemoryBlobTxMgr) Send ¶
func (m *MemoryBlobTxMgr) Send(ctx context.Context, candidate txmgr.TxCandidate) (*types.Receipt, error)
Send sends a transaction to the tx manager.
func (*MemoryBlobTxMgr) SendAsync ¶
func (m *MemoryBlobTxMgr) SendAsync(ctx context.Context, candidate txmgr.TxCandidate, ch chan txmgr.SendResponse)
SendAsync implements TxManager interface.
type Proposer ¶
type Proposer interface { utils.SubcommandApplication ProposeOp(ctx context.Context) error ProposeTxLists(ctx context.Context, txLists []types.Transactions) error RegisterTxMgrSelctorToBlobServer(blobServer *MemoryBlobServer) }