Skip to content
Open
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 .gitleaks.toml
Original file line number Diff line number Diff line change
Expand Up @@ -1709,7 +1709,7 @@ stopwords= [
"phalcon",
"input",
"custom",
"atom",
"edgens",
"oracle",
"phonegap",
"ubuntu",
Expand Down
2 changes: 1 addition & 1 deletion ante/cosmos/min_gas_price.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ func (mpd MinGasPriceDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate
feeCoins := feeTx.GetFee()
evmDenom := evmtypes.GetEVMCoinDenom()

// only allow user to pass in aatom and stake native token as transaction fees
// only allow user to pass in aedgens and stake native token as transaction fees
// allow use stake native tokens for fees is just for unit tests to pass
//
// TODO: is the handling of stake necessary here? Why not adjust the tests to contain the correct denom?
Expand Down
6 changes: 3 additions & 3 deletions ante/evm/04_validate.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,9 @@ func CheckTxFee(txFeeInfo *tx.Fee, txFee *big.Int, txGasLimit uint64) error {
}

// NOTE: When an evm tx comes in, it goes through the process of converting it
// to MsgEthereumTx, which is a sdk tx. Here, the denom will be a uatom, not aatom.
// BuildTx then converts uatom to aatom meaning that logic that interacts with the user
// will use uatom and internal processing such as the ante handler will operate based on aatom.
// to MsgEthereumTx, which is a sdk tx. Here, the denom will be a uedgens, not aedgens.
// BuildTx then converts uedgens to aedgens meaning that logic that interacts with the user
// will use uedgens and internal processing such as the ante handler will operate based on aedgens.
evmExtendedDenom := evmtypes.GetEVMCoinExtendedDenom()
if !txFeeInfo.Amount.AmountOf(evmExtendedDenom).Equal(sdkmath.NewIntFromBigInt(txFee)) {
return errorsmod.Wrapf(errortypes.ErrInvalidRequest, "invalid AuthInfo Fee Amount (%s != %s)", txFeeInfo.Amount, txFee)
Expand Down
16 changes: 8 additions & 8 deletions ante/evm/ante_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -662,7 +662,7 @@ func (suite *AnteTestSuite) TestAnteHandler() {
addr[:],
sdk.NewCoins(
sdk.NewCoin(
"uatomz",
"uedgensz",
sdkmath.NewInt(1),
),
),
Expand Down Expand Up @@ -692,7 +692,7 @@ func (suite *AnteTestSuite) TestAnteHandler() {
addr[:],
sdk.NewCoins(
sdk.NewCoin(
"uatomz",
"uedgensz",
sdkmath.NewInt(1),
),
),
Expand Down Expand Up @@ -747,7 +747,7 @@ func (suite *AnteTestSuite) TestAnteHandler() {
addr[:],
sdk.NewCoins(
sdk.NewCoin(
"uatomz",
"uedgensz",
sdkmath.NewInt(1),
),
),
Expand Down Expand Up @@ -777,7 +777,7 @@ func (suite *AnteTestSuite) TestAnteHandler() {
addr[:],
sdk.NewCoins(
sdk.NewCoin(
"uatomz",
"uedgensz",
sdkmath.NewInt(1),
),
),
Expand Down Expand Up @@ -807,7 +807,7 @@ func (suite *AnteTestSuite) TestAnteHandler() {
addr[:],
sdk.NewCoins(
sdk.NewCoin(
"uatomz",
"uedgensz",
sdkmath.NewInt(1),
),
),
Expand Down Expand Up @@ -837,7 +837,7 @@ func (suite *AnteTestSuite) TestAnteHandler() {
addr[:],
sdk.NewCoins(
sdk.NewCoin(
"uatomz",
"uedgensz",
sdkmath.NewInt(1),
),
),
Expand Down Expand Up @@ -871,7 +871,7 @@ func (suite *AnteTestSuite) TestAnteHandler() {
addr[:],
sdk.NewCoins(
sdk.NewCoin(
"uatomz",
"uedgensz",
sdkmath.NewInt(1),
),
),
Expand Down Expand Up @@ -901,7 +901,7 @@ func (suite *AnteTestSuite) TestAnteHandler() {
addr[:],
sdk.NewCoins(
sdk.NewCoin(
"uatomz",
"uedgensz",
sdkmath.NewInt(1),
),
),
Expand Down
10 changes: 5 additions & 5 deletions ante/evm/fee_checker_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ func TestSDKTxFeeChecker(t *testing.T) {
return txBuilder.GetTx()
},
false,
"10aatom",
"10aedgens",
0,
true,
},
Expand Down Expand Up @@ -155,7 +155,7 @@ func TestSDKTxFeeChecker(t *testing.T) {
return txBuilder.GetTx()
},
true,
"10aatom",
"10aedgens",
0,
true,
},
Expand All @@ -172,7 +172,7 @@ func TestSDKTxFeeChecker(t *testing.T) {
return txBuilder.GetTx()
},
true,
"10000010aatom",
"10000010aedgens",
10,
true,
},
Expand All @@ -193,7 +193,7 @@ func TestSDKTxFeeChecker(t *testing.T) {
return txBuilder.GetTx()
},
true,
"10aatom",
"10aedgens",
0,
true,
},
Expand All @@ -216,7 +216,7 @@ func TestSDKTxFeeChecker(t *testing.T) {
return txBuilder.GetTx()
},
true,
"5000010aatom",
"5000010aedgens",
5,
true,
},
Expand Down
2 changes: 1 addition & 1 deletion api/cosmos/evm/precisebank/v1/genesis.pulsar.go

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

12 changes: 6 additions & 6 deletions cmd/evmd/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ var ChainsCoinInfo = map[uint64]evmtypes.EvmCoinInfo{
Decimals: evmtypes.EighteenDecimals,
},
CosmosChainID: {
Denom: "atest",
ExtendedDenom: "atest",
DisplayDenom: "test",
Denom: "aedgen",
ExtendedDenom: "aedgen",
DisplayDenom: "edgen",
Decimals: evmtypes.EighteenDecimals,
},
}
Expand All @@ -41,13 +41,13 @@ const (
// Bech32PrefixConsPub defines the Bech32 prefix of a consensus node public key.
Bech32PrefixConsPub = Bech32Prefix + sdk.PrefixValidator + sdk.PrefixConsensus + sdk.PrefixPublic
// DisplayDenom defines the denomination displayed to users in client applications.
DisplayDenom = "atom"
DisplayDenom = "edgens"
// BaseDenom defines to the default denomination used in the Cosmos EVM example chain.
BaseDenom = "aatom"
BaseDenom = "aedgens"
// BaseDenomUnit defines the precision of the base denomination.
BaseDenomUnit = 18
// EVMChainID defines the EIP-155 replay-protection chain id for the current ethereum chain config.
EVMChainID = 262144
EVMChainID = 4207
)

// SetBech32Prefixes sets the global prefixes to be used when serializing addresses and public keys to Bech32 strings.
Expand Down
6 changes: 3 additions & 3 deletions cmd/evmd/config/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ package config

const (
// ExampleChainDenom is the denomination of the Cosmos EVM example chain's base coin.
ExampleChainDenom = "aatom"
ExampleChainDenom = "aedgens"

// ExampleDisplayDenom is the display denomination of the Cosmos EVM example chain's base coin.
ExampleDisplayDenom = "atom"
ExampleDisplayDenom = "edgens"

// EighteenDecimalsChainID is the chain ID for the 18 decimals chain.
EighteenDecimalsChainID = 9001
Expand All @@ -19,7 +19,7 @@ const (
// TwoDecimalsChainID is the chain ID for the 2 decimals chain.
TwoDecimalsChainID = 9004

CosmosChainID = 262144
CosmosChainID = 4207

// TestChainID1 is test chain IDs for IBC E2E test
TestChainID1 = 9005
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"_format": "hh-sol-artifact-1",
"contractName": "WATOM",
"sourceName": "solidity/WATOM.sol",
"contractName": "WEDGENS",
"sourceName": "solidity/WEDGENS.sol",
"abi": [
{
"anonymous": false,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

contract WATOM {
string public name = "Wrapped Atom";
string public symbol = "WATOM";
contract WEDGENS {
string public name = "Wrapped Edgens";
string public symbol = "WEDGENS";
uint8 public decimals = 18;

mapping(address => uint256) public balanceOf;
Expand All @@ -12,7 +12,7 @@ contract WATOM {
event Withdrawal(address indexed src, uint256 amount);
event Transfer(address indexed src, address indexed dst, uint256 amount);

// Receive ether and wrap it into ATOM
// Receive ether and wrap it into EDGENS
receive() external payable {
deposit();
}
Expand Down
14 changes: 7 additions & 7 deletions contracts/watom.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,19 @@ import (
)

var (
// WATOMJSON are the compiled bytes of the WATOMContract
// WEDGENSJSON are the compiled bytes of the WEDGENSContract
//
//go:embed solidity/WATOM.json
WATOMJSON []byte
//go:embed solidity/WEDGENS.json
WEDGENSJSON []byte

// WATOMContract is the compiled watom contract
WATOMContract evmtypes.CompiledContract
// WEDGENSContract is the compiled wedgens contract
WEDGENSContract evmtypes.CompiledContract
)

func init() {
var err error
if WATOMContract, err = contractutils.ConvertHardhatBytesToCompiledContract(
WATOMJSON,
if WEDGENSContract, err = contractutils.ConvertHardhatBytesToCompiledContract(
WEDGENSJSON,
); err != nil {
panic(err)
}
Expand Down
6 changes: 3 additions & 3 deletions evmd/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ repository, which itself is a simplified version of a Cosmos SDK-based
blockchain.

This chain implementation is used to demonstrate the integration of Cosmos EVM
as well as to provide a chain object for testing purposes within the repository.
as well as to provide a chain object for edgening purposes within the repository.

## Config

Expand All @@ -18,7 +18,7 @@ By default, this chain has the following configuration:
| Chain ID | `cosmos_262144-1` |
| Custom Opcodes | - |
| Default Token Pairs | 1 for the native token |
| Denomination | `atest` |
| Denomination | `aedgen` |
| EVM permissioning | permissionless |
| Enabled Precompiles | all |

Expand All @@ -42,7 +42,7 @@ Available flags are:
For the sake of this example, we'll be using Metamask:

1. Use the following seed phrase when adding a new wallet:
`gesture inject test cycle original hollow east ridge hen combine
`gesture inject edgen cycle original hollow east ridge hen combine
junk child baconzero hope comfort vacuum milk pitch cage oppose
unhappy lunar seat`
2. On the top left of the Metamask extension, click the Network button.
Expand Down
2 changes: 1 addition & 1 deletion evmd/ante/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ var _ = Describe("when sending a Cosmos transaction", Label("AnteHandler"), Orde
addr, priv = testutiltx.NewAccAddressAndKey()

// this is a new address that does not exist on chain.
// Transfer 1 aatom to this account so it is
// Transfer 1 aedgens to this account so it is
// added on chain
err := s.factory.FundAccount(
s.keyring.GetKey(0),
Expand Down
6 changes: 3 additions & 3 deletions evmd/config_testing.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ var ChainsCoinInfo = map[uint64]evmtypes.EvmCoinInfo{
Decimals: evmtypes.EighteenDecimals,
},
config.SixDecimalsChainID: {
Denom: "utest",
ExtendedDenom: "atest",
DisplayDenom: "test",
Denom: "uedgen",
ExtendedDenom: "aedgen",
DisplayDenom: "edgen",
Decimals: evmtypes.SixDecimals,
},
config.TwelveDecimalsChainID: {
Expand Down
Loading