-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: split code from remote account in (#517)
- Loading branch information
Showing
4 changed files
with
83 additions
and
20 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,5 @@ | ||
--- | ||
"@nomicfoundation/edr": patch | ||
--- | ||
|
||
Fixed missing remote contract code when setting storage |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
use std::str::FromStr as _; | ||
|
||
use edr_eth::{Address, SpecId, U256}; | ||
use edr_provider::{ | ||
hardhat_rpc_types::ForkConfig, test_utils::create_test_config_with_fork, time::CurrentTime, | ||
MethodInvocation, NoopLogger, Provider, ProviderRequest, | ||
}; | ||
use edr_test_utils::env::get_alchemy_url; | ||
use tokio::runtime; | ||
|
||
// https://github.com/NomicFoundation/edr/issues/503 | ||
#[tokio::test(flavor = "multi_thread")] | ||
async fn issue_503() -> anyhow::Result<()> { | ||
let logger = Box::new(NoopLogger); | ||
let subscriber = Box::new(|_event| {}); | ||
|
||
let mut config = create_test_config_with_fork(Some(ForkConfig { | ||
json_rpc_url: get_alchemy_url(), | ||
block_number: Some(19_909_475), | ||
http_headers: None, | ||
})); | ||
config.hardfork = SpecId::CANCUN; | ||
|
||
let provider = Provider::new( | ||
runtime::Handle::current(), | ||
logger, | ||
subscriber, | ||
config, | ||
CurrentTime, | ||
)?; | ||
|
||
let address = Address::from_str("0xbe9895146f7af43049ca1c1ae358b0541ea49704")?; | ||
let index = | ||
U256::from_str("0x4f039c94bc7b6c8e7867b9fbd2890a637837fea1c829f434a649c572b15b2969")?; | ||
|
||
provider.handle_request(ProviderRequest::Single(MethodInvocation::GetStorageAt( | ||
address, index, None, | ||
)))?; | ||
|
||
provider.handle_request(ProviderRequest::Single(MethodInvocation::SetStorageAt( | ||
address, | ||
index, | ||
U256::from(1u64), | ||
)))?; | ||
|
||
Ok(()) | ||
} |
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 |
---|---|---|
|
@@ -8,3 +8,4 @@ mod issue_356; | |
mod issue_361; | ||
mod issue_384; | ||
mod issue_407; | ||
mod issue_503; |