Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/e2e-test-deployed-network.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ jobs:
- uses: ./.github/workflows/composite/setup
- name: Run e2e tests alfajores
shell: bash
run: NETWORK=alfajores e2e_test/run_all_tests.sh
run: NETWORK=celo-sepolia e2e_test/run_all_tests.sh
180 changes: 65 additions & 115 deletions e2e_test/js-tests/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion e2e_test/js-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"chai": "^5.1.2",
"ethers": "^6.10.0",
"mocha": "^10.2.0",
"viem": "^2.21.18"
"viem": "^2.35.1"
},
"engines": {
"node": ">=18.0.0"
Expand Down
6 changes: 2 additions & 4 deletions e2e_test/js-tests/test_viem_tx.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -182,11 +182,9 @@ describe("viem send tx", () => {
args: [process.env.FEE_CURRENCY],
});

// TODO fix this when viem is fixed - https://github.com/celo-org/viem/pull/20
// The expected value for the max fee should be the (baseFeePerGas * multiplier) + maxPriorityFeePerGas
// Instead what is currently returned is (maxFeePerGas * multiplier) + maxPriorityFeePerGas
const maxPriorityFeeInFeeCurrency = (maxPriorityFeePerGasNative * numerator) / denominator;
const maxFeeInFeeCurrency = ((block.baseFeePerGas + maxPriorityFeePerGasNative) * numerator) / denominator;
const maxFeeInFeeCurrency = ((block.baseFeePerGas) * numerator) / denominator;
assert.equal(fees.maxFeePerGas, ((maxFeeInFeeCurrency * 12n) / 10n) + maxPriorityFeeInFeeCurrency);
assert.equal(fees.maxPriorityFeePerGas, maxPriorityFeeInFeeCurrency);

Expand Down Expand Up @@ -327,7 +325,7 @@ describe("viem send tx", () => {
maxFeePerGas: gasPrice,
maxPriorityFeePerGas: 0n,
});
await expectTxFail(request, "transaction gas price below minimum");
await expectTxFail(request, "gas tip cap 0");
}).timeout(10_000);

});
Expand Down
5 changes: 4 additions & 1 deletion e2e_test/js-tests/viem_setup.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
webSocket,
defineChain,
} from "viem";
import { celo, celoAlfajores } from "viem/chains";
import { celo, celoAlfajores, celoSepolia } from "viem/chains";
import { privateKeyToAccount } from "viem/accounts";

// Setup up chain
Expand Down Expand Up @@ -51,6 +51,8 @@ const chain = (() => {
return celoAlfajores
case 'baklava':
return celoBaklava
case 'celo-sepolia':
return celoSepolia
case 'mainnet':
return celoMainnet
default:
Expand All @@ -62,6 +64,7 @@ const transportForNetwork = (() => {
switch (process.env.NETWORK) {
case 'alfajores':
case 'baklava':
case 'celo-sepolia':
case 'mainnet':
return webSocket(process.env.ETH_RPC_URL);
default:
Expand Down
8 changes: 8 additions & 0 deletions e2e_test/shared.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,14 @@ baklava)
export FEE_CURRENCY_DIRECTORY_ADDR=0xD59E1599F45e42Eb356202B2C714D6C7b734C034
echo "Using Baklava network"
;;
celo-sepolia)
export ETH_RPC_URL=wss://forno.celo-sepolia.celo-testnet.org/ws
export TOKEN_ADDR=0x471EcE3750Da237f93B8E339c536989b8978a438
export FEE_HANDLER=0xcD437749E43A154C07F3553504c68fBfD56B8778
export FEE_CURRENCY=0x6B172e333e2978484261D7eCC3DE491E79764BbC
export FEE_CURRENCY_DIRECTORY_ADDR=0x9212Fb72ae65367A7c887eC4Ad9bE310BAC611BF
echo "Using Celo Sepolia network"
;;
'')
export ETH_RPC_URL=http://127.0.0.1:8545
export TOKEN_ADDR=0x471ece3750da237f93b8e339c536989b8978a438
Expand Down