This repository has been archived by the owner on Apr 4, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 563
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* evm: unit tests * Add unit tests for DynamicFeeTx.Validate() * Start get and set signature values tests * get set values * Add tests for GetTo() * Add GetNonce test * Add GetValue test * Start copy test * Add WIP newDynamicFeeTx test * Add WIP legacy_tx_test * pair programming session * Add TestLegacyTxValidate * Add TestLegacyTxSetSignatureValues & GetSignatureValues * Add legacyTx tests * Merge main, forgot to save one file * Add AccessList tests * Add chain Config (fork order) * Add invalid genesis account test * Add params tests * Add WIP tracer test * tracer tests * Add FormatLogs tests * Add NewNoOpTracer test * Refactor to test suite * Refactor Tx Test suits to only use TxDataTestSuite * Update link to geth interpreter * Update x/evm/types/params.go * Refactor accessListTx Test suits to use TxDataTestSuite Co-authored-by: Daniel Burckhardt <[email protected]>
- Loading branch information
Showing
12 changed files
with
1,111 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
package types | ||
|
||
import ( | ||
"github.com/ethereum/go-ethereum/common" | ||
ethtypes "github.com/ethereum/go-ethereum/core/types" | ||
) | ||
|
||
func (suite *TxDataTestSuite) TestTestNewAccessList() { | ||
testCases := []struct { | ||
name string | ||
ethAccessList *ethtypes.AccessList | ||
expAl AccessList | ||
}{ | ||
{ | ||
"ethAccessList is nil", | ||
nil, | ||
nil, | ||
}, | ||
{ | ||
"non-empty ethAccessList", | ||
ðtypes.AccessList{{Address: suite.addr, StorageKeys: []common.Hash{{0}}}}, | ||
AccessList{{Address: suite.hexAddr, StorageKeys: []string{common.Hash{}.Hex()}}}, | ||
}, | ||
} | ||
for _, tc := range testCases { | ||
al := NewAccessList(tc.ethAccessList) | ||
|
||
suite.Require().Equal(tc.expAl, al) | ||
} | ||
} | ||
|
||
func (suite *TxDataTestSuite) TestAccessListToEthAccessList() { | ||
ethAccessList := ethtypes.AccessList{{Address: suite.addr, StorageKeys: []common.Hash{{0}}}} | ||
al := NewAccessList(ðAccessList) | ||
actual := al.ToEthAccessList() | ||
|
||
suite.Require().Equal(ðAccessList, actual) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.