Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: staking precompile #2784

Merged
merged 31 commits into from
Sep 5, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
44dc9ce
add boilerplate for staking precompile with empty delegate method
skosito Aug 28, 2024
766a30a
add simple undelegate and redelegate methods
skosito Aug 28, 2024
9e97065
add new methods to run
skosito Aug 28, 2024
6984671
add simple tests
skosito Aug 28, 2024
6c2128b
add delegator caller checks
skosito Aug 28, 2024
dacf5fb
fix del addr origin check
skosito Aug 28, 2024
f16df7f
add unit tests for delegate method
skosito Aug 28, 2024
b335fc9
changelog
skosito Aug 28, 2024
f5dc0c3
add undelegate tests
skosito Aug 28, 2024
758864d
add redelegate unit tests
skosito Aug 28, 2024
f7aa77e
renamings
skosito Aug 29, 2024
d1df9ec
generate
skosito Aug 29, 2024
0003316
pr comments
skosito Aug 29, 2024
378ea6d
codecov
skosito Aug 29, 2024
781cdd4
renaming
skosito Aug 29, 2024
7f1999d
e2e test and fixes
skosito Aug 29, 2024
9eb8775
generate
skosito Aug 29, 2024
7f8c962
Merge branch 'develop' into stake-precompile
skosito Aug 29, 2024
a063f84
fix tests
skosito Aug 30, 2024
c425696
fix view methods required gas
skosito Aug 30, 2024
43f063e
add queries unit tests
skosito Aug 30, 2024
2e6cb8a
Merge branch 'develop' into stake-precompile
skosito Aug 30, 2024
5af835f
add more unit tests and refactor a bit
skosito Aug 30, 2024
17380ca
fmt
skosito Aug 30, 2024
e4ae503
Merge branch 'develop' into stake-precompile
skosito Aug 30, 2024
ecf6d12
fixes after merge
skosito Aug 30, 2024
0bef0e7
cleanup
skosito Aug 30, 2024
f991479
PR comments
skosito Sep 2, 2024
09f35e8
add todo with issue
skosito Sep 2, 2024
f88bfa1
PR comment and bug fix with validators append
skosito Sep 4, 2024
5e1f021
Merge branch 'develop' into stake-precompile
skosito Sep 5, 2024
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
Prev Previous commit
Next Next commit
Merge branch 'develop' into stake-precompile
  • Loading branch information
skosito committed Aug 30, 2024
commit 2e6cb8a75e02a073227b35158eead9f442fef92f
22 changes: 21 additions & 1 deletion contrib/localnet/orchestrator/start-zetae2e.sh
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,29 @@ address=$(yq -r '.additional_accounts.user_migration.evm_address' config.yml)
echo "funding migration tester address ${address} with 10000 Ether"
geth --exec "eth.sendTransaction({from: eth.coinbase, to: '${address}', value: web3.toWei(10000,'ether')})" attach http://eth:8545 > /dev/null

# unlock v2 ethers tests accounts
address=$(yq -r '.additional_accounts.user_v2_ether.evm_address' config.yml)
echo "funding v2 ethers tester address ${address} with 10000 Ether"
geth --exec "eth.sendTransaction({from: eth.coinbase, to: '${address}', value: web3.toWei(10000,'ether')})" attach http://eth:8545 > /dev/null

# unlock v2 erc20 tests accounts
address=$(yq -r '.additional_accounts.user_v2_erc20.evm_address' config.yml)
echo "funding v2 erc20 tester address ${address} with 10000 Ether"
geth --exec "eth.sendTransaction({from: eth.coinbase, to: '${address}', value: web3.toWei(10000,'ether')})" attach http://eth:8545 > /dev/null

# unlock v2 ethers revert tests accounts
address=$(yq -r '.additional_accounts.user_v2_ether_revert.evm_address' config.yml)
echo "funding v2 ethers revert tester address ${address} with 10000 Ether"
geth --exec "eth.sendTransaction({from: eth.coinbase, to: '${address}', value: web3.toWei(10000,'ether')})" attach http://eth:8545 > /dev/null

# unlock v2 erc20 revert tests accounts
address=$(yq -r '.additional_accounts.user_v2_erc20_revert.evm_address' config.yml)
echo "funding v2 erc20 revert tester address ${address} with 10000 Ether"
geth --exec "eth.sendTransaction({from: eth.coinbase, to: '${address}', value: web3.toWei(10000,'ether')})" attach http://eth:8545 > /dev/null

# unlock precompile tests accounts
address=$(yq -r '.additional_accounts.user_precompile.evm_address' config.yml)
echo "funding migration tester address ${address} with 10000 Ether"
echo "funding precompile tester address ${address} with 10000 Ether"
geth --exec "eth.sendTransaction({from: eth.coinbase, to: '${address}', value: web3.toWei(10000,'ether')})" attach http://eth:8545 > /dev/null

# unlock local solana relayer accounts
Expand Down
12 changes: 12 additions & 0 deletions contrib/localnet/scripts/start-zetacored.sh
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,18 @@ then
# precompiles tester
address=$(yq -r '.additional_accounts.user_precompile.bech32_address' /root/config.yml)
zetacored add-genesis-account "$address" 100000000000000000000000000azeta
# v2 ether tester
address=$(yq -r '.additional_accounts.user_v2_ether.bech32_address' /root/config.yml)
zetacored add-genesis-account "$address" 100000000000000000000000000azeta
# v2 erc20 tester
address=$(yq -r '.additional_accounts.user_v2_erc20.bech32_address' /root/config.yml)
zetacored add-genesis-account "$address" 100000000000000000000000000azeta
# v2 ether revert tester
address=$(yq -r '.additional_accounts.user_v2_ether_revert.bech32_address' /root/config.yml)
zetacored add-genesis-account "$address" 100000000000000000000000000azeta
# v2 erc20 revert tester
address=$(yq -r '.additional_accounts.user_v2_erc20_revert.bech32_address' /root/config.yml)
zetacored add-genesis-account "$address" 100000000000000000000000000azeta

# 3. Copy the genesis.json to all the nodes .And use it to create a gentx for every node
zetacored gentx operator 1000000000000000000000azeta --chain-id=$CHAINID --keyring-backend=$KEYRING --gas-prices 20000000000azeta
Expand Down
Loading
You are viewing a condensed version of this merge commit. You can view the full changes here.