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

Erc20 keeper extend #21

Draft
wants to merge 4 commits into
base: erc20-module
Choose a base branch
from
Draft

Erc20 keeper extend #21

wants to merge 4 commits into from

Conversation

hieuvubk
Copy link

No description provided.

// TODO: these values were obtained from Remix using the ERC20.sol from OpenZeppelin.
// We should execute the transactions using the ERC20MinterBurnerDecimals.sol from Evmos testnet
// to ensure parity in the values.
switch method.Name {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing gas calculating for mint, burn

@@ -185,7 +185,7 @@ func (suite *AnteTestSuite) BuildTestEthTx(
gasTipCap *big.Int,
accesses *ethtypes.AccessList,
) *evmtypes.MsgEthereumTx {
chainID := suite.app.EvmKeeper.ChainID()
chainID := evmtypes.GetEthChainConfig().ChainID
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is static value. We can change to this:

	chainConfig, _ := suite.app.EvmKeeper.EVMConfig()
	
	nonce := suite.app.EvmKeeper.GetNonce(
		suite.ctx,
		common.BytesToAddress(from.Bytes()),
	)
	data := make([]byte, 0)
	gasLimit := uint64(100000)

	args := evmtypes.EvmTxArgs{
		Nonce:     nonce,
		GasLimit:  gasLimit,
		Input:     data,
		GasFeeCap: gasFeeCap,
		GasPrice:  gasPrice,
		ChainID:   chainConfig.ChainConfig.ChainID,
		GasTipCap: gasTipCap,
		Amount:    nil,
		To:        &to,
		Accesses:  accesses,
	}


// IsTransaction checks if the given method name corresponds to a transaction or query.
func (Precompile) IsTransaction(method *abi.Method) bool {
switch method.Name {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing Mint, Burn

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants