@@ -89,8 +89,8 @@ extension Web3.Utils {
89
89
// TODO: - Need to fix
90
90
public static var erc721xABI = " [{ \" constant \" :true, \" inputs \" :[{ \" name \" : \" interfaceID \" , \" type \" : \" bytes4 \" }], \" name \" : \" supportsInterface \" , \" outputs \" :[{ \" name \" : \" \" , \" type \" : \" bool \" }], \" payable \" :false, \" stateMutability \" : \" view \" , \" type \" : \" function \" },{ \" constant \" :true, \" inputs \" :[], \" name \" : \" name \" , \" outputs \" :[{ \" name \" : \" _name \" , \" type \" : \" string \" }], \" payable \" :false, \" stateMutability \" : \" view \" , \" type \" : \" function \" },{ \" constant \" :true, \" inputs \" :[{ \" name \" : \" _tokenId \" , \" type \" : \" uint256 \" }], \" name \" : \" getApproved \" , \" outputs \" :[{ \" name \" : \" \" , \" type \" : \" address \" }], \" payable \" :false, \" stateMutability \" : \" view \" , \" type \" : \" function \" },{ \" constant \" :false, \" inputs \" :[{ \" name \" : \" _approved \" , \" type \" : \" address \" },{ \" name \" : \" _tokenId \" , \" type \" : \" uint256 \" }], \" name \" : \" approve \" , \" outputs \" :[], \" payable \" :true, \" stateMutability \" : \" payable \" , \" type \" : \" function \" },{ \" constant \" :true, \" inputs \" :[], \" name \" : \" totalSupply \" , \" outputs \" :[{ \" name \" : \" \" , \" type \" : \" uint256 \" }], \" payable \" :false, \" stateMutability \" : \" view \" , \" type \" : \" function \" },{ \" constant \" :false, \" inputs \" :[{ \" name \" : \" _from \" , \" type \" : \" address \" },{ \" name \" : \" _to \" , \" type \" : \" address \" },{ \" name \" : \" _tokenId \" , \" type \" : \" uint256 \" }], \" name \" : \" transferFrom \" , \" outputs \" :[], \" payable \" :true, \" stateMutability \" : \" payable \" , \" type \" : \" function \" },{ \" constant \" :true, \" inputs \" :[{ \" name \" : \" _owner \" , \" type \" : \" address \" },{ \" name \" : \" _index \" , \" type \" : \" uint256 \" }], \" name \" : \" tokenOfOwnerByIndex \" , \" outputs \" :[{ \" name \" : \" \" , \" type \" : \" uint256 \" }], \" payable \" :false, \" stateMutability \" : \" view \" , \" type \" : \" function \" },{ \" constant \" :false, \" inputs \" :[{ \" name \" : \" _from \" , \" type \" : \" address \" },{ \" name \" : \" _to \" , \" type \" : \" address \" },{ \" name \" : \" _tokenId \" , \" type \" : \" uint256 \" }], \" name \" : \" safeTransferFrom \" , \" outputs \" :[], \" payable \" :true, \" stateMutability \" : \" payable \" , \" type \" : \" function \" },{ \" constant \" :true, \" inputs \" :[{ \" name \" : \" _index \" , \" type \" : \" uint256 \" }], \" name \" : \" tokenByIndex \" , \" outputs \" :[{ \" name \" : \" \" , \" type \" : \" uint256 \" }], \" payable \" :false, \" stateMutability \" : \" view \" , \" type \" : \" function \" },{ \" constant \" :true, \" inputs \" :[{ \" name \" : \" _tokenId \" , \" type \" : \" uint256 \" }], \" name \" : \" ownerOf \" , \" outputs \" :[{ \" name \" : \" \" , \" type \" : \" address \" }], \" payable \" :false, \" stateMutability \" : \" view \" , \" type \" : \" function \" },{ \" constant \" :true, \" inputs \" :[{ \" name \" : \" _owner \" , \" type \" : \" address \" }], \" name \" : \" balanceOf \" , \" outputs \" :[{ \" name \" : \" \" , \" type \" : \" uint256 \" }], \" payable \" :false, \" stateMutability \" : \" view \" , \" type \" : \" function \" },{ \" constant \" :true, \" inputs \" :[], \" name \" : \" symbol \" , \" outputs \" :[{ \" name \" : \" _symbol \" , \" type \" : \" string \" }], \" payable \" :false, \" stateMutability \" : \" view \" , \" type \" : \" function \" },{ \" constant \" :false, \" inputs \" :[{ \" name \" : \" _operator \" , \" type \" : \" address \" },{ \" name \" : \" _approved \" , \" type \" : \" bool \" }], \" name \" : \" setApprovalForAll \" , \" outputs \" :[], \" payable \" :false, \" stateMutability \" : \" nonpayable \" , \" type \" : \" function \" },{ \" constant \" :false, \" inputs \" :[{ \" name \" : \" _from \" , \" type \" : \" address \" },{ \" name \" : \" _to \" , \" type \" : \" address \" },{ \" name \" : \" _tokenId \" , \" type \" : \" uint256 \" },{ \" name \" : \" data \" , \" type \" : \" bytes \" }], \" name \" : \" safeTransferFrom \" , \" outputs \" :[], \" payable \" :true, \" stateMutability \" : \" payable \" , \" type \" : \" function \" },{ \" constant \" :true, \" inputs \" :[{ \" name \" : \" _tokenId \" , \" type \" : \" uint256 \" }], \" name \" : \" tokenURI \" , \" outputs \" :[{ \" name \" : \" \" , \" type \" : \" string \" }], \" payable \" :false, \" stateMutability \" : \" view \" , \" type \" : \" function \" },{ \" constant \" :true, \" inputs \" :[{ \" name \" : \" _owner \" , \" type \" : \" address \" },{ \" name \" : \" _operator \" , \" type \" : \" address \" }], \" name \" : \" isApprovedForAll \" , \" outputs \" :[{ \" name \" : \" \" , \" type \" : \" bool \" }], \" payable \" :false, \" stateMutability \" : \" view \" , \" type \" : \" function \" },{ \" anonymous \" :false, \" inputs \" :[{ \" indexed \" :true, \" name \" : \" _from \" , \" type \" : \" address \" },{ \" indexed \" :true, \" name \" : \" _to \" , \" type \" : \" address \" },{ \" indexed \" :true, \" name \" : \" _tokenId \" , \" type \" : \" uint256 \" }], \" name \" : \" Transfer \" , \" type \" : \" event \" },{ \" anonymous \" :false, \" inputs \" :[{ \" indexed \" :true, \" name \" : \" _owner \" , \" type \" : \" address \" },{ \" indexed \" :true, \" name \" : \" _approved \" , \" type \" : \" address \" },{ \" indexed \" :true, \" name \" : \" _tokenId \" , \" type \" : \" uint256 \" }], \" name \" : \" Approval \" , \" type \" : \" event \" },{ \" anonymous \" :false, \" inputs \" :[{ \" indexed \" :true, \" name \" : \" _owner \" , \" type \" : \" address \" },{ \" indexed \" :true, \" name \" : \" _operator \" , \" type \" : \" address \" },{ \" indexed \" :false, \" name \" : \" _approved \" , \" type \" : \" bool \" }], \" name \" : \" ApprovalForAll \" , \" type \" : \" event \" }] "
91
91
92
- // TODO: - Need to fix
93
- public static var erc1155ABI = " [{ \" constant \" :true, \" inputs \" :[{ \" name \" : \" interfaceID \" , \" type \" : \" bytes4 \" }], \" name \" : \" supportsInterface \" , \" outputs \" :[{ \" name \" : \" \" , \" type \" : \" bool \" }], \" payable \" :false, \" stateMutability \" : \" view \" , \" type \" : \" function \" },{ \" constant \" :true, \" inputs \" :[], \" name \" : \" name \" , \" outputs \" :[{ \" name \" : \" _name \" , \" type \" : \" string \" }], \" payable \" :false, \" stateMutability \" : \" view \" , \" type \" : \" function \" },{ \" constant \" :true, \" inputs \" :[{ \" name \" : \" _tokenId \" , \" type \" : \" uint256 \" }], \" name \" : \" getApproved \" , \" outputs \" :[{ \" name \" : \" \" , \" type \" : \" address \" }], \" payable \" :false, \" stateMutability \" : \" view \" , \" type \" : \" function \" },{ \" constant \" :false, \" inputs \" :[{ \" name \" : \" _approved \" , \" type \" : \" address \" },{ \" name \" : \" _tokenId \" , \" type \" : \" uint256 \" }], \" name \" : \" approve \" , \" outputs \" :[], \" payable \" :true, \" stateMutability \" : \" payable \" , \" type \" : \" function \" },{ \" constant \" :true, \" inputs \" :[], \" name \" : \" totalSupply \" , \" outputs \" :[{ \" name \" : \" \" , \" type \" : \" uint256 \" }], \" payable \" :false, \" stateMutability \" : \" view \" , \" type \" : \" function \" },{ \" constant \" :false, \" inputs \" :[{ \" name \" : \" _from \" , \" type \" : \" address \" },{ \" name \" : \" _to \" , \" type \" : \" address \" },{ \" name \" : \" _tokenId \" , \" type \" : \" uint256 \" }], \" name \" : \" transferFrom \" , \" outputs \" :[], \" payable \" :true, \" stateMutability \" : \" payable \" , \" type \" : \" function \" },{ \" constant \" :true, \" inputs \" :[{ \" name \" : \" _owner \" , \" type \" : \" address \" },{ \" name \" : \" _index \" , \" type \" : \" uint256 \" }], \" name \" : \" tokenOfOwnerByIndex \" , \" outputs \" :[{ \" name \" : \" \" , \" type \" : \" uint256 \" }], \" payable \" :false, \" stateMutability \" : \" view \" , \" type \" : \" function \" },{ \" constant \" :false, \" inputs \" :[{ \" name \" : \" _from \" , \" type \" : \" address \" },{ \" name \" : \" _to \" , \" type \" : \" address \" },{ \" name \" : \" _tokenId \" , \" type \" : \" uint256 \" }], \" name \" : \" safeTransferFrom \" , \" outputs \" :[], \" payable \" :true, \" stateMutability \" : \" payable \" , \" type \" : \" function \" },{ \" constant \" :true, \" inputs \" :[{ \" name \" : \" _index \" , \" type \" : \" uint256 \" }], \" name \" : \" tokenByIndex \" , \" outputs \" :[{ \" name \" : \" \" , \" type \" : \" uint256 \" }], \" payable \" :false, \" stateMutability \" : \" view \" , \" type \" : \" function \" },{ \" constant \" :true, \" inputs \" :[{ \" name \" : \" _tokenId \" , \" type \" : \" uint256 \" }], \" name \" : \" ownerOf \" , \" outputs \" :[{ \" name \" : \" \" , \" type \" : \" address \" }], \" payable \" :false, \" stateMutability \" : \" view \" , \" type \" : \" function \" },{ \" constant \" :true, \" inputs \" :[{ \" name \" : \" _owner \" , \" type \" : \" address \" }], \" name \" : \" balanceOf \" , \" outputs \" :[{ \" name \" : \" \" , \" type \" : \" uint256 \" }], \" payable \" :false, \" stateMutability \" : \" view \" , \" type \" : \" function \" },{ \" constant \" :true, \" inputs \" :[], \" name \" : \" symbol \" , \" outputs \" :[{ \" name \" : \" _symbol \" , \" type \" : \" string \" }], \" payable \" :false, \" stateMutability \" : \" view \" , \" type \" : \" function \" },{ \" constant \" :false, \" inputs \" :[{ \" name \" : \" _operator \" , \" type \" : \" address \" },{ \" name \" : \" _approved \" , \" type \" : \" bool \" }], \" name \" : \" setApprovalForAll \" , \" outputs \" :[], \" payable \" :false, \" stateMutability \" : \" nonpayable \" , \" type \" : \" function \" },{ \" constant \" :false, \" inputs \" :[{ \" name \" : \" _from \" , \" type \" : \" address \" },{ \" name \" : \" _to \" , \" type \" : \" address \" },{ \" name \" : \" _tokenId \" , \" type \" : \" uint256 \" },{ \" name \" : \" data \" , \" type \" : \" bytes \" }], \" name \" : \" safeTransferFrom \" , \" outputs \" :[], \" payable \" :true, \" stateMutability \" : \" payable \" , \" type \" : \" function \" },{ \" constant \" :true, \" inputs \" :[{ \" name \" : \" _tokenId \" , \" type \" : \" uint256 \" }], \" name \" : \" tokenURI \" , \" outputs \" :[{ \" name \" : \" \" , \" type \" : \" string \" }], \" payable \" :false, \" stateMutability \" : \" view \" , \" type \" : \" function \" },{ \" constant \" :true, \" inputs \" :[{ \" name \" : \" _owner \" , \" type \" : \" address \" },{ \" name \" : \" _operator \" , \" type \" : \" address \" }], \" name \" : \" isApprovedForAll \" , \" outputs \" :[{ \" name \" : \" \" , \" type \" : \" bool \" }], \" payable \" :false, \" stateMutability \" : \" view \" , \" type \" : \" function \" },{ \" anonymous \" :false, \" inputs \" :[{ \" indexed \" :true, \" name \" : \" _from \" , \" type \" : \" address \" },{ \" indexed \" :true, \" name \" : \" _to \" , \" type \" : \" address \" },{ \" indexed \" :true, \" name \" : \" _tokenId \" , \" type \" : \" uint256 \" }], \" name \" : \" Transfer \" , \" type \" : \" event \" },{ \" anonymous \" :false, \" inputs \" :[{ \" indexed \" :true, \" name \" : \" _owner \" , \" type \" : \" address \" },{ \" indexed \" :true, \" name \" : \" _approved \" , \" type \" : \" address \" },{ \" indexed \" :true, \" name \" : \" _tokenId \" , \" type \" : \" uint256 \" }], \" name \" : \" Approval \" , \" type \" : \" event \" },{ \" anonymous \" :false, \" inputs \" :[{ \" indexed \" :true, \" name \" : \" _owner \" , \" type \" : \" address \" },{ \" indexed \" :true, \" name \" : \" _operator \" , \" type \" : \" address \" },{ \" indexed \" :false, \" name \" : \" _approved \" , \" type \" : \" bool \" }], \" name \" : \" ApprovalForAll \" , \" type \" : \" event \" }] "
92
+ // Reference ERC-1155 ABI
93
+ public static var erc1155ABI = " [{ \" anonymous \" : false, \" inputs \" : [{ \" indexed \" : true, \" internalType \" : \" address \" , \" name \" : \" account \" , \" type \" : \" address \" },{ \" indexed \" : true, \" internalType \" : \" address \" , \" name \" : \" operator \" , \" type \" : \" address \" },{ \" indexed \" : false, \" internalType \" : \" bool \" , \" name \" : \" approved \" , \" type \" : \" bool \" }], \" name \" : \" ApprovalForAll \" , \" type \" : \" event \" },{ \" anonymous \" : false, \" inputs \" : [{ \" indexed \" : true, \" internalType \" : \" address \" , \" name \" : \" operator \" , \" type \" : \" address \" },{ \" indexed \" : true, \" internalType \" : \" address \" , \" name \" : \" from \" , \" type \" : \" address \" },{ \" indexed \" : true, \" internalType \" : \" address \" , \" name \" : \" to \" , \" type \" : \" address \" },{ \" indexed \" : false, \" internalType \" : \" uint256[] \" , \" name \" : \" ids \" , \" type \" : \" uint256[] \" },{ \" indexed \" : false, \" internalType \" : \" uint256[] \" , \" name \" : \" values \" , \" type \" : \" uint256[] \" }], \" name \" : \" TransferBatch \" , \" type \" : \" event \" },{ \" anonymous \" : false, \" inputs \" : [{ \" indexed \" : true, \" internalType \" : \" address \" , \" name \" : \" operator \" , \" type \" : \" address \" },{ \" indexed \" : true, \" internalType \" : \" address \" , \" name \" : \" from \" , \" type \" : \" address \" },{ \" indexed \" : true, \" internalType \" : \" address \" , \" name \" : \" to \" , \" type \" : \" address \" },{ \" indexed \" : false, \" internalType \" : \" uint256 \" , \" name \" : \" id \" , \" type \" : \" uint256 \" },{ \" indexed \" : false, \" internalType \" : \" uint256 \" , \" name \" : \" value \" , \" type \" : \" uint256 \" }], \" name \" : \" TransferSingle \" , \" type \" : \" event \" },{ \" anonymous \" : false, \" inputs \" : [{ \" indexed \" : false, \" internalType \" : \" string \" , \" name \" : \" value \" , \" type \" : \" string \" },{ \" indexed \" : true, \" internalType \" : \" uint256 \" , \" name \" : \" id \" , \" type \" : \" uint256 \" }], \" name \" : \" URI \" , \" type \" : \" event \" },{ \" inputs \" : [{ \" internalType \" : \" address \" , \" name \" : \" account \" , \" type \" : \" address \" },{ \" internalType \" : \" uint256 \" , \" name \" : \" id \" , \" type \" : \" uint256 \" }], \" name \" : \" balanceOf \" , \" outputs \" : [{ \" internalType \" : \" uint256 \" , \" name \" : \" \" , \" type \" : \" uint256 \" }], \" stateMutability \" : \" view \" , \" type \" : \" function \" },{ \" inputs \" : [{ \" internalType \" : \" address[] \" , \" name \" : \" accounts \" , \" type \" : \" address[] \" },{ \" internalType \" : \" uint256[] \" , \" name \" : \" ids \" , \" type \" : \" uint256[] \" }], \" name \" : \" balanceOfBatch \" , \" outputs \" : [{ \" internalType \" : \" uint256[] \" , \" name \" : \" \" , \" type \" : \" uint256[] \" }], \" stateMutability \" : \" view \" , \" type \" : \" function \" },{ \" inputs \" : [{ \" internalType \" : \" address \" , \" name \" : \" account \" , \" type \" : \" address \" },{ \" internalType \" : \" address \" , \" name \" : \" operator \" , \" type \" : \" address \" }], \" name \" : \" isApprovedForAll \" , \" outputs \" : [{ \" internalType \" : \" bool \" , \" name \" : \" \" , \" type \" : \" bool \" }], \" stateMutability \" : \" view \" , \" type \" : \" function \" },{ \" inputs \" : [{ \" internalType \" : \" address \" , \" name \" : \" from \" , \" type \" : \" address \" },{ \" internalType \" : \" address \" , \" name \" : \" to \" , \" type \" : \" address \" },{ \" internalType \" : \" uint256[] \" , \" name \" : \" ids \" , \" type \" : \" uint256[] \" },{ \" internalType \" : \" uint256[] \" , \" name \" : \" amounts \" , \" type \" : \" uint256[] \" },{ \" internalType \" : \" bytes \" , \" name \" : \" data \" , \" type \" : \" bytes \" }], \" name \" : \" safeBatchTransferFrom \" , \" outputs \" : [], \" stateMutability \" : \" nonpayable \" , \" type \" : \" function \" },{ \" inputs \" : [{ \" internalType \" : \" address \" , \" name \" : \" from \" , \" type \" : \" address \" },{ \" internalType \" : \" address \" , \" name \" : \" to \" , \" type \" : \" address \" },{ \" internalType \" : \" uint256 \" , \" name \" : \" id \" , \" type \" : \" uint256 \" },{ \" internalType \" : \" uint256 \" , \" name \" : \" amount \" , \" type \" : \" uint256 \" },{ \" internalType \" : \" bytes \" , \" name \" : \" data \" , \" type \" : \" bytes \" }], \" name \" : \" safeTransferFrom \" , \" outputs \" : [], \" stateMutability \" : \" nonpayable \" , \" type \" : \" function \" },{ \" inputs \" : [{ \" internalType \" : \" address \" , \" name \" : \" operator \" , \" type \" : \" address \" },{ \" internalType \" : \" bool \" , \" name \" : \" approved \" , \" type \" : \" bool \" }], \" name \" : \" setApprovalForAll \" , \" outputs \" : [], \" stateMutability \" : \" nonpayable \" , \" type \" : \" function \" },{ \" inputs \" : [{ \" internalType \" : \" bytes4 \" , \" name \" : \" interfaceId \" , \" type \" : \" bytes4 \" }], \" name \" : \" supportsInterface \" , \" outputs \" : [{ \" internalType \" : \" bool \" , \" name \" : \" \" , \" type \" : \" bool \" }], \" stateMutability \" : \" view \" , \" type \" : \" function \" },{ \" inputs \" : [{ \" internalType \" : \" uint256 \" , \" name \" : \" id \" , \" type \" : \" uint256 \" }], \" name \" : \" uri \" , \" outputs \" : [{ \" internalType \" : \" string \" , \" name \" : \" \" , \" type \" : \" string \" }], \" stateMutability \" : \" view \" , \" type \" : \" function \" }] "
94
94
95
95
/// Precoded ERC777 contracts ABI. Output parameters are named for ease of use.
96
96
public static var erc777ABI = """
0 commit comments