runner: endow test accounts on genesis

Signed-off-by: Cyrill Leutwiler <bigcyrill@hotmail.com>
This commit is contained in:
Cyrill Leutwiler
2024-09-06 13:50:01 +02:00
parent c111bcbc4d
commit d77ee1e0d4
4 changed files with 19 additions and 5 deletions
+11 -1
View File
@@ -26,5 +26,15 @@
"mixhash": "0x0000000000000000000000000000000000000000000000000000000000000000", "mixhash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000", "parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"timestamp": "0x00", "timestamp": "0x00",
"alloc": {} "alloc": {
"0101010101010101010101010101010101010101": {
"balance": "1000000000"
},
"0202020202020202020202020202020202020202": {
"balance": "1000000000"
},
"0303030303030303030303030303030303030303": {
"balance": "1000000000"
}
}
} }
+2 -3
View File
@@ -100,10 +100,9 @@ pub struct EvmOutput {
impl EvmOutput { impl EvmOutput {
/// Return if there was no error found. /// Return if there was no error found.
/// ///
/// Panics if the gas used is zero as this indicates nothing was run, i.e. /// Panics if the gas used is zero as this indicates nothing was run.
/// there was no receiving account but still no error is reported.
pub fn run_success(&self) -> bool { pub fn run_success(&self) -> bool {
assert_ne!(self.gas_used, U256::ZERO, "nothing was executed"); assert_ne!(self.gas_used, U256::ZERO, "nothing was executed: {self:?}");
self.error.is_none() self.error.is_none()
} }
} }
+1
View File
@@ -19,6 +19,7 @@ pragma solidity ^0.8;
"dest": { "dest": {
"Instantiated": 0 "Instantiated": 0
}, },
"value": 123,
"data": "3fa4f245" "data": "3fa4f245"
} }
} }
+5 -1
View File
@@ -179,7 +179,11 @@ impl Default for Specs {
fn default() -> Self { fn default() -> Self {
Self { Self {
differential: false, differential: false,
balances: vec![(ALICE, 1_000_000_000)], balances: vec![
(ALICE, 1_000_000_000),
(BOB, 1_000_000_000),
(CHARLIE, 1_000_000_000),
],
actions: Default::default(), actions: Default::default(),
} }
} }