openethereum / sol-rs

Solaris - Solidity testing framework in Rust.
GNU General Public License v3.0
54 stars 14 forks source link

unable to top up account #23

Closed snd closed 6 years ago

snd commented 6 years ago

i've added a simple test that checks whether msg.value in a contract function matches the value passed to evm.with_value: https://github.com/paritytech/sol-rs/blob/36061c16226c7a8c6b564c5c4c923ecd47152959/tests/tests/test.rs#L57

it fails with Unable to top up account. here https://travis-ci.org/paritytech/sol-rs/builds/319662624#L1045

https://github.com/paritytech/sol-rs/blob/36061c16226c7a8c6b564c5c4c923ecd47152959/tests/tests/test.rs#L77

if i remove the ensure_funds line it fails with assertion failed: self.balance >= *x', /Users/basilisk/.cargo/git/checkouts/parity-dc9825eb65b3adf1/7c 2c4c8/ethcore/src/state/account.rs:351:2 instead which is to be expected as the account doesn't have any funds

snd commented 6 years ago

fixed in https://github.com/paritytech/sol-rs/pull/22/commits/35487cabfea29b3e9fc4683c1cc39793bceae929

reason was that 3, the address used here, is a builtin address and those have different pricing schemes