scripts

package
v0.0.0-...-af5322b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 18, 2023 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var MaxGas uint64 = 300000000000000
View Source
var (
	ReceiptNotFoundError = errors.New("receipt not found")
)

Functions

func FtChargeCommission

func FtChargeCommission(
	ctx context.Context,
	cli nearclient2.Client,
	feeTokenAddr,
	tokenAddr,
	sender,
	receiver,
	amount,
	feer string,
) (string, string)

func FtDeposit

func FtDeposit(ctx context.Context, cli nearclient2.Client, sender, receiver, token string, amount string, bridge string, isWrapped bool) (string, string)

func FtWithdraw

func FtWithdraw(ctx context.Context, cli nearclient2.Client, txHash, eventID, sender, receiver, chainFrom, chainTo, token, amount, bridge, privateKey string, isWrapped bool) string

func GenKey

func GenKey() ([]byte, []byte)

GenKey returns uncompressed public key without 04 prefix

func GetDepositedReceiptID

func GetDepositedReceiptID(tx common.FinalExecutionOutcomeView, eventType common.LogEventType, bridge string, token *string, tokenID *string, amount *common.Balance) (*common.Hash, error)

func ManageFeeToken

func ManageFeeToken(ctx context.Context, operationType common.FeeManageOperationType, cli nearclient2.Client, sender, receiver, bridgeAddr, privateKey string, token common.FeeToken) string

func NativeChargeCommission

func NativeChargeCommission(ctx context.Context, cli nearclient2.Client, tokenAddr, sender, receiver, amount string, feer string) (string, string)

func NativeDeposit

func NativeDeposit(ctx context.Context, cli nearclient2.Client, sender, receiver, chainTo, amount, bridge string) (string, string)

func NativeWithdraw

func NativeWithdraw(ctx context.Context, cli nearclient2.Client, txHash, eventID string, sender, receiver, chainFrom, chainTo, amount, bridge, privateKey string) string

func NftChargeCommission

func NftChargeCommission(ctx context.Context, cli nearclient2.Client, feeTokenAddr, tokenAddr, sender, receiver, tokenId string, feer string) (string, string)

func NftDeposit

func NftDeposit(ctx context.Context, cli nearclient2.Client, sender, receiver, token, tokenID, bridge string, isWrapped bool) (string, string)

func NftWithdraw

func NftWithdraw(ctx context.Context, cli nearclient2.Client, txHash, eventID, sender, receiver, chainFrom, chainTo, token, tokenID, bridge, privateKey string, isWrapped bool) string

func RawFTWithdraw

func RawFTWithdraw(ctx context.Context, cli *nearclient2.Client, sender, bridge, token, amount, receiver, origin, signature string, path [][32]byte, recoveryID uint8, isWrapped bool) string

func RawNFTWithdraw

func RawNFTWithdraw(ctx context.Context, cli *nearclient2.Client, sender, bridge, token, tokenID, receiver, origin, signature string, path [][32]byte, recoveryID uint8, isWrapped bool) string

func RawNativeWithdraw

func RawNativeWithdraw(ctx context.Context, cli *nearclient2.Client, sender, bridge, amount, receiver, origin, signature string, path [][32]byte, recoveryID uint8) string

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL