Skip to content

Commit

Permalink
change bscusd to usdtbep20
Browse files Browse the repository at this point in the history
  • Loading branch information
Geapefurit committed Dec 17, 2023
1 parent c0c2e38 commit 857476c
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@
| ironfish | 1min | 1~2min |
| spacemesh | 0.5min | 2min |
| binanceusd | 4s | 5s |
| bscusd | 4s | 5s |
| usdtbep20 | 4s | 5s |
| usdcerc20 | 12s | 10~20s |
| usdttrc20 | 2s | 3s |
| binancecoin | 4s | 5s |
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ require (
github.com/NpoolPlatform/build-chain v0.0.0-20231211023318-0c7698792ed7
github.com/NpoolPlatform/go-service-framework v0.0.0-20230930023319-e48074d9472e
github.com/NpoolPlatform/libent-cruder v0.0.0-20231008051607-f64457cf6ab6
github.com/NpoolPlatform/message v0.0.0-20231216051302-6e62f7e3c242
github.com/NpoolPlatform/message v0.0.0-20231217081906-f252cde26c22
github.com/btcsuite/btcd v0.22.0-beta
github.com/btcsuite/btcutil v1.0.3-0.20201208143702-a53e38424cce
github.com/common-nighthawk/go-figure v0.0.0-20210622060536-734e95fb86be
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ github.com/NpoolPlatform/go-service-framework v0.0.0-20230930023319-e48074d9472e
github.com/NpoolPlatform/go-service-framework v0.0.0-20230930023319-e48074d9472e/go.mod h1:Kh7DMkWnYOMHxEKq7QfJqbxm1HaUPkhTNN74lfHQxyE=
github.com/NpoolPlatform/libent-cruder v0.0.0-20231008051607-f64457cf6ab6 h1:zbM3Zq0qObWEiw+wYJihNFOsBfXey8mBgAhT7HzGB8Y=
github.com/NpoolPlatform/libent-cruder v0.0.0-20231008051607-f64457cf6ab6/go.mod h1:EXCihQpRNNyWaPu1IphiZFLTyyUK/CJMZdW4My7y48Q=
github.com/NpoolPlatform/message v0.0.0-20231216051302-6e62f7e3c242 h1:zbmyG83EJOAzhH+2ghY3iuzHw497MW4nPpVWlhBLZNA=
github.com/NpoolPlatform/message v0.0.0-20231216051302-6e62f7e3c242/go.mod h1:PxJpF0vSSOke+NJskbRBRQ2fK2K3SRe8zaEja+GxSHk=
github.com/NpoolPlatform/message v0.0.0-20231217081906-f252cde26c22 h1:Rqx+ZlbFxnV8oJw/cVzt/avv6XtMy4nuq8uSEcjIRNg=
github.com/NpoolPlatform/message v0.0.0-20231217081906-f252cde26c22/go.mod h1:PxJpF0vSSOke+NJskbRBRQ2fK2K3SRe8zaEja+GxSHk=
github.com/OneOfOne/xxhash v1.2.2 h1:KMrpdQIwFcEqXDklaen+P1axHaj9BSKzvpUUfnHldSE=
github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU=
github.com/Shonminh/apollo-client v0.4.0 h1:AXGp4wOahrEKjheMXehgsG9B8dEfLQHttRLHeEefvus=
Expand Down
2 changes: 1 addition & 1 deletion pkg/coins/bsc/base.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ var (
bscTokenList = []*coins.TokenInfo{
{OfficialName: "BSC", Decimal: ChainUnitExp, Unit: "BNB", Name: ChainNativeCoinName, OfficialContract: ChainNativeCoinName, TokenType: coins.Binancecoin, CoinType: sphinxplugin.CoinType_CoinTypebinancecoin},
{OfficialName: "BUSD Token", Decimal: 18, Unit: "BUSD", Name: "binanceusd", OfficialContract: "0xe9e7CEA3DedcA5984780Bafc599bD69ADd087D56", TokenType: coins.Bep20, CoinType: sphinxplugin.CoinType_CoinTypebinanceusd},
{OfficialName: "Binance-Peg BSC-USD", Decimal: 18, Unit: "USDT", Name: "bscusd", OfficialContract: "0x55d398326f99059fF775485246999027B3197955", TokenType: coins.Bep20, CoinType: sphinxplugin.CoinType_CoinTypebscusd},
{OfficialName: "Binance-Peg BSC-USD", Decimal: 18, Unit: "USDT", Name: "usdtbep20", OfficialContract: "0x55d398326f99059fF775485246999027B3197955", TokenType: coins.Bep20, CoinType: sphinxplugin.CoinType_CoinTypeusdtbep20},
}
)

Expand Down
4 changes: 2 additions & 2 deletions pkg/coins/bsc/plugin/plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,8 @@ func PreSign(ctx context.Context, in []byte, tokenInfo *coins.TokenInfo) (out []
info.GasLimit = 21_000
case sphinxplugin.CoinType_CoinTypebinanceusd,
sphinxplugin.CoinType_CoinTypetbinanceusd,
sphinxplugin.CoinType_CoinTypebscusd,
sphinxplugin.CoinType_CoinTypetbscusd:
sphinxplugin.CoinType_CoinTypeusdtbep20,
sphinxplugin.CoinType_CoinTypetusdtbep20:
info.ContractID = bsc.GetContract(chainID.Int64(), tokenInfo)
info.GasLimit = 300_000
}
Expand Down
12 changes: 6 additions & 6 deletions pkg/coins/coin.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ var (
"binancecoin": sphinxplugin.CoinType_CoinTypebinancecoin,
"binanceusd": sphinxplugin.CoinType_CoinTypebinanceusd,
"usdcerc20": sphinxplugin.CoinType_CoinTypeusdcerc20,
"bscusd": sphinxplugin.CoinType_CoinTypebscusd,
"usdtbep20": sphinxplugin.CoinType_CoinTypeusdtbep20,
},
CoinNetTest: {
"filecoin": sphinxplugin.CoinType_CoinTypetfilecoin,
Expand All @@ -91,7 +91,7 @@ var (
"binancecoin": sphinxplugin.CoinType_CoinTypetbinancecoin,
"binanceusd": sphinxplugin.CoinType_CoinTypetbinanceusd,
"usdcerc20": sphinxplugin.CoinType_CoinTypetusdcerc20,
"bscusd": sphinxplugin.CoinType_CoinTypetbscusd,
"usdtbep20": sphinxplugin.CoinType_CoinTypetusdtbep20,
},
}

Expand Down Expand Up @@ -119,8 +119,8 @@ var (
"tbinanceusd": "binanceusd/",
"usdcerc20": "usdcerc20/",
"tusdcerc20": "usdcerc20/",
"bscusd": "bscusd/",
"tbscusd": "bscusd/",
"usdtbep20": "usdtbep20/",
"tusdtbep20": "usdtbep20/",
}

// default sync time for waitting transaction on chain
Expand Down Expand Up @@ -158,8 +158,8 @@ var (
sphinxplugin.CoinType_CoinTypebinanceusd: time.Second * 4,
sphinxplugin.CoinType_CoinTypetbinanceusd: time.Second * 4,

sphinxplugin.CoinType_CoinTypebscusd: time.Second * 4,
sphinxplugin.CoinType_CoinTypetbscusd: time.Second * 4,
sphinxplugin.CoinType_CoinTypeusdtbep20: time.Second * 4,
sphinxplugin.CoinType_CoinTypetusdtbep20: time.Second * 4,
}
)

Expand Down

0 comments on commit 857476c

Please sign in to comment.