Skip to content

Commit

Permalink
Merge branch 'main' into cosmos_sdk_47_8
Browse files Browse the repository at this point in the history
  • Loading branch information
yerasyla committed Mar 26, 2024
2 parents b621b42 + b7705b6 commit 4af8442
Show file tree
Hide file tree
Showing 13 changed files with 125 additions and 131 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ parent:
-->

<div align="center">
<h1> Ethermint </h1>
<h1> Entangle </h1>
</div>

[Entangle](https://www.entangle.fi/) blockchain node based on Ethermint - a scalable and interoperable Ethereum library, built on Proof-of-Stake with fast-finality using the [Cosmos SDK](https://github.com/cosmos/cosmos-sdk/) which runs on top of [Tendermint Core](https://github.com/cometbft/cometbft) consensus engine.
Expand Down Expand Up @@ -95,7 +95,7 @@ sh run_node.sh

- [Official Website](https://www.entangle.fi/)
- [Twitter](https://twitter.com/Entanglefi)
- [Discord](https://discord.com/invite/entanglefi)
- [Discord](https://discord.com/invite/entangle)

## Contributing

Expand Down
4 changes: 2 additions & 2 deletions client/debug/debug.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ func AddrCmd() *cobra.Command {
Short: "Convert an address between hex and bech32",
Long: "Convert an address between hex encoding and bech32.",
Example: fmt.Sprintf(
`$ %s debug addr ethm10jmp6sgh4cc6zt3e8gw05wavvejgr5pw2unfju
$ %s debug addr 0xA588C66983a81e800Db4dF74564F09f91c026351`, version.AppName, version.AppName),
`$ %s debug addr ent1dsj2c3k5mucpx2nmeu5067vf9t5s70mgmwg4uh
$ %s debug addr 0x6C24Ac46d4DF30132a7BCF28fD79892ae90f3F68`, version.AppName, version.AppName),
Args: cobra.ExactArgs(1),
RunE: func(cmd *cobra.Command, args []string) error {
addrString := args[0]
Expand Down
2 changes: 1 addition & 1 deletion cmd/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (

const (
// Bech32Prefix defines the Bech32 prefix used for EthAccounts
Bech32Prefix = "ethm"
Bech32Prefix = "ent"

// Bech32PrefixAccAddr defines the Bech32 prefix of an account's address
Bech32PrefixAccAddr = Bech32Prefix
Expand Down
22 changes: 11 additions & 11 deletions config/genesis.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
{
"@type": "/ethermint.types.v1.EthAccount",
"base_account": {
"address": "ethm12k2wt5f5jau5c28cfkpajw7y5snr37tr8yqsxs",
"address": "ent12k2wt5f5jau5c28cfkpajw7y5snr37trunzuvy",
"pub_key": null,
"account_number": "0",
"sequence": "0"
Expand All @@ -42,7 +42,7 @@
{
"@type": "/ethermint.types.v1.EthAccount",
"base_account": {
"address": "ethm1790k9v035ad5hf2rtptds74j8g4rktnp3jp87r",
"address": "ent1790k9v035ad5hf2rtptds74j8g4rktnp29rt5h",
"pub_key": null,
"account_number": "0",
"sequence": "0"
Expand All @@ -52,7 +52,7 @@
{
"@type": "/ethermint.types.v1.EthAccount",
"base_account": {
"address": "ethm1k2k7gnrxghwrdj3drehddcughk8cfqnmv6n6dr",
"address": "ent1k2k7gnrxghwrdj3drehddcughk8cfqnmhd3k8h",
"pub_key": null,
"account_number": "0",
"sequence": "0"
Expand All @@ -62,7 +62,7 @@
{
"@type": "/ethermint.types.v1.EthAccount",
"base_account": {
"address": "ethm1d9r4x5r3fvymvzewesa2t3q8h8gu4myxgklefl",
"address": "ent1d9r4x5r3fvymvzewesa2t3q8h8gu4myxnpa4rt",
"pub_key": null,
"account_number": "0",
"sequence": "0"
Expand All @@ -81,7 +81,7 @@
},
"balances": [
{
"address": "ethm12k2wt5f5jau5c28cfkpajw7y5snr37tr8yqsxs",
"address": "ent12k2wt5f5jau5c28cfkpajw7y5snr37trunzuvy",
"coins": [
{
"denom": "aNGL",
Expand All @@ -90,7 +90,7 @@
]
},
{
"address": "ethm1d9r4x5r3fvymvzewesa2t3q8h8gu4myxgklefl",
"address": "ent1d9r4x5r3fvymvzewesa2t3q8h8gu4myxnpa4rt",
"coins": [
{
"denom": "aNGL",
Expand All @@ -99,7 +99,7 @@
]
},
{
"address": "ethm1k2k7gnrxghwrdj3drehddcughk8cfqnmv6n6dr",
"address": "ent1k2k7gnrxghwrdj3drehddcughk8cfqnmhd3k8h",
"coins": [
{
"denom": "aNGL",
Expand All @@ -108,7 +108,7 @@
]
},
{
"address": "ethm1790k9v035ad5hf2rtptds74j8g4rktnp3jp87r",
"address": "ent1790k9v035ad5hf2rtptds74j8g4rktnp29rt5h",
"coins": [
{
"denom": "aNGL",
Expand Down Expand Up @@ -157,7 +157,7 @@
"distributorsauth": {
"admins": [
{
"address": "ethm1d9r4x5r3fvymvzewesa2t3q8h8gu4myxgklefl",
"address": "ent1d9r4x5r3fvymvzewesa2t3q8h8gu4myxnpa4rt",
"edit_option": true
}
],
Expand Down Expand Up @@ -230,8 +230,8 @@
"max_change_rate": "0.010000000000000000"
},
"min_self_delegation": "1",
"delegator_address": "ethm12k2wt5f5jau5c28cfkpajw7y5snr37tr8yqsxs",
"validator_address": "ethmvaloper12k2wt5f5jau5c28cfkpajw7y5snr37trg52u7d",
"delegator_address": "ent12k2wt5f5jau5c28cfkpajw7y5snr37trunzuvy",
"validator_address": "entvaloper12k2wt5f5jau5c28cfkpajw7y5snr37trwxjnas",
"pubkey": {
"@type": "/cosmos.crypto.ed25519.PubKey",
"key": "eEjeg38J4WmE2lrpEdeebr7uMr4iytBTNsbknLKKAZI="
Expand Down
9 changes: 1 addition & 8 deletions init_key.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,13 @@ KEYALGO="eth_secp256k1"
KEY=$1
PASSWORD=$2

# chack arguments
# check arguments
if [ "$#" -ne 2 ]; then
echo "Error. Wrong number of arguments"
echo "Using: $0 [KEY] [PASSWORD]"
exit 1
fi

command -v jq > /dev/null 2>&1 || { echo >&2 "jq not installed. More info: https://stedolan.github.io/jq/download/"; exit 1; }

make install

entangled config keyring-backend $KEYRING
entangled config chain-id $CHAINID

# if $KEY exists it should be deleted
yes $PASSWORD | entangled keys add $KEY --keyring-backend $KEYRING --algo $KEYALGO

Expand Down
13 changes: 7 additions & 6 deletions rpc/types/events_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,13 @@ func TestParseTxResult(t *testing.T) {
GasUsed: 21000,
Events: []abci.Event{
{Type: "coin_received", Attributes: []abci.EventAttribute{
{Key: "receiver", Value: "ethm12luku6uxehhak02py4rcz65zu0swh7wjun6msa"},
{Key: "receiver", Value: "ent12luku6uxehhak02py4rcz65zu0swh7wj8ych6f"},
{Key: "amount", Value: "1252860basetcro"},
}},
{Type: "coin_spent", Attributes: []abci.EventAttribute{
{Key: "spender", Value: "ethm17xpfvakm2amg962yls6f84z3kell8c5lthdzgl"},
{Key: "spender", Value: "ent17xpfvakm2amg962yls6f84z3kell8c5lsq0wzt"},
{Key: "amount", Value: "1252860basetcro"},

}},
{Type: evmtypes.EventTypeEthereumTx, Attributes: []abci.EventAttribute{
{Key: "ethereumTxHash", Value: txHash.Hex()},
Expand All @@ -43,7 +44,7 @@ func TestParseTxResult(t *testing.T) {
}},
{Type: "message", Attributes: []abci.EventAttribute{
{Key: "action", Value: "/ethermint.evm.v1.MsgEthereumTx"},
{Key: "key", Value: "ethm17xpfvakm2amg962yls6f84z3kell8c5lthdzgl"},
{Key: "key", Value: "ent17xpfvakm2amg962yls6f84z3kell8c5lsq0wzt"},
{Key: "module", Value: "evm"},
{Key: "sender", Value: address},
}},
Expand Down Expand Up @@ -82,11 +83,11 @@ func TestParseTxResult(t *testing.T) {
GasUsed: 21000,
Events: []abci.Event{
{Type: "coin_received", Attributes: []abci.EventAttribute{
{Key: "receiver", Value: "ethm12luku6uxehhak02py4rcz65zu0swh7wjun6msa"},
{Key: "receiver", Value: "ent12luku6uxehhak02py4rcz65zu0swh7wj8ych6f"},
{Key: "amount", Value: "1252860basetcro"},
}},
{Type: "coin_spent", Attributes: []abci.EventAttribute{
{Key: "spender", Value: "ethm17xpfvakm2amg962yls6f84z3kell8c5lthdzgl"},
{Key: "spender", Value: "ent17xpfvakm2amg962yls6f84z3kell8c5lsq0wzt"},
{Key: "amount", Value: "1252860basetcro"},
}},
{Type: evmtypes.EventTypeEthereumTx, Attributes: []abci.EventAttribute{
Expand All @@ -103,7 +104,7 @@ func TestParseTxResult(t *testing.T) {
}},
{Type: "message", Attributes: []abci.EventAttribute{
{Key: "action", Value: "/ethermint.evm.v1.MsgEthereumTx"},
{Key: "key", Value: "ethm17xpfvakm2amg962yls6f84z3kell8c5lthdzgl"},
{Key: "key", Value: "ent17xpfvakm2amg962yls6f84z3kell8c5lsq0wzt"},
{Key: "module", Value: "evm"},
{Key: "sender", Value: address},
}},
Expand Down
2 changes: 1 addition & 1 deletion run_node.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ entangled init $MONIKER --chain-id $CHAINID
cp -f config/genesis.json $HOME/.entangled/config/
cp -f config/config.toml $HOME/.entangled/config/

entangled start --pruning=nothing --evm.tracer=json --log_level $LOGLEVEL --minimum-gas-prices=0.0001aNGL --json-rpc.api eth,txpool,personal,net,debug,web3,miner --api.enable --api.enabled-unsafe-cors
entangled start --pruning=default --log_level $LOGLEVEL --minimum-gas-prices=0.0001aNGL --json-rpc.api eth,net,web3,miner
2 changes: 1 addition & 1 deletion tests/integration_tests/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
}
KEYS = {name: account.key for name, account in ACCOUNTS.items()}
ADDRS = {name: account.address for name, account in ACCOUNTS.items()}
ETHERMINT_ADDRESS_PREFIX = "ethm"
ETHERMINT_ADDRESS_PREFIX = "ent"
TEST_CONTRACTS = {
"TestERC20A": "TestERC20A.sol",
"Greeter": "Greeter.sol",
Expand Down
12 changes: 6 additions & 6 deletions tests/solidity/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,11 @@ When in doubt, you can also run the tests against a Ganache instance via `yarn t

The [`init-test-node.sh`](./init-test-node.sh) script sets up ethermint with the following accounts:

- `ethm10jmp6sgh4cc6zt3e8gw05wavvejgr5pwtu750w` (Validator)
- `ent10jmp6sgh4cc6zt3e8gw05wavvejgr5pwstuc9` (Validator)
- `0x7cB61D4117AE31a12E393a1Cfa3BaC666481D02E`
- `ethm1cml96vmptgw99syqrrz8az79xer2pcgp767p9e` (User 1)
- `ent1cml96vmptgw99syqrrz8az79xer2pcgp9dud0d` (User 1)
- `0xC6Fe5D33615a1C52c08018c47E8Bc53646A0E101`
- `ethm1jcltmuhplrdcwp7stlr4hlhlhgd4htqhgjpff2` (user 2)
- `ent1jcltmuhplrdcwp7stlr4hlhlhgd4htqhn9r9r7` (user 2)
- `0x963EBDf2e1f8DB8707D05FC75bfeFFBa1B5BaC17`

Each with roughly 100 ETH available (1e18 NGL).
Expand All @@ -62,19 +62,19 @@ Running `entangled keys list --keyring-backend=test` should output:
{
"name": "localkey",
"type": "local",
"address": "ethm18de995q8qk0leqk3d5pzmg7tlxvj6tmsku084d",
"address": "ent18de995q8qk0leqk3d5pzmg7tlxvj6tmsku084d",
"pubkey": "ethpub1pfqnmk6pq3ycjs34vv4n6rkty89f6m02qcsal3ecdzn7a3uunx0e5ly0846pzg903hxf2zp5gq4grh8jcatcemfrscdfl797zhg5crkcsx43gujzppge3n"
},
{
"name": "user1",
"type": "local",
"address": "ethm1mhtyk3cj7ly0rt8rc9zuj5pnnmw67gsapygwyq",
"address": "ent1mhtyk3cj7ly0rt8rc9zuj5pnnmw67gsapygwyq",
"pubkey": "ethpub1pfqnmk6pq3wrkx6lh7uug8ss0thggact3n49m5gkmpca4vylldpur5qrept57e0rrxfmeq5mp5xt3cyf4kys53qcv66qxttv970das69hlpkf8cnyd2a2x"
},
{
"name": "user2",
"type": "local",
"address": "ethm1pa20g7lehr330vs5ent20slr3wyne4lsy8qae3",
"address": "ent1pa20g7lehr330vs5ent20slr3wyne4lsy8qae3",
"pubkey": "ethpub1pfqnmk6pq3art9y45zw5ntyktt2qrt0skmsl0ux9qwk8458ed3d8sgnrs99zlgvj3rt2vggvkh0x56hffugwsyddwqla48npx46pglgs6xhcqpall58tgn"
}
]
Expand Down
14 changes: 7 additions & 7 deletions x/distributorsauth/keeper/abci_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,31 +24,31 @@ func (suite *KeeperTestSuite) TestEndBlock() {
"No correct Distributors",
func() {},
false,
"ethm1tjm23pl06ja8zgag08q2vt8smrnyds9yzkx7ww",
"ent1tjm23pl06ja8zgag08q2vt8smrnyds9yepyjy6",
},
{
"Distributor with timer in future",
func() {
suite.app.DistributorsAuthKeeper.AddDistributor(suite.ctx, distributorsauthtypes.DistributorInfo{Address: "ethm1tjm23pl06ja8zgag08q2vt8smrnyds9yzkx7ww", EndDate: uint64(1234567890123)})
suite.app.DistributorsAuthKeeper.AddDistributor(suite.ctx, distributorsauthtypes.DistributorInfo{Address: "ent1tjm23pl06ja8zgag08q2vt8smrnyds9yepyjy6", EndDate: uint64(1234567890123)})
},
true,
"ethm1tjm23pl06ja8zgag08q2vt8smrnyds9yzkx7ww",
"ent1tjm23pl06ja8zgag08q2vt8smrnyds9yepyjy6",
},
{
"Distributor with 0 timer",
func() {
suite.app.DistributorsAuthKeeper.AddDistributor(suite.ctx, distributorsauthtypes.DistributorInfo{Address: "ethm1tjm23pl06ja8zgag08q2vt8smrnyds9yzkx7ww", EndDate: uint64(0)})
suite.app.DistributorsAuthKeeper.AddDistributor(suite.ctx, distributorsauthtypes.DistributorInfo{Address: "ent1tjm23pl06ja8zgag08q2vt8smrnyds9yepyjy6", EndDate: uint64(0)})
},
true,
"ethm1tjm23pl06ja8zgag08q2vt8smrnyds9yzkx7ww",
"ent1tjm23pl06ja8zgag08q2vt8smrnyds9yepyjy6",
},
{
"Distributor remove",
func() {
suite.app.DistributorsAuthKeeper.AddDistributor(suite.ctx, distributorsauthtypes.DistributorInfo{Address: "ethm1tjm23pl06ja8zgag08q2vt8smrnyds9yzkx7ww", EndDate: uint64(100)})
suite.app.DistributorsAuthKeeper.AddDistributor(suite.ctx, distributorsauthtypes.DistributorInfo{Address: "ent1tjm23pl06ja8zgag08q2vt8smrnyds9yepyjy6", EndDate: uint64(100)})
},
false,
"ethm1tjm23pl06ja8zgag08q2vt8smrnyds9yzkx7ww",
"ent1tjm23pl06ja8zgag08q2vt8smrnyds9yepyjy6",
},
}
for _, tc := range testCases {
Expand Down
12 changes: 6 additions & 6 deletions x/distributorsauth/keeper/grpc_query_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ func (suite *KeeperTestSuite) TestQueryDistributor() {

expRes = &types.QueryDistributorResponse{Distributor: distr}
},
"ethm1tjm23pl06ja8zgag08q2vt8smrnyds9yzkx7ww",
"ent1tjm23pl06ja8zgag08q2vt8smrnyds9yepyjy6",
timeInFuture,
},
}
Expand Down Expand Up @@ -75,7 +75,7 @@ func (suite *KeeperTestSuite) TestQueryDistributors() {

expRes = &types.QueryDistributorsResponse{Distributors: []types.DistributorInfo{distr}}
},
"ethm1tjm23pl06ja8zgag08q2vt8smrnyds9yzkx7ww",
"ent1tjm23pl06ja8zgag08q2vt8smrnyds9yepyjy6",
timeInFuture,
},
}
Expand Down Expand Up @@ -110,7 +110,7 @@ func (suite *KeeperTestSuite) TestQueryAdmin() {

expRes = &types.QueryAdminResponse{Admin: admin}
},
"ethm1tjm23pl06ja8zgag08q2vt8smrnyds9yzkx7ww",
"ent1tjm23pl06ja8zgag08q2vt8smrnyds9yepyjy6",
true,
},
{
Expand All @@ -124,7 +124,7 @@ func (suite *KeeperTestSuite) TestQueryAdmin() {

expRes = &types.QueryAdminResponse{Admin: admin}
},
"ethm1cdsdkvxydypnhtec5y880qdtdexcu2ehf0lpv8",
"ent1cdsdkvxydypnhtec5y880qdtdexcu2ehjcadxn",
true,
},
}
Expand Down Expand Up @@ -169,7 +169,7 @@ func (suite *KeeperTestSuite) TestQueryAdmins() {

expRes = &types.QueryAdminsResponse{Admins: []types.Admin{admin}}
},
"ethm1tjm23pl06ja8zgag08q2vt8smrnyds9yzkx7ww",
"ent1tjm23pl06ja8zgag08q2vt8smrnyds9yepyjy6",
true,
},
{
Expand All @@ -183,7 +183,7 @@ func (suite *KeeperTestSuite) TestQueryAdmins() {

expRes = &types.QueryAdminsResponse{Admins: []types.Admin{admin}}
},
"ethm1tjm23pl06ja8zgag08q2vt8smrnyds9yzkx7ww",
"ent1tjm23pl06ja8zgag08q2vt8smrnyds9yepyjy6",
false,
},
}
Expand Down
Loading

0 comments on commit 4af8442

Please sign in to comment.