FNCY Chain
FNCY 2.0.2 (KOR)
FNCY 2.0.2 (KOR)
  • Introduction
  • Getting Started
  • Design
    • Structure
    • Three Main Sets of Participants
    • PoSA Consensus
    • Governance
    • Staking
    • Mining Reward
    • Gas Fee
    • Runtime Upgrade
    • Cross-Chain Bridge
    • Security
  • Build On FNCY Chain
    • RPC Endpoints
    • Testnet Faucet
    • Block Explorer
      • Token Listing
    • BEP20 Token
    • NFT
    • Validator Requirements
    • NFT Market
      • FNCY Marketplace
  • For Developers
    • JSON-RPC
    • FNCY Chain API
      • Wallet API
      • Transaction API
      • Blockchain API
    • Wallet
      • FNCY Wallet
      • Use Metamask for FNCY Chain
      • SDK
        • Android
          • 설치
          • 사용법
            • 초기화
            • 지갑 생성/복원
            • 지갑 조회
            • 코인보내기/Contract 실행
            • Transaction 조회
            • 기타 기능
          • Methods
          • Domain
          • ETC
        • iOS
          • 설치
          • 사용법
            • 초기화
            • 지갑 생성/복원
            • 지갑 조회
            • 코인보내기/Contract 실행
            • Transaction 조회
            • 기타 기능
          • Methods
          • Domain
          • ETC
    • Smart Contract
      • Deployment
        • Truffle
        • Hardhat
        • Remix IDE
      • Verify Your Contract on FncyScan
    • Gasless Transaction
    • with FNCY
      • FNCY 로그인
      • GAME AUTH 로그인
  • Tokenomics
  • Ecosystem Partner
  • FNCY Governance Partner
Powered by GitBook
On this page
  • Steps
  • 가스비 조회
  • 티켓 정보 조회
  • Coin 전송
  • Token 전송(Contract 실행)
  • WalletConnect
  • 티켓 생성
  • Coin 전송
  • Token 전송(Contract 실행)
  • WalletConnect
  • 티켓 정보 확인
  • 티켓 전송
  1. For Developers
  2. Wallet
  3. SDK
  4. Android
  5. 사용법

코인보내기/Contract 실행

이 문서는 '코인 보내기' 및 '스마트 컨트랙트 실행' 방법에 대하여 설명합니다.

Previous지갑 조회NextTransaction 조회

Steps

  1. Transaction 결과 확인

가스비 조회

체인ID에 해당하는 네트워크(블록체인)의 현재 네트워크 사용료(가스비) 정보를 가져옵니다.

val gas = fncyWallet.(
    chainId = 3
)

See Also

티켓 정보 조회

Ticket을 생성하기 전 전송 가능여부 및 nonce, gasLimit등을 확인한다.

Ticket의 전송은 아래 3가지 타입이 있다.

  • AssetTransfer : Coin전송

  • SmartContract : Token전송 및 Contract 실행

  • WalletConnect : WalletConnect연결 시에 사용

See Also

Coin 전송

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전송일 경우 사용
)

Token 전송(Contract 실행)

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전송일 경우 사용
)

WalletConnect

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전송일 경우 사용
)

티켓 생성

네트워크에 전송할 티켓(트랜잭션 정보)을 서버에 등록하고, 해당 티켓의 UUID 정보를 가져옵니다.

See Also

Coin 전송

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
)

Token 전송(Contract 실행)

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
)

WalletConnect

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
)

티켓 정보 확인

TicketUuid로 해당 Uuid에 해당하는 Ticket 정보를 조회합니다.

val info = fncyWallet.getTicketInfo(
    ticketUuid = "ticketUuid", // Ticekt UUID
)

See Also

티켓 전송

티켓 전송은 서버에 등록된 티켓 정보를 사용하여 실제 트랜잭션 실행을 요청합니다.

티켓 전송이 성공하면 해당 트랜잭션 이력은 블록체인에 영구적으로 포함되며 변경하거나 취소할 수 없습니다.

발행된 티켓UUID와 지갑 비밀번호를 전달하여 해당 티켓 정보로 실제 트랜잭션을 실행시킵니다.

val result = fncyWallet.sendTicket(
    ticketUuids = "ticketUuid", // Ticekt UUID
    pinNumber = "000000" // 지갑 비밀번호
)

See Also

티켓UUID를 얻는 방법은 을 확인하십시오.

티켓 생성
TicketType
가스비 조회
티켓 정보 조회
티켓 생성
티켓 전송
FncyTicket
FncyTicketResult
FncyTicket
FncyGasPrice
getGasPrice
estimateTicket
makeTicket
getTicketInfo
sendTicket