Skip to content

Commit

Permalink
Add Bungee
Browse files Browse the repository at this point in the history
  • Loading branch information
perrornet committed Aug 19, 2024
1 parent 34bae87 commit 82a6a97
Show file tree
Hide file tree
Showing 7 changed files with 821 additions and 45 deletions.
2 changes: 1 addition & 1 deletion internal/daemons/market/market.go
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ func processOrder(ctx context.Context, order models.Order, conf configs.Config)
return nil
}
if result.Status == "" {
return errors.New("the result status is empty")
return errors.Errorf("the result status is empty: %v", providerErr)
}
if result.CurrentChain != args.TargetChain && providerErr == nil {
result.Status = models.OrderStatusWaitCrossChain
Expand Down
92 changes: 48 additions & 44 deletions utils/constant/chain.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,38 +3,40 @@ package constant
import "golang.org/x/exp/constraints"

const (
Zksync = "zksync"
Sepolia = "sepolia"
Polygon = "polygon"
PolygonZkEvm = "polygon-zkEvm"
Bsc = "bsc"
Blast = "blast"
DarwiniaDvm = "darwinia-dvm"
Base = "base"
Arbitrum = "arbitrum"
Gnosis = "gnosis"
Scroll = "scroll"
Optimism = "op"
ArbitrumSepolia = "arbitrum-sepolia"
Astar = "astar"
AstarZkevm = "astar-zkevm"
Mantle = "mantle"
Linea = "linea"
Aurora = "aurora"
Avalanche = "avalanche"
Base = "base"
Blast = "blast"
Bnb = "bnb"
Bsc = "bsc"
Celo = "celo"
CrabDvm = "crab-dvm"
Cronos = "cronos"
DarwiniaDvm = "darwinia-dvm"
Ethereum = "ethereum"
Fantom = "fantom"
Gnosis = "gnosis"
Kava = "kava"
Linea = "linea"
Mantle = "mantle"
Merlin = "merlin"
Avalanche = "avalanche"
Mode = "mode"
Cronos = "cronos"
Moonbeam = "moonbeam"
OpBNB = "opBNB"
Optimism = "op"
Polygon = "polygon"
PolygonZkEvm = "polygon-zkEvm"
PulseChain = "pulseChain"
Kava = "kava"
ZkLinkNova = "zkLink-nova"
Rootstock = "rootstock"
Astar = "astar"
OpBNB = "opBNB"
Bnb = "bnb"
Celo = "celo"
Moonbeam = "moonbeam"
ArbitrumSepolia = "arbitrum-sepolia"
Scroll = "scroll"
Sepolia = "sepolia"
Zircuit = "zircuit"
ZkLinkNova = "zkLink-nova"
Zksync = "zksync"
)

const (
Expand All @@ -46,37 +48,39 @@ const (

var (
chainName2Id = map[string]int{
Aurora: 1313161554,
Arbitrum: 42161,
ArbitrumSepolia: 421614,
Moonbeam: 1284,
Sepolia: 11155111,
Zksync: 324,
Polygon: 137,
PolygonZkEvm: 1101,
Bsc: 56,
Astar: 592,
AstarZkevm: 3776,
Avalanche: 43114,
Base: 8453,
Blast: 81457,
Bsc: 56,
Celo: 42220,
CrabDvm: 44,
Cronos: 25,
DarwiniaDvm: 46,
Base: 8453,
Arbitrum: 42161,
Ethereum: 1,
Fantom: 250,
Gnosis: 100,
Scroll: 534352,
Optimism: 10,
AstarZkevm: 3776,
Mantle: 5000,
Kava: 2222,
Linea: 59144,
CrabDvm: 44,
Ethereum: 1,
Mantle: 5000,
Merlin: 4200,
Avalanche: 43114,
Mode: 34443,
Cronos: 25,
Moonbeam: 1284,
OpBNB: 204,
Optimism: 10,
Polygon: 137,
PolygonZkEvm: 1101,
PulseChain: 369,
Kava: 2222,
ZkLinkNova: 810180,
Rootstock: 30,
Astar: 592,
OpBNB: 204,
Celo: 42220,
Scroll: 534352,
Sepolia: 11155111,
Zircuit: 48900,
ZkLinkNova: 810180,
Zksync: 324,
}
chainId2Name = make(map[int]string)
)
Expand Down
Loading

0 comments on commit 82a6a97

Please sign in to comment.