-
Notifications
You must be signed in to change notification settings - Fork 0
/
assets.go
58 lines (51 loc) · 1.74 KB
/
assets.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
package constants
import (
"math"
"math/big"
"github.com/jinxprotocol/v4-chain/protocol/lib"
asstypes "github.com/jinxprotocol/v4-chain/protocol/x/assets/types"
)
const (
// TestFee is the gas fee offered for test transactions.
TestFee = "50000" + asstypes.UusdcDenom // 5 cents
// TestFeeNativeTokens is the gas fee offered for test transactions specified in native tokens.
// Value is .05 of native token in jinx denom.
TestFeeNativeTokens = "50000000000000000" + lib.DefaultBaseDenom
// TestGasLimit is the gas limit used for test transactions.
// It's set to a larger amount such that the transaction never runs out of gas.
TestGasLimit = 1_000_000
// TestNativeTokenDenom is the denom of the native token used for testing.
TestNativeTokenDenom = "jinx"
)
var (
// TestFeeCoins_5Cents is the gas fee offered for test transactions.
TestFeeCoins_5Cents = lib.MustParseCoinsNormalized(TestFee)
// TestFeeCoins_5Cents_NativeToken is the gas fee offered for test transactions specified in native tokens.
TestFeeCoins_5Cents_NativeToken = lib.MustParseCoinsNormalized(TestFeeNativeTokens)
)
// BigNegMaxUint64 returns a `big.Int` that is set to -math.MaxUint64.
func BigNegMaxUint64() *big.Int {
return new(big.Int).Neg(
new(big.Int).SetUint64(math.MaxUint64),
)
}
var (
BtcUsd = &asstypes.Asset{
Id: 1,
Symbol: "BTC",
Denom: "btc-denom",
DenomExponent: int32(-8),
HasMarket: true,
MarketId: uint32(0),
AtomicResolution: int32(-8),
}
Usdc = &asstypes.Asset{
Id: 0,
Symbol: "USDC",
Denom: asstypes.AssetUsdc.Denom,
DenomExponent: int32(-6),
HasMarket: false,
MarketId: uint32(0),
AtomicResolution: int32(-6),
}
)