mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-27 07:06:42 +00:00
CI changes to accommodate Anvil
This commit is contained in:
parent
08f81df254
commit
a1b401460b
3 changed files with 12 additions and 26 deletions
4
.github/matic-cli-config.yml
vendored
4
.github/matic-cli-config.yml
vendored
|
|
@ -2,7 +2,7 @@ defaultStake: 10000
|
||||||
defaultFee: 2000
|
defaultFee: 2000
|
||||||
borChainId: 15001
|
borChainId: 15001
|
||||||
heimdallChainId: heimdall-15001
|
heimdallChainId: heimdall-15001
|
||||||
contractsBranch: mardizzone/node-16
|
contractsBranch: anvil-pos
|
||||||
genesisContractsBranch: master
|
genesisContractsBranch: master
|
||||||
sprintSize:
|
sprintSize:
|
||||||
- '64'
|
- '64'
|
||||||
|
|
@ -16,7 +16,7 @@ numOfBorArchiveNodes: 0
|
||||||
numOfErigonValidators: 0
|
numOfErigonValidators: 0
|
||||||
numOfErigonSentries: 0
|
numOfErigonSentries: 0
|
||||||
numOfErigonArchiveNodes: 0
|
numOfErigonArchiveNodes: 0
|
||||||
ethURL: http://ganache:9545
|
ethURL: http://anvil:9545
|
||||||
ethHostUser: ubuntu
|
ethHostUser: ubuntu
|
||||||
devnetType: docker
|
devnetType: docker
|
||||||
borDockerBuildContext: "../../bor"
|
borDockerBuildContext: "../../bor"
|
||||||
|
|
|
||||||
15
.github/workflows/ci.yml
vendored
15
.github/workflows/ci.yml
vendored
|
|
@ -225,6 +225,9 @@ jobs:
|
||||||
matic-cli/devnet/code/genesis-contracts/package-lock.json
|
matic-cli/devnet/code/genesis-contracts/package-lock.json
|
||||||
matic-cli/devnet/code/genesis-contracts/matic-contracts/package-lock.json
|
matic-cli/devnet/code/genesis-contracts/matic-contracts/package-lock.json
|
||||||
|
|
||||||
|
- name: Install Foundry
|
||||||
|
uses: foundry-rs/foundry-toolchain@v1
|
||||||
|
|
||||||
- name: Bootstrap devnet
|
- name: Bootstrap devnet
|
||||||
run: |
|
run: |
|
||||||
cd matic-cli
|
cd matic-cli
|
||||||
|
|
@ -242,12 +245,14 @@ jobs:
|
||||||
|
|
||||||
- name: Run smoke tests
|
- name: Run smoke tests
|
||||||
run: |
|
run: |
|
||||||
echo "Funding ganache accounts..."
|
|
||||||
timeout 10m bash bor/integration-tests/fund_ganache_accounts.sh
|
|
||||||
echo "Deposit 100 matic for each account to bor network"
|
echo "Deposit 100 matic for each account to bor network"
|
||||||
cd matic-cli/devnet/code/contracts
|
cd matic-cli/devnet/devnet
|
||||||
npm run truffle exec scripts/deposit.js -- --network development $(jq -r .root.tokens.MaticToken contractAddresses.json) 100000000000000000000
|
SCRIPT_ADDRESS=$(jq -r '.[0].address' signer-dump.json)
|
||||||
cd -
|
SCRIPT_PRIVATE_KEY=$(jq -r '.[0].priv_key' signer-dump.json)
|
||||||
|
cd ../code/pos-contracts
|
||||||
|
CONTRACT_ADDRESS=$(jq -r .root.tokens.MaticToken contractAddresses.json)
|
||||||
|
forge script scripts/matic-cli-scripts/Deposit.s.sol:MaticDeposit --rpc-url http://localhost:9545 --private-key $SCRIPT_PRIVATE_KEY --broadcast --sig "run(address,address,uint256)" $SCRIPT_ADDRESS $CONTRACT_ADDRESS 100000000000000000000
|
||||||
|
cd ../../../..
|
||||||
timeout 60m bash bor/integration-tests/smoke_test.sh
|
timeout 60m bash bor/integration-tests/smoke_test.sh
|
||||||
|
|
||||||
- name: Run RPC Tests
|
- name: Run RPC Tests
|
||||||
|
|
|
||||||
|
|
@ -1,19 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
host='localhost'
|
|
||||||
|
|
||||||
echo "Transferring 1 ETH from ganache account[0] to all others..."
|
|
||||||
|
|
||||||
signersFile="matic-cli/devnet/devnet/signer-dump.json"
|
|
||||||
signersDump=$(jq . $signersFile)
|
|
||||||
signersLength=$(jq '. | length' $signersFile)
|
|
||||||
|
|
||||||
rootChainWeb3="http://${host}:9545"
|
|
||||||
|
|
||||||
for ((i = 1; i < signersLength; i++)); do
|
|
||||||
to_address=$(echo "$signersDump" | jq -r ".[$i].address")
|
|
||||||
from_address=$(echo "$signersDump" | jq -r ".[0].address")
|
|
||||||
txReceipt=$(curl $rootChainWeb3 -X POST --data '{"jsonrpc":"2.0","method":"eth_sendTransaction","params":[{"to":"'"$to_address"'","from":"'"$from_address"'","value":"0xDE0B6B3A7640000"}],"id":1}' -H "Content-Type: application/json")
|
|
||||||
txHash=$(echo "$txReceipt" | jq -r '.result')
|
|
||||||
echo "Funds transferred from $from_address to $to_address with txHash: $txHash"
|
|
||||||
done
|
|
||||||
Loading…
Reference in a new issue