6.批量转移POAP与NFT
POST
https://testnet.jugugu.cn/GUGUBOX_TransferBatch批量转移POAP与NFT,ERC721和ERC1155通用;也可单转;ERC721:tos 和 tokenids 数组长度必须相等 ERC1155:amounts、tos 和 tokenids 数组长度必须相等。转移者必须是NFT的所有者
请求参数
Body 参数application/json
phone
string
手机号
token
string
登录Jugugu获得的通信令牌
paymentpassword
string
区块链短密钥
可由查询类函数【获取短密钥状态】获取,返回true则paymentpassword传“”空字符串,如果返回false,主需要手动输入,目前暂时为空字符串即可,短密钥,会在jugugu app全部上线后可由用户修改,jugugu将不再存储
contract
string
合约地址
转移NFT所属的合约地址
contracttype
string
合约类型
11155代表ERC1155 721代表ERC721
amounts
array[string]
必需
ERC721忽略该参数,转移NFT 数量的 数组
tokenids
array[string]
转移NFT id 数组
转移NFT id 数组
tos
array[string]
POAP合约地址
转移目的地址数组
chaintype
string
区块链类型
这里默认填“cfx”
示例
{
"phone": "13136617115",
"token": "pariatur dolore commodo officia",
"paymentpassword": "reprehenderit officia",
"contract ": "721",
"contracttype": "sunt",
"amounts": [
"62",
"81",
"98",
"99"
],
"tokenids": [
"85",
"2",
"96",
"28",
"19"
],
"tos": [
"sit irure occaecat in labore",
"voluptate esse in dolor nulla",
"adipisicing",
"esse labore",
"dolore elit aute sunt dolore"
],
"chaintype": "dolor sint qui mollit"
}
示例代码
返回响应
成功(200)
HTTP 状态码: 200
内容格式: JSONapplication/json
数据结构
code
integer
请求状态
0代表成功 -1代表错误
msg
string
提示信息
提示信息
hash
string
交易hash
交易hash
Contract
string
合约地址
合约地址
total
integer
转移NFT的数量
转移NFT的数量
transfers
array [object {3}]
转移详情
转移详情,数组结构
tokenid
string
转移的NFT的ID
转移的NFT的ID
from
string
转移的源地址
转移的源地址
to
string
转移的目的地址
转移的目的地址
示例
成功示例
{
"code": 0,
"msg": "success",
"hash": "0xb7c7aae12675ce62ecc374793814eddd3dd9e969a433f0a681d54238d87e111d",
"Contract": "cfxtest:accxhshya9wehuh08gc2kgujgp0sus7xd6bn90f18b",
"total": 1,
"transfers": [
{
"tokenid": "1",
"from": "cfxtest:aapsau0fgafbz53d3ke963r7mhgu16y592k3deunrw",
"to": "cfxtest:aatxudan1t6fxpjgmkrh4b0hyjy27pc5ne7e51rsah"
}
]
}
最后修改时间: 2 years ago