Compare commits

..

9 Commits

Author SHA1 Message Date
Omar Abdulla 2a9d497827 Update the initial balance 2025-07-24 11:40:33 +03:00
Omar Abdulla 4763d763f6 Revert "Add extra comments"
This reverts commit bd4de2c83d.
2025-07-24 10:38:23 +03:00
Omar Abdulla bd4de2c83d Add extra comments 2025-07-24 09:48:18 +03:00
Omar Abdulla 3c70e0ac76 Revert "Bump commit hash of polkadot SDK"
This reverts commit 8aaa69780e.
2025-07-24 09:39:08 +03:00
Omar Abdulla 995ef80940 Revert "Change how the cache key is computed"
This reverts commit 75afdd9cfd.
2025-07-24 09:39:00 +03:00
Omar Abdulla 75afdd9cfd Change how the cache key is computed 2025-07-24 08:31:50 +03:00
Omar Abdulla 8aaa69780e Bump commit hash of polkadot SDK 2025-07-24 08:19:05 +03:00
Omar Abdulla d7795fff9d Pre-seed accounts with more ETH.
This commit fixes and solves some issues around how much ETH we seed an
account with in genesis. Currently, any account that the node has keys
to sign for will be seeded with u128::MAX WEI in genesis. This also
includes the default signer account.
2025-07-24 06:58:46 +03:00
Omar 6f4aa731ab Handle exceptions (#54)
* Add support for wrapper types

* Move `FilesWithExtensionIterator` to `core::common`

* Remove unneeded use of two `HashMap`s

* Make metadata structs more typed

* Impl new_from for wrapper types

* Implement the new input handling logic

* Fix edge-case in input handling

* Ignore macro doc comment tests

* Correct comment

* Fix edge-case in deployment order

* Handle calldata better

* Allow for the use of function signatures

* Add support for exceptions

* Cached nonce allocator

* Fix tests

* Add support for address replacement

* Cleanup implementation

* Cleanup mutability

* Wire up address replacement with rest of code

* Implement caller replacement

* Switch to callframe trace for exceptions

* Add a way to skip tests if they don't match the target

* Handle values from the metadata files

* Remove address replacement

* Correct the arguments

* Remove empty impl

* Remove address replacement

* Correct the arguments

* Remove empty impl

* Fix size_requirement underflow

* Add support for wildcards in exceptions

* Fix calldata construction of single calldata

* Better handling for length in equivalency checks

* Make initial balance a constant

* Fix size_requirement underflow

* Add support for wildcards in exceptions

* Fix calldata construction of single calldata

* Better handling for length in equivalency checks

* Fix tests
2025-07-24 03:45:53 +00:00
4 changed files with 8 additions and 8 deletions
+3 -3
View File
@@ -1,5 +1,5 @@
/// This constant defines how much Wei accounts are pre-seeded with in genesis.
///
/// We use [`u128::MAX`] here which means that accounts will be given 2^128 - 1 WEI which is
/// (2^128 - 1) / 10^18 ETH.
pub const INITIAL_BALANCE: u128 = u128::MAX;
/// Note: After changing this number, check that the tests for kitchensink work as we encountered
/// some issues with different values of the initial balance on Kitchensink.
pub const INITIAL_BALANCE: u128 = 10u128.pow(37);
+2
View File
@@ -84,6 +84,8 @@ impl Instance {
for signer_address in
<EthereumWallet as NetworkWallet<Ethereum>>::signer_addresses(&self.wallet)
{
// Note, the use of the entry API here means that we only modify the entries for any
// account that is not in the `alloc` field of the genesis state.
genesis
.alloc
.entry(signer_address)
+2
View File
@@ -131,6 +131,8 @@ impl KitchensinkNode {
for signer_address in
<EthereumWallet as NetworkWallet<Ethereum>>::signer_addresses(&self.wallet)
{
// Note, the use of the entry API here means that we only modify the entries for any
// account that is not in the `alloc` field of the genesis state.
genesis
.alloc
.entry(signer_address)
+1 -5
View File
@@ -33,9 +33,5 @@
"mixhash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"timestamp": "0x00",
"alloc": {
"90F8bf6A479f320ead074411a4B0e7944Ea8c9C1": {
"balance": "10000000000000000000000"
}
}
"alloc": {}
}