{"modulePath":"github.com/luxfi/coreth","version":"v1.25.5","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package atomictest\n\n## Variables\n\n```go\nvar TestBlockchainID = ids.GenerateTestID()\n```\n\n```go\nvar TestTxCodec atomic.Manager = \u0026testManager{}\n```\nTestTxCodec is an atomic.Manager whose unsigned-tx dispatch only knows about [TestUnsignedTx](#TestUnsignedTx). It exists so repo/trie tests can exercise the AtomicRepository code path without depending on production import/export transactions.\n\nThe wire shape is identical to atomic.Codec's:\n\n\t[u16 version][u32 typeID=0][TestUnsignedTx body][u32 nCreds][creds]\n\nTestUnsignedTx is the only unsigned-tx type registered at id=0; production Codec uses id=0 for \\*UnsignedImportTx. The two managers are intentionally disjoint — never cross blobs between them.\n\n## Functions\n\n```go\nfunc ConvertToAtomicOps(tx *atomic.Tx) (map[ids.ID]*luxatomic.Requests, error)\n```\n\n```go\nfunc GenerateTestExportTx() *atomic.Tx\n```\n\n```go\nfunc GenerateTestImportTx() *atomic.Tx\n```\n\n```go\nfunc GenerateTestImportTxWithGas(gasUsed uint64, burned uint64) *atomic.Tx\n```\n\n```go\nfunc NewTestTx() *atomic.Tx\n```\n\n```go\nfunc NewTestTxs(numTxs int) []*atomic.Tx\n```\n\n```go\nfunc TestSharedMemory() atomic.SharedMemory\n```\n\n## Types\n\n```go\ntype SharedMemories struct {\n\tThisChain atomic.SharedMemory\n\tPeerChain atomic.SharedMemory\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc NewSharedMemories(atomicMemory *atomic.Memory, thisChainID, peerChainID ids.ID) *SharedMemories\n```\n\n```go\nfunc (s *SharedMemories) AddItemsToBeRemovedToPeerChain(ops map[ids.ID]*atomic.Requests) error\n```\n\n```go\nfunc (s *SharedMemories) AssertOpsApplied(t *testing.T, ops map[ids.ID]*atomic.Requests)\n```\n\n```go\nfunc (s *SharedMemories) AssertOpsNotApplied(t *testing.T, ops map[ids.ID]*atomic.Requests)\n```\n\n```go\ntype TestUnsignedTx struct {\n\tGasUsedV                    uint64\n\tAcceptRequestsBlockchainIDV ids.ID\n\tAcceptRequestsV             *luxatomic.Requests\n\tVerifyV                     error\n\tIDV                         ids.ID\n\tBurnedV                     uint64\n\tUnsignedBytesV              []byte\n\tSignedBytesV                []byte\n\tInputUTXOsV                 set.Set[ids.ID]\n\tVisitV                      error\n\tEVMStateTransferV           error\n}\n```\n\n```go\nfunc (t *TestUnsignedTx) AtomicOps() (ids.ID, *luxatomic.Requests, error)\n```\nAtomicOps implements the UnsignedAtomicTx interface\n\n```go\nfunc (t *TestUnsignedTx) Burned(assetID ids.ID) (uint64, error)\n```\nBurned implements the UnsignedAtomicTx interface\n\n```go\nfunc (t *TestUnsignedTx) Bytes() []byte\n```\nBytes implements the UnsignedAtomicTx interface\n\n```go\nfunc (t *TestUnsignedTx) EVMStateTransfer(ctx *consensusctx.Context, state atomic.StateDB) error\n```\nEVMStateTransfer implements the UnsignedAtomicTx interface\n\n```go\nfunc (t *TestUnsignedTx) GasUsed(fixedFee bool) (uint64, error)\n```\nGasUsed implements the UnsignedAtomicTx interface\n\n```go\nfunc (t *TestUnsignedTx) ID() ids.ID\n```\nID implements the UnsignedAtomicTx interface\n\n```go\nfunc (t *TestUnsignedTx) Initialize(unsignedBytes, signedBytes []byte)\n```\nInitialize implements the UnsignedAtomicTx interface\n\n```go\nfunc (t *TestUnsignedTx) InputUTXOs() set.Set[ids.ID]\n```\nInputUTXOs implements the UnsignedAtomicTx interface\n\n```go\nfunc (t *TestUnsignedTx) SignedBytes() []byte\n```\nSignedBytes implements the UnsignedAtomicTx interface\n\n```go\nfunc (t *TestUnsignedTx) Verify(ctx *consensusctx.Context, rules extras.Rules) error\n```\nVerify implements the UnsignedAtomicTx interface\n\n```go\nfunc (t *TestUnsignedTx) Visit(v atomic.Visitor) error\n```\nVisit implements the UnsignedAtomicTx interface\n\n","path":"github.com/luxfi/coreth/plugin/evm/atomic/atomictest","name":"atomictest","synopsis":"","isRedistributable":true}
