Chainbridge sample ERC721 token is transferred between Polygon POS chain and local network setup with polygon edge. ERC 721 token is deposited and proposal is executed at relayer but tokens are not released in Polygon edge network.
Your environment
OS and version: ubuntu
version of the Polygon Edge : 0.2.1
branch that causes this issue: development branch
Steps to reproduce
Alchemy URLs are used for RPC, for testing common ac## ERC721 deposit failing with chainbridge
Description
Chainbridge sample ERC721 token is transferred between Polygon POS chain and local network setup with polygon edge. ERC 721 token is deposited and proposal is executed at relayer but tokens are not released in Polygon edge network.
Your environment
OS and version: ubuntu
version of the Polygon Edge : 0.2.1
branch that causes this issue: Polygon development branch , chainbridge master branch
Chainbridge version: v1.1.5
Chainbridge deployer: f2aa093 on main branch
Steps to reproduce
Alchemy URLs are used for RPC, for testing common account is used for admin,relayer and user
All gas prices are used from matic gasstation for POS chain transactions
chainbridge's default lock release mode is used in below setup
Polygon edge block gas limit is set to 0x7A1200
Relayer config is set to "blockConfirmations": "1"
Created a polygon edge local network as per documentation [ documentation ]
Deployed chainbridge contracts on Polygon POS chain
Tokens should be released in polygon edge network and below command should return owner address
cb-sol-cli erc721 owner \ --url http://localhost:8005 \ --privateKey <PRIVATE_KEY> \ --erc721Address "0x79fd328b623157c4cf9Db77EF7645B7840A75E71" \ --id 0x90
Actual behaviour
Tokens were not released in polygon edge network and cb-sol-cli erc721 owner command returned below error
WARNING: Multiple definitions for safeTransferFrom
{
e: Error: unable to execute call: execution was reverted
at getResult (/home/ubuntu/polygon-edge/chainbridge-nft/chainbridge-deploy/cb-sol-cli/node_modules/ethers/providers/json-rpc-provider.js:40:21)
at exports.XMLHttpRequest.request.onreadystatechange (/home/ubuntu/polygon-edge/chainbridge-nft/chainbridge-deploy/cb-sol-cli/node_modules/ethers/utils/web.js:111:30)
at exports.XMLHttpRequest.dispatchEvent (/home/ubuntu/polygon-edge/chainbridge-nft/chainbridge-deploy/cb-sol-cli/node_modules/xmlhttprequest/lib/XMLHttpRequest.js:591:25)
at setState (/home/ubuntu/polygon-edge/chainbridge-nft/chainbridge-deploy/cb-sol-cli/node_modules/xmlhttprequest/lib/XMLHttpRequest.js:610:14)
at IncomingMessage. (/home/ubuntu/polygon-edge/chainbridge-nft/chainbridge-deploy/cb-sol-cli/node_modules/xmlhttprequest/lib/XMLHttpRequest.js:447:13)
at IncomingMessage.emit (node:events:402:35)
at endReadableNT (node:internal/streams/readable:1343:12)
at processTicksAndRejections (node:internal/process/task_queues:83:21) {
code: -32600,
data: undefined,
url: 'http://localhost:8005',
body: '{"method":"eth_call","params":[{"from":"0xbE6401aaBFd8B019747205787E6FaeA82BA46C60","to":"0xa1F5DFbd3CeAC105b173481CcCcee3D32Da877c5","data":"0x6352211e0000000000000000000000000000000000000000000000000000000000000090"},"latest"],"id":44,"jsonrpc":"2.0"}',
responseText: '{"jsonrpc":"2.0","id":44,"error":{"code":-32600,"message":"unable to execute call: execution was reverted"}}'
}
}
ERC721 deposit failing with chainbridge
Description
Chainbridge sample ERC721 token is transferred between Polygon POS chain and local network setup with polygon edge. ERC 721 token is deposited and proposal is executed at relayer but tokens are not released in Polygon edge network.
Your environment
Steps to reproduce
Description
Chainbridge sample ERC721 token is transferred between Polygon POS chain and local network setup with polygon edge. ERC 721 token is deposited and proposal is executed at relayer but tokens are not released in Polygon edge network.
Your environment
Steps to reproduce
cb-sol-cli deploy --all --chainId 99 \ --url <RPCURL> \ --privateKey <PRIVATE_KEY> \ --relayers 0xbE6401aaBFd8B019747205787E6FaeA82BA46C60 \ --relayerThreshold 1 \ --gasPrice 24854016445 \
cb-sol-cli deploy --all --chainId 100 \ --url http://localhost:8002 \ --privateKey <PRIVATE_KEY> \ --relayers 0xbE6401aaBFd8B019747205787E6FaeA82BA46C60 \ --relayerThreshold 1 \
cb-sol-cli bridge register-resource \ --url http://localhost:8002 \ --privateKey <PRIVATE_KEY> \ --resourceId "0x000000000000000000000000000000e389d61c11e5fe32ec1735b3cd38c69501" \ --bridge "0x545f55f6cC8D95307C712e68eaCcfE848bfb10d6" \ --handler "0xA5630f58dc7422CF9B4EE763F156e771D8C8Dda4" \ --targetContract "0xa1F5DFbd3CeAC105b173481CcCcee3D32Da877c5" \
cb-sol-cli bridge register-resource \ --url <RPCURL> \ --privateKey <PRIVATE_KEY> \ --resourceId "0x000000000000000000000000000000e389d61c11e5fe32ec1735b3cd38c69501" \ --bridge "0x545f55f6cC8D95307C712e68eaCcfE848bfb10d6" \ --handler "0xA5630f58dc7422CF9B4EE763F156e771D8C8Dda4" \ --targetContract "0xa1F5DFbd3CeAC105b173481CcCcee3D32Da877c5" \ --gasPrice 48678101393 \
cb-sol-cli erc721 mint --url <RPCURL> --privateKey <PRIVATE_KEY> --erc721Address "0xa1F5DFbd3CeAC105b173481CcCcee3D32Da877c5" --id 0x90 --gasPrice 43850705630
cb-sol-cli erc721 approve \ --url <RPCURL> \ --privateKey <PRIVATE_KEY> \ --erc721Address "0xa1F5DFbd3CeAC105b173481CcCcee3D32Da877c5" \ --recipient "0xA5630f58dc7422CF9B4EE763F156e771D8C8Dda4" \ --id 0x90 \ --gasPrice 31606193298 \
cb-sol-cli erc721 deposit \ --url <RPCURL> \ --privateKey <PRIVATE_KEY> \ --bridge "0x545f55f6cC8D95307C712e68eaCcfE848bfb10d6" \ --resourceId "0x000000000000000000000000000000e389d61c11e5fe32ec1735b3cd38c69501" \ --id 0x90 \ --dest 100 \ --recipient "0x5142C452a671AcbD369Fbf99307e707719C118B3" \ --gasPrice 18670932665 \
cb-sol-cli erc721 owner \ --url http://localhost:8005 \ --privateKey <PRIVATE_KEY> \ --erc721Address "0xa1F5DFbd3CeAC105b173481CcCcee3D32Da877c5" \ --id 0x90
Expected behaviour
Tokens should be released in polygon edge network and below command should return owner address
cb-sol-cli erc721 owner \ --url http://localhost:8005 \ --privateKey <PRIVATE_KEY> \ --erc721Address "0x79fd328b623157c4cf9Db77EF7645B7840A75E71" \ --id 0x90
Actual behaviour
Tokens were not released in polygon edge network and
cb-sol-cli erc721 owner
command returned below errorcb-sol-cli erc721 owner \ --url http://localhost:8005 \ --privateKey <PRIVATE_KEY> \ --erc721Address "0xa1F5DFbd3CeAC105b173481CcCcee3D32Da877c5" \ --id 0x90
Logs
Relayer Logs:
cb-sol-cli deposit Logs;