You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
542 B
36 lines
542 B
package tron
|
|
|
|
import (
|
|
"math/big"
|
|
)
|
|
|
|
var basicUnit = 1000000
|
|
|
|
// AmountInt
|
|
//
|
|
// @Description:
|
|
// @param a
|
|
// @return int64
|
|
func AmountInt(a int) int64 {
|
|
return int64(a * basicUnit)
|
|
}
|
|
|
|
// AmountBigInt
|
|
//
|
|
// @Description:
|
|
// @param a
|
|
// @return *big.Int
|
|
func AmountBigInt(a int) *big.Int {
|
|
amountBig := big.NewInt(int64(a))
|
|
amountBig = amountBig.Mul(amountBig, big.NewInt(int64(basicUnit)))
|
|
return amountBig
|
|
}
|
|
|
|
// FeeLimitInt
|
|
//
|
|
// @Description:
|
|
// @param a
|
|
// @return int64
|
|
func FeeLimitInt(a int) int64 {
|
|
return int64(a * basicUnit)
|
|
}
|
|
|