Skip to content

Commit

Permalink
Added testnets for AnkrProvider (#2949, #2950).
Browse files Browse the repository at this point in the history
  • Loading branch information
ricmoo committed May 1, 2022
1 parent 8a7b5ef commit d9f45b3
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
8 changes: 8 additions & 0 deletions packages/providers/src.ts/ankr-provider.ts
Expand Up @@ -17,8 +17,16 @@ function getHost(name: string): string {
switch (name) {
case "homestead":
return "rpc.ankr.com/eth/";
case "ropsten":
return "rpc.ankr.com/eth_ropsten/";
case "rinkeby":
return "rpc.ankr.com/eth_rinkeby/";
case "goerli":
return "rpc.ankr.com/eth_goerli/";

case "matic":
return "rpc.ankr.com/polygon/";

case "arbitrum":
return "rpc.ankr.com/arbitrum/";
}
Expand Down
7 changes: 4 additions & 3 deletions packages/tests/src.ts/test-providers.ts
Expand Up @@ -113,7 +113,7 @@ const blockchainData: { [ network: string ]: TestCases } = {
}
],
logsBloom: "0x00000000000000040000000000100000010000000000000040000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000200000010000000004000000000000000000000000000000000002000000000000000000000000400000000020000000000000000000000000000000000000004000000000000000000000000000000000000000000000000801000000000000000000000020000000000040000000040000000000000000002000000004000000000000000000000000000000000000000000000010000000000000000000000000000000000200000000000000000",
root: "0x9b550a9a640ce50331b64504ef87aaa7e2aaf97344acb6ff111f879b319d2590",
//root: "0x9b550a9a640ce50331b64504ef87aaa7e2aaf97344acb6ff111f879b319d2590",
status: null,
to: "0x6090A6e47849629b7245Dfa1Ca21D94cd15878Ef",
transactionHash: "0xc6fcb7d00d536e659a4559d2de29afa9e364094438fef3e72ba80728ce1cb616",
Expand Down Expand Up @@ -351,7 +351,7 @@ const blockchainData: { [ network: string ]: TestCases } = {
}
],
logsBloom: "0x00000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000010000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
root: "0xf1c3506ab619ac1b5e8f1ca355b16d6b9a1b7436b2960b0e9ec9a91f4238b5cc",
//root: "0xf1c3506ab619ac1b5e8f1ca355b16d6b9a1b7436b2960b0e9ec9a91f4238b5cc",
to: "0x6fC21092DA55B392b045eD78F4732bff3C580e2c",
transactionHash: "0x55c477790b105e69e98afadf0505cbda606414b0187356137132bf24945016ce",
transactionIndex: 0x0
Expand Down Expand Up @@ -585,7 +585,7 @@ const providerFunctions: Array<ProviderDescription> = [
},
{
name: "AnkrProvider",
networks: [ "default", "homestead" ],
networks: [ "default", "homestead", "ropsten", "rinkeby" ],
create: (network: string) => {
if (network == "default") {
return new ethers.providers.AnkrProvider(null);
Expand Down Expand Up @@ -763,6 +763,7 @@ Object.keys(blockchainData).forEach((network) => {
const hash = test.transactionHash;
addObjectTest(`fetches transaction receipt ${ hash }`, async (provider: ethers.providers.Provider) => {
const receipt = await provider.getTransactionReceipt(hash);
assert.ok(!!receipt, "missing receipt");

if (test.status === null) {
assert.ok(receipt.status === undefined, "no status");
Expand Down

0 comments on commit d9f45b3

Please sign in to comment.