Documentation ¶
Index ¶
- Constants
- Variables
- func ConvertBigIntFromString(v0, v1 string) (n0 *big.Int, n1 *big.Int, err error)
- func ConvertFloat64ToTokenAmount(amount float64, decimals int) *big.Int
- func ConvertHexToDecimalInStringFormat(hexString string) string
- func ConvertTokenAmountToFloat64(amt string, tokenDecimal int32) float64
- func CreateTransactionOpts(client *ethclient.Client, key *ecdsa.PrivateKey, chainId uint64, ...) (opts *bind.TransactOpts, err error)
- func EncodeAddress(addr common.Address) []byte
- func EncodeBigInt(b *big.Int) []byte
- func EncodeBytesString(v string) []byte
- func EncodePacked(input ...[]byte) []byte
- func EncodeUint256(v string) []byte
- func EncodeUint256Array(arr []string) []byte
- func FindOrderEventTopic(topic string) string
- func GenerateIncreaseID() (int64, error)
- func GetCommitReceiptTopic() string
- func GetCommitmentAdded() string
- func GetCrossFromTopic() string
- func GetCrossToTopic() string
- func GetHTTPClient() *http.Client
- func GetPairCreatedTopic()
- func HTTPReq(method string, url string, httpClient *http.Client, content []byte, ...) (body []byte, err error)
- func InitLog(logPath, logLever string)
- func IsAnAddress(address string) bool
- func IsValidTxHash(txHash string) bool
- func Logger() *zap.Logger
- func PadLeft(str, pad string, length int) string
- func TxWaitToSync(ctx context.Context, client *ethclient.Client, tx *types.Transaction) (*types.Receipt, bool, error)
- type OrderEvent
- type PairCreatedEvent
Constants ¶
View Source
const (
CommitmentAddedTopic string = "0x65ba9a9f4b62e3d394afcc0ed4b32089839f4dd83f4cfda7e495e09f2cc5657f"
)
Variables ¶
View Source
var IsAlphanumeric = regexp.MustCompile(`^[0-9a-zA-Z]+$`).MatchString
Functions ¶
func ConvertBigIntFromString ¶
func CreateTransactionOpts ¶
func CreateTransactionOpts(client *ethclient.Client, key *ecdsa.PrivateKey, chainId uint64, caller common.Address) (opts *bind.TransactOpts, err error)
func EncodeAddress ¶
func EncodeBigInt ¶
func EncodeBytesString ¶
func EncodePacked ¶
func EncodeUint256 ¶
func EncodeUint256Array ¶
func FindOrderEventTopic ¶
func GenerateIncreaseID ¶
func GetCommitReceiptTopic ¶
func GetCommitReceiptTopic() string
event CommitReceipt 0x581db44feed8ab7f2b0e591fd633c1326a4ba3ea20a5c346ab38fd1f42208e81
func GetCrossFromTopic ¶
func GetCrossFromTopic() string
event CrossFrom 0x104f0c1d6ebbba9acf834bd5f27d78481d562d83159d076b974d16bca9c66c21
func GetCrossToTopic ¶
func GetCrossToTopic() string
event CrossTo 0xeb354ff2ff6b3d6392f3c14565a5e0c60fc642b456cd2538e94968fbc54467e8
func GetHTTPClient ¶
func GetPairCreatedTopic ¶
func GetPairCreatedTopic()
func HTTPReq ¶
func HTTPReq(method string, url string, httpClient *http.Client, content []byte, headers map[string]string) (body []byte, err error)
HTTPReq ..
func IsAnAddress ¶
func IsValidTxHash ¶
Types ¶
type OrderEvent ¶
Click to show internal directories.
Click to hide internal directories.