chore: make ethers-etherscan compile for wasm32 (#1403)

This commit is contained in:
Matthias Seitz 2022-06-22 19:12:11 +02:00 committed by GitHub
parent 7472e02577
commit 42e966662a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 0 deletions

1
Cargo.lock generated
View File

@ -1288,6 +1288,7 @@ version = "0.13.0"
dependencies = [ dependencies = [
"ethers-core", "ethers-core",
"ethers-solc", "ethers-solc",
"getrandom 0.2.7",
"reqwest", "reqwest",
"semver", "semver",
"serde", "serde",

View File

@ -23,6 +23,10 @@ thiserror = "1.0"
tracing = "0.1.35" tracing = "0.1.35"
semver = "1.0.10" semver = "1.0.10"
[target.'cfg(target_arch = "wasm32")'.dependencies]
# NOTE: this enables wasm compatibility for getrandom indirectly
getrandom = { version = "0.2", features = ["js"] }
[dev-dependencies] [dev-dependencies]
tempfile = "3.3.0" tempfile = "3.3.0"
tokio = { version = "1.18", features = ["macros", "rt-multi-thread", "time"] } tokio = { version = "1.18", features = ["macros", "rt-multi-thread", "time"] }