(
config: &DVFConfig,
address: &Address,
block_num: u64,
)
| 944 | } |
| 945 | |
| 946 | pub fn get_eth_code( |
| 947 | config: &DVFConfig, |
| 948 | address: &Address, |
| 949 | block_num: u64, |
| 950 | ) -> Result<String, ValidationError> { |
| 951 | let block_num_hex = format!("{:#x}", block_num); |
| 952 | |
| 953 | let request_body = json!({ |
| 954 | "jsonrpc": "2.0", |
| 955 | "method": "eth_getCode", |
| 956 | "params": [address, block_num_hex], |
| 957 | "id": 1 |
| 958 | }); |
| 959 | let result = send_blocking_web3_post(config, &request_body)?; |
| 960 | let code: String = serde_json::from_value(result).unwrap_or_default(); |
| 961 | Ok(code) |
| 962 | } |
| 963 | |
| 964 | pub fn get_eth_storage_at( |
| 965 | config: &DVFConfig, |
no test coverage detected