Replace celo-ethers-wrapper with celo-ethers-provider (#626)

* Replace celo-ethers-wrapper with new celo-ethers-provider lib

* Use recommended alfajores forno url
pull/603/head
J M Rossy 2 years ago committed by GitHub
parent 1f7beb3b9c
commit 841685485d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      typescript/infra/package.json
  2. 4
      typescript/infra/src/config/chain.ts
  3. 2
      typescript/sdk/package.json
  4. 10
      typescript/sdk/src/chains.ts
  5. 22
      yarn.lock

@ -3,6 +3,7 @@
"description": "Infrastructure utilities for the Abacus Network",
"version": "0.2.2",
"dependencies": {
"@abacus-network/celo-ethers-provider": "^0.1.0",
"@abacus-network/core": "^0.2.2",
"@abacus-network/deploy": "^0.2.2",
"@abacus-network/helloworld": "0.2.2",
@ -10,7 +11,6 @@
"@aws-sdk/client-iam": "^3.74.0",
"@aws-sdk/client-kms": "3.48.0",
"@aws-sdk/client-s3": "^3.74.0",
"@celo-tools/celo-ethers-wrapper": "^0.3.0",
"@ethersproject/experimental": "^5.6.2",
"@nomiclabs/hardhat-etherscan": "^3.0.3",
"@types/mocha": "^9.1.0",

@ -1,8 +1,8 @@
import { StaticCeloProvider } from '@celo-tools/celo-ethers-wrapper';
import { Provider } from '@ethersproject/abstract-provider';
import { NonceManager } from '@ethersproject/experimental';
import { ethers } from 'ethers';
import { StaticCeloJsonRpcProvider } from '@abacus-network/celo-ethers-provider';
import { ChainName, RetryJsonRpcProvider } from '@abacus-network/sdk';
import { getSecretDeployerKey, getSecretRpcEndpoint } from '../agents';
@ -16,7 +16,7 @@ export async function fetchProvider(
const rpc = await getSecretRpcEndpoint(environment, chainName);
const celoChainNames = new Set(['alfajores', 'baklava', 'celo']);
const provider = celoChainNames.has(chainName)
? new StaticCeloProvider(rpc)
? new StaticCeloJsonRpcProvider(rpc)
: new RetryJsonRpcProvider(new ethers.providers.JsonRpcProvider(rpc), {
retryLimit: 2,
interval: 250,

@ -3,9 +3,9 @@
"description": "The official SDK for the Abacus Network",
"version": "0.2.2",
"dependencies": {
"@abacus-network/celo-ethers-provider": "^0.1.0",
"@abacus-network/core": "^0.2.2",
"@abacus-network/utils": "^0.2.2",
"@celo-tools/celo-ethers-wrapper": "^0.3.0",
"ethers": "^5.6.8"
},
"devDependencies": {

@ -1,6 +1,7 @@
import { StaticCeloProvider } from '@celo-tools/celo-ethers-wrapper';
import { ethers } from 'ethers';
import { StaticCeloJsonRpcProvider } from '@abacus-network/celo-ethers-provider';
import { IChainConnection } from './provider';
import { ChainMap, ChainName } from './types';
@ -14,7 +15,7 @@ export const ethereum: IChainConnection = {
};
export const celo: IChainConnection = {
provider: new StaticCeloProvider('https://forno.celo.org', 42220),
provider: new StaticCeloJsonRpcProvider('https://forno.celo.org', 42220),
confirmations: 1,
blockExplorerUrl: 'https://celoscan.xyz',
};
@ -65,7 +66,10 @@ export const bsc: IChainConnection = {
};
export const alfajores: IChainConnection = {
provider: new StaticCeloProvider('https://alfajores-forno.celo.org', 44787),
provider: new StaticCeloJsonRpcProvider(
'https://alfajores-forno.celo-testnet.org',
44787,
),
confirmations: 1,
};

@ -33,6 +33,15 @@ __metadata:
languageName: unknown
linkType: soft
"@abacus-network/celo-ethers-provider@npm:^0.1.0":
version: 0.1.0
resolution: "@abacus-network/celo-ethers-provider@npm:0.1.0"
peerDependencies:
ethers: ^5
checksum: 06f440366bbd9ddf9962aa46c471be1fb587909c4da71a0d816497a5c0c8597e9b315d70fe9ae728ed51fc936097da50da2cd18f750861f3d602660b8ea1ecfd
languageName: node
linkType: hard
"@abacus-network/core@^0.2.2, @abacus-network/core@workspace:solidity/core":
version: 0.0.0-use.local
resolution: "@abacus-network/core@workspace:solidity/core"
@ -117,6 +126,7 @@ __metadata:
version: 0.0.0-use.local
resolution: "@abacus-network/infra@workspace:typescript/infra"
dependencies:
"@abacus-network/celo-ethers-provider": ^0.1.0
"@abacus-network/core": ^0.2.2
"@abacus-network/deploy": ^0.2.2
"@abacus-network/helloworld": 0.2.2
@ -124,7 +134,6 @@ __metadata:
"@aws-sdk/client-iam": ^3.74.0
"@aws-sdk/client-kms": 3.48.0
"@aws-sdk/client-s3": ^3.74.0
"@celo-tools/celo-ethers-wrapper": ^0.3.0
"@ethersproject/experimental": ^5.6.2
"@nomiclabs/hardhat-ethers": ^2.0.5
"@nomiclabs/hardhat-etherscan": ^3.0.3
@ -165,9 +174,9 @@ __metadata:
version: 0.0.0-use.local
resolution: "@abacus-network/sdk@workspace:typescript/sdk"
dependencies:
"@abacus-network/celo-ethers-provider": ^0.1.0
"@abacus-network/core": ^0.2.2
"@abacus-network/utils": ^0.2.2
"@celo-tools/celo-ethers-wrapper": ^0.3.0
"@types/node": ^16.9.1
chai: ^4.3.6
dotenv: ^10.0.0
@ -2229,15 +2238,6 @@ __metadata:
languageName: node
linkType: hard
"@celo-tools/celo-ethers-wrapper@npm:^0.3.0":
version: 0.3.0
resolution: "@celo-tools/celo-ethers-wrapper@npm:0.3.0"
peerDependencies:
ethers: ^5
checksum: d073eff579714f710a97b3d8b682e5068fd78b3cb26218a67f7dc0e7a09b5d8109d1bd5c2a18670b98dd0891472288d1500d3ee3f1764dfc21885aaeb3b5745b
languageName: node
linkType: hard
"@cspotcode/source-map-support@npm:^0.8.0":
version: 0.8.1
resolution: "@cspotcode/source-map-support@npm:0.8.1"

Loading…
Cancel
Save