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

Refactor evm address #1200

Merged
merged 10 commits into from
May 17, 2022
Merged
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 go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/33cn/plugin
go 1.16

require (
github.com/33cn/chain33 v1.67.3-0.20220429040542-b673a0ec0b30
github.com/33cn/chain33 v1.67.3-0.20220513094523-7bd89216191e
github.com/BurntSushi/toml v0.3.1
github.com/NebulousLabs/Sia v1.3.7
github.com/NebulousLabs/errors v0.0.0-20181203160057-9f787ce8f69e // indirect
Expand Down
6 changes: 2 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,8 @@ dmitri.shuralyov.com/html/belt v0.0.0-20180602232347-f7d459c86be0/go.mod h1:JLBr
dmitri.shuralyov.com/service/change v0.0.0-20181023043359-a85b471d5412/go.mod h1:a1inKt/atXimZ4Mv927x+r7UpyzRUf4emIoiiSC2TN4=
dmitri.shuralyov.com/state v0.0.0-20180228185332-28bcc343414c/go.mod h1:0PRwlb0D6DFvNNtx+9ybjezNCa8XF0xaYcETyp6rHWU=
git.apache.org/thrift.git v0.0.0-20180902110319-2566ecd5d999/go.mod h1:fPE2ZNJGynbRyZ4dJvy6G277gSllfV2HJqblrnkyeyg=
github.com/33cn/chain33 v1.67.3-0.20220426094841-49abaf7e556c h1:QYcb9Y1K3PRtBbFadYnbSGJkhc0b234VNekU2jxABbs=
github.com/33cn/chain33 v1.67.3-0.20220426094841-49abaf7e556c/go.mod h1:rOabIpP0KWiehXmX6ShOrAveTUvdoQvjUkUePdwk/oQ=
github.com/33cn/chain33 v1.67.3-0.20220429040542-b673a0ec0b30 h1:G1cDiYaUkaczg9U2/83cHTdVuVQE+fykaSseKyAbEcA=
github.com/33cn/chain33 v1.67.3-0.20220429040542-b673a0ec0b30/go.mod h1:rOabIpP0KWiehXmX6ShOrAveTUvdoQvjUkUePdwk/oQ=
github.com/33cn/chain33 v1.67.3-0.20220513094523-7bd89216191e h1:XnCiHCmrvmgKFA5+a51d7btaNwlEurqUZNYox/Gi4Ls=
github.com/33cn/chain33 v1.67.3-0.20220513094523-7bd89216191e/go.mod h1:rOabIpP0KWiehXmX6ShOrAveTUvdoQvjUkUePdwk/oQ=
github.com/AndreasBriese/bbloom v0.0.0-20180913140656-343706a395b7/go.mod h1:bOvUY6CB00SOBii9/FifXqc0awNKxLFCL/+pkDPuyl8=
github.com/AndreasBriese/bbloom v0.0.0-20190306092124-e2d15f34fcf9/go.mod h1:bOvUY6CB00SOBii9/FifXqc0awNKxLFCL/+pkDPuyl8=
github.com/AndreasBriese/bbloom v0.0.0-20190825152654-46b345b51c96 h1:cTp8I5+VIoKjsnZuH8vjyaysT/ses3EvZeaV/1UkF2M=
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import (
"encoding/json"
"fmt"

"github.com/33cn/chain33/common/address"
"github.com/33cn/chain33/system/crypto/secp256k1"
"github.com/33cn/plugin/plugin/dapp/bridgevmxgo/contracts/generated"
erc20 "github.com/33cn/plugin/plugin/dapp/cross2eth/contracts/erc20/generated"
Expand Down Expand Up @@ -68,10 +67,7 @@ func CreateERC20(cmd *cobra.Command, _ []string) {
fmt.Println("Failed to do PrivKeyFromBytes")
return
}
fromAddr := address.BytesToBtcAddress(address.NormalVer, privateKey.PubKey().Bytes())
from := common.Address{
Addr: fromAddr,
}
from := common.PubKey2Address(privateKey.PubKey().Bytes())

createPara := fmt.Sprintf("%s,%s,%s,%s", symbol, symbol, fmt.Sprintf("%d", amountInt64), owner)
content, txHash, err := utils.CreateContractAndSign(getTxInfo(cmd), erc20.ERC20Bin, erc20.ERC20ABI, createPara, "ERC20:"+symbol)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import (
"fmt"
"time"

"github.com/33cn/chain33/common/address"
"github.com/33cn/chain33/system/crypto/secp256k1"
"github.com/33cn/plugin/plugin/dapp/bridgevmxgo/contracts/generated"
gnosis "github.com/33cn/plugin/plugin/dapp/cross2eth/contracts/gnosis/generated"
Expand Down Expand Up @@ -50,10 +49,7 @@ func createBridgevmxgo(cmd *cobra.Command, args []string) {
fmt.Println("Failed to do PrivKeyFromBytes")
return
}
fromAddr := address.BytesToBtcAddress(address.NormalVer, privateKey.PubKey().Bytes())
from := common.Address{
Addr: fromAddr,
}
from := common.PubKey2Address(privateKey.PubKey().Bytes())

i := 1
fmt.Printf("%d: Going to create Valset\n", i)
Expand Down
6 changes: 1 addition & 5 deletions plugin/dapp/cross2eth/boss4x/chain33/offline/createERC20.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import (
"encoding/json"
"fmt"

"github.com/33cn/chain33/common/address"
"github.com/33cn/chain33/system/crypto/secp256k1"
"github.com/33cn/plugin/plugin/dapp/cross2eth/contracts/contracts4chain33/generated"
erc20 "github.com/33cn/plugin/plugin/dapp/cross2eth/contracts/erc20/generated"
Expand Down Expand Up @@ -70,10 +69,7 @@ func CreateERC20(cmd *cobra.Command, _ []string) {
fmt.Println("Failed to do PrivKeyFromBytes")
return
}
fromAddr := address.BytesToBtcAddress(address.NormalVer, privateKey.PubKey().Bytes())
from := common.Address{
Addr: fromAddr,
}
from := common.PubKey2Address(privateKey.PubKey().Bytes())

createPara := fmt.Sprintf("%s,%s,%s,%s,8", symbol, symbol, fmt.Sprintf("%d", amountInt64), owner)
content, txHash, err := utils.CreateContractAndSign(getTxInfo(cmd), erc20.ERC20Bin, erc20.ERC20ABI, createPara, "ERC20:"+symbol)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
"strings"
"time"

"github.com/33cn/chain33/common/address"
"github.com/33cn/chain33/system/crypto/secp256k1"
"github.com/33cn/plugin/plugin/dapp/cross2eth/contracts/contracts4chain33/generated"
ebTypes "github.com/33cn/plugin/plugin/dapp/cross2eth/ebrelayer/types"
Expand Down Expand Up @@ -73,12 +72,9 @@ func createContractsWithFile(cmd *cobra.Command, _ []string) {
fmt.Println("Failed to do PrivKeyFromBytes")
return
}
fromAddr := address.BytesToBtcAddress(address.NormalVer, privateKey.PubKey().Bytes())
from := common.Address{
Addr: fromAddr,
}
from := common.PubKey2Address(privateKey.PubKey().Bytes())

valsetParameter := fromAddr.String() + ",[" + validators + "],[" + initPowers + "]"
valsetParameter := from.String() + ",[" + validators + "],[" + initPowers + "]"
multisignAddrs := strings.Join(deployCfg.MultisignAddrs, ",")
txCreateInfo := getTxInfo(cmd)

Expand Down Expand Up @@ -119,10 +115,7 @@ func createCrossBridge(cmd *cobra.Command, args []string) {
fmt.Println("Failed to do PrivKeyFromBytes")
return
}
fromAddr := address.BytesToBtcAddress(address.NormalVer, privateKey.PubKey().Bytes())
from := common.Address{
Addr: fromAddr,
}
from := common.PubKey2Address(privateKey.PubKey().Bytes())

txCreateInfo := getTxInfo(cmd)

Expand Down
34 changes: 17 additions & 17 deletions plugin/dapp/cross2eth/cmd/build/proxyVerifyTest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -393,23 +393,23 @@ function TestProxy() {
function TestRelayerProxy() {
start_docker_ebrelayerProxy

Boss4xCLI=${Boss4xCLIeth}
CLIP=${CLIPeth}
ethereumBridgeBank="${ethereumBridgeBankOnETH}"
chain33MainBridgeTokenAddr="${chain33MainBridgeTokenAddrETH}"
ethereumUSDTERC20TokenAddr="${ethereumUSDTERC20TokenAddrOnETH}"
chain33USDTBridgeTokenAddr="${chain33USDTBridgeTokenAddrOnETH}"
setWithdraw_ethereum
TestProxy

Boss4xCLI=${Boss4xCLIbsc}
CLIP=${CLIPbsc}
ethereumBridgeBank="${ethereumBridgeBankOnBSC}"
chain33MainBridgeTokenAddr="${chain33MainBridgeTokenAddrBNB}"
ethereumUSDTERC20TokenAddr="${ethereumUSDTERC20TokenAddrOnBSC}"
chain33USDTBridgeTokenAddr="${chain33USDTBridgeTokenAddrOnBSC}"
setWithdraw_bsc
TestProxy
Boss4xCLI=${Boss4xCLIeth}
CLIP=${CLIPeth}
ethereumBridgeBank="${ethereumBridgeBankOnETH}"
chain33MainBridgeTokenAddr="${chain33MainBridgeTokenAddrETH}"
ethereumUSDTERC20TokenAddr="${ethereumUSDTERC20TokenAddrOnETH}"
chain33USDTBridgeTokenAddr="${chain33USDTBridgeTokenAddrOnETH}"
setWithdraw_ethereum
TestProxy

Boss4xCLI=${Boss4xCLIbsc}
CLIP=${CLIPbsc}
ethereumBridgeBank="${ethereumBridgeBankOnBSC}"
chain33MainBridgeTokenAddr="${chain33MainBridgeTokenAddrBNB}"
ethereumUSDTERC20TokenAddr="${ethereumUSDTERC20TokenAddrOnBSC}"
chain33USDTBridgeTokenAddr="${chain33USDTBridgeTokenAddrOnBSC}"
setWithdraw_bsc
TestProxy
}

function parallel_test() {
Expand Down
56 changes: 28 additions & 28 deletions plugin/dapp/cross2eth/cmd/build/public/mainPubilcRelayerTest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -666,34 +666,34 @@ function echo_addrs() {
}

function get_cli() {
paraName="user.p.para."
docker_chain33_ip=$(get_docker_addr "${dockerNamePrefix}_chain33_1")
MainCli="./chain33-cli --rpc_laddr http://${docker_chain33_ip}:8801"
Para8801Cli="./chain33-cli --rpc_laddr http://${docker_chain33_ip}:8901 --paraName ${paraName}"
Para8901Cli="./chain33-cli --rpc_laddr http://${docker_chain33_ip}:8901 --paraName ${paraName}"
docker_chain31_ip=$(get_docker_addr "${dockerNamePrefix}_chain31_1")
docker_chain32_ip=$(get_docker_addr "${dockerNamePrefix}_chain32_1")
docker_chain30_ip=$(get_docker_addr "${dockerNamePrefix}_chain30_1")

docker_ebrelayera_ip=$(get_docker_addr "${dockerNamePrefix}_ebrelayera_1")
CLIP="docker exec ${dockerNamePrefix}_ebrelayerproxy_1 /root/ebcli_A"
CLIA="docker exec ${dockerNamePrefix}_ebrelayera_1 /root/ebcli_A"
CLIB="docker exec ${dockerNamePrefix}_ebrelayerb_1 /root/ebcli_A"
CLIC="docker exec ${dockerNamePrefix}_ebrelayerc_1 /root/ebcli_A"
CLID="docker exec ${dockerNamePrefix}_ebrelayerd_1 /root/ebcli_A"

docker_ganachetesteth_ip=$(get_docker_addr "${dockerNamePrefix}_ganachetesteth_1")
docker_ganachetestbsc_ip=$(get_docker_addr "${dockerNamePrefix}_ganachetestbsc_1")
Boss4xCLI="docker exec ${dockerNamePrefix}_ebrelayera_1 /root/boss4x --rpc_laddr http://${docker_chain33_ip}:8901 --rpc_laddr_ethereum http://${docker_ganachetesteth_ip}:8545 --paraName ${paraName} --chainID ${chain33ID} --chainEthId 1337"

Boss4xCLIeth="docker exec ${dockerNamePrefix}_ebrelayera_1 /root/boss4x --rpc_laddr http://${docker_chain33_ip}:8901 --rpc_laddr_ethereum http://${docker_ganachetesteth_ip}:8545 --paraName ${paraName} --chainID ${chain33ID} --chainEthId 1337"
Boss4xCLIbsc="docker exec ${dockerNamePrefix}_ebrelayera_1 /root/boss4x --rpc_laddr http://${docker_chain33_ip}:8901 --rpc_laddr_ethereum http://${docker_ganachetestbsc_ip}:8545 --paraName ${paraName} --chainID ${chain33ID} --chainEthId 1337"

CLIAeth="docker exec ${dockerNamePrefix}_ebrelayera_1 /root/ebcli_A --node_addr http://${docker_ganachetesteth_ip}:8545 --eth_chain_name Ethereum"
CLIAbsc="docker exec ${dockerNamePrefix}_ebrelayera_1 /root/ebcli_A --node_addr http://${docker_ganachetestbsc_ip}:8545 --eth_chain_name Binance"

CLIPeth="docker exec ${dockerNamePrefix}_ebrelayerproxy_1 /root/ebcli_A --node_addr http://${docker_ganachetesteth_ip}:8545 --eth_chain_name Ethereum"
CLIPbsc="docker exec ${dockerNamePrefix}_ebrelayerproxy_1 /root/ebcli_A --node_addr http://${docker_ganachetestbsc_ip}:8545 --eth_chain_name Binance"
paraName="user.p.para."
docker_chain33_ip=$(get_docker_addr "${dockerNamePrefix}_chain33_1")
MainCli="./chain33-cli --rpc_laddr http://${docker_chain33_ip}:8801"
Para8801Cli="./chain33-cli --rpc_laddr http://${docker_chain33_ip}:8901 --paraName ${paraName}"
Para8901Cli="./chain33-cli --rpc_laddr http://${docker_chain33_ip}:8901 --paraName ${paraName}"
docker_chain31_ip=$(get_docker_addr "${dockerNamePrefix}_chain31_1")
docker_chain32_ip=$(get_docker_addr "${dockerNamePrefix}_chain32_1")
docker_chain30_ip=$(get_docker_addr "${dockerNamePrefix}_chain30_1")

docker_ebrelayera_ip=$(get_docker_addr "${dockerNamePrefix}_ebrelayera_1")
CLIP="docker exec ${dockerNamePrefix}_ebrelayerproxy_1 /root/ebcli_A"
CLIA="docker exec ${dockerNamePrefix}_ebrelayera_1 /root/ebcli_A"
CLIB="docker exec ${dockerNamePrefix}_ebrelayerb_1 /root/ebcli_A"
CLIC="docker exec ${dockerNamePrefix}_ebrelayerc_1 /root/ebcli_A"
CLID="docker exec ${dockerNamePrefix}_ebrelayerd_1 /root/ebcli_A"

docker_ganachetesteth_ip=$(get_docker_addr "${dockerNamePrefix}_ganachetesteth_1")
docker_ganachetestbsc_ip=$(get_docker_addr "${dockerNamePrefix}_ganachetestbsc_1")
Boss4xCLI="docker exec ${dockerNamePrefix}_ebrelayera_1 /root/boss4x --rpc_laddr http://${docker_chain33_ip}:8901 --rpc_laddr_ethereum http://${docker_ganachetesteth_ip}:8545 --paraName ${paraName} --chainID ${chain33ID} --chainEthId 1337"

Boss4xCLIeth="docker exec ${dockerNamePrefix}_ebrelayera_1 /root/boss4x --rpc_laddr http://${docker_chain33_ip}:8901 --rpc_laddr_ethereum http://${docker_ganachetesteth_ip}:8545 --paraName ${paraName} --chainID ${chain33ID} --chainEthId 1337"
Boss4xCLIbsc="docker exec ${dockerNamePrefix}_ebrelayera_1 /root/boss4x --rpc_laddr http://${docker_chain33_ip}:8901 --rpc_laddr_ethereum http://${docker_ganachetestbsc_ip}:8545 --paraName ${paraName} --chainID ${chain33ID} --chainEthId 1337"

CLIAeth="docker exec ${dockerNamePrefix}_ebrelayera_1 /root/ebcli_A --node_addr http://${docker_ganachetesteth_ip}:8545 --eth_chain_name Ethereum"
CLIAbsc="docker exec ${dockerNamePrefix}_ebrelayera_1 /root/ebcli_A --node_addr http://${docker_ganachetestbsc_ip}:8545 --eth_chain_name Binance"

CLIPeth="docker exec ${dockerNamePrefix}_ebrelayerproxy_1 /root/ebcli_A --node_addr http://${docker_ganachetesteth_ip}:8545 --eth_chain_name Ethereum"
CLIPbsc="docker exec ${dockerNamePrefix}_ebrelayerproxy_1 /root/ebcli_A --node_addr http://${docker_ganachetestbsc_ip}:8545 --eth_chain_name Binance"
}

function test_lock_and_burn() {
Expand Down
16 changes: 3 additions & 13 deletions plugin/dapp/dex/boss/deploy/chain33/offline/farmCmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import (
"fmt"
"time"

"github.com/33cn/chain33/common/address"
"github.com/33cn/chain33/system/crypto/secp256k1"

"github.com/33cn/plugin/plugin/dapp/evm/executor/vm/common"
Expand Down Expand Up @@ -177,10 +176,7 @@ func createMasterChef(cmd *cobra.Command, args []string) {
fmt.Println("Failed to do PrivKeyFromBytes")
return
}
fromAddr := address.BytesToBtcAddress(address.NormalVer, privateKey.PubKey().Bytes())
from := common.Address{
Addr: fromAddr,
}
from := common.PubKey2Address(privateKey.PubKey().Bytes())

var txs []*utils.Chain33OfflineTx
i := 1
Expand Down Expand Up @@ -310,10 +306,7 @@ func addPool(cmd *cobra.Command, args []string) {
fmt.Println("Failed to do PrivKeyFromBytes")
return
}
fromAddr := address.BytesToBtcAddress(address.NormalVer, privateKey.PubKey().Bytes())
from := common.Address{
Addr: fromAddr,
}
from := common.PubKey2Address(privateKey.PubKey().Bytes())
info := &utils.TxCreateInfo{
PrivateKey: privateKeyStr,
Expire: expire,
Expand Down Expand Up @@ -395,10 +388,7 @@ func updateAllocPoint(cmd *cobra.Command, args []string) {
fmt.Println("Failed to do PrivKeyFromBytes")
return
}
fromAddr := address.BytesToBtcAddress(address.NormalVer, privateKey.PubKey().Bytes())
from := common.Address{
Addr: fromAddr,
}
from := common.PubKey2Address(privateKey.PubKey().Bytes())

info := &utils.TxCreateInfo{
PrivateKey: privateKeyStr,
Expand Down
13 changes: 3 additions & 10 deletions plugin/dapp/dex/boss/deploy/chain33/offline/routerCmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import (
"fmt"
"time"

"github.com/33cn/chain33/common/address"
"github.com/33cn/chain33/system/crypto/secp256k1"
"github.com/33cn/plugin/plugin/dapp/dex/contracts/pancake-swap-periphery/src/pancakeFactory"
"github.com/33cn/plugin/plugin/dapp/dex/contracts/pancake-swap-periphery/src/pancakeRouter"
Expand Down Expand Up @@ -61,10 +60,7 @@ func createERC20Contract(cmd *cobra.Command, args []string) {
fmt.Println("Failed to do PrivKeyFromBytes")
return
}
fromAddr := address.BytesToBtcAddress(address.NormalVer, privateKey.PubKey().Bytes())
from := common.Address{
Addr: fromAddr,
}
from := common.PubKey2Address(privateKey.PubKey().Bytes())

info := &utils.TxCreateInfo{
PrivateKey: privateKeyStr,
Expand All @@ -74,7 +70,7 @@ func createERC20Contract(cmd *cobra.Command, args []string) {
ParaName: paraName,
ChainID: chainID,
}
createPara := name + "," + symbol + "," + supply + "," + fromAddr.String()
createPara := name + "," + symbol + "," + supply + "," + from.String()
content, txHash, err := utils.CreateContractAndSign(info, erc20.ERC20Bin, erc20.ERC20ABI, createPara, "erc20")
if nil != err {
fmt.Println("Failed to create erc20 due to cause:", err.Error())
Expand Down Expand Up @@ -104,10 +100,7 @@ func createRouterContract(cmd *cobra.Command, args []string) {
fmt.Println("Failed to do PrivKeyFromBytes")
return
}
fromAddr := address.BytesToBtcAddress(address.NormalVer, privateKey.PubKey().Bytes())
from := common.Address{
Addr: fromAddr,
}
from := common.PubKey2Address(privateKey.PubKey().Bytes())
i := 1
fmt.Printf("%d: Going to create factory\n", i)
i += 1
Expand Down
11 changes: 9 additions & 2 deletions plugin/dapp/evm/commands/evm.go
Original file line number Diff line number Diff line change
Expand Up @@ -214,8 +214,15 @@ func calcNewContractAddrCmd() *cobra.Command {
func calcNewContractAddr(cmd *cobra.Command, args []string) {
deployer, _ := cmd.Flags().GetString("deployer")
hash, _ := cmd.Flags().GetString("hash")
newContractAddr := address.BytesToBtcAddress(address.NormalVer, address.ExecPubKey(deployer+hash))
fmt.Println(newContractAddr.String())
params := &evmtypes.EvmCalcNewContractAddrReq{
Caller: deployer,
Txhash: hash,
}

rpcLaddr, _ := cmd.Flags().GetString("rpc_laddr")
var res string
ctx := jsonclient.NewRPCCtx(rpcLaddr, "evm.CalcNewContractAddr", params, &res)
ctx.Run()
}

func addCalcNewContractAddrFlags(cmd *cobra.Command) {
Expand Down
34 changes: 33 additions & 1 deletion plugin/dapp/evm/executor/evm.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ package executor

import (
"bytes"
"fmt"
"math/big"
"os"

Expand All @@ -27,10 +28,41 @@ var (
driverName = evmtypes.ExecutorName
)

type subConfig struct {
// AddressDriver address driver name, support btc/eth
AddressDriver string `json:"addressDriver"`
}

func initEvmSubConfig(sub []byte, evmEnableHeight int64) {
var subCfg subConfig
if sub != nil {
types.MustDecode(sub, &subCfg)
}
addressType, err := address.GetDriverType(subCfg.AddressDriver)

if err != nil && subCfg.AddressDriver != "" {
panic("GetDriverType:" + err.Error())
}

// get default if not config
if subCfg.AddressDriver == "" {
addressType = address.GetDefaultAddressID()
}
// 加载, 确保在evm使能高度前, eth地址驱动已使能
driver, err := address.LoadDriver(addressType, evmEnableHeight)
if err != nil {
panic(fmt.Sprintf("address driver must enable before %d", evmEnableHeight))
}
common.InitEvmAddressTypeOnce(driver)
}

// Init 初始化本合约对象
func Init(name string, cfg *types.Chain33Config, sub []byte) {

enableHeight := cfg.GetDappFork(driverName, evmtypes.EVMEnable)
initEvmSubConfig(sub, enableHeight)
driverName = name
drivers.Register(cfg, driverName, newEVMDriver, cfg.GetDappFork(driverName, evmtypes.EVMEnable))
drivers.Register(cfg, driverName, newEVMDriver, enableHeight)
EvmAddress = address.ExecAddress(cfg.ExecName(name))
// 初始化硬分叉数据
state.InitForkData()
Expand Down
Loading