코인보내기/Contract 실행
이 문서는 '코인 보내기' 및 '스마트 컨트랙트 실행' 방법에 대하여 설명합니다.
Steps
가스비 조회
val gas = fncyWallet.getGasPrice(
chainId = 3
)이 문서는 '코인 보내기' 및 '스마트 컨트랙트 실행' 방법에 대하여 설명합니다.
val gas = fncyWallet.getGasPrice(
chainId = 3
)val info = fncyWallet.estimateTicket(
walletId = 10000L, //지갑 ID
chainId = 3L, // bsc: 1, eth: 2, fncy: 3
signatureType = TicketType.AssetTransfer,
toAddress = "0x1234...", //코인을 받을 주소
transferVal = "1000000000000000000".toBigInteger(), //보낼 수량 (단위: wei)
txGasPrice = "10000000000".toBigInteger(), //Gas Price (단위: wei)
assetId = 6L, //보낼 자산 asset ID
maxPriorityPerGas = BigInteger.ZERO, //ETH 전송일 경우 사용
maxFeePerGas = BigInteger.ZERO // ETH전송일 경우 사용
)val info = fncyWallet.estimateTicket(
walletId = 10000L, //지갑 ID
chainId = 3L, // bsc: 1, eth: 2, fncy: 3
signatureType = TicketType.SmartContract, //
toAddress = "0x1234...", //코인을 받을 주소
transferVal = "0".toBigInteger(), //보낼 수량 (단위: wei)
txGasPrice = "10000000000".toBigInteger(), //Gas Price (단위: wei)
contractAddress = "0x1234...", //Contract Address
txInput = "0x123456....", //Data
assetId = 6L, //보낼 자산 asset ID
maxPriorityPerGas = BigInteger.ZERO, //ETH 전송일 경우 사용
maxFeePerGas = BigInteger.ZERO // ETH전송일 경우 사용
)val info = fncyWallet.estimateTicket(
walletId = 10000L, //지갑 ID
chainId = 3L, // bsc: 1, eth: 2, fncy: 3
signatureType = TicketType.WalletConnect, //
toAddress = "0x1234...", //코인을 받을 주소
transferVal = "1000000000000000000".toBigInteger(), //보낼 수량 (단위: wei)
txGasPrice: "10000000000".toBigInteger(), //Gas Price (단위: wei)
contractAddress: "0x1234...", //Contract Address
txInput: "0x123456....", //Data
assetId: 6L, //보낼 자산 asset ID
maxPriorityPerGas = BigInteger.ZERO, //ETH 전송일 경우 사용
maxFeePerGas = BigInteger.ZERO // ETH전송일 경우 사용
)val info = fncyWallet.makeTicket(
walletId = 10000L, //지갑 ID
chainId = 3L, // bsc: 1, eth: 2, fncy: 3
signatureType = TicketType.AssetTransfer,
toAddress = "0x1234...", //코인을 받을 주소
transferVal = "1000000000000000000".toBigInteger(), //보낼 수량 (단위: wei)
txGasPrice = "10000000000".toBigInteger(), //Gas Price (단위: wei)
assetId = 6L, //보낼 자산 asset ID
maxPriorityPerGas = BigInteger.ZERO, //ETH 전송일 경우 사용
maxFeePerGas = BigInteger.ZERO, // ETH전송일 경우 사용
txGasLimit = "21000".toBigInteger() // Gas Limit
)val info = fncyWallet.makeTicket(
walletId = 10000L, //지갑 ID
chainId = 3L, // bsc: 1, eth: 2, fncy: 3
signatureType = TicketType.SmartContract,
toAddress = "0x1234...", //코인을 받을 주소
transferVal = "1000000000000000000".toBigInteger(), //보낼 수량 (단위: wei)
txGasPrice = "10000000000".toBigInteger(), //Gas Price (단위: wei)
contractAddress: "0x1234...", //Contract Address
txInput: "0x123456....", //Data
assetId = 6L, //보낼 자산 asset ID
maxPriorityPerGas = BigInteger.ZERO, //ETH 전송일 경우 사용
maxFeePerGas = BigInteger.ZERO, // ETH전송일 경우 사용
txGasLimit = "21000".toBigInteger() // Gas Limit
)val info = fncyWallet.makeTicket(
walletId = 10000L, //지갑 ID
chainId = 3L, // bsc: 1, eth: 2, fncy: 3
signatureType = TicketType.WalletConnect,
toAddress = "0x1234...", //코인을 받을 주소
transferVal = "1000000000000000000".toBigInteger(), //보낼 수량 (단위: wei)
txGasPrice = "10000000000".toBigInteger(), //Gas Price (단위: wei)
contractAddress: "0x1234...", //Contract Address
txInput: "0x123456....", //Data
assetId = 6L, //보낼 자산 asset ID
maxPriorityPerGas = BigInteger.ZERO, //ETH 전송일 경우 사용
maxFeePerGas = BigInteger.ZERO, // ETH전송일 경우 사용
txGasLimit = "21000".toBigInteger() // Gas Limit
)val info = fncyWallet.getTicketInfo(
ticketUuid = "ticketUuid", // Ticekt UUID
)val result = fncyWallet.sendTicket(
ticketUuids = "ticketUuid", // Ticekt UUID
pinNumber = "000000" // 지갑 비밀번호
)