This repository has been archived by the owner on Nov 30, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 161
Call uniswapV2 contract on ethermint, the operation fails, but the same operation can be successful on ethereum #626
Labels
Comments
Cause Analysis
|
After some debug, we found out that some EIP Code has not enabled, when I passing eip params into evm, the uniswap V2 createPair succeed: func (st StateTransition) newEVM(ctx sdk.Context, csdb *CommitStateDB, gasLimit uint64, gasPrice *big.Int, config ChainConfig) *vm.EVM {
// Create context for evm
context := vm.Context{
CanTransfer: core.CanTransfer,
Transfer: core.Transfer,
Origin: st.Sender,
Coinbase: common.Address{}, // there's no benefitiary since we're not mining
BlockNumber: big.NewInt(ctx.BlockHeight()),
Time: big.NewInt(ctx.BlockHeader().Time.Unix()),
Difficulty: big.NewInt(0), // unused. Only required in PoW context
GasLimit: gasLimit,
GasPrice: gasPrice,
}
return vm.NewEVM(context, csdb, config.EthereumConfig(st.ChainID), vm.Config{ExtraEips: []int{2929, 2200, 1884, 1344, 2315}})
} Here is the questions:
|
Merged
This was referenced Dec 8, 2020
Closed
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
System info: [Include Ethermint commit, operating system name, and other relevant details]
Steps to reproduce:
Expected behavior: [What you expected to happen]
Actual behavior: [What actually happened]
Additional info: [Include gist of relevant config, logs, etc.]
The text was updated successfully, but these errors were encountered: