Execute SendCoin/Contract
This document describes how to 'Send Coins' and 'Execute Smart Contract'.
Steps
Search Gas Fee
val gas = fncyWallet.getGasPrice(
chainId = 3
)This document describes how to 'Send Coins' and 'Execute Smart Contract'.
val gas = fncyWallet.getGasPrice(
chainId = 3
)val info = fncyWallet.estimateTicket(
walletId = 10000L, //Wallet ID
chainId = 3L, // bsc: 1, eth: 2, fncy: 3
signatureType = TicketType.AssetTransfer,
toAddress = "0x1234...", //Address to Receive Coins
transferVal = "1000000000000000000".toBigInteger(), //Quantity to Send (in wei)
txGasPrice = "10000000000".toBigInteger(), //Gas Price (in wei)
assetId = 6L, //Transfer Asset's Asset ID
maxPriorityPerGas = BigInteger.ZERO, //For ETH Transfers
maxFeePerGas = BigInteger.ZERO //For ETH Transfers
)val info = fncyWallet.estimateTicket(
walletId = 10000L, //Wallet ID
chainId = 3L, // bsc: 1, eth: 2, fncy: 3
signatureType = TicketType.SmartContract, //
toAddress = "0x1234...", //Address to Receive Coins
transferVal = "0".toBigInteger(), //Quantity to Send (in wei)
txGasPrice = "10000000000".toBigInteger(), //Gas Price (in wei)
contractAddress = "0x1234...", //Contract Address
txInput = "0x123456....", //Data
assetId = 6L, //Transfer Asset's Asset ID
maxPriorityPerGas = BigInteger.ZERO, //For ETH Transfers
maxFeePerGas = BigInteger.ZERO //For ETH Transfers
)val info = fncyWallet.estimateTicket(
walletId = 10000L, //Wallet ID
chainId = 3L, // bsc: 1, eth: 2, fncy: 3
signatureType = TicketType.WalletConnect, //
toAddress = "0x1234...", //Address to Receive Coins
transferVal = "1000000000000000000".toBigInteger(), //Quantity to Send (in wei)
txGasPrice: "10000000000".toBigInteger(), //Gas Price (in wei)
contractAddress: "0x1234...", //Contract Address
txInput: "0x123456....", //Data
assetId: 6L, //Transfer Asset's Asset ID
maxPriorityPerGas = BigInteger.ZERO, //For ETH Transfers
maxFeePerGas = BigInteger.ZERO //For ETH Transfers
)val info = fncyWallet.makeTicket(
walletId = 10000L, //Wallet ID
chainId = 3L, // bsc: 1, eth: 2, fncy: 3
signatureType = TicketType.AssetTransfer,
toAddress = "0x1234...", //Address to Receive Coinss
transferVal = "1000000000000000000".toBigInteger(), //Quantity to Send (in wei)
txGasPrice = "10000000000".toBigInteger(), //Gas Price (in wei)
assetId = 6L, //Transfer Asset's Asset ID
maxPriorityPerGas = BigInteger.ZERO, //For ETH Transfers
maxFeePerGas = BigInteger.ZERO, //For ETH Transfers
txGasLimit = "21000".toBigInteger() // Gas Limit
)val info = fncyWallet.makeTicket(
walletId = 10000L, //Wallet ID
chainId = 3L, // bsc: 1, eth: 2, fncy: 3
signatureType = TicketType.SmartContract,
toAddress = "0x1234...", //Address to Receive Coins
transferVal = "1000000000000000000".toBigInteger(), //Quantity to Send (in wei)
txGasPrice = "10000000000".toBigInteger(), //Gas Price (in wei)
contractAddress: "0x1234...", //Contract Address
txInput: "0x123456....", //Data
assetId = 6L, //Transfer Asset's Asset ID
maxPriorityPerGas = BigInteger.ZERO, //For ETH Transfers
maxFeePerGas = BigInteger.ZERO, //For ETH Transfers
txGasLimit = "21000".toBigInteger() // Gas Limit
)val info = fncyWallet.makeTicket(
walletId = 10000L, //Wallet ID
chainId = 3L, // bsc: 1, eth: 2, fncy: 3
signatureType = TicketType.WalletConnect,
toAddress = "0x1234...", //Address to Receive Coins
transferVal = "1000000000000000000".toBigInteger(), //Quantity to Send (in wei)
txGasPrice = "10000000000".toBigInteger(), //Gas Price (in wei)
contractAddress: "0x1234...", //Contract Address
txInput: "0x123456....", //Data
assetId = 6L, //Transfer Asset's Asset ID
maxPriorityPerGas = BigInteger.ZERO, //For ETH Transfers
maxFeePerGas = BigInteger.ZERO, //For ETH Transfers
txGasLimit = "21000".toBigInteger() // Gas Limit
)val info = fncyWallet.getTicketInfo(
ticketUuid = "ticketUuid", // Ticekt UUID
)val result = fncyWallet.sendTicket(
ticketUuids = "ticketUuid", // Ticekt UUID
pinNumber = "000000" // Wallet Password
)