ethers.js/src.ts/_tests/test-providers-extra.ts

16 lines
557 B
TypeScript
Raw Normal View History

2022-10-01 08:33:18 +03:00
import assert from "assert";
import { EtherscanProvider } from "../index.js";
import { retryIt } from "./utils.js";
describe("Test Etherscan extra APIs", function() {
retryIt("test etherscanProvider.getContract", async function() {
const provider = new EtherscanProvider("mainnet", "FPFGK6JSW2UHJJ2666FG93KP7WC999MNW7");
const contract = await provider.getContract("dai.tokens.ethers.eth");
assert.ok(contract != null, "contract == null");
assert.equal(await contract.symbol(), "DAI", "contract.symbol");
});
});