Skip to content

Commit

Permalink
support coin ETH-LINEA.
Browse files Browse the repository at this point in the history
  • Loading branch information
jiangjinyuan committed Nov 27, 2023
1 parent 8fd394d commit 65b6f57
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 44 deletions.
6 changes: 6 additions & 0 deletions common/coin.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ var (
"OKT": "ETH",
"OKB": "ETH",
"OPTIMISM": "ETH",
"ETH-LINEA": "ETH",

// BETH
"BETH": "BETH",
Expand Down Expand Up @@ -156,6 +157,7 @@ var (
"OKB": EvmCoinTye,
"OPTIMISM": EvmCoinTye,
"FIL-EVM": EvmCoinTye,
"ETH-LINEA": EvmCoinTye,

// BETH
"BETH": BethCoinType,
Expand Down Expand Up @@ -239,6 +241,7 @@ var (
"OKB": EthMessageSignatureHeader,
"OPTIMISM": EthMessageSignatureHeader,
"FIL-EVM": EthMessageSignatureHeader,
"ETH-LINEA": EthMessageSignatureHeader,

// BETH
"BETH": EthMessageSignatureHeader,
Expand Down Expand Up @@ -337,6 +340,7 @@ var (
"OKT": "OKT",
"OKB": "OKB",
"OPTIMISM": "OPTIMISM",
"ETH-LINEA": "ETH",

// BETH
"BETH": "BETH",
Expand Down Expand Up @@ -427,6 +431,7 @@ var (
"OKT": 18,
"OKB": 18,
"OPTIMISM": 18,
"ETH-LINEA": 18,

// BETH
"BETH": 18,
Expand Down Expand Up @@ -483,6 +488,7 @@ var (

"USDT-ALGO": true,
"FIL-EVM": true,
"ETH-LINEA": true,
}

VerifyAddressCoinBlackList = map[string]bool{
Expand Down
6 changes: 6 additions & 0 deletions common/crypto_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,12 @@ func TestVerifyEvmCoinSignature(t *testing.T) {
msg: "I am an OKX address",
sign: "0x05168f6ede2213bebae69256ad78cfcf4f3a99d4b11bacd4a24ec2171becb34e2f690c515e3b1227a52e7e7c4dd99dd0f307c167f768b2201bd82b69af5a112b1c",
},
{
coin: "ETH-LINEA",
addr: "0xd3d7dbe73bbdd5a5c7a49ca322763c4d400fc240",
msg: "I am an OKX address",
sign: "0x75f1d8203bef472f4f5f2627b186eb6d700544633690f4f368ea3d6d069040ac378b84765bf4fecfc4d62d807158817a0d6f5d2ac13121aba578ff0f6880067b1c",
},
}
for _, tt := range args {
err := VerifyEvmCoin(tt.coin, tt.addr, tt.msg, tt.sign)
Expand Down
89 changes: 45 additions & 44 deletions docs/support_coins.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,50 +39,51 @@

### VerifyAddress

| coin | network |
|---------|------------------|
| BTC | Bitcoin |
| ETH | Ethereum |
| ETH | Arbitrum |
| ETH | Optimism |
| USDT | Ethereum |
| USDT | Tron |
| USDT | Polygon |
| USDT | Avalanche |
| USDT | Arbitrum |
| USDT | Optimism |
| USDT | OKC |
| USDC | Ethereum |
| USDC | OKC |
| USDC | Tron |
| USDC | Polygon |
| USDC | Avalanche |
| USDC | Arbitrum |
| USDC | Optimism |
| OKB | Ethereum |
| OKB | OKC |
| OKT | OKC |
| FIL | Fil |
| FIL | OKC |
| DOT | Polkadot |
| DOT | OKC |
| ETC | Ethereum Classic |
| ETC | OKC |
| XRP | Ripple |
| XRP | OKC |
| UNI | Ethereum |
| UNI | OKC |
| ELF | Aelf |
| LINK | Ethereum |
| LINK | OKC |
| PEOPLE | Ethereum |
| TON | Toncoin |
| TRX | Tron |
| APT | Aptos |
| SOL | Solana |
| DASH | Dash |
| DOGE | Doge |
| FIL-EVM | FEVM |
| coin | network |
|-----------|------------------|
| BTC | Bitcoin |
| ETH | Ethereum |
| ETH | Arbitrum |
| ETH | Optimism |
| USDT | Ethereum |
| USDT | Tron |
| USDT | Polygon |
| USDT | Avalanche |
| USDT | Arbitrum |
| USDT | Optimism |
| USDT | OKC |
| USDC | Ethereum |
| USDC | OKC |
| USDC | Tron |
| USDC | Polygon |
| USDC | Avalanche |
| USDC | Arbitrum |
| USDC | Optimism |
| OKB | Ethereum |
| OKB | OKC |
| OKT | OKC |
| FIL | Fil |
| FIL | OKC |
| DOT | Polkadot |
| DOT | OKC |
| ETC | Ethereum Classic |
| ETC | OKC |
| XRP | Ripple |
| XRP | OKC |
| UNI | Ethereum |
| UNI | OKC |
| ELF | Aelf |
| LINK | Ethereum |
| LINK | OKC |
| PEOPLE | Ethereum |
| TON | Toncoin |
| TRX | Tron |
| APT | Aptos |
| SOL | Solana |
| DASH | Dash |
| DOGE | Doge |
| FIL-EVM | FEVM |
| ETH-LINEA | ETH_LINEA |



0 comments on commit 65b6f57

Please sign in to comment.