Skip to content

Commit

Permalink
refactor: remove the leftover test
Browse files Browse the repository at this point in the history
  • Loading branch information
IaroslavMazur committed Aug 26, 2024
1 parent 0080f4a commit 98977c3
Showing 1 changed file with 0 additions and 30 deletions.
30 changes: 0 additions & 30 deletions crates/revm/src/sablier/test_native_tokens.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1053,34 +1053,4 @@ mod test {
.0;
assert_eq!(recipient_token2_balance, fee_amount);
}

#[test]
fn gas_calculation_underflow() {
let callee = address!("5fdcca53617f4d2b9134b29090c87d01058e27e9");

// https://github.com/bluealloy/revm/issues/277
// checks this use case
let mut evm = Evm::builder()
.with_db(InMemoryDB::default())
.modify_db(|db| {
let code = bytes!("5b597fb075978b6c412c64d169d56d839a8fe01b3f4607ed603b2c78917ce8be1430fe6101e8527ffe64706ecad72a2f5c97a95e006e279dc57081902029ce96af7edae5de116fec610208527f9fc1ef09d4dd80683858ae3ea18869fe789ddc365d8d9d800e26c9872bac5e5b6102285260276102485360d461024953601661024a53600e61024b53607d61024c53600961024d53600b61024e5360b761024f5360596102505360796102515360a061025253607261025353603a6102545360fb61025553601261025653602861025753600761025853606f61025953601761025a53606161025b53606061025c5360a661025d53602b61025e53608961025f53607a61026053606461026153608c6102625360806102635360d56102645360826102655360ae61026653607f6101e8610146610220677a814b184591c555735fdcca53617f4d2b9134b29090c87d01058e27e962047654f259595947443b1b816b65cdb6277f4b59c10a36f4e7b8658f5a5e6f5561");
let info = AccountInfo {
balances: HashMap::from([(BASE_TOKEN_ID, "0x100c5d668240db8e00".parse().unwrap())]),
code_hash: keccak256(&code),
code: Some(Bytecode::new_raw(code)),
nonce: 1,
};
db.insert_account_info(callee, info);
})
.modify_tx_env(|tx| {
tx.caller = address!("5fdcca53617f4d2b9134b29090c87d01058e27e0");
tx.transact_to = TransactTo::Call(callee);
tx.data = Bytes::new();
tx.transferred_tokens = vec![(TokenTransfer{ id: BASE_TOKEN_ID, amount: U256::ZERO})];
})
.with_spec_id(SpecId::BERLIN)
.build();

evm.transact().expect("Transaction to work");
}
}

0 comments on commit 98977c3

Please sign in to comment.