Skip to content
This repository was archived by the owner on Oct 19, 2024. It is now read-only.

Commit e15252d

Browse files
mattssegakonst
andauthoredNov 29, 2021
fix: conditional http support (#632)
* fix: conditional http support * chore: update changelog Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>
1 parent f6e803b commit e15252d

File tree

3 files changed

+24
-4
lines changed

3 files changed

+24
-4
lines changed
 

‎CHANGELOG.md

+16-3
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,24 @@
22

33
## ethers-core
44

5-
- Change types mapping for solidity `bytes` to rust `ethers::core::Bytes` and solidity `uint8[]` to rust `Vec<u8>`.
5+
### Unreleased
6+
7+
- Change types mapping for solidity `bytes` to rust `ethers::core::Bytes` and
8+
solidity `uint8[]` to rust `Vec<u8>`.
69
[613](https://github.com/gakonst/ethers-rs/pull/613)
710
- Fix `format_units` to return a `String` of representing a decimal point float
811
such that the decimal places don't get truncated.
912
[597](https://github.com/gakonst/ethers-rs/pull/597)
10-
- Implement hex display format for `ethers::core::Bytes` [#624](https://github.com/gakonst/ethers-rs/pull/624).
13+
- Implement hex display format for `ethers::core::Bytes`
14+
[#624](https://github.com/gakonst/ethers-rs/pull/624).
1115

1216
## ethers-solc
13-
- Return cached artifacts from project `compile` when the cache only contains some files
1417

1518
### Unreleased
1619

20+
- Return cached artifacts from project `compile` when the cache only contains
21+
some files
22+
1723
### 0.6.0
1824

1925
- move `AbiEncode` `AbiDecode` trait to ethers-core and implement for core types
@@ -82,6 +88,13 @@
8288

8389
## ethers-contract
8490

91+
### Unreleased
92+
93+
- fix Etherscan conditional HTTP support
94+
[#632](https://github.com/gakonst/ethers-rs/pull/632)
95+
- use `CARGO_MANIFEST_DIR` as root for relative paths in abigen
96+
[#631](https://github.com/gakonst/ethers-rs/pull/631)
97+
8598
### 0.6.0
8699

87100
- Provide a way to opt out of networking support in abigen proc macro with

‎ethers-contract/ethers-contract-abigen/src/source.rs

+7
Original file line numberDiff line numberDiff line change
@@ -279,4 +279,11 @@ mod tests {
279279
let hardhat_parsed = Source::parse(&hardhat_src).unwrap();
280280
assert_eq!(hardhat_parsed, Source::String(hardhat_src));
281281
}
282+
283+
#[test]
284+
#[ignore]
285+
fn get_etherscan_contract() {
286+
let source = Source::etherscan("0x6b175474e89094c44da98b954eedeac495271d0f").unwrap();
287+
let _dai = source.get().unwrap();
288+
}
282289
}

‎ethers-contract/ethers-contract-abigen/src/util.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ where
7474
/// Perform an HTTP GET request and return the contents of the response.
7575
pub fn http_get(_url: &str) -> Result<String> {
7676
cfg_if! {
77-
if #[cfg(any(not(target_arch = "wasm32"), not(features = "reqwest")))]{
77+
if #[cfg(any(target_arch = "wasm32", not(feature = "reqwest")))]{
7878
Err(anyhow!("HTTP is unsupported"))
7979
} else {
8080
Ok(reqwest::blocking::get(_url)?.text()?)

0 commit comments

Comments
 (0)