Skip to content

Commit

Permalink
Merge pull request #1 from wuyachi/update-zion-contracts
Browse files Browse the repository at this point in the history
Update zion native contracts
  • Loading branch information
devfans authored Jul 20, 2022
2 parents 23f13b7 + 2696091 commit 5f00484
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 24 deletions.
6 changes: 5 additions & 1 deletion contracts/native/params.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,23 @@
package native

import (
"github.com/ethereum/go-ethereum/common"
"github.com/devfans/zion-sdk/contracts/native/utils"
"github.com/ethereum/go-ethereum/common"
)

// FailedTxGasUsage tx's gas usage should not be greater than an minimum fixed value if it execute failed.
const FailedTxGasUsage = uint64(100)

const (
NativeGovernance = "governance"
NativeEconomic = "economic"
NativeSyncCrossChainInfo = "sync_cross_chain_info"
NativeCrossChain = "cross_chain"
NativeNeo3StateManager = "neo3_state_manager"
NativeNodeManager = "node_manager"
NativeRelayerManager = "relayer_manager"
NativeSideChainManager = "side_chain_manager"
NativeSignatureManager = "signature_manage"

// native backup contracts
NativeExtra4 = "extra4"
Expand All @@ -55,12 +57,14 @@ const (

var NativeContractAddrMap = map[string]common.Address{
NativeGovernance: utils.GovernanceContractAddress,
NativeEconomic: utils.EconomicContractAddress,
NativeSyncCrossChainInfo: utils.InfoSyncContractAddress,
NativeCrossChain: utils.CrossChainManagerContractAddress,
NativeNeo3StateManager: utils.Neo3StateManagerContractAddress,
NativeNodeManager: utils.NodeManagerContractAddress,
NativeRelayerManager: utils.RelayerManagerContractAddress,
NativeSideChainManager: utils.SideChainManagerContractAddress,
NativeSignatureManager: utils.SignatureManagerContractAddress,
NativeExtra4: common.HexToAddress("0x7d79D936DA7833c7fe056eB450064f34A327DcA8"),
NativeExtra5: common.HexToAddress("0xD37F626c9E007DdD244E5Cbee0C223fec6D11289"),
NativeExtra6: common.HexToAddress("0x33463b771Da32D450723C7C23a2240dE223b53bd"),
Expand Down
48 changes: 25 additions & 23 deletions contracts/native/utils/params.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,28 +34,30 @@ var (
)

var (
GovernanceContractAddress = common.HexToAddress("0x4600691499997fCc224425ba5C93EebC57f3615b")
InfoSyncContractAddress = common.HexToAddress("0xb2799bDE6831449d73C1F22CE815f773D0CafCc5")
CrossChainManagerContractAddress = common.HexToAddress("0x5747C05FF236F8d18BB21Bc02ecc389deF853cae")
SideChainManagerContractAddress = common.HexToAddress("0x864Ff06eC5fFc75aB6eaf64263308ef5fa7d6637")
NodeManagerContractAddress = common.HexToAddress("0xA4Bf827047a08510722B2d62e668a72FCCFa232C")
RelayerManagerContractAddress = common.HexToAddress("0xA22f301D7Cb5b50dcA4a015b12EC0cc5f3971412")
Neo3StateManagerContractAddress = common.HexToAddress("0x5E839898821dB2A2F0eC9F8aAE7D7053744DB051")
NodeManagerContractAddress = common.HexToAddress("0x0000000000000000000000000000000000001000")
EconomicContractAddress = common.HexToAddress("0x0000000000000000000000000000000000001001")
InfoSyncContractAddress = common.HexToAddress("0x0000000000000000000000000000000000001002")
CrossChainManagerContractAddress = common.HexToAddress("0x0000000000000000000000000000000000001003")
SideChainManagerContractAddress = common.HexToAddress("0x0000000000000000000000000000000000001004")
RelayerManagerContractAddress = common.HexToAddress("0x0000000000000000000000000000000000001005")
Neo3StateManagerContractAddress = common.HexToAddress("0x0000000000000000000000000000000000001006")
SignatureManagerContractAddress = common.HexToAddress("0x0000000000000000000000000000000000001007")
GovernanceContractAddress = common.HexToAddress("0x0000000000000000000000000000000000001008")

NO_PROOF_ROUTER = uint64(0)
BTC_ROUTER = uint64(1)
ETH_ROUTER = uint64(2)
ONT_ROUTER = uint64(3)
NEO_ROUTER = uint64(4)
COSMOS_ROUTER = uint64(5)
BSC_ROUTER = uint64(6)
HECO_ROUTER = uint64(7)
QUORUM_ROUTER = uint64(8)
ZILLIQA_ROUTER = uint64(9)
MSC_ROUTER = uint64(10)
NEO3_LEGACY_ROUTER = uint64(11)
OKEX_ROUTER = uint64(12)
NEO3_ROUTER = uint64(14)
ETH_COMMON_ROUTER = uint64(15)
NO_PROOF_ROUTER = uint64(0)
BTC_ROUTER = uint64(1)
ETH_ROUTER = uint64(2)
ONT_ROUTER = uint64(3)
NEO_ROUTER = uint64(4)
COSMOS_ROUTER = uint64(5)
BSC_ROUTER = uint64(6)
HECO_ROUTER = uint64(7)
QUORUM_ROUTER = uint64(8)
ZILLIQA_ROUTER = uint64(9)
MSC_ROUTER = uint64(10)
NEO3_LEGACY_ROUTER = uint64(11)
OKEX_ROUTER = uint64(12)
NEO3_ROUTER = uint64(14)

ETH_COMMON_ROUTER = uint64(15)
)

0 comments on commit 5f00484

Please sign in to comment.