Documentation ¶
Index ¶
- func CalcCoefficientByBigIntStr(newTotalVal, oldTotalVal string, decimals int64) float64
- func GetBalanceOf(payToken, address common.Address, cli *ethclient.Client) (*big.Int, error)
- func GetRandomBigNumbers(num int) []int
- func GetRandomNumbers(num int) []int
- func GetRecordedBalance(walletAddress common.Address, cli *ethclient.Client) (*big.Int, error)
- func GetUUID() string
- func HexStringToUint64(s string) uint64
- func IsDigit(str string) bool
- func LarkNotice(webHookUrl, msg string) (err error)
- func Md5WithSalt(data string, salt string) string
- func Sign(msg, key []byte) string
- func SpinLock(chainId uint64, typ OnlyKeyType, uuid string)
- func StringToUint64(s string) uint64
- func Verify(msg, key []byte, hash string) (bool, error)
- type LarkResponse
- type OnlyKeyType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetBalanceOf ¶
func GetRandomBigNumbers ¶
func GetRandomNumbers ¶
func GetRecordedBalance ¶
func HexStringToUint64 ¶
func LarkNotice ¶
func Md5WithSalt ¶
func SpinLock ¶
func SpinLock(chainId uint64, typ OnlyKeyType, uuid string)
SpinLock Preventing task duplication in a distributed environment
func StringToUint64 ¶
Types ¶
type LarkResponse ¶
type OnlyKeyType ¶
type OnlyKeyType string
const ( // case: 195_pid, 195_staking, 195_voucher, 1177777711_pid_voucher OnlyOneKey = "only_one_key:%s" TransferUSDT OnlyKeyType = "transfer_usdt" ScanTransferWatchForDb OnlyKeyType = "scan_transfer_watch_for_db" PFTokenRebase OnlyKeyType = "pf_token_rebase" ScanWalletTransferWatch OnlyKeyType = "scan_wallet_transfer_watch" ScanWalletAssignWatch OnlyKeyType = "scan_wallet_assign_watch" StartWalletAPR OnlyKeyType = "start_wallet_apr" PftokenStatistics OnlyKeyType = "pftoken_statistics" ScanPftokenWatch OnlyKeyType = "scan_pftoken_watch" ScanWithdrawWatch OnlyKeyType = "scan_withdraw_watch" WalletStatistics OnlyKeyType = "wallet_statistics" )
Click to show internal directories.
Click to hide internal directories.