NFT 브릿지
개요
서로 다른 네트워크에서의 자산(ERC-721, ERC-1155)을 이동시킬 수 있습니다. 예를 들어, 이더리움 네트워크의 NFT를 클레이튼 네트워크로 이동시킬 수 있습니다.
브릿지 최초 이용 시, 브릿지 컨트랙트로의 Approve가 필요합니다.
Parameters
Response
value (array of object)
Example
// parameters
var network = "polygon"
var from = "0x..."
var to_network = "cypress"
var token_id = "1"
var collection_id = "0x..."
var name = "zxcv"
var symbol = "ZXC"
var ownership = "0x..."
var amount = "1"
//ERC721
var bridgeErc721Async = bridgeErc721Async(
network,
from,
to_network,
token_id,
collection_id,
name,
symbol,
ownership)
//ERC1155
var bridgeErc1155Async = bridgeErc1155Async(
network,
fromAddress,
to_network,
token_id,
collection_id,
name,
symbol,
ownership,
amount)
println(bridgeErc721Async)
println(bridgeErc1155Async)
val approveSetupNftAsync = approveSetupNftAsync(network,fromAddress,token_address)
println(approveSetupNftAsync)
// result log
/*
{
"result" : "OK",
"value": [
{
"transaction_hash": "0x..."
}
]
}
*/
Parameters
Response
value (array of object)
Example
// parameters
let network = "polygon"
let fromAddress = "0x..."
let to_network = "cypress"
let token_id = "100"
let token_address = "0x..."
let name = "asd"
let symbol = "asd"
let ownership = "0x..."
let amount = "1"
//ERC721
let bridgeErc721Async = try await bridgeErc721Async(
network: network,
from: from,
toNetwork: to_network,
token_id: token_id,
collection_id: collection_id,
name: name,
symbol: symbol,
ownership: ownership)
//ERC1155
let bridgeErc1155Async = try await bridgeErc1155Async(
network: network,
from: from,
toNetwork: to_network,
token_id: token_id,
collection_id: collection_id,
name: name,
symbol: symbol,
ownership: ownership,
amount: amount)
print(bridgeErc721Async)
print(bridgeErc1155Async)
// result log
/*
{
"result" : "OK",
"value": [
{
"transaction_hash": "0x..."
}
]
}
*/
Last updated