KTHULU DOCS
Search
K
Comment on page

NFT 다중전송

개요

다수의 NFT를 하나의 트랜잭션으로 전송합니다.

여러 NFT들을 일일이 개별 전송했을 때 낭비되는 시간과 비용을 최소화 할 수 있게 됩니다.

Android
iOS
Web

Parameters

이름
타입
설명
참조
network
String
네트워크
required
from
String
보낸 계정
required
to
String
받는 계정
required
collection_id
String
컬렉션 아이디
required
token_id
Array<String>
전송할 NFT 아이디
required
amount
Array<String>
전송량
if ERC1155 required

Response

이름
타입
설명
result
String
전송 성공여부("OK", "FAIL")
value (array of object)
이름
타입
설명
transaction_hash
String
전송 트랜잭션 해쉬

Example

//parameters
val network = "polygon" // ("cypress", "polygon", "bnb")
val from = "0x..."
val to = "0x..."
val collection_id = "0x..."
val token_id = arrayOf("1","2")
val amount = arrayOf("1","2")
//ERC721
val sendERC721Batch = sendNFT721BatchTransactionAsync(network,
from,
to,
token_id,
collection_id)
//ERC1155
val sendERC1155Batch = sendNFT1155BatchTransactionAsync(network,
from,
to,
token_id,
collection_id,
amount)
println(sendERC721Batch)
println(sendERC1155Batch)
//result log
/*
{
"result" : "OK",
"value": {
"transaction_hash": "0x..."
}
}
*/

Parameters

이름
타입
설명
참조
network
String
네트워크
required
from
String
보낸 계정
required
to
String
받는 계정
required
collection_id
String
컬렉션 아이디
required
token_id
Array<String>
전송할 NFT 아이디
required
amount
Array<String>
전송량
if ERC1155 required

Response

이름
타입
설명
result
String
전송 성공여부("OK", "FAIL")
value (array of object)
이름
타입
설명
transaction_hash
String
전송 트랜잭션 해쉬

Example

//parameters
let network = "polygon" // ("cypress", "polygon", "bnb")
let from = "0x..."
let to = "0x..."
let collection_id = "0x..."
let token_id = ["1","2"]
let amount = ["1","2"]
//ERC721
let sendERC721Batch = try await sendErc721BatchAsync(network: network,
from: from,
to: to,
token_id: token_id,
collection_id: collection_id)
//ERC1155
let sendERC1155Batch = try await sendErc1155BatchAsync(network: network,
from: from,
to: to,
token_id: token_id,
collection_id: collection_id,
amount: amount)
print(sendERC721Batch)
print(sendERC1155Batch)
//result log
{
"result" : "OK",
"value": {
"transaction_hash": "0x..."
}
}