Documentation ¶
Index ¶
- func AddBlockReward(currState *WorldState, addr [20]byte, b *uint256.Int)
- func CompareWorldState(stateA, stateB *WorldState) (bool, error)
- func PrintBlock(fout io.Writer, block *TestBlock)
- func PrintTestCases(fout io.Writer, cases []TestCase)
- func PrintWorldState(fout io.Writer, state *WorldState)
- func RunOneCase(args []string, printLog bool, runTestCase RunTestCaseFn)
- func RunOneDir(args []string, printLog bool, runTestCase RunTestCaseFn)
- func RunOneFile(args []string, runTestCase RunTestCaseFn)
- func StorageKeyLess(k1, k2 StorageKey) bool
- func UpdateWorldState(world *WorldState, key, value []byte)
- type BasicAccount
- type BytecodeInfo
- type DumbSigner
- func (signer *DumbSigner) ChainID() *big.Int
- func (signer *DumbSigner) Equal(s coretypes.Signer) bool
- func (signer *DumbSigner) Hash(tx *coretypes.Transaction) common.Hash
- func (signer *DumbSigner) Sender(tx *coretypes.Transaction) (addr common.Address, err error)
- func (signer *DumbSigner) SignatureValues(tx *coretypes.Transaction, sig []byte) (r, s, v *big.Int, err error)
- type EvmLog
- type RunTestCaseFn
- type StorageKey
- type TestBlock
- type TestCase
- type Tx
- type WorldState
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddBlockReward ¶
func AddBlockReward(currState *WorldState, addr [20]byte, b *uint256.Int)
func CompareWorldState ¶
func CompareWorldState(stateA, stateB *WorldState) (bool, error)
func PrintBlock ¶
func PrintTestCases ¶
func PrintWorldState ¶
func PrintWorldState(fout io.Writer, state *WorldState)
func RunOneCase ¶
func RunOneCase(args []string, printLog bool, runTestCase RunTestCaseFn)
func RunOneDir ¶
func RunOneDir(args []string, printLog bool, runTestCase RunTestCaseFn)
func RunOneFile ¶
func RunOneFile(args []string, runTestCase RunTestCaseFn)
func StorageKeyLess ¶
func StorageKeyLess(k1, k2 StorageKey) bool
func UpdateWorldState ¶
func UpdateWorldState(world *WorldState, key, value []byte)
Types ¶
type BytecodeInfo ¶
type DumbSigner ¶
type DumbSigner struct { }
func (*DumbSigner) ChainID ¶
func (signer *DumbSigner) ChainID() *big.Int
func (*DumbSigner) Equal ¶
func (signer *DumbSigner) Equal(s coretypes.Signer) bool
Equal returns true if the given signer is the same as the receiver.
func (*DumbSigner) Hash ¶
func (signer *DumbSigner) Hash(tx *coretypes.Transaction) common.Hash
Hash returns the hash to be signed.
func (*DumbSigner) Sender ¶
func (signer *DumbSigner) Sender(tx *coretypes.Transaction) (addr common.Address, err error)
Sender returns the sender address of the transaction.
func (*DumbSigner) SignatureValues ¶
func (signer *DumbSigner) SignatureValues(tx *coretypes.Transaction, sig []byte) (r, s, v *big.Int, err error)
SignatureValues returns the raw R, S, V values corresponding to the given signature.
type RunTestCaseFn ¶
type StorageKey ¶
type TestBlock ¶
func NewTestBlock ¶
func NewTestBlock() *TestBlock
type TestCase ¶
type TestCase struct { Name string ImplState WorldState RefState WorldState Blocks []*TestBlock }
func NewTestCase ¶
func ReadTestCases ¶
func ReadTestCasesFromString ¶
type Tx ¶
type Tx struct { From [20]byte To [20]byte Nonce uint64 Value uint256.Int GasPrice uint256.Int Gas uint64 Data []byte }
func (Tx) ToEthTx ¶
func (tx Tx) ToEthTx() *coretypes.Transaction
type WorldState ¶
type WorldState struct { CreationCounters [256]uint64 BlockHashes [512][32]byte Bytecodes map[[20]byte]BytecodeInfo Accounts map[[20]byte]*BasicAccount Values map[StorageKey][]byte }
func GetWorldStateFromMads ¶
func GetWorldStateFromMads(mads *ads.ADS) *WorldState
func NewWorldState ¶
func NewWorldState() WorldState
func (WorldState) Clone ¶
func (world WorldState) Clone() (out WorldState)
func (WorldState) SumAllBalance ¶
func (world WorldState) SumAllBalance() *uint256.Int
Click to show internal directories.
Click to hide internal directories.