diff --git a/contracts/core/assets/usdt/USDT.sol b/contracts/core/assets/usdt/USDT.sol index 2f94df0..df07a45 100644 --- a/contracts/core/assets/usdt/USDT.sol +++ b/contracts/core/assets/usdt/USDT.sol @@ -1,8 +1,8 @@ -// /** -// *Submitted for verification at Etherscan.io on 2017-11-28 -// */ +/** + *Submitted for verification at Etherscan.io on 2017-11-28 +*/ -// pragma solidity ^0.4.17; +pragma solidity ^0.5.0; // /** // * @title SafeMath diff --git a/contracts/core/cross_chain_manager/interface/IEthCrossChainManager.sol b/contracts/core/cross_chain_manager/interface/IEthCrossChainManager.sol index 852df55..1e20212 100644 --- a/contracts/core/cross_chain_manager/interface/IEthCrossChainManager.sol +++ b/contracts/core/cross_chain_manager/interface/IEthCrossChainManager.sol @@ -1,4 +1,4 @@ -pragma solidity ^0.5.0; +pragma solidity >=0.5.0; /** * @dev Interface of the EthCrossChainManager contract for business contract like LockProxy to request cross chain transaction diff --git a/contracts/core/cross_chain_manager/interface/IEthCrossChainManagerProxy.sol b/contracts/core/cross_chain_manager/interface/IEthCrossChainManagerProxy.sol index 73150e1..75b6772 100644 --- a/contracts/core/cross_chain_manager/interface/IEthCrossChainManagerProxy.sol +++ b/contracts/core/cross_chain_manager/interface/IEthCrossChainManagerProxy.sol @@ -1,4 +1,4 @@ -pragma solidity ^0.5.0; +pragma solidity >=0.5.0; /** * @dev Interface of the EthCrossChainManagerProxy for business contract like LockProxy to obtain the reliable EthCrossChainManager contract hash. diff --git a/contracts/core/cross_chain_manager/interface/IUpgradableECCM.sol b/contracts/core/cross_chain_manager/interface/IUpgradableECCM.sol index 69f0d9e..b3de72f 100644 --- a/contracts/core/cross_chain_manager/interface/IUpgradableECCM.sol +++ b/contracts/core/cross_chain_manager/interface/IUpgradableECCM.sol @@ -9,4 +9,5 @@ interface IUpgradableECCM { function paused() external view returns (bool); function upgradeToNew(address) external returns (bool); function isOwner() external view returns (bool); + function setChainId(uint64 _newChainId) external returns (bool); } diff --git a/contracts/core/cross_chain_manager/libs/EthCrossChainUtils.sol b/contracts/core/cross_chain_manager/libs/EthCrossChainUtils.sol index 427ed94..cf79897 100644 --- a/contracts/core/cross_chain_manager/libs/EthCrossChainUtils.sol +++ b/contracts/core/cross_chain_manager/libs/EthCrossChainUtils.sol @@ -111,7 +111,6 @@ library ECCUtils { function verifySig(bytes memory _rawHeader, bytes memory _sigList, address[] memory _keepers, uint _m) internal pure returns (bool){ bytes32 hash = getHeaderHash(_rawHeader); - uint signed = 0; uint sigCount = _sigList.length / POLYCHAIN_SIGNATURE_LEN; address[] memory signers = new address[](sigCount); bytes32 r; diff --git a/contracts/core/cross_chain_manager/logic/EthCrossChainManager.sol b/contracts/core/cross_chain_manager/logic/EthCrossChainManager.sol index e38be6b..0f098bb 100644 --- a/contracts/core/cross_chain_manager/logic/EthCrossChainManager.sol +++ b/contracts/core/cross_chain_manager/logic/EthCrossChainManager.sol @@ -8,14 +8,16 @@ import "./../upgrade/UpgradableECCM.sol"; import "./../libs/EthCrossChainUtils.sol"; import "./../interface/IEthCrossChainManager.sol"; import "./../interface/IEthCrossChainData.sol"; + contract EthCrossChainManager is IEthCrossChainManager, UpgradableECCM { using SafeMath for uint256; - + event InitGenesisBlockEvent(uint256 height, bytes rawHeader); event ChangeBookKeeperEvent(uint256 height, bytes rawHeader); event CrossChainEvent(address indexed sender, bytes txId, address proxyOrAssetContract, uint64 toChainId, bytes toContract, bytes rawdata); event VerifyHeaderAndExecuteTxEvent(uint64 fromChainID, bytes toContract, bytes crossChainTxHash, bytes fromChainTxHash); - constructor(address _eccd) UpgradableECCM(_eccd) public {} + + constructor(address _eccd, uint64 _chainId) UpgradableECCM(_eccd, _chainId) public {} /* @notice sync Poly chain genesis block header to smart contrat * @dev this function can only be called once, nextbookkeeper of rawHeader can't be empty @@ -157,7 +159,7 @@ contract EthCrossChainManager is IEthCrossChainManager, UpgradableECCM { require(eccd.markFromChainTxExist(toMerkleValue.fromChainID, Utils.bytesToBytes32(toMerkleValue.txHash)), "Save crosschain tx exist failed!"); // Ethereum ChainId is 2, we need to check the transaction is for Ethereum network - require(toMerkleValue.makeTxParam.toChainId == uint64(2), "This Tx is not aiming at Ethereum network!"); + require(toMerkleValue.makeTxParam.toChainId == chainId, "This Tx is not aiming at Ethereum network!"); // Obtain the targeting contract, so that Ethereum cross chain manager contract can trigger the executation of cross chain tx on Ethereum side address toContract = Utils.bytesToAddress(toMerkleValue.makeTxParam.toContract); diff --git a/contracts/core/cross_chain_manager/logic/EthCrossChainManager_new_template.sol b/contracts/core/cross_chain_manager/logic/EthCrossChainManager_new_template.sol index d6de2b8..61e1d6a 100644 --- a/contracts/core/cross_chain_manager/logic/EthCrossChainManager_new_template.sol +++ b/contracts/core/cross_chain_manager/logic/EthCrossChainManager_new_template.sol @@ -15,7 +15,7 @@ contract NewEthCrossChainManager is IEthCrossChainManager, UpgradableECCM { event ChangeBookKeeperEvent(uint256 height, bytes rawHeader); event CrossChainEvent(address indexed sender, bytes txId, address proxyOrAssetContract, uint64 toChainId, bytes toContract, bytes rawdata); event VerifyHeaderAndExecuteTxEvent(uint64 fromChainID, bytes toContract, bytes crossChainTxHash, bytes fromChainTxHash); - constructor(address _eccd) UpgradableECCM(_eccd) public {} + constructor(address _eccd, uint64 _chainId) UpgradableECCM(_eccd, _chainId) public {} /* @notice sync Poly chain genesis block header to smart contrat * @dev this function can only be called once, nextbookkeeper of rawHeader can't be empty diff --git a/contracts/core/cross_chain_manager/upgrade/EthCrossChainManagerProxy.sol b/contracts/core/cross_chain_manager/upgrade/EthCrossChainManagerProxy.sol index 6789cd1..346f86e 100644 --- a/contracts/core/cross_chain_manager/upgrade/EthCrossChainManagerProxy.sol +++ b/contracts/core/cross_chain_manager/upgrade/EthCrossChainManagerProxy.sol @@ -48,4 +48,11 @@ contract EthCrossChainManagerProxy is IEthCrossChainManagerProxy, Ownable, Pausa function getEthCrossChainManager() whenNotPaused public view returns (address) { return EthCrossChainManagerAddr_; } + function changeManagerChainID(uint64 _newChainId) onlyOwner whenPaused public { + IUpgradableECCM eccm = IUpgradableECCM(EthCrossChainManagerAddr_); + if (!eccm.paused()) { + require(eccm.pause(), "Pause old EthCrossChainManager contract failed!"); + } + require(eccm.setChainId(_newChainId), "set chain ID failed. "); + } } \ No newline at end of file diff --git a/contracts/core/cross_chain_manager/upgrade/UpgradableECCM.sol b/contracts/core/cross_chain_manager/upgrade/UpgradableECCM.sol index 441e0f7..2c51db5 100644 --- a/contracts/core/cross_chain_manager/upgrade/UpgradableECCM.sol +++ b/contracts/core/cross_chain_manager/upgrade/UpgradableECCM.sol @@ -7,8 +7,11 @@ import "./../../../libs/ownership/Ownable.sol"; contract UpgradableECCM is IUpgradableECCM, Ownable, Pausable { address public EthCrossChainDataAddress; - constructor (address ethCrossChainDataAddr) Pausable() Ownable() public { + uint64 public chainId; + + constructor (address ethCrossChainDataAddr, uint64 _chainId) Pausable() Ownable() public { EthCrossChainDataAddress = ethCrossChainDataAddr; + chainId = _chainId; } function pause() onlyOwner public returns (bool) { if (!paused()) { @@ -38,4 +41,9 @@ contract UpgradableECCM is IUpgradableECCM, Ownable, Pausable { eccd.transferOwnership(newEthCrossChainManagerAddress); return true; } + + function setChainId(uint64 _newChainId) whenPaused onlyOwner public returns (bool) { + chainId = _newChainId; + return true; + } } \ No newline at end of file diff --git a/contracts/core/lock_proxy/LockProxy.sol b/contracts/core/lock_proxy/LockProxy.sol index 04da125..4a451c6 100644 --- a/contracts/core/lock_proxy/LockProxy.sol +++ b/contracts/core/lock_proxy/LockProxy.sol @@ -154,18 +154,18 @@ contract LockProxy is Ownable { return true; } - function _transferERC20ToContract(address fromAssetHash, address fromAddress, address toAddress, uint256 amount) internal returns (bool) { - IERC20 erc20Token = IERC20(fromAssetHash); + IERC20 erc20Token = IERC20(fromAssetHash); // require(erc20Token.transferFrom(fromAddress, toAddress, amount), "trasnfer ERC20 Token failed!"); - erc20Token.safeTransferFrom(fromAddress, toAddress, amount); - return true; + erc20Token.safeTransferFrom(fromAddress, toAddress, amount); + return true; } + function _transferERC20FromContract(address toAssetHash, address toAddress, uint256 amount) internal returns (bool) { - IERC20 erc20Token = IERC20(toAssetHash); + IERC20 erc20Token = IERC20(toAssetHash); // require(erc20Token.transfer(toAddress, amount), "trasnfer ERC20 Token failed!"); - erc20Token.safeTransfer(toAddress, amount); - return true; + erc20Token.safeTransfer(toAddress, amount); + return true; } function _serializeTxArgs(TxArgs memory args) internal pure returns (bytes memory) { diff --git a/contracts/libs/GSN/Context.sol b/contracts/libs/GSN/Context.sol index 72b0eeb..e4c4a19 100644 --- a/contracts/libs/GSN/Context.sol +++ b/contracts/libs/GSN/Context.sol @@ -1,4 +1,4 @@ -pragma solidity ^0.5.0; +pragma solidity >=0.5.0; /* * @dev Provides information about the current execution context, including the diff --git a/contracts/libs/common/ZeroCopySink.sol b/contracts/libs/common/ZeroCopySink.sol index 7a9b0ae..d9c4779 100644 --- a/contracts/libs/common/ZeroCopySink.sol +++ b/contracts/libs/common/ZeroCopySink.sol @@ -1,4 +1,4 @@ -pragma solidity ^0.5.0; +pragma solidity >=0.5.0; /** * @dev Wrappers over encoding and serialization operation into bytes from bassic types in Solidity for PolyNetwork cross chain utility. @@ -162,6 +162,32 @@ library ZeroCopySink { return buff; } + /* @notice Convert limited uint256 value into bytes + * @param v The uint256 value + * @return Converted bytes array + */ + function WriteUint256(uint256 v) internal pure returns (bytes memory) { + require(v <= uint256(-1), "Value exceeds uint256 range"); + bytes memory buff; + + assembly{ + buff := mload(0x40) + let byteLen := 0x20 + mstore(buff, byteLen) + for { + let mindex := 0x00 + let vindex := 0x1f + } lt(mindex, byteLen) { + mindex := add(mindex, 0x01) + vindex := sub(vindex, 0x01) + }{ + mstore8(add(add(buff, 0x20), mindex), byte(vindex, v)) + } + mstore(0x40, add(buff, 0x40)) + } + return buff; + } + /* @notice Encode bytes format data into bytes * @param data The bytes array data * @return Encoded bytes array diff --git a/contracts/libs/common/ZeroCopySource.sol b/contracts/libs/common/ZeroCopySource.sol index c113dd4..00a357b 100644 --- a/contracts/libs/common/ZeroCopySource.sol +++ b/contracts/libs/common/ZeroCopySource.sol @@ -1,4 +1,4 @@ -pragma solidity ^0.5.0; +pragma solidity >=0.5.0; /** * @dev Wrappers over decoding and deserialization operation from bytes into bassic types in Solidity for PolyNetwork cross chain utility. @@ -173,6 +173,30 @@ library ZeroCopySource { require(v <= 0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff, "Value exceeds the range"); return (v, offset + 32); } + + function NextUint256(bytes memory buff, uint256 offset) internal pure returns (uint256, uint256) { + require(offset + 32 <= buff.length && offset < offset + 32, "NextUint256, offset exceeds maximum"); + uint256 v; + assembly { + let tmpbytes := mload(0x40) + let byteLen := 0x20 + for { + let tindex := 0x00 + let bindex := sub(byteLen, 0x01) + let bvalue := mload(add(add(buff, 0x20), offset)) + } lt(tindex, byteLen) { + tindex := add(tindex, 0x01) + bindex := sub(bindex, 0x01) + }{ + mstore8(add(tmpbytes, tindex), byte(bindex, bvalue)) + } + mstore(0x40, add(tmpbytes, byteLen)) + v := mload(tmpbytes) + } + require(v <= uint256(-1), "Value exceeds the range"); + return (v, offset + 32); + } + /* @notice Read next variable bytes starting from offset, the decoding rule coming from multi-chain * @param buff Source bytes array diff --git a/contracts/libs/math/SafeMath.sol b/contracts/libs/math/SafeMath.sol index 96b76f0..ba068b8 100644 --- a/contracts/libs/math/SafeMath.sol +++ b/contracts/libs/math/SafeMath.sol @@ -1,4 +1,4 @@ -pragma solidity ^0.5.0; +pragma solidity >=0.5.0; /** * @dev Wrappers over Solidity's arithmetic operations with added overflow diff --git a/contracts/libs/ownership/Ownable.sol b/contracts/libs/ownership/Ownable.sol index 0d971e8..9767dab 100644 --- a/contracts/libs/ownership/Ownable.sol +++ b/contracts/libs/ownership/Ownable.sol @@ -1,4 +1,4 @@ -pragma solidity ^0.5.0; +pragma solidity >=0.5.0; import "../GSN/Context.sol"; /** diff --git a/contracts/libs/utils/EnumerableMap.sol b/contracts/libs/utils/EnumerableMap.sol new file mode 100644 index 0000000..a62f600 --- /dev/null +++ b/contracts/libs/utils/EnumerableMap.sol @@ -0,0 +1,237 @@ +// SPDX-License-Identifier: MIT + +pragma solidity >=0.5.0; + +/** + * @dev Library for managing an enumerable variant of Solidity's + * https://solidity.readthedocs.io/en/latest/types.html#mapping-types[`mapping`] + * type. + * + * Maps have the following properties: + * + * - Entries are added, removed, and checked for existence in constant time + * (O(1)). + * - Entries are enumerated in O(n). No guarantees are made on the ordering. + * + * ``` + * contract Example { + * // Add the library methods + * using EnumerableMap for EnumerableMap.UintToAddressMap; + * + * // Declare a set state variable + * EnumerableMap.UintToAddressMap private myMap; + * } + * ``` + * + * As of v3.0.0, only maps of type `uint256 -> address` (`UintToAddressMap`) are + * supported. + */ +library EnumerableMap { + // To implement this library for multiple types with as little code + // repetition as possible, we write it in terms of a generic Map type with + // bytes32 keys and values. + // The Map implementation uses private functions, and user-facing + // implementations (such as Uint256ToAddressMap) are just wrappers around + // the underlying Map. + // This means that we can only create new EnumerableMaps for types that fit + // in bytes32. + + struct MapEntry { + bytes32 _key; + bytes32 _value; + } + + struct Map { + // Storage of map keys and values + MapEntry[] _entries; + + // Position of the entry defined by a key in the `entries` array, plus 1 + // because index 0 means a key is not in the map. + mapping (bytes32 => uint256) _indexes; + } + + /** + * @dev Adds a key-value pair to a map, or updates the value for an existing + * key. O(1). + * + * Returns true if the key was added to the map, that is if it was not + * already present. + */ + function _set(Map storage map, bytes32 key, bytes32 value) private returns (bool) { + // We read and store the key's index to prevent multiple reads from the same storage slot + uint256 keyIndex = map._indexes[key]; + + if (keyIndex == 0) { // Equivalent to !contains(map, key) + map._entries.push(MapEntry({ _key: key, _value: value })); + // The entry is stored at length-1, but we add 1 to all indexes + // and use 0 as a sentinel value + map._indexes[key] = map._entries.length; + return true; + } else { + map._entries[keyIndex - 1]._value = value; + return false; + } + } + + /** + * @dev Removes a key-value pair from a map. O(1). + * + * Returns true if the key was removed from the map, that is if it was present. + */ + function _remove(Map storage map, bytes32 key) private returns (bool) { + // We read and store the key's index to prevent multiple reads from the same storage slot + uint256 keyIndex = map._indexes[key]; + + if (keyIndex != 0) { // Equivalent to contains(map, key) + // To delete a key-value pair from the _entries array in O(1), we swap the entry to delete with the last one + // in the array, and then remove the last entry (sometimes called as 'swap and pop'). + // This modifies the order of the array, as noted in {at}. + + uint256 toDeleteIndex = keyIndex - 1; + uint256 lastIndex = map._entries.length - 1; + + // When the entry to delete is the last one, the swap operation is unnecessary. However, since this occurs + // so rarely, we still do the swap anyway to avoid the gas cost of adding an 'if' statement. + + MapEntry storage lastEntry = map._entries[lastIndex]; + + // Move the last entry to the index where the entry to delete is + map._entries[toDeleteIndex] = lastEntry; + // Update the index for the moved entry + map._indexes[lastEntry._key] = toDeleteIndex + 1; // All indexes are 1-based + + // Delete the slot where the moved entry was stored + map._entries.pop(); + + // Delete the index for the deleted slot + delete map._indexes[key]; + + return true; + } else { + return false; + } + } + + /** + * @dev Returns true if the key is in the map. O(1). + */ + function _contains(Map storage map, bytes32 key) private view returns (bool) { + return map._indexes[key] != 0; + } + + /** + * @dev Returns the number of key-value pairs in the map. O(1). + */ + function _length(Map storage map) private view returns (uint256) { + return map._entries.length; + } + + /** + * @dev Returns the key-value pair stored at position `index` in the map. O(1). + * + * Note that there are no guarantees on the ordering of entries inside the + * array, and it may change when more entries are added or removed. + * + * Requirements: + * + * - `index` must be strictly less than {length}. + */ + function _at(Map storage map, uint256 index) private view returns (bytes32, bytes32) { + require(map._entries.length > index, "EnumerableMap: index out of bounds"); + + MapEntry storage entry = map._entries[index]; + return (entry._key, entry._value); + } + + /** + * @dev Returns the value associated with `key`. O(1). + * + * Requirements: + * + * - `key` must be in the map. + */ + function _get(Map storage map, bytes32 key) private view returns (bytes32) { + return _get(map, key, "EnumerableMap: nonexistent key"); + } + + /** + * @dev Same as {_get}, with a custom error message when `key` is not in the map. + */ + function _get(Map storage map, bytes32 key, string memory errorMessage) private view returns (bytes32) { + uint256 keyIndex = map._indexes[key]; + require(keyIndex != 0, errorMessage); // Equivalent to contains(map, key) + return map._entries[keyIndex - 1]._value; // All indexes are 1-based + } + + // UintToAddressMap + + struct UintToAddressMap { + Map _inner; + } + + /** + * @dev Adds a key-value pair to a map, or updates the value for an existing + * key. O(1). + * + * Returns true if the key was added to the map, that is if it was not + * already present. + */ + function set(UintToAddressMap storage map, uint256 key, address value) internal returns (bool) { + return _set(map._inner, bytes32(key), bytes32(uint256(value))); + } + + /** + * @dev Removes a value from a set. O(1). + * + * Returns true if the key was removed from the map, that is if it was present. + */ + function remove(UintToAddressMap storage map, uint256 key) internal returns (bool) { + return _remove(map._inner, bytes32(key)); + } + + /** + * @dev Returns true if the key is in the map. O(1). + */ + function contains(UintToAddressMap storage map, uint256 key) internal view returns (bool) { + return _contains(map._inner, bytes32(key)); + } + + /** + * @dev Returns the number of elements in the map. O(1). + */ + function length(UintToAddressMap storage map) internal view returns (uint256) { + return _length(map._inner); + } + + /** + * @dev Returns the element stored at position `index` in the set. O(1). + * Note that there are no guarantees on the ordering of values inside the + * array, and it may change when more values are added or removed. + * + * Requirements: + * + * - `index` must be strictly less than {length}. + */ + function at(UintToAddressMap storage map, uint256 index) internal view returns (uint256, address) { + (bytes32 key, bytes32 value) = _at(map._inner, index); + return (uint256(key), address(uint256(value))); + } + + /** + * @dev Returns the value associated with `key`. O(1). + * + * Requirements: + * + * - `key` must be in the map. + */ + function get(UintToAddressMap storage map, uint256 key) internal view returns (address) { + return address(uint256(_get(map._inner, bytes32(key)))); + } + + /** + * @dev Same as {get}, with a custom error message when `key` is not in the map. + */ + function get(UintToAddressMap storage map, uint256 key, string memory errorMessage) internal view returns (address) { + return address(uint256(_get(map._inner, bytes32(key), errorMessage))); + } +} diff --git a/contracts/libs/utils/EnumerableSet.sol b/contracts/libs/utils/EnumerableSet.sol new file mode 100644 index 0000000..482c479 --- /dev/null +++ b/contracts/libs/utils/EnumerableSet.sol @@ -0,0 +1,243 @@ +// SPDX-License-Identifier: MIT + +pragma solidity >=0.5.0; + +/** + * @dev Library for managing + * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive + * types. + * + * Sets have the following properties: + * + * - Elements are added, removed, and checked for existence in constant time + * (O(1)). + * - Elements are enumerated in O(n). No guarantees are made on the ordering. + * + * ``` + * contract Example { + * // Add the library methods + * using EnumerableSet for EnumerableSet.AddressSet; + * + * // Declare a set state variable + * EnumerableSet.AddressSet private mySet; + * } + * ``` + * + * As of v3.0.0, only sets of type `address` (`AddressSet`) and `uint256` + * (`UintSet`) are supported. + */ +library EnumerableSet { + // To implement this library for multiple types with as little code + // repetition as possible, we write it in terms of a generic Set type with + // bytes32 values. + // The Set implementation uses private functions, and user-facing + // implementations (such as AddressSet) are just wrappers around the + // underlying Set. + // This means that we can only create new EnumerableSets for types that fit + // in bytes32. + + struct Set { + // Storage of set values + bytes32[] _values; + + // Position of the value in the `values` array, plus 1 because index 0 + // means a value is not in the set. + mapping (bytes32 => uint256) _indexes; + } + + /** + * @dev Add a value to a set. O(1). + * + * Returns true if the value was added to the set, that is if it was not + * already present. + */ + function _add(Set storage set, bytes32 value) private returns (bool) { + if (!_contains(set, value)) { + set._values.push(value); + // The value is stored at length-1, but we add 1 to all indexes + // and use 0 as a sentinel value + set._indexes[value] = set._values.length; + return true; + } else { + return false; + } + } + + /** + * @dev Removes a value from a set. O(1). + * + * Returns true if the value was removed from the set, that is if it was + * present. + */ + function _remove(Set storage set, bytes32 value) private returns (bool) { + // We read and store the value's index to prevent multiple reads from the same storage slot + uint256 valueIndex = set._indexes[value]; + + if (valueIndex != 0) { // Equivalent to contains(set, value) + // To delete an element from the _values array in O(1), we swap the element to delete with the last one in + // the array, and then remove the last element (sometimes called as 'swap and pop'). + // This modifies the order of the array, as noted in {at}. + + uint256 toDeleteIndex = valueIndex - 1; + uint256 lastIndex = set._values.length - 1; + + // When the value to delete is the last one, the swap operation is unnecessary. However, since this occurs + // so rarely, we still do the swap anyway to avoid the gas cost of adding an 'if' statement. + + bytes32 lastvalue = set._values[lastIndex]; + + // Move the last value to the index where the value to delete is + set._values[toDeleteIndex] = lastvalue; + // Update the index for the moved value + set._indexes[lastvalue] = toDeleteIndex + 1; // All indexes are 1-based + + // Delete the slot where the moved value was stored + set._values.pop(); + + // Delete the index for the deleted slot + delete set._indexes[value]; + + return true; + } else { + return false; + } + } + + /** + * @dev Returns true if the value is in the set. O(1). + */ + function _contains(Set storage set, bytes32 value) private view returns (bool) { + return set._indexes[value] != 0; + } + + /** + * @dev Returns the number of values on the set. O(1). + */ + function _length(Set storage set) private view returns (uint256) { + return set._values.length; + } + + /** + * @dev Returns the value stored at position `index` in the set. O(1). + * + * Note that there are no guarantees on the ordering of values inside the + * array, and it may change when more values are added or removed. + * + * Requirements: + * + * - `index` must be strictly less than {length}. + */ + function _at(Set storage set, uint256 index) private view returns (bytes32) { + require(set._values.length > index, "EnumerableSet: index out of bounds"); + return set._values[index]; + } + + // AddressSet + + struct AddressSet { + Set _inner; + } + + /** + * @dev Add a value to a set. O(1). + * + * Returns true if the value was added to the set, that is if it was not + * already present. + */ + function add(AddressSet storage set, address value) internal returns (bool) { + return _add(set._inner, bytes32(uint256(value))); + } + + /** + * @dev Removes a value from a set. O(1). + * + * Returns true if the value was removed from the set, that is if it was + * present. + */ + function remove(AddressSet storage set, address value) internal returns (bool) { + return _remove(set._inner, bytes32(uint256(value))); + } + + /** + * @dev Returns true if the value is in the set. O(1). + */ + function contains(AddressSet storage set, address value) internal view returns (bool) { + return _contains(set._inner, bytes32(uint256(value))); + } + + /** + * @dev Returns the number of values in the set. O(1). + */ + function length(AddressSet storage set) internal view returns (uint256) { + return _length(set._inner); + } + + /** + * @dev Returns the value stored at position `index` in the set. O(1). + * + * Note that there are no guarantees on the ordering of values inside the + * array, and it may change when more values are added or removed. + * + * Requirements: + * + * - `index` must be strictly less than {length}. + */ + function at(AddressSet storage set, uint256 index) internal view returns (address) { + return address(uint256(_at(set._inner, index))); + } + + + // UintSet + + struct UintSet { + Set _inner; + } + + /** + * @dev Add a value to a set. O(1). + * + * Returns true if the value was added to the set, that is if it was not + * already present. + */ + function add(UintSet storage set, uint256 value) internal returns (bool) { + return _add(set._inner, bytes32(value)); + } + + /** + * @dev Removes a value from a set. O(1). + * + * Returns true if the value was removed from the set, that is if it was + * present. + */ + function remove(UintSet storage set, uint256 value) internal returns (bool) { + return _remove(set._inner, bytes32(value)); + } + + /** + * @dev Returns true if the value is in the set. O(1). + */ + function contains(UintSet storage set, uint256 value) internal view returns (bool) { + return _contains(set._inner, bytes32(value)); + } + + /** + * @dev Returns the number of values on the set. O(1). + */ + function length(UintSet storage set) internal view returns (uint256) { + return _length(set._inner); + } + + /** + * @dev Returns the value stored at position `index` in the set. O(1). + * + * Note that there are no guarantees on the ordering of values inside the + * array, and it may change when more values are added or removed. + * + * Requirements: + * + * - `index` must be strictly less than {length}. + */ + function at(UintSet storage set, uint256 index) internal view returns (uint256) { + return uint256(_at(set._inner, index)); + } +} diff --git a/contracts/libs/utils/Strings.sol b/contracts/libs/utils/Strings.sol new file mode 100644 index 0000000..c44fa64 --- /dev/null +++ b/contracts/libs/utils/Strings.sol @@ -0,0 +1,34 @@ +// SPDX-License-Identifier: MIT + +pragma solidity >=0.5.0; + +/** + * @dev String operations. + */ +library Strings { + /** + * @dev Converts a `uint256` to its ASCII `string` representation. + */ + function toString(uint256 value) internal pure returns (string memory) { + // Inspired by OraclizeAPI's implementation - MIT licence + // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol + + if (value == 0) { + return "0"; + } + uint256 temp = value; + uint256 digits; + while (temp != 0) { + digits++; + temp /= 10; + } + bytes memory buffer = new bytes(digits); + uint256 index = digits - 1; + temp = value; + while (temp != 0) { + buffer[index--] = byte(uint8(48 + temp % 10)); + temp /= 10; + } + return string(buffer); + } +} diff --git a/contracts/libs/utils/Utils.sol b/contracts/libs/utils/Utils.sol index d70406d..8a65160 100644 --- a/contracts/libs/utils/Utils.sol +++ b/contracts/libs/utils/Utils.sol @@ -1,4 +1,4 @@ -pragma solidity ^0.5.0; +pragma solidity >=0.5.0; library Utils { diff --git a/contracts_nftlockproxy/Migrations.sol b/contracts_nftlockproxy/Migrations.sol new file mode 100644 index 0000000..c378ffb --- /dev/null +++ b/contracts_nftlockproxy/Migrations.sol @@ -0,0 +1,23 @@ +pragma solidity >=0.4.21 <0.6.0; + +contract Migrations { + address public owner; + uint public last_completed_migration; + + constructor() public { + owner = msg.sender; + } + + modifier restricted() { + if (msg.sender == owner) _; + } + + function setCompleted(uint completed) public restricted { + last_completed_migration = completed; + } + + function upgrade(address new_address) public restricted { + Migrations upgraded = Migrations(new_address); + upgraded.setCompleted(last_completed_migration); + } +} diff --git a/contracts_nftlockproxy/NFTLockProxy.sol b/contracts_nftlockproxy/NFTLockProxy.sol new file mode 100644 index 0000000..66b463c --- /dev/null +++ b/contracts_nftlockproxy/NFTLockProxy.sol @@ -0,0 +1,170 @@ +pragma solidity ^0.6.0; + +import "./libs/ownership/Ownable.sol"; +import "./libs/common/ZeroCopySink.sol"; +import "./libs/common/ZeroCopySource.sol"; +import "./libs/utils/Utils.sol"; +import "./libs/utils/Address.sol"; +import "./libs/token/ERC721/IERC721Metadata.sol"; +import "./libs/token/ERC721/IERC721Receiver.sol"; +import "./libs/math/SafeMath.sol"; +import "./core/cross_chain_manager/interface/IEthCrossChainManager.sol"; +import "./core/cross_chain_manager/interface/IEthCrossChainManagerProxy.sol"; + + +contract NFTLockProxy is IERC721Receiver, Ownable { + using SafeMath for uint; + using Address for address; + + struct TxArgs { + bytes toAssetHash; + bytes toAddress; + uint256 tokenId; + bytes tokenURI; + } + + address public managerProxyContract; + mapping(uint64 => bytes) public proxyHashMap; + mapping(address => mapping(uint64 => bytes)) public assetHashMap; + mapping(address => bool) safeTransfer; + + event SetManagerProxyEvent(address manager); + event BindProxyEvent(uint64 toChainId, bytes targetProxyHash); + event BindAssetEvent(address fromAssetHash, uint64 toChainId, bytes targetProxyHash); + event UnlockEvent(address toAssetHash, address toAddress, uint256 tokenId); + event LockEvent(address fromAssetHash, address fromAddress, bytes toAssetHash, bytes toAddress, uint64 toChainId, uint256 tokenId); + + modifier onlyManagerContract() { + IEthCrossChainManagerProxy ieccmp = IEthCrossChainManagerProxy(managerProxyContract); + require(_msgSender() == ieccmp.getEthCrossChainManager(), "msgSender is not EthCrossChainManagerContract"); + _; + } + + function setManagerProxy(address ethCCMProxyAddr) onlyOwner public { + managerProxyContract = ethCCMProxyAddr; + emit SetManagerProxyEvent(managerProxyContract); + } + + function bindProxyHash(uint64 toChainId, bytes memory targetProxyHash) onlyOwner public returns (bool) { + proxyHashMap[toChainId] = targetProxyHash; + emit BindProxyEvent(toChainId, targetProxyHash); + return true; + } + + function bindAssetHash(address fromAssetHash, uint64 toChainId, bytes memory toAssetHash) onlyOwner public returns (bool) { + assetHashMap[fromAssetHash][toChainId] = toAssetHash; + emit BindAssetEvent(fromAssetHash, toChainId, toAssetHash); + return true; + } + + // /* @notice This function is meant to be invoked by the ETH crosschain management contract, + // * then mint a certin amount of tokens to the designated address since a certain amount + // * was burnt from the source chain invoker. + // * @param argsBs The argument bytes recevied by the ethereum lock proxy contract, need to be deserialized. + // * based on the way of serialization in the source chain proxy contract. + // * @param fromContractAddr The source chain contract address + // * @param fromChainId The source chain id + // */ + function unlock(bytes memory argsBs, bytes memory fromContractAddr, uint64 fromChainId) public onlyManagerContract returns (bool) { + TxArgs memory args = _deserializeTxArgs(argsBs); + + require(fromContractAddr.length != 0, "from proxy contract address cannot be empty"); + require(Utils.equalStorage(proxyHashMap[fromChainId], fromContractAddr), "From Proxy contract address error!"); + + require(args.toAssetHash.length != 0, "toAssetHash cannot be empty"); + address toAssetHash = Utils.bytesToAddress(args.toAssetHash); + + require(args.toAddress.length != 0, "toAddress cannot be empty"); + address toAddress = Utils.bytesToAddress(args.toAddress); + + bool success; + bytes memory res; + address owner; + bytes memory raw = abi.encodeWithSignature("ownerOf(uint256)", args.tokenId); + (success, res) = toAssetHash.call(raw); + if (success) { + owner = abi.decode(res, (address)); + require(owner == address(this) || owner == address(0), "your token ID is not hold by lockproxy."); + if (owner == address(this)) { + raw = abi.encodeWithSignature("safeTransferFrom(address,address,uint256)", address(this), toAddress, args.tokenId); + (success, ) = toAssetHash.call(raw); + require(success, "failed to call safeTransferFrom"); + } + } + if (!success || owner == address(0)) { + raw = abi.encodeWithSignature("mintWithURI(address,uint256,string)", toAddress, args.tokenId, string(args.tokenURI)); + (success, ) = toAssetHash.call(raw); + require(success, "failed to call mintWithURI to mint a new mapping NFT"); + } + + emit UnlockEvent(toAssetHash, toAddress, args.tokenId); + return true; + } + + function onERC721Received(address operator, address from, uint256 tokenId, bytes calldata data) public override returns (bytes4) { + address fromAssetHash = _msgSender(); + require(data.length > 0, "length of toAddress can't be zero. "); + require(fromAssetHash.isContract(), "caller must be a contract. "); + + bytes memory toAddress; + uint64 toChainId; + bytes memory toAssetHash; + { + (toAddress, toChainId) = _deserializeCallData(data); + toAssetHash = assetHashMap[fromAssetHash][toChainId]; + require(toAssetHash.length != 0, "empty illegal toAssetHash"); + + IERC721Metadata nft = IERC721Metadata(fromAssetHash); + require(nft.ownerOf(tokenId) == address(this), "wrong owner for this token ID"); + + string memory uri = nft.tokenURI(tokenId); + TxArgs memory txArgs = TxArgs({ + toAssetHash: toAssetHash, + toAddress: toAddress, + tokenId: tokenId, + tokenURI: bytes(uri) + }); + bytes memory txData = _serializeTxArgs(txArgs); + IEthCrossChainManager eccm = IEthCrossChainManager(IEthCrossChainManagerProxy(managerProxyContract).getEthCrossChainManager()); + + bytes memory toProxyHash = proxyHashMap[toChainId]; + require(toProxyHash.length != 0, "empty illegal toProxyHash"); + require(eccm.crossChain(toChainId, toProxyHash, "unlock", txData), "EthCrossChainManager crossChain executed error!"); + } + { + emit LockEvent(fromAssetHash, from, toAssetHash, toAddress, toChainId, tokenId); + } + + return this.onERC721Received.selector; + } + + function _serializeTxArgs(TxArgs memory args) internal pure returns (bytes memory) { + bytes memory buff; + buff = abi.encodePacked( + ZeroCopySink.WriteVarBytes(args.toAssetHash), + ZeroCopySink.WriteVarBytes(args.toAddress), + ZeroCopySink.WriteUint256(args.tokenId), + ZeroCopySink.WriteVarBytes(args.tokenURI) + ); + return buff; + } + + function _deserializeTxArgs(bytes memory valueBs) internal pure returns (TxArgs memory) { + TxArgs memory args; + uint256 off = 0; + (args.toAssetHash, off) = ZeroCopySource.NextVarBytes(valueBs, off); + (args.toAddress, off) = ZeroCopySource.NextVarBytes(valueBs, off); + (args.tokenId, off) = ZeroCopySource.NextUint256(valueBs, off); + (args.tokenURI, off) = ZeroCopySource.NextVarBytes(valueBs, off); + return args; + } + + function _deserializeCallData(bytes memory valueBs) internal pure returns (bytes memory, uint64) { + bytes memory toAddress; + uint64 chainId; + uint256 off = 0; + (toAddress, off) = ZeroCopySource.NextVarBytes(valueBs, off); + (chainId, off) = ZeroCopySource.NextUint64(valueBs, off); + return (toAddress, chainId); + } +} \ No newline at end of file diff --git a/contracts_nftlockproxy/core/cross_chain_manager/interface/IEthCrossChainManager.sol b/contracts_nftlockproxy/core/cross_chain_manager/interface/IEthCrossChainManager.sol new file mode 100644 index 0000000..c482806 --- /dev/null +++ b/contracts_nftlockproxy/core/cross_chain_manager/interface/IEthCrossChainManager.sol @@ -0,0 +1,8 @@ +pragma solidity ^0.6.0; + +/** + * @dev Interface of the EthCrossChainManager contract for business contract like LockProxy to request cross chain transaction + */ +interface IEthCrossChainManager { + function crossChain(uint64 _toChainId, bytes calldata _toContract, bytes calldata _method, bytes calldata _txData) external returns (bool); +} diff --git a/contracts_nftlockproxy/core/cross_chain_manager/interface/IEthCrossChainManagerProxy.sol b/contracts_nftlockproxy/core/cross_chain_manager/interface/IEthCrossChainManagerProxy.sol new file mode 100644 index 0000000..e1798cf --- /dev/null +++ b/contracts_nftlockproxy/core/cross_chain_manager/interface/IEthCrossChainManagerProxy.sol @@ -0,0 +1,8 @@ +pragma solidity ^0.6.0; + +/** + * @dev Interface of the EthCrossChainManagerProxy for business contract like LockProxy to obtain the reliable EthCrossChainManager contract hash. + */ +interface IEthCrossChainManagerProxy { + function getEthCrossChainManager() external view returns (address); +} diff --git a/contracts_nftlockproxy/erc721_template/CrossChainNFTMapping.sol b/contracts_nftlockproxy/erc721_template/CrossChainNFTMapping.sol new file mode 100644 index 0000000..ac01667 --- /dev/null +++ b/contracts_nftlockproxy/erc721_template/CrossChainNFTMapping.sol @@ -0,0 +1,26 @@ +pragma solidity >=0.5.0; + +import "../libs/token/ERC721/ERC721.sol"; +import "../libs/utils/Address.sol"; + +contract CrossChainNFTMapping is ERC721 { + using Address for address; + + address private lpAddr; + + constructor (address _lpAddr, string memory name, string memory symbol) public ERC721(name, symbol) { + require(_lpAddr.isContract(), "lockproxy address must be contract."); + lpAddr = _lpAddr; + } + + modifier onlyProxy() { + require(msg.sender == lpAddr, ""); + _; + } + + function mintWithURI(address to, uint256 tokenId, string memory uri) public onlyProxy { + require(!_exists(tokenId), "token id already exist"); + _safeMint(to, tokenId); + _setTokenURI(tokenId, uri); + } +} \ No newline at end of file diff --git a/contracts_nftlockproxy/libs/GSN/Context.sol b/contracts_nftlockproxy/libs/GSN/Context.sol new file mode 100644 index 0000000..45f3057 --- /dev/null +++ b/contracts_nftlockproxy/libs/GSN/Context.sol @@ -0,0 +1,28 @@ +pragma solidity ^0.6.0; + +/* + * @dev Provides information about the current execution context, including the + * sender of the transaction and its data. While these are generally available + * via msg.sender and msg.data, they should not be accessed in such a direct + * manner, since when dealing with GSN meta-transactions the account sending and + * paying for execution may not be the actual sender (as far as an application + * is concerned). + * + * This contract is only required for intermediate, library-like contracts. + * Refer from https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/GSN/Context.sol + */ +contract Context { + // Empty internal constructor, to prevent people from mistakenly deploying + // an instance of this contract, which should be used via inheritance. + constructor () internal { } + // solhint-disable-previous-line no-empty-blocks + + function _msgSender() internal view returns (address payable) { + return msg.sender; + } + + function _msgData() internal view returns (bytes memory) { + this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 + return msg.data; + } +} diff --git a/contracts_nftlockproxy/libs/common/ZeroCopySink.sol b/contracts_nftlockproxy/libs/common/ZeroCopySink.sol new file mode 100644 index 0000000..ee92caf --- /dev/null +++ b/contracts_nftlockproxy/libs/common/ZeroCopySink.sol @@ -0,0 +1,211 @@ +pragma solidity ^0.6.0; + +/** + * @dev Wrappers over encoding and serialization operation into bytes from bassic types in Solidity for PolyNetwork cross chain utility. + * + * Encode basic types in Solidity into bytes easily. It's designed to be used + * for PolyNetwork cross chain application, and the encoding rules on Ethereum chain + * and the decoding rules on other chains should be consistent. Here we + * follow the underlying serialization rule with implementation found here: + * https://github.com/polynetwork/poly/blob/master/common/zero_copy_sink.go + * + * Using this library instead of the unchecked serialization method can help reduce + * the risk of serious bugs and handfule, so it's recommended to use it. + * + * Please note that risk can be minimized, yet not eliminated. + */ +library ZeroCopySink { + /* @notice Convert boolean value into bytes + * @param b The boolean value + * @return Converted bytes array + */ + function WriteBool(bool b) internal pure returns (bytes memory) { + bytes memory buff; + assembly{ + buff := mload(0x40) + mstore(buff, 1) + switch iszero(b) + case 1 { + mstore(add(buff, 0x20), shl(248, 0x00)) + // mstore8(add(buff, 0x20), 0x00) + } + default { + mstore(add(buff, 0x20), shl(248, 0x01)) + // mstore8(add(buff, 0x20), 0x01) + } + mstore(0x40, add(buff, 0x21)) + } + return buff; + } + + /* @notice Convert byte value into bytes + * @param b The byte value + * @return Converted bytes array + */ + function WriteByte(byte b) internal pure returns (bytes memory) { + return WriteUint8(uint8(b)); + } + + /* @notice Convert uint8 value into bytes + * @param v The uint8 value + * @return Converted bytes array + */ + function WriteUint8(uint8 v) internal pure returns (bytes memory) { + bytes memory buff; + assembly{ + buff := mload(0x40) + mstore(buff, 1) + mstore(add(buff, 0x20), shl(248, v)) + // mstore(add(buff, 0x20), byte(0x1f, v)) + mstore(0x40, add(buff, 0x21)) + } + return buff; + } + + /* @notice Convert uint16 value into bytes + * @param v The uint16 value + * @return Converted bytes array + */ + function WriteUint16(uint16 v) internal pure returns (bytes memory) { + bytes memory buff; + + assembly{ + buff := mload(0x40) + let byteLen := 0x02 + mstore(buff, byteLen) + for { + let mindex := 0x00 + let vindex := 0x1f + } lt(mindex, byteLen) { + mindex := add(mindex, 0x01) + vindex := sub(vindex, 0x01) + }{ + mstore8(add(add(buff, 0x20), mindex), byte(vindex, v)) + } + mstore(0x40, add(buff, 0x22)) + } + return buff; + } + + /* @notice Convert uint32 value into bytes + * @param v The uint32 value + * @return Converted bytes array + */ + function WriteUint32(uint32 v) internal pure returns(bytes memory) { + bytes memory buff; + assembly{ + buff := mload(0x40) + let byteLen := 0x04 + mstore(buff, byteLen) + for { + let mindex := 0x00 + let vindex := 0x1f + } lt(mindex, byteLen) { + mindex := add(mindex, 0x01) + vindex := sub(vindex, 0x01) + }{ + mstore8(add(add(buff, 0x20), mindex), byte(vindex, v)) + } + mstore(0x40, add(buff, 0x24)) + } + return buff; + } + + /* @notice Convert uint64 value into bytes + * @param v The uint64 value + * @return Converted bytes array + */ + function WriteUint64(uint64 v) internal pure returns(bytes memory) { + bytes memory buff; + + assembly{ + buff := mload(0x40) + let byteLen := 0x08 + mstore(buff, byteLen) + for { + let mindex := 0x00 + let vindex := 0x1f + } lt(mindex, byteLen) { + mindex := add(mindex, 0x01) + vindex := sub(vindex, 0x01) + }{ + mstore8(add(add(buff, 0x20), mindex), byte(vindex, v)) + } + mstore(0x40, add(buff, 0x28)) + } + return buff; + } + + /* @notice Convert limited uint256 value into bytes + * @param v The uint256 value + * @return Converted bytes array + */ + function WriteUint255(uint256 v) internal pure returns (bytes memory) { + require(v <= 0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff, "Value exceeds uint255 range"); + bytes memory buff; + + assembly{ + buff := mload(0x40) + let byteLen := 0x20 + mstore(buff, byteLen) + for { + let mindex := 0x00 + let vindex := 0x1f + } lt(mindex, byteLen) { + mindex := add(mindex, 0x01) + vindex := sub(vindex, 0x01) + }{ + mstore8(add(add(buff, 0x20), mindex), byte(vindex, v)) + } + mstore(0x40, add(buff, 0x40)) + } + return buff; + } + + /* @notice Convert limited uint256 value into bytes + * @param v The uint256 value + * @return Converted bytes array + */ + function WriteUint256(uint256 v) internal pure returns (bytes memory) { + require(v <= uint256(-1), "Value exceeds uint256 range"); + bytes memory buff; + + assembly{ + buff := mload(0x40) + let byteLen := 0x20 + mstore(buff, byteLen) + for { + let mindex := 0x00 + let vindex := 0x1f + } lt(mindex, byteLen) { + mindex := add(mindex, 0x01) + vindex := sub(vindex, 0x01) + }{ + mstore8(add(add(buff, 0x20), mindex), byte(vindex, v)) + } + mstore(0x40, add(buff, 0x40)) + } + return buff; + } + + /* @notice Encode bytes format data into bytes + * @param data The bytes array data + * @return Encoded bytes array + */ + function WriteVarBytes(bytes memory data) internal pure returns (bytes memory) { + uint64 l = uint64(data.length); + return abi.encodePacked(WriteVarUint(l), data); + } + + function WriteVarUint(uint64 v) internal pure returns (bytes memory) { + if (v < 0xFD){ + return WriteUint8(uint8(v)); + } else if (v <= 0xFFFF) { + return abi.encodePacked(WriteByte(0xFD), WriteUint16(uint16(v))); + } else if (v <= 0xFFFFFFFF) { + return abi.encodePacked(WriteByte(0xFE), WriteUint32(uint32(v))); + } else { + return abi.encodePacked(WriteByte(0xFF), WriteUint64(uint64(v))); + } + } +} \ No newline at end of file diff --git a/contracts_nftlockproxy/libs/common/ZeroCopySource.sol b/contracts_nftlockproxy/libs/common/ZeroCopySource.sol new file mode 100644 index 0000000..ed45321 --- /dev/null +++ b/contracts_nftlockproxy/libs/common/ZeroCopySource.sol @@ -0,0 +1,317 @@ +pragma solidity ^0.6.0; + +/** + * @dev Wrappers over decoding and deserialization operation from bytes into bassic types in Solidity for PolyNetwork cross chain utility. + * + * Decode into basic types in Solidity from bytes easily. It's designed to be used + * for PolyNetwork cross chain application, and the decoding rules on Ethereum chain + * and the encoding rule on other chains should be consistent, and . Here we + * follow the underlying deserialization rule with implementation found here: + * https://github.com/polynetwork/poly/blob/master/common/zero_copy_source.go + * + * Using this library instead of the unchecked serialization method can help reduce + * the risk of serious bugs and handfule, so it's recommended to use it. + * + * Please note that risk can be minimized, yet not eliminated. + */ +library ZeroCopySource { + /* @notice Read next byte as boolean type starting at offset from buff + * @param buff Source bytes array + * @param offset The position from where we read the boolean value + * @return The the read boolean value and new offset + */ + function NextBool(bytes memory buff, uint256 offset) internal pure returns(bool, uint256) { + require(offset + 1 <= buff.length && offset < offset + 1, "Offset exceeds limit"); + // byte === bytes1 + byte v; + assembly{ + v := mload(add(add(buff, 0x20), offset)) + } + bool value; + if (v == 0x01) { + value = true; + } else if (v == 0x00) { + value = false; + } else { + revert("NextBool value error"); + } + return (value, offset + 1); + } + + /* @notice Read next byte starting at offset from buff + * @param buff Source bytes array + * @param offset The position from where we read the byte value + * @return The read byte value and new offset + */ + function NextByte(bytes memory buff, uint256 offset) internal pure returns (byte, uint256) { + require(offset + 1 <= buff.length && offset < offset + 1, "NextByte, Offset exceeds maximum"); + byte v; + assembly{ + v := mload(add(add(buff, 0x20), offset)) + } + return (v, offset + 1); + } + + /* @notice Read next byte as uint8 starting at offset from buff + * @param buff Source bytes array + * @param offset The position from where we read the byte value + * @return The read uint8 value and new offset + */ + function NextUint8(bytes memory buff, uint256 offset) internal pure returns (uint8, uint256) { + require(offset + 1 <= buff.length && offset < offset + 1, "NextUint8, Offset exceeds maximum"); + uint8 v; + assembly{ + let tmpbytes := mload(0x40) + let bvalue := mload(add(add(buff, 0x20), offset)) + mstore8(tmpbytes, byte(0, bvalue)) + mstore(0x40, add(tmpbytes, 0x01)) + v := mload(sub(tmpbytes, 0x1f)) + } + return (v, offset + 1); + } + + /* @notice Read next two bytes as uint16 type starting from offset + * @param buff Source bytes array + * @param offset The position from where we read the uint16 value + * @return The read uint16 value and updated offset + */ + function NextUint16(bytes memory buff, uint256 offset) internal pure returns (uint16, uint256) { + require(offset + 2 <= buff.length && offset < offset + 2, "NextUint16, offset exceeds maximum"); + + uint16 v; + assembly { + let tmpbytes := mload(0x40) + let bvalue := mload(add(add(buff, 0x20), offset)) + mstore8(tmpbytes, byte(0x01, bvalue)) + mstore8(add(tmpbytes, 0x01), byte(0, bvalue)) + mstore(0x40, add(tmpbytes, 0x02)) + v := mload(sub(tmpbytes, 0x1e)) + } + return (v, offset + 2); + } + + + /* @notice Read next four bytes as uint32 type starting from offset + * @param buff Source bytes array + * @param offset The position from where we read the uint32 value + * @return The read uint32 value and updated offset + */ + function NextUint32(bytes memory buff, uint256 offset) internal pure returns (uint32, uint256) { + require(offset + 4 <= buff.length && offset < offset + 4, "NextUint32, offset exceeds maximum"); + uint32 v; + assembly { + let tmpbytes := mload(0x40) + let byteLen := 0x04 + for { + let tindex := 0x00 + let bindex := sub(byteLen, 0x01) + let bvalue := mload(add(add(buff, 0x20), offset)) + } lt(tindex, byteLen) { + tindex := add(tindex, 0x01) + bindex := sub(bindex, 0x01) + }{ + mstore8(add(tmpbytes, tindex), byte(bindex, bvalue)) + } + mstore(0x40, add(tmpbytes, byteLen)) + v := mload(sub(tmpbytes, sub(0x20, byteLen))) + } + return (v, offset + 4); + } + + /* @notice Read next eight bytes as uint64 type starting from offset + * @param buff Source bytes array + * @param offset The position from where we read the uint64 value + * @return The read uint64 value and updated offset + */ + function NextUint64(bytes memory buff, uint256 offset) internal pure returns (uint64, uint256) { + require(offset + 8 <= buff.length && offset < offset + 8, "NextUint64, offset exceeds maximum"); + uint64 v; + assembly { + let tmpbytes := mload(0x40) + let byteLen := 0x08 + for { + let tindex := 0x00 + let bindex := sub(byteLen, 0x01) + let bvalue := mload(add(add(buff, 0x20), offset)) + } lt(tindex, byteLen) { + tindex := add(tindex, 0x01) + bindex := sub(bindex, 0x01) + }{ + mstore8(add(tmpbytes, tindex), byte(bindex, bvalue)) + } + mstore(0x40, add(tmpbytes, byteLen)) + v := mload(sub(tmpbytes, sub(0x20, byteLen))) + } + return (v, offset + 8); + } + + /* @notice Read next 32 bytes as uint256 type starting from offset, + there are limits considering the numerical limits in multi-chain + * @param buff Source bytes array + * @param offset The position from where we read the uint256 value + * @return The read uint256 value and updated offset + */ + function NextUint255(bytes memory buff, uint256 offset) internal pure returns (uint256, uint256) { + require(offset + 32 <= buff.length && offset < offset + 32, "NextUint255, offset exceeds maximum"); + uint256 v; + assembly { + let tmpbytes := mload(0x40) + let byteLen := 0x20 + for { + let tindex := 0x00 + let bindex := sub(byteLen, 0x01) + let bvalue := mload(add(add(buff, 0x20), offset)) + } lt(tindex, byteLen) { + tindex := add(tindex, 0x01) + bindex := sub(bindex, 0x01) + }{ + mstore8(add(tmpbytes, tindex), byte(bindex, bvalue)) + } + mstore(0x40, add(tmpbytes, byteLen)) + v := mload(tmpbytes) + } + require(v <= 0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff, "Value exceeds the range"); + return (v, offset + 32); + } + + function NextUint256(bytes memory buff, uint256 offset) internal pure returns (uint256, uint256) { + require(offset + 32 <= buff.length && offset < offset + 32, "NextUint256, offset exceeds maximum"); + uint256 v; + assembly { + let tmpbytes := mload(0x40) + let byteLen := 0x20 + for { + let tindex := 0x00 + let bindex := sub(byteLen, 0x01) + let bvalue := mload(add(add(buff, 0x20), offset)) + } lt(tindex, byteLen) { + tindex := add(tindex, 0x01) + bindex := sub(bindex, 0x01) + }{ + mstore8(add(tmpbytes, tindex), byte(bindex, bvalue)) + } + mstore(0x40, add(tmpbytes, byteLen)) + v := mload(tmpbytes) + } + require(v <= uint256(-1), "Value exceeds the range"); + return (v, offset + 32); + } + + /* @notice Read next variable bytes starting from offset, + the decoding rule coming from multi-chain + * @param buff Source bytes array + * @param offset The position from where we read the bytes value + * @return The read variable bytes array value and updated offset + */ + function NextVarBytes(bytes memory buff, uint256 offset) internal pure returns(bytes memory, uint256) { + uint len; + (len, offset) = NextVarUint(buff, offset); + require(offset + len <= buff.length && offset < offset + len, "NextVarBytes, offset exceeds maximum"); + bytes memory tempBytes; + assembly{ + switch iszero(len) + case 0 { + // Get a location of some free memory and store it in tempBytes as + // Solidity does for memory variables. + tempBytes := mload(0x40) + + // The first word of the slice result is potentially a partial + // word read from the original array. To read it, we calculate + // the length of that partial word and start copying that many + // bytes into the array. The first word we copy will start with + // data we don't care about, but the last `lengthmod` bytes will + // land at the beginning of the contents of the new array. When + // we're done copying, we overwrite the full first word with + // the actual length of the slice. + let lengthmod := and(len, 31) + + // The multiplication in the next line is necessary + // because when slicing multiples of 32 bytes (lengthmod == 0) + // the following copy loop was copying the origin's length + // and then ending prematurely not copying everything it should. + let mc := add(add(tempBytes, lengthmod), mul(0x20, iszero(lengthmod))) + let end := add(mc, len) + + for { + // The multiplication in the next line has the same exact purpose + // as the one above. + let cc := add(add(add(buff, lengthmod), mul(0x20, iszero(lengthmod))), offset) + } lt(mc, end) { + mc := add(mc, 0x20) + cc := add(cc, 0x20) + } { + mstore(mc, mload(cc)) + } + + mstore(tempBytes, len) + + //update free-memory pointer + //allocating the array padded to 32 bytes like the compiler does now + mstore(0x40, and(add(mc, 31), not(31))) + } + //if we want a zero-length slice let's just return a zero-length array + default { + tempBytes := mload(0x40) + + mstore(0x40, add(tempBytes, 0x20)) + } + } + + return (tempBytes, offset + len); + } + /* @notice Read next 32 bytes starting from offset, + * @param buff Source bytes array + * @param offset The position from where we read the bytes value + * @return The read bytes32 value and updated offset + */ + function NextHash(bytes memory buff, uint256 offset) internal pure returns (bytes32 , uint256) { + require(offset + 32 <= buff.length && offset < offset + 32, "NextHash, offset exceeds maximum"); + bytes32 v; + assembly { + v := mload(add(buff, add(offset, 0x20))) + } + return (v, offset + 32); + } + + /* @notice Read next 20 bytes starting from offset, + * @param buff Source bytes array + * @param offset The position from where we read the bytes value + * @return The read bytes20 value and updated offset + */ + function NextBytes20(bytes memory buff, uint256 offset) internal pure returns (bytes20 , uint256) { + require(offset + 20 <= buff.length && offset < offset + 20, "NextBytes20, offset exceeds maximum"); + bytes20 v; + assembly { + v := mload(add(buff, add(offset, 0x20))) + } + return (v, offset + 20); + } + + function NextVarUint(bytes memory buff, uint256 offset) internal pure returns(uint, uint256) { + byte v; + (v, offset) = NextByte(buff, offset); + + uint value; + if (v == 0xFD) { + // return NextUint16(buff, offset); + (value, offset) = NextUint16(buff, offset); + require(value >= 0xFD && value <= 0xFFFF, "NextUint16, value outside range"); + return (value, offset); + } else if (v == 0xFE) { + // return NextUint32(buff, offset); + (value, offset) = NextUint32(buff, offset); + require(value > 0xFFFF && value <= 0xFFFFFFFF, "NextVarUint, value outside range"); + return (value, offset); + } else if (v == 0xFF) { + // return NextUint64(buff, offset); + (value, offset) = NextUint64(buff, offset); + require(value > 0xFFFFFFFF, "NextVarUint, value outside range"); + return (value, offset); + } else{ + // return (uint8(v), offset); + value = uint8(v); + require(value < 0xFD, "NextVarUint, value outside range"); + return (value, offset); + } + } +} \ No newline at end of file diff --git a/contracts_nftlockproxy/libs/introspection/ERC165.sol b/contracts_nftlockproxy/libs/introspection/ERC165.sol new file mode 100644 index 0000000..8f34a88 --- /dev/null +++ b/contracts_nftlockproxy/libs/introspection/ERC165.sol @@ -0,0 +1,54 @@ +// SPDX-License-Identifier: MIT + +pragma solidity ^0.6.0; + +import "./IERC165.sol"; + +/** + * @dev Implementation of the {IERC165} interface. + * + * Contracts may inherit from this and call {_registerInterface} to declare + * their support of an interface. + */ +contract ERC165 is IERC165 { + /* + * bytes4(keccak256('supportsInterface(bytes4)')) == 0x01ffc9a7 + */ + bytes4 private constant _INTERFACE_ID_ERC165 = 0x01ffc9a7; + + /** + * @dev Mapping of interface ids to whether or not it's supported. + */ + mapping(bytes4 => bool) private _supportedInterfaces; + + constructor () internal { + // Derived contracts need only register support for their own interfaces, + // we register support for ERC165 itself here + _registerInterface(_INTERFACE_ID_ERC165); + } + + /** + * @dev See {IERC165-supportsInterface}. + * + * Time complexity O(1), guaranteed to always use less than 30 000 gas. + */ + function supportsInterface(bytes4 interfaceId) public view override returns (bool) { + return _supportedInterfaces[interfaceId]; + } + + /** + * @dev Registers the contract as an implementer of the interface defined by + * `interfaceId`. Support of the actual ERC165 interface is automatic and + * registering its interface id is not required. + * + * See {IERC165-supportsInterface}. + * + * Requirements: + * + * - `interfaceId` cannot be the ERC165 invalid interface (`0xffffffff`). + */ + function _registerInterface(bytes4 interfaceId) internal virtual { + require(interfaceId != 0xffffffff, "ERC165: invalid interface id"); + _supportedInterfaces[interfaceId] = true; + } +} diff --git a/contracts_nftlockproxy/libs/introspection/IERC165.sol b/contracts_nftlockproxy/libs/introspection/IERC165.sol new file mode 100644 index 0000000..425458d --- /dev/null +++ b/contracts_nftlockproxy/libs/introspection/IERC165.sol @@ -0,0 +1,24 @@ +// SPDX-License-Identifier: MIT + +pragma solidity ^0.6.0; + +/** + * @dev Interface of the ERC165 standard, as defined in the + * https://eips.ethereum.org/EIPS/eip-165[EIP]. + * + * Implementers can declare support of contract interfaces, which can then be + * queried by others ({ERC165Checker}). + * + * For an implementation, see {ERC165}. + */ +interface IERC165 { + /** + * @dev Returns true if this contract implements the interface defined by + * `interfaceId`. See the corresponding + * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] + * to learn more about how these ids are created. + * + * This function call must use less than 30 000 gas. + */ + function supportsInterface(bytes4 interfaceId) external view returns (bool); +} diff --git a/contracts_nftlockproxy/libs/math/SafeMath.sol b/contracts_nftlockproxy/libs/math/SafeMath.sol new file mode 100644 index 0000000..ee875ee --- /dev/null +++ b/contracts_nftlockproxy/libs/math/SafeMath.sol @@ -0,0 +1,156 @@ +pragma solidity ^0.6.0; + +/** + * @dev Wrappers over Solidity's arithmetic operations with added overflow + * checks. + * + * Arithmetic operations in Solidity wrap on overflow. This can easily result + * in bugs, because programmers usually assume that an overflow raises an + * error, which is the standard behavior in high level programming languages. + * `SafeMath` restores this intuition by reverting the transaction when an + * operation overflows. + * + * Using this library instead of the unchecked operations eliminates an entire + * class of bugs, so it's recommended to use it always. + */ +library SafeMath { + /** + * @dev Returns the addition of two unsigned integers, reverting on + * overflow. + * + * Counterpart to Solidity's `+` operator. + * + * Requirements: + * - Addition cannot overflow. + */ + function add(uint256 a, uint256 b) internal pure returns (uint256) { + uint256 c = a + b; + require(c >= a, "SafeMath: addition overflow"); + + return c; + } + + /** + * @dev Returns the subtraction of two unsigned integers, reverting on + * overflow (when the result is negative). + * + * Counterpart to Solidity's `-` operator. + * + * Requirements: + * - Subtraction cannot overflow. + */ + function sub(uint256 a, uint256 b) internal pure returns (uint256) { + return sub(a, b, "SafeMath: subtraction overflow"); + } + + /** + * @dev Returns the subtraction of two unsigned integers, reverting with custom message on + * overflow (when the result is negative). + * + * Counterpart to Solidity's `-` operator. + * + * Requirements: + * - Subtraction cannot overflow. + * + * _Available since v2.4.0._ + */ + function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { + require(b <= a, errorMessage); + uint256 c = a - b; + + return c; + } + + /** + * @dev Returns the multiplication of two unsigned integers, reverting on + * overflow. + * + * Counterpart to Solidity's `*` operator. + * + * Requirements: + * - Multiplication cannot overflow. + */ + function mul(uint256 a, uint256 b) internal pure returns (uint256) { + // Gas optimization: this is cheaper than requiring 'a' not being zero, but the + // benefit is lost if 'b' is also tested. + // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 + if (a == 0) { + return 0; + } + + uint256 c = a * b; + require(c / a == b, "SafeMath: multiplication overflow"); + + return c; + } + + /** + * @dev Returns the integer division of two unsigned integers. Reverts on + * division by zero. The result is rounded towards zero. + * + * Counterpart to Solidity's `/` operator. Note: this function uses a + * `revert` opcode (which leaves remaining gas untouched) while Solidity + * uses an invalid opcode to revert (consuming all remaining gas). + * + * Requirements: + * - The divisor cannot be zero. + */ + function div(uint256 a, uint256 b) internal pure returns (uint256) { + return div(a, b, "SafeMath: division by zero"); + } + + /** + * @dev Returns the integer division of two unsigned integers. Reverts with custom message on + * division by zero. The result is rounded towards zero. + * + * Counterpart to Solidity's `/` operator. Note: this function uses a + * `revert` opcode (which leaves remaining gas untouched) while Solidity + * uses an invalid opcode to revert (consuming all remaining gas). + * + * Requirements: + * - The divisor cannot be zero. + * + * _Available since v2.4.0._ + */ + function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { + // Solidity only automatically asserts when dividing by 0 + require(b != 0, errorMessage); + uint256 c = a / b; + // assert(a == b * c + a % b); // There is no case in which this doesn't hold + + return c; + } + + /** + * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), + * Reverts when dividing by zero. + * + * Counterpart to Solidity's `%` operator. This function uses a `revert` + * opcode (which leaves remaining gas untouched) while Solidity uses an + * invalid opcode to revert (consuming all remaining gas). + * + * Requirements: + * - The divisor cannot be zero. + */ + function mod(uint256 a, uint256 b) internal pure returns (uint256) { + return mod(a, b, "SafeMath: modulo by zero"); + } + + /** + * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), + * Reverts with custom message when dividing by zero. + * + * Counterpart to Solidity's `%` operator. This function uses a `revert` + * opcode (which leaves remaining gas untouched) while Solidity uses an + * invalid opcode to revert (consuming all remaining gas). + * + * Requirements: + * - The divisor cannot be zero. + * + * _Available since v2.4.0._ + */ + function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { + require(b != 0, errorMessage); + return a % b; + } +} diff --git a/contracts_nftlockproxy/libs/ownership/Ownable.sol b/contracts_nftlockproxy/libs/ownership/Ownable.sol new file mode 100644 index 0000000..1d9ab13 --- /dev/null +++ b/contracts_nftlockproxy/libs/ownership/Ownable.sol @@ -0,0 +1,77 @@ +pragma solidity ^0.6.0; + +import "../GSN/Context.sol"; +/** + * @dev Contract module which provides a basic access control mechanism, where + * there is an account (an owner) that can be granted exclusive access to + * specific functions. + * + * This module is used through inheritance. It will make available the modifier + * `onlyOwner`, which can be applied to your functions to restrict their use to + * the owner. + */ +contract Ownable is Context { + address private _owner; + + event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); + + /** + * @dev Initializes the contract setting the deployer as the initial owner. + */ + constructor () internal { + address msgSender = _msgSender(); + _owner = msgSender; + emit OwnershipTransferred(address(0), msgSender); + } + + /** + * @dev Returns the address of the current owner. + */ + function owner() public view returns (address) { + return _owner; + } + + /** + * @dev Throws if called by any account other than the owner. + */ + modifier onlyOwner() { + require(isOwner(), "Ownable: caller is not the owner"); + _; + } + + /** + * @dev Returns true if the caller is the current owner. + */ + function isOwner() public view returns (bool) { + return _msgSender() == _owner; + } + + /** + * @dev Leaves the contract without owner. It will not be possible to call + * `onlyOwner` functions anymore. Can only be called by the current owner. + * + * NOTE: Renouncing ownership will leave the contract without an owner, + * thereby removing any functionality that is only available to the owner. + */ + function renounceOwnership() public onlyOwner { + emit OwnershipTransferred(_owner, address(0)); + _owner = address(0); + } + + /** + * @dev Transfers ownership of the contract to a new account (`newOwner`). + * Can only be called by the current owner. + */ + function transferOwnership(address newOwner) public onlyOwner { + _transferOwnership(newOwner); + } + + /** + * @dev Transfers ownership of the contract to a new account (`newOwner`). + */ + function _transferOwnership(address newOwner) internal { + require(newOwner != address(0), "Ownable: new owner is the zero address"); + emit OwnershipTransferred(_owner, newOwner); + _owner = newOwner; + } +} diff --git a/contracts_nftlockproxy/libs/token/ERC721/ERC721.sol b/contracts_nftlockproxy/libs/token/ERC721/ERC721.sol new file mode 100644 index 0000000..fc04f1d --- /dev/null +++ b/contracts_nftlockproxy/libs/token/ERC721/ERC721.sol @@ -0,0 +1,473 @@ +// SPDX-License-Identifier: MIT + +pragma solidity ^0.6.0; + +import "../../GSN/Context.sol"; +import "./IERC721.sol"; +import "./IERC721Metadata.sol"; +import "./IERC721Enumerable.sol"; +import "./IERC721Receiver.sol"; +import "../../introspection/ERC165.sol"; +import "../../math/SafeMath.sol"; +import "../../utils/Address.sol"; +import "../../utils/EnumerableSet.sol"; +import "../../utils/EnumerableMap.sol"; +import "../../utils/Strings.sol"; + +/** + * @title ERC721 Non-Fungible Token Standard basic implementation + * @dev see https://eips.ethereum.org/EIPS/eip-721 + */ +contract ERC721 is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable { + using SafeMath for uint256; + using Address for address; + using EnumerableSet for EnumerableSet.UintSet; + using EnumerableMap for EnumerableMap.UintToAddressMap; + using Strings for uint256; + + // Equals to `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))` + // which can be also obtained as `IERC721Receiver(0).onERC721Received.selector` + bytes4 private constant _ERC721_RECEIVED = 0x150b7a02; + + // Mapping from holder address to their (enumerable) set of owned tokens + mapping (address => EnumerableSet.UintSet) private _holderTokens; + + // Enumerable mapping from token ids to their owners + EnumerableMap.UintToAddressMap private _tokenOwners; + + // Mapping from token ID to approved address + mapping (uint256 => address) private _tokenApprovals; + + // Mapping from owner to operator approvals + mapping (address => mapping (address => bool)) private _operatorApprovals; + + // Token name + string private _name; + + // Token symbol + string private _symbol; + + // Optional mapping for token URIs + mapping (uint256 => string) private _tokenURIs; + + // Base URI + string private _baseURI; + + /* + * bytes4(keccak256('balanceOf(address)')) == 0x70a08231 + * bytes4(keccak256('ownerOf(uint256)')) == 0x6352211e + * bytes4(keccak256('approve(address,uint256)')) == 0x095ea7b3 + * bytes4(keccak256('getApproved(uint256)')) == 0x081812fc + * bytes4(keccak256('setApprovalForAll(address,bool)')) == 0xa22cb465 + * bytes4(keccak256('isApprovedForAll(address,address)')) == 0xe985e9c5 + * bytes4(keccak256('transferFrom(address,address,uint256)')) == 0x23b872dd + * bytes4(keccak256('safeTransferFrom(address,address,uint256)')) == 0x42842e0e + * bytes4(keccak256('safeTransferFrom(address,address,uint256,bytes)')) == 0xb88d4fde + * + * => 0x70a08231 ^ 0x6352211e ^ 0x095ea7b3 ^ 0x081812fc ^ + * 0xa22cb465 ^ 0xe985e9c5 ^ 0x23b872dd ^ 0x42842e0e ^ 0xb88d4fde == 0x80ac58cd + */ + bytes4 private constant _INTERFACE_ID_ERC721 = 0x80ac58cd; + + /* + * bytes4(keccak256('name()')) == 0x06fdde03 + * bytes4(keccak256('symbol()')) == 0x95d89b41 + * bytes4(keccak256('tokenURI(uint256)')) == 0xc87b56dd + * + * => 0x06fdde03 ^ 0x95d89b41 ^ 0xc87b56dd == 0x5b5e139f + */ + bytes4 private constant _INTERFACE_ID_ERC721_METADATA = 0x5b5e139f; + + /* + * bytes4(keccak256('totalSupply()')) == 0x18160ddd + * bytes4(keccak256('tokenOfOwnerByIndex(address,uint256)')) == 0x2f745c59 + * bytes4(keccak256('tokenByIndex(uint256)')) == 0x4f6ccce7 + * + * => 0x18160ddd ^ 0x2f745c59 ^ 0x4f6ccce7 == 0x780e9d63 + */ + bytes4 private constant _INTERFACE_ID_ERC721_ENUMERABLE = 0x780e9d63; + + /** + * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection. + */ + constructor (string memory name, string memory symbol) public { + _name = name; + _symbol = symbol; + + // register the supported interfaces to conform to ERC721 via ERC165 + _registerInterface(_INTERFACE_ID_ERC721); + _registerInterface(_INTERFACE_ID_ERC721_METADATA); + _registerInterface(_INTERFACE_ID_ERC721_ENUMERABLE); + } + + /** + * @dev See {IERC721-balanceOf}. + */ + function balanceOf(address owner) public view override returns (uint256) { + require(owner != address(0), "ERC721: balance query for the zero address"); + + return _holderTokens[owner].length(); + } + + /** + * @dev See {IERC721-ownerOf}. + */ + function ownerOf(uint256 tokenId) public view override returns (address) { + return _tokenOwners.get(tokenId, "ERC721: owner query for nonexistent token"); + } + + /** + * @dev See {IERC721Metadata-name}. + */ + function name() public view override returns (string memory) { + return _name; + } + + /** + * @dev See {IERC721Metadata-symbol}. + */ + function symbol() public view override returns (string memory) { + return _symbol; + } + + /** + * @dev See {IERC721Metadata-tokenURI}. + */ + function tokenURI(uint256 tokenId) public view override returns (string memory) { + require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token"); + + string memory _tokenURI = _tokenURIs[tokenId]; + + // If there is no base URI, return the token URI. + if (bytes(_baseURI).length == 0) { + return _tokenURI; + } + // If both are set, concatenate the baseURI and tokenURI (via abi.encodePacked). + if (bytes(_tokenURI).length > 0) { + return string(abi.encodePacked(_baseURI, _tokenURI)); + } + // If there is a baseURI but no tokenURI, concatenate the tokenID to the baseURI. + return string(abi.encodePacked(_baseURI, tokenId.toString())); + } + + /** + * @dev Returns the base URI set via {_setBaseURI}. This will be + * automatically added as a prefix in {tokenURI} to each token's URI, or + * to the token ID if no specific URI is set for that token ID. + */ + function baseURI() public view returns (string memory) { + return _baseURI; + } + + /** + * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}. + */ + function tokenOfOwnerByIndex(address owner, uint256 index) public view override returns (uint256) { + return _holderTokens[owner].at(index); + } + + /** + * @dev See {IERC721Enumerable-totalSupply}. + */ + function totalSupply() public view override returns (uint256) { + // _tokenOwners are indexed by tokenIds, so .length() returns the number of tokenIds + return _tokenOwners.length(); + } + + /** + * @dev See {IERC721Enumerable-tokenByIndex}. + */ + function tokenByIndex(uint256 index) public view override returns (uint256) { + (uint256 tokenId, ) = _tokenOwners.at(index); + return tokenId; + } + + /** + * @dev See {IERC721-approve}. + */ + function approve(address to, uint256 tokenId) public virtual override { + address owner = ownerOf(tokenId); + require(to != owner, "ERC721: approval to current owner"); + + require(_msgSender() == owner || isApprovedForAll(owner, _msgSender()), + "ERC721: approve caller is not owner nor approved for all" + ); + + _approve(to, tokenId); + } + + /** + * @dev See {IERC721-getApproved}. + */ + function getApproved(uint256 tokenId) public view override returns (address) { + require(_exists(tokenId), "ERC721: approved query for nonexistent token"); + + return _tokenApprovals[tokenId]; + } + + /** + * @dev See {IERC721-setApprovalForAll}. + */ + function setApprovalForAll(address operator, bool approved) public virtual override { + require(operator != _msgSender(), "ERC721: approve to caller"); + + _operatorApprovals[_msgSender()][operator] = approved; + emit ApprovalForAll(_msgSender(), operator, approved); + } + + /** + * @dev See {IERC721-isApprovedForAll}. + */ + function isApprovedForAll(address owner, address operator) public view override returns (bool) { + return _operatorApprovals[owner][operator]; + } + + /** + * @dev See {IERC721-transferFrom}. + */ + function transferFrom(address from, address to, uint256 tokenId) public virtual override { + //solhint-disable-next-line max-line-length + require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); + + _transfer(from, to, tokenId); + } + + /** + * @dev See {IERC721-safeTransferFrom}. + */ + function safeTransferFrom(address from, address to, uint256 tokenId) public virtual override { + safeTransferFrom(from, to, tokenId, ""); + } + + /** + * @dev See {IERC721-safeTransferFrom}. + */ + function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory _data) public virtual override { + require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); + _safeTransfer(from, to, tokenId, _data); + } + + /** + * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients + * are aware of the ERC721 protocol to prevent tokens from being forever locked. + * + * `_data` is additional data, it has no specified format and it is sent in call to `to`. + * + * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g. + * implement alternative mechanisms to perform token transfer, such as signature-based. + * + * Requirements: + * + * - `from` cannot be the zero address. + * - `to` cannot be the zero address. + * - `tokenId` token must exist and be owned by `from`. + * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. + * + * Emits a {Transfer} event. + */ + function _safeTransfer(address from, address to, uint256 tokenId, bytes memory _data) internal virtual { + _transfer(from, to, tokenId); + require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer"); + } + + /** + * @dev Returns whether `tokenId` exists. + * + * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. + * + * Tokens start existing when they are minted (`_mint`), + * and stop existing when they are burned (`_burn`). + */ + function _exists(uint256 tokenId) internal view returns (bool) { + return _tokenOwners.contains(tokenId); + } + + /** + * @dev Returns whether `spender` is allowed to manage `tokenId`. + * + * Requirements: + * + * - `tokenId` must exist. + */ + function _isApprovedOrOwner(address spender, uint256 tokenId) internal view returns (bool) { + require(_exists(tokenId), "ERC721: operator query for nonexistent token"); + address owner = ownerOf(tokenId); + return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, spender)); + } + + /** + * @dev Safely mints `tokenId` and transfers it to `to`. + * + * Requirements: + d* + * - `tokenId` must not exist. + * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. + * + * Emits a {Transfer} event. + */ + function _safeMint(address to, uint256 tokenId) internal virtual { + _safeMint(to, tokenId, ""); + } + + /** + * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is + * forwarded in {IERC721Receiver-onERC721Received} to contract recipients. + */ + function _safeMint(address to, uint256 tokenId, bytes memory _data) internal virtual { + _mint(to, tokenId); + require(_checkOnERC721Received(address(0), to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer"); + } + + /** + * @dev Mints `tokenId` and transfers it to `to`. + * + * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible + * + * Requirements: + * + * - `tokenId` must not exist. + * - `to` cannot be the zero address. + * + * Emits a {Transfer} event. + */ + function _mint(address to, uint256 tokenId) internal virtual { + require(to != address(0), "ERC721: mint to the zero address"); + require(!_exists(tokenId), "ERC721: token already minted"); + + _beforeTokenTransfer(address(0), to, tokenId); + + _holderTokens[to].add(tokenId); + + _tokenOwners.set(tokenId, to); + + emit Transfer(address(0), to, tokenId); + } + + /** + * @dev Destroys `tokenId`. + * The approval is cleared when the token is burned. + * + * Requirements: + * + * - `tokenId` must exist. + * + * Emits a {Transfer} event. + */ + function _burn(uint256 tokenId) internal virtual { + address owner = ownerOf(tokenId); + + _beforeTokenTransfer(owner, address(0), tokenId); + + // Clear approvals + _approve(address(0), tokenId); + + // Clear metadata (if any) + if (bytes(_tokenURIs[tokenId]).length != 0) { + delete _tokenURIs[tokenId]; + } + + _holderTokens[owner].remove(tokenId); + + _tokenOwners.remove(tokenId); + + emit Transfer(owner, address(0), tokenId); + } + + /** + * @dev Transfers `tokenId` from `from` to `to`. + * As opposed to {transferFrom}, this imposes no restrictions on msg.sender. + * + * Requirements: + * + * - `to` cannot be the zero address. + * - `tokenId` token must be owned by `from`. + * + * Emits a {Transfer} event. + */ + function _transfer(address from, address to, uint256 tokenId) internal virtual { + require(ownerOf(tokenId) == from, "ERC721: transfer of token that is not own"); + require(to != address(0), "ERC721: transfer to the zero address"); + + _beforeTokenTransfer(from, to, tokenId); + + // Clear approvals from the previous owner + _approve(address(0), tokenId); + + _holderTokens[from].remove(tokenId); + _holderTokens[to].add(tokenId); + + _tokenOwners.set(tokenId, to); + + emit Transfer(from, to, tokenId); + } + + /** + * @dev Sets `_tokenURI` as the tokenURI of `tokenId`. + * + * Requirements: + * + * - `tokenId` must exist. + */ + function _setTokenURI(uint256 tokenId, string memory _tokenURI) internal virtual { + require(_exists(tokenId), "ERC721Metadata: URI set of nonexistent token"); + _tokenURIs[tokenId] = _tokenURI; + } + + /** + * @dev Internal function to set the base URI for all token IDs. It is + * automatically added as a prefix to the value returned in {tokenURI}, + * or to the token ID if {tokenURI} is empty. + */ + function _setBaseURI(string memory baseURI_) internal virtual { + _baseURI = baseURI_; + } + + /** + * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. + * The call is not executed if the target address is not a contract. + * + * @param from address representing the previous owner of the given token ID + * @param to target address that will receive the tokens + * @param tokenId uint256 ID of the token to be transferred + * @param _data bytes optional data to send along with the call + * @return bool whether the call correctly returned the expected magic value + */ + function _checkOnERC721Received(address from, address to, uint256 tokenId, bytes memory _data) + private returns (bool) + { + if (!to.isContract()) { + return true; + } + bytes memory returndata = to.functionCall(abi.encodeWithSelector( + IERC721Receiver(to).onERC721Received.selector, + _msgSender(), + from, + tokenId, + _data + ), "ERC721: transfer to non ERC721Receiver implementer"); + bytes4 retval = abi.decode(returndata, (bytes4)); + return (retval == _ERC721_RECEIVED); + } + + function _approve(address to, uint256 tokenId) private { + _tokenApprovals[tokenId] = to; + emit Approval(ownerOf(tokenId), to, tokenId); + } + + /** + * @dev Hook that is called before any token transfer. This includes minting + * and burning. + * + * Calling conditions: + * + * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be + * transferred to `to`. + * - When `from` is zero, `tokenId` will be minted for `to`. + * - When `to` is zero, ``from``'s `tokenId` will be burned. + * - `from` cannot be the zero address. + * - `to` cannot be the zero address. + * + * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. + */ + function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal virtual { } +} diff --git a/contracts_nftlockproxy/libs/token/ERC721/ERC721Burnable.sol b/contracts_nftlockproxy/libs/token/ERC721/ERC721Burnable.sol new file mode 100644 index 0000000..6f767d2 --- /dev/null +++ b/contracts_nftlockproxy/libs/token/ERC721/ERC721Burnable.sol @@ -0,0 +1,25 @@ +// SPDX-License-Identifier: MIT + +pragma solidity ^0.6.0; + +import "../../GSN/Context.sol"; +import "./ERC721.sol"; + +/** + * @title ERC721 Burnable Token + * @dev ERC721 Token that can be irreversibly burned (destroyed). + */ +abstract contract ERC721Burnable is Context, ERC721 { + /** + * @dev Burns `tokenId`. See {ERC721-_burn}. + * + * Requirements: + * + * - The caller must own `tokenId` or be an approved operator. + */ + function burn(uint256 tokenId) public virtual { + //solhint-disable-next-line max-line-length + require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721Burnable: caller is not owner nor approved"); + _burn(tokenId); + } +} diff --git a/contracts_nftlockproxy/libs/token/ERC721/ERC721Holder.sol b/contracts_nftlockproxy/libs/token/ERC721/ERC721Holder.sol new file mode 100644 index 0000000..3684bd1 --- /dev/null +++ b/contracts_nftlockproxy/libs/token/ERC721/ERC721Holder.sol @@ -0,0 +1,23 @@ +// SPDX-License-Identifier: MIT + +pragma solidity ^0.6.0; + +import "./IERC721Receiver.sol"; + + /** + * @dev Implementation of the {IERC721Receiver} interface. + * + * Accepts all token transfers. + * Make sure the contract is able to use its token with {IERC721-safeTransferFrom}, {IERC721-approve} or {IERC721-setApprovalForAll}. + */ +contract ERC721Holder is IERC721Receiver { + + /** + * @dev See {IERC721Receiver-onERC721Received}. + * + * Always returns `IERC721Receiver.onERC721Received.selector`. + */ + function onERC721Received(address, address, uint256, bytes memory) public virtual override returns (bytes4) { + return this.onERC721Received.selector; + } +} diff --git a/contracts_nftlockproxy/libs/token/ERC721/ERC721Pausable.sol b/contracts_nftlockproxy/libs/token/ERC721/ERC721Pausable.sol new file mode 100644 index 0000000..c590647 --- /dev/null +++ b/contracts_nftlockproxy/libs/token/ERC721/ERC721Pausable.sol @@ -0,0 +1,28 @@ +// SPDX-License-Identifier: MIT + +pragma solidity ^0.6.0; + +import "./ERC721.sol"; +import "../../utils/Pausable.sol"; + +/** + * @dev ERC721 token with pausable token transfers, minting and burning. + * + * Useful for scenarios such as preventing trades until the end of an evaluation + * period, or having an emergency switch for freezing all token transfers in the + * event of a large bug. + */ +abstract contract ERC721Pausable is ERC721, Pausable { + /** + * @dev See {ERC721-_beforeTokenTransfer}. + * + * Requirements: + * + * - the contract must not be paused. + */ + function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal virtual override { + super._beforeTokenTransfer(from, to, tokenId); + + require(!paused(), "ERC721Pausable: token transfer while paused"); + } +} diff --git a/contracts_nftlockproxy/libs/token/ERC721/IERC721.sol b/contracts_nftlockproxy/libs/token/ERC721/IERC721.sol new file mode 100644 index 0000000..5e7d20e --- /dev/null +++ b/contracts_nftlockproxy/libs/token/ERC721/IERC721.sol @@ -0,0 +1,129 @@ +// SPDX-License-Identifier: MIT + +pragma solidity ^0.6.2; + +import "../../introspection/IERC165.sol"; + +/** + * @dev Required interface of an ERC721 compliant contract. + */ +interface IERC721 is IERC165 { + /** + * @dev Emitted when `tokenId` token is transferred from `from` to `to`. + */ + event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); + + /** + * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. + */ + event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); + + /** + * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. + */ + event ApprovalForAll(address indexed owner, address indexed operator, bool approved); + + /** + * @dev Returns the number of tokens in ``owner``'s account. + */ + function balanceOf(address owner) external view returns (uint256 balance); + + /** + * @dev Returns the owner of the `tokenId` token. + * + * Requirements: + * + * - `tokenId` must exist. + */ + function ownerOf(uint256 tokenId) external view returns (address owner); + + /** + * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients + * are aware of the ERC721 protocol to prevent tokens from being forever locked. + * + * Requirements: + * + * - `from` cannot be the zero address. + * - `to` cannot be the zero address. + * - `tokenId` token must exist and be owned by `from`. + * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}. + * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. + * + * Emits a {Transfer} event. + */ + function safeTransferFrom(address from, address to, uint256 tokenId) external; + + /** + * @dev Transfers `tokenId` token from `from` to `to`. + * + * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. + * + * Requirements: + * + * - `from` cannot be the zero address. + * - `to` cannot be the zero address. + * - `tokenId` token must be owned by `from`. + * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. + * + * Emits a {Transfer} event. + */ + function transferFrom(address from, address to, uint256 tokenId) external; + + /** + * @dev Gives permission to `to` to transfer `tokenId` token to another account. + * The approval is cleared when the token is transferred. + * + * Only a single account can be approved at a time, so approving the zero address clears previous approvals. + * + * Requirements: + * + * - The caller must own the token or be an approved operator. + * - `tokenId` must exist. + * + * Emits an {Approval} event. + */ + function approve(address to, uint256 tokenId) external; + + /** + * @dev Returns the account approved for `tokenId` token. + * + * Requirements: + * + * - `tokenId` must exist. + */ + function getApproved(uint256 tokenId) external view returns (address operator); + + /** + * @dev Approve or remove `operator` as an operator for the caller. + * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. + * + * Requirements: + * + * - The `operator` cannot be the caller. + * + * Emits an {ApprovalForAll} event. + */ + function setApprovalForAll(address operator, bool _approved) external; + + /** + * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. + * + * See {setApprovalForAll} + */ + function isApprovedForAll(address owner, address operator) external view returns (bool); + + /** + * @dev Safely transfers `tokenId` token from `from` to `to`. + * + * Requirements: + * + * - `from` cannot be the zero address. + * - `to` cannot be the zero address. + * - `tokenId` token must exist and be owned by `from`. + * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. + * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. + * + * Emits a {Transfer} event. + */ + function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) external; +} diff --git a/contracts_nftlockproxy/libs/token/ERC721/IERC721Enumerable.sol b/contracts_nftlockproxy/libs/token/ERC721/IERC721Enumerable.sol new file mode 100644 index 0000000..bd3c86d --- /dev/null +++ b/contracts_nftlockproxy/libs/token/ERC721/IERC721Enumerable.sol @@ -0,0 +1,29 @@ +// SPDX-License-Identifier: MIT + +pragma solidity ^0.6.2; + +import "./IERC721.sol"; + +/** + * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension + * @dev See https://eips.ethereum.org/EIPS/eip-721 + */ +interface IERC721Enumerable is IERC721 { + + /** + * @dev Returns the total amount of tokens stored by the contract. + */ + function totalSupply() external view returns (uint256); + + /** + * @dev Returns a token ID owned by `owner` at a given `index` of its token list. + * Use along with {balanceOf} to enumerate all of ``owner``'s tokens. + */ + function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256 tokenId); + + /** + * @dev Returns a token ID at a given `index` of all the tokens stored by the contract. + * Use along with {totalSupply} to enumerate all tokens. + */ + function tokenByIndex(uint256 index) external view returns (uint256); +} diff --git a/contracts_nftlockproxy/libs/token/ERC721/IERC721Metadata.sol b/contracts_nftlockproxy/libs/token/ERC721/IERC721Metadata.sol new file mode 100644 index 0000000..f2ebb49 --- /dev/null +++ b/contracts_nftlockproxy/libs/token/ERC721/IERC721Metadata.sol @@ -0,0 +1,27 @@ +// SPDX-License-Identifier: MIT + +pragma solidity ^0.6.2; + +import "./IERC721.sol"; + +/** + * @title ERC-721 Non-Fungible Token Standard, optional metadata extension + * @dev See https://eips.ethereum.org/EIPS/eip-721 + */ +interface IERC721Metadata is IERC721 { + + /** + * @dev Returns the token collection name. + */ + function name() external view returns (string memory); + + /** + * @dev Returns the token collection symbol. + */ + function symbol() external view returns (string memory); + + /** + * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. + */ + function tokenURI(uint256 tokenId) external view returns (string memory); +} diff --git a/contracts_nftlockproxy/libs/token/ERC721/IERC721Receiver.sol b/contracts_nftlockproxy/libs/token/ERC721/IERC721Receiver.sol new file mode 100644 index 0000000..0d17a07 --- /dev/null +++ b/contracts_nftlockproxy/libs/token/ERC721/IERC721Receiver.sol @@ -0,0 +1,21 @@ +// SPDX-License-Identifier: MIT + +pragma solidity ^0.6.0; + +/** + * @title ERC721 token receiver interface + * @dev Interface for any contract that wants to support safeTransfers + * from ERC721 asset contracts. + */ +interface IERC721Receiver { + /** + * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} + * by `operator` from `from`, this function is called. + * + * It must return its Solidity selector to confirm the token transfer. + * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. + * + * The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`. + */ + function onERC721Received(address operator, address from, uint256 tokenId, bytes calldata data) external returns (bytes4); +} diff --git a/contracts_nftlockproxy/libs/utils/Address.sol b/contracts_nftlockproxy/libs/utils/Address.sol new file mode 100644 index 0000000..fe3ba65 --- /dev/null +++ b/contracts_nftlockproxy/libs/utils/Address.sol @@ -0,0 +1,141 @@ +// SPDX-License-Identifier: MIT + +pragma solidity ^0.6.2; + +/** + * @dev Collection of functions related to the address type + */ +library Address { + /** + * @dev Returns true if `account` is a contract. + * + * [IMPORTANT] + * ==== + * It is unsafe to assume that an address for which this function returns + * false is an externally-owned account (EOA) and not a contract. + * + * Among others, `isContract` will return false for the following + * types of addresses: + * + * - an externally-owned account + * - a contract in construction + * - an address where a contract will be created + * - an address where a contract lived, but was destroyed + * ==== + */ + function isContract(address account) internal view returns (bool) { + // This method relies in extcodesize, which returns 0 for contracts in + // construction, since the code is only stored at the end of the + // constructor execution. + + uint256 size; + // solhint-disable-next-line no-inline-assembly + assembly { size := extcodesize(account) } + return size > 0; + } + + /** + * @dev Replacement for Solidity's `transfer`: sends `amount` wei to + * `recipient`, forwarding all available gas and reverting on errors. + * + * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost + * of certain opcodes, possibly making contracts go over the 2300 gas limit + * imposed by `transfer`, making them unable to receive funds via + * `transfer`. {sendValue} removes this limitation. + * + * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. + * + * IMPORTANT: because control is transferred to `recipient`, care must be + * taken to not create reentrancy vulnerabilities. Consider using + * {ReentrancyGuard} or the + * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. + */ + function sendValue(address payable recipient, uint256 amount) internal { + require(address(this).balance >= amount, "Address: insufficient balance"); + + // solhint-disable-next-line avoid-low-level-calls, avoid-call-value + (bool success, ) = recipient.call{ value: amount }(""); + require(success, "Address: unable to send value, recipient may have reverted"); + } + + /** + * @dev Performs a Solidity function call using a low level `call`. A + * plain`call` is an unsafe replacement for a function call: use this + * function instead. + * + * If `target` reverts with a revert reason, it is bubbled up by this + * function (like regular Solidity function calls). + * + * Returns the raw returned data. To convert to the expected return value, + * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. + * + * Requirements: + * + * - `target` must be a contract. + * - calling `target` with `data` must not revert. + * + * _Available since v3.1._ + */ + function functionCall(address target, bytes memory data) internal returns (bytes memory) { + return functionCall(target, data, "Address: low-level call failed"); + } + + /** + * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with + * `errorMessage` as a fallback revert reason when `target` reverts. + * + * _Available since v3.1._ + */ + function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { + return _functionCallWithValue(target, data, 0, errorMessage); + } + + /** + * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], + * but also transferring `value` wei to `target`. + * + * Requirements: + * + * - the calling contract must have an ETH balance of at least `value`. + * - the called Solidity function must be `payable`. + * + * _Available since v3.1._ + */ + function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { + return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); + } + + /** + * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but + * with `errorMessage` as a fallback revert reason when `target` reverts. + * + * _Available since v3.1._ + */ + function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) { + require(address(this).balance >= value, "Address: insufficient balance for call"); + return _functionCallWithValue(target, data, value, errorMessage); + } + + function _functionCallWithValue(address target, bytes memory data, uint256 weiValue, string memory errorMessage) private returns (bytes memory) { + require(isContract(target), "Address: call to non-contract"); + + // solhint-disable-next-line avoid-low-level-calls + (bool success, bytes memory returndata) = target.call{ value: weiValue }(data); + if (success) { + return returndata; + } else { + // Look for revert reason and bubble it up if present + if (returndata.length > 0) { + // The easiest way to bubble the revert reason is using memory via assembly + + // solhint-disable-next-line no-inline-assembly + assembly { + let returndata_size := mload(returndata) + revert(add(32, returndata), returndata_size) + } + } else { + revert(errorMessage); + } + } + } +} diff --git a/contracts_nftlockproxy/libs/utils/EnumerableMap.sol b/contracts_nftlockproxy/libs/utils/EnumerableMap.sol new file mode 100644 index 0000000..82eb04c --- /dev/null +++ b/contracts_nftlockproxy/libs/utils/EnumerableMap.sol @@ -0,0 +1,237 @@ +// SPDX-License-Identifier: MIT + +pragma solidity ^0.6.0; + +/** + * @dev Library for managing an enumerable variant of Solidity's + * https://solidity.readthedocs.io/en/latest/types.html#mapping-types[`mapping`] + * type. + * + * Maps have the following properties: + * + * - Entries are added, removed, and checked for existence in constant time + * (O(1)). + * - Entries are enumerated in O(n). No guarantees are made on the ordering. + * + * ``` + * contract Example { + * // Add the library methods + * using EnumerableMap for EnumerableMap.UintToAddressMap; + * + * // Declare a set state variable + * EnumerableMap.UintToAddressMap private myMap; + * } + * ``` + * + * As of v3.0.0, only maps of type `uint256 -> address` (`UintToAddressMap`) are + * supported. + */ +library EnumerableMap { + // To implement this library for multiple types with as little code + // repetition as possible, we write it in terms of a generic Map type with + // bytes32 keys and values. + // The Map implementation uses private functions, and user-facing + // implementations (such as Uint256ToAddressMap) are just wrappers around + // the underlying Map. + // This means that we can only create new EnumerableMaps for types that fit + // in bytes32. + + struct MapEntry { + bytes32 _key; + bytes32 _value; + } + + struct Map { + // Storage of map keys and values + MapEntry[] _entries; + + // Position of the entry defined by a key in the `entries` array, plus 1 + // because index 0 means a key is not in the map. + mapping (bytes32 => uint256) _indexes; + } + + /** + * @dev Adds a key-value pair to a map, or updates the value for an existing + * key. O(1). + * + * Returns true if the key was added to the map, that is if it was not + * already present. + */ + function _set(Map storage map, bytes32 key, bytes32 value) private returns (bool) { + // We read and store the key's index to prevent multiple reads from the same storage slot + uint256 keyIndex = map._indexes[key]; + + if (keyIndex == 0) { // Equivalent to !contains(map, key) + map._entries.push(MapEntry({ _key: key, _value: value })); + // The entry is stored at length-1, but we add 1 to all indexes + // and use 0 as a sentinel value + map._indexes[key] = map._entries.length; + return true; + } else { + map._entries[keyIndex - 1]._value = value; + return false; + } + } + + /** + * @dev Removes a key-value pair from a map. O(1). + * + * Returns true if the key was removed from the map, that is if it was present. + */ + function _remove(Map storage map, bytes32 key) private returns (bool) { + // We read and store the key's index to prevent multiple reads from the same storage slot + uint256 keyIndex = map._indexes[key]; + + if (keyIndex != 0) { // Equivalent to contains(map, key) + // To delete a key-value pair from the _entries array in O(1), we swap the entry to delete with the last one + // in the array, and then remove the last entry (sometimes called as 'swap and pop'). + // This modifies the order of the array, as noted in {at}. + + uint256 toDeleteIndex = keyIndex - 1; + uint256 lastIndex = map._entries.length - 1; + + // When the entry to delete is the last one, the swap operation is unnecessary. However, since this occurs + // so rarely, we still do the swap anyway to avoid the gas cost of adding an 'if' statement. + + MapEntry storage lastEntry = map._entries[lastIndex]; + + // Move the last entry to the index where the entry to delete is + map._entries[toDeleteIndex] = lastEntry; + // Update the index for the moved entry + map._indexes[lastEntry._key] = toDeleteIndex + 1; // All indexes are 1-based + + // Delete the slot where the moved entry was stored + map._entries.pop(); + + // Delete the index for the deleted slot + delete map._indexes[key]; + + return true; + } else { + return false; + } + } + + /** + * @dev Returns true if the key is in the map. O(1). + */ + function _contains(Map storage map, bytes32 key) private view returns (bool) { + return map._indexes[key] != 0; + } + + /** + * @dev Returns the number of key-value pairs in the map. O(1). + */ + function _length(Map storage map) private view returns (uint256) { + return map._entries.length; + } + + /** + * @dev Returns the key-value pair stored at position `index` in the map. O(1). + * + * Note that there are no guarantees on the ordering of entries inside the + * array, and it may change when more entries are added or removed. + * + * Requirements: + * + * - `index` must be strictly less than {length}. + */ + function _at(Map storage map, uint256 index) private view returns (bytes32, bytes32) { + require(map._entries.length > index, "EnumerableMap: index out of bounds"); + + MapEntry storage entry = map._entries[index]; + return (entry._key, entry._value); + } + + /** + * @dev Returns the value associated with `key`. O(1). + * + * Requirements: + * + * - `key` must be in the map. + */ + function _get(Map storage map, bytes32 key) private view returns (bytes32) { + return _get(map, key, "EnumerableMap: nonexistent key"); + } + + /** + * @dev Same as {_get}, with a custom error message when `key` is not in the map. + */ + function _get(Map storage map, bytes32 key, string memory errorMessage) private view returns (bytes32) { + uint256 keyIndex = map._indexes[key]; + require(keyIndex != 0, errorMessage); // Equivalent to contains(map, key) + return map._entries[keyIndex - 1]._value; // All indexes are 1-based + } + + // UintToAddressMap + + struct UintToAddressMap { + Map _inner; + } + + /** + * @dev Adds a key-value pair to a map, or updates the value for an existing + * key. O(1). + * + * Returns true if the key was added to the map, that is if it was not + * already present. + */ + function set(UintToAddressMap storage map, uint256 key, address value) internal returns (bool) { + return _set(map._inner, bytes32(key), bytes32(uint256(value))); + } + + /** + * @dev Removes a value from a set. O(1). + * + * Returns true if the key was removed from the map, that is if it was present. + */ + function remove(UintToAddressMap storage map, uint256 key) internal returns (bool) { + return _remove(map._inner, bytes32(key)); + } + + /** + * @dev Returns true if the key is in the map. O(1). + */ + function contains(UintToAddressMap storage map, uint256 key) internal view returns (bool) { + return _contains(map._inner, bytes32(key)); + } + + /** + * @dev Returns the number of elements in the map. O(1). + */ + function length(UintToAddressMap storage map) internal view returns (uint256) { + return _length(map._inner); + } + + /** + * @dev Returns the element stored at position `index` in the set. O(1). + * Note that there are no guarantees on the ordering of values inside the + * array, and it may change when more values are added or removed. + * + * Requirements: + * + * - `index` must be strictly less than {length}. + */ + function at(UintToAddressMap storage map, uint256 index) internal view returns (uint256, address) { + (bytes32 key, bytes32 value) = _at(map._inner, index); + return (uint256(key), address(uint256(value))); + } + + /** + * @dev Returns the value associated with `key`. O(1). + * + * Requirements: + * + * - `key` must be in the map. + */ + function get(UintToAddressMap storage map, uint256 key) internal view returns (address) { + return address(uint256(_get(map._inner, bytes32(key)))); + } + + /** + * @dev Same as {get}, with a custom error message when `key` is not in the map. + */ + function get(UintToAddressMap storage map, uint256 key, string memory errorMessage) internal view returns (address) { + return address(uint256(_get(map._inner, bytes32(key), errorMessage))); + } +} diff --git a/contracts_nftlockproxy/libs/utils/EnumerableSet.sol b/contracts_nftlockproxy/libs/utils/EnumerableSet.sol new file mode 100644 index 0000000..7f4c761 --- /dev/null +++ b/contracts_nftlockproxy/libs/utils/EnumerableSet.sol @@ -0,0 +1,243 @@ +// SPDX-License-Identifier: MIT + +pragma solidity ^0.6.0; + +/** + * @dev Library for managing + * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive + * types. + * + * Sets have the following properties: + * + * - Elements are added, removed, and checked for existence in constant time + * (O(1)). + * - Elements are enumerated in O(n). No guarantees are made on the ordering. + * + * ``` + * contract Example { + * // Add the library methods + * using EnumerableSet for EnumerableSet.AddressSet; + * + * // Declare a set state variable + * EnumerableSet.AddressSet private mySet; + * } + * ``` + * + * As of v3.0.0, only sets of type `address` (`AddressSet`) and `uint256` + * (`UintSet`) are supported. + */ +library EnumerableSet { + // To implement this library for multiple types with as little code + // repetition as possible, we write it in terms of a generic Set type with + // bytes32 values. + // The Set implementation uses private functions, and user-facing + // implementations (such as AddressSet) are just wrappers around the + // underlying Set. + // This means that we can only create new EnumerableSets for types that fit + // in bytes32. + + struct Set { + // Storage of set values + bytes32[] _values; + + // Position of the value in the `values` array, plus 1 because index 0 + // means a value is not in the set. + mapping (bytes32 => uint256) _indexes; + } + + /** + * @dev Add a value to a set. O(1). + * + * Returns true if the value was added to the set, that is if it was not + * already present. + */ + function _add(Set storage set, bytes32 value) private returns (bool) { + if (!_contains(set, value)) { + set._values.push(value); + // The value is stored at length-1, but we add 1 to all indexes + // and use 0 as a sentinel value + set._indexes[value] = set._values.length; + return true; + } else { + return false; + } + } + + /** + * @dev Removes a value from a set. O(1). + * + * Returns true if the value was removed from the set, that is if it was + * present. + */ + function _remove(Set storage set, bytes32 value) private returns (bool) { + // We read and store the value's index to prevent multiple reads from the same storage slot + uint256 valueIndex = set._indexes[value]; + + if (valueIndex != 0) { // Equivalent to contains(set, value) + // To delete an element from the _values array in O(1), we swap the element to delete with the last one in + // the array, and then remove the last element (sometimes called as 'swap and pop'). + // This modifies the order of the array, as noted in {at}. + + uint256 toDeleteIndex = valueIndex - 1; + uint256 lastIndex = set._values.length - 1; + + // When the value to delete is the last one, the swap operation is unnecessary. However, since this occurs + // so rarely, we still do the swap anyway to avoid the gas cost of adding an 'if' statement. + + bytes32 lastvalue = set._values[lastIndex]; + + // Move the last value to the index where the value to delete is + set._values[toDeleteIndex] = lastvalue; + // Update the index for the moved value + set._indexes[lastvalue] = toDeleteIndex + 1; // All indexes are 1-based + + // Delete the slot where the moved value was stored + set._values.pop(); + + // Delete the index for the deleted slot + delete set._indexes[value]; + + return true; + } else { + return false; + } + } + + /** + * @dev Returns true if the value is in the set. O(1). + */ + function _contains(Set storage set, bytes32 value) private view returns (bool) { + return set._indexes[value] != 0; + } + + /** + * @dev Returns the number of values on the set. O(1). + */ + function _length(Set storage set) private view returns (uint256) { + return set._values.length; + } + + /** + * @dev Returns the value stored at position `index` in the set. O(1). + * + * Note that there are no guarantees on the ordering of values inside the + * array, and it may change when more values are added or removed. + * + * Requirements: + * + * - `index` must be strictly less than {length}. + */ + function _at(Set storage set, uint256 index) private view returns (bytes32) { + require(set._values.length > index, "EnumerableSet: index out of bounds"); + return set._values[index]; + } + + // AddressSet + + struct AddressSet { + Set _inner; + } + + /** + * @dev Add a value to a set. O(1). + * + * Returns true if the value was added to the set, that is if it was not + * already present. + */ + function add(AddressSet storage set, address value) internal returns (bool) { + return _add(set._inner, bytes32(uint256(value))); + } + + /** + * @dev Removes a value from a set. O(1). + * + * Returns true if the value was removed from the set, that is if it was + * present. + */ + function remove(AddressSet storage set, address value) internal returns (bool) { + return _remove(set._inner, bytes32(uint256(value))); + } + + /** + * @dev Returns true if the value is in the set. O(1). + */ + function contains(AddressSet storage set, address value) internal view returns (bool) { + return _contains(set._inner, bytes32(uint256(value))); + } + + /** + * @dev Returns the number of values in the set. O(1). + */ + function length(AddressSet storage set) internal view returns (uint256) { + return _length(set._inner); + } + + /** + * @dev Returns the value stored at position `index` in the set. O(1). + * + * Note that there are no guarantees on the ordering of values inside the + * array, and it may change when more values are added or removed. + * + * Requirements: + * + * - `index` must be strictly less than {length}. + */ + function at(AddressSet storage set, uint256 index) internal view returns (address) { + return address(uint256(_at(set._inner, index))); + } + + + // UintSet + + struct UintSet { + Set _inner; + } + + /** + * @dev Add a value to a set. O(1). + * + * Returns true if the value was added to the set, that is if it was not + * already present. + */ + function add(UintSet storage set, uint256 value) internal returns (bool) { + return _add(set._inner, bytes32(value)); + } + + /** + * @dev Removes a value from a set. O(1). + * + * Returns true if the value was removed from the set, that is if it was + * present. + */ + function remove(UintSet storage set, uint256 value) internal returns (bool) { + return _remove(set._inner, bytes32(value)); + } + + /** + * @dev Returns true if the value is in the set. O(1). + */ + function contains(UintSet storage set, uint256 value) internal view returns (bool) { + return _contains(set._inner, bytes32(value)); + } + + /** + * @dev Returns the number of values on the set. O(1). + */ + function length(UintSet storage set) internal view returns (uint256) { + return _length(set._inner); + } + + /** + * @dev Returns the value stored at position `index` in the set. O(1). + * + * Note that there are no guarantees on the ordering of values inside the + * array, and it may change when more values are added or removed. + * + * Requirements: + * + * - `index` must be strictly less than {length}. + */ + function at(UintSet storage set, uint256 index) internal view returns (uint256) { + return uint256(_at(set._inner, index)); + } +} diff --git a/contracts_nftlockproxy/libs/utils/Strings.sol b/contracts_nftlockproxy/libs/utils/Strings.sol new file mode 100644 index 0000000..aacce81 --- /dev/null +++ b/contracts_nftlockproxy/libs/utils/Strings.sol @@ -0,0 +1,34 @@ +// SPDX-License-Identifier: MIT + +pragma solidity ^0.6.0; + +/** + * @dev String operations. + */ +library Strings { + /** + * @dev Converts a `uint256` to its ASCII `string` representation. + */ + function toString(uint256 value) internal pure returns (string memory) { + // Inspired by OraclizeAPI's implementation - MIT licence + // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol + + if (value == 0) { + return "0"; + } + uint256 temp = value; + uint256 digits; + while (temp != 0) { + digits++; + temp /= 10; + } + bytes memory buffer = new bytes(digits); + uint256 index = digits - 1; + temp = value; + while (temp != 0) { + buffer[index--] = byte(uint8(48 + temp % 10)); + temp /= 10; + } + return string(buffer); + } +} diff --git a/contracts_nftlockproxy/libs/utils/Utils.sol b/contracts_nftlockproxy/libs/utils/Utils.sol new file mode 100644 index 0000000..2f9f31e --- /dev/null +++ b/contracts_nftlockproxy/libs/utils/Utils.sol @@ -0,0 +1,310 @@ +pragma solidity ^0.6.0; + + +library Utils { + + /* @notice Convert the bytes array to bytes32 type, the bytes array length must be 32 + * @param _bs Source bytes array + * @return bytes32 + */ + function bytesToBytes32(bytes memory _bs) internal pure returns (bytes32 value) { + require(_bs.length == 32, "bytes length is not 32."); + assembly { + // load 32 bytes from memory starting from position _bs + 0x20 since the first 0x20 bytes stores _bs length + value := mload(add(_bs, 0x20)) + } + } + + /* @notice Convert bytes to uint256 + * @param _b Source bytes should have length of 32 + * @return uint256 + */ + function bytesToUint256(bytes memory _bs) internal pure returns (uint256 value) { + require(_bs.length == 32, "bytes length is not 32."); + assembly { + // load 32 bytes from memory starting from position _bs + 32 + value := mload(add(_bs, 0x20)) + } + require(value <= 0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff, "Value exceeds the range"); + } + + /* @notice Convert uint256 to bytes + * @param _b uint256 that needs to be converted + * @return bytes + */ + function uint256ToBytes(uint256 _value) internal pure returns (bytes memory bs) { + require(_value <= 0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff, "Value exceeds the range"); + assembly { + // Get a location of some free memory and store it in result as + // Solidity does for memory variables. + bs := mload(0x40) + // Put 0x20 at the first word, the length of bytes for uint256 value + mstore(bs, 0x20) + //In the next word, put value in bytes format to the next 32 bytes + mstore(add(bs, 0x20), _value) + // Update the free-memory pointer by padding our last write location to 32 bytes + mstore(0x40, add(bs, 0x40)) + } + } + + /* @notice Convert bytes to address + * @param _bs Source bytes: bytes length must be 20 + * @return Converted address from source bytes + */ + function bytesToAddress(bytes memory _bs) internal pure returns (address addr) + { + require(_bs.length == 20, "bytes length does not match address"); + assembly { + // for _bs, first word store _bs.length, second word store _bs.value + // load 32 bytes from mem[_bs+20], convert it into Uint160, meaning we take last 20 bytes as addr (address). + addr := mload(add(_bs, 0x14)) + } + + } + + /* @notice Convert address to bytes + * @param _addr Address need to be converted + * @return Converted bytes from address + */ + function addressToBytes(address _addr) internal pure returns (bytes memory bs){ + assembly { + // Get a location of some free memory and store it in result as + // Solidity does for memory variables. + bs := mload(0x40) + // Put 20 (address byte length) at the first word, the length of bytes for uint256 value + mstore(bs, 0x14) + // logical shift left _a by 12 bytes, change _a from right-aligned to left-aligned + mstore(add(bs, 0x20), shl(96, _addr)) + // Update the free-memory pointer by padding our last write location to 32 bytes + mstore(0x40, add(bs, 0x40)) + } + } + + /* @notice Do hash leaf as the multi-chain does + * @param _data Data in bytes format + * @return Hashed value in bytes32 format + */ + function hashLeaf(bytes memory _data) internal pure returns (bytes32 result) { + result = sha256(abi.encodePacked(byte(0x0), _data)); + } + + /* @notice Do hash children as the multi-chain does + * @param _l Left node + * @param _r Right node + * @return Hashed value in bytes32 format + */ + function hashChildren(bytes32 _l, bytes32 _r) internal pure returns (bytes32 result) { + result = sha256(abi.encodePacked(bytes1(0x01), _l, _r)); + } + + /* @notice Compare if two bytes are equal, which are in storage and memory, seperately + Refer from https://github.com/summa-tx/bitcoin-spv/blob/master/solidity/contracts/BytesLib.sol#L368 + * @param _preBytes The bytes stored in storage + * @param _postBytes The bytes stored in memory + * @return Bool type indicating if they are equal + */ + function equalStorage(bytes storage _preBytes, bytes memory _postBytes) internal view returns (bool) { + bool success = true; + + assembly { + // we know _preBytes_offset is 0 + let fslot := sload(_preBytes_slot) + // Arrays of 31 bytes or less have an even value in their slot, + // while longer arrays have an odd value. The actual length is + // the slot divided by two for odd values, and the lowest order + // byte divided by two for even values. + // If the slot is even, bitwise and the slot with 255 and divide by + // two to get the length. If the slot is odd, bitwise and the slot + // with -1 and divide by two. + let slength := div(and(fslot, sub(mul(0x100, iszero(and(fslot, 1))), 1)), 2) + let mlength := mload(_postBytes) + + // if lengths don't match the arrays are not equal + switch eq(slength, mlength) + case 1 { + // fslot can contain both the length and contents of the array + // if slength < 32 bytes so let's prepare for that + // v. http://solidity.readthedocs.io/en/latest/miscellaneous.html#layout-of-state-variables-in-storage + // slength != 0 + if iszero(iszero(slength)) { + switch lt(slength, 32) + case 1 { + // blank the last byte which is the length + fslot := mul(div(fslot, 0x100), 0x100) + + if iszero(eq(fslot, mload(add(_postBytes, 0x20)))) { + // unsuccess: + success := 0 + } + } + default { + // cb is a circuit breaker in the for loop since there's + // no said feature for inline assembly loops + // cb = 1 - don't breaker + // cb = 0 - break + let cb := 1 + + // get the keccak hash to get the contents of the array + mstore(0x0, _preBytes_slot) + let sc := keccak256(0x0, 0x20) + + let mc := add(_postBytes, 0x20) + let end := add(mc, mlength) + + // the next line is the loop condition: + // while(uint(mc < end) + cb == 2) + for {} eq(add(lt(mc, end), cb), 2) { + sc := add(sc, 1) + mc := add(mc, 0x20) + } { + if iszero(eq(sload(sc), mload(mc))) { + // unsuccess: + success := 0 + cb := 0 + } + } + } + } + } + default { + // unsuccess: + success := 0 + } + } + + return success; + } + + /* @notice Slice the _bytes from _start index till the result has length of _length + Refer from https://github.com/summa-tx/bitcoin-spv/blob/master/solidity/contracts/BytesLib.sol#L246 + * @param _bytes The original bytes needs to be sliced + * @param _start The index of _bytes for the start of sliced bytes + * @param _length The index of _bytes for the end of sliced bytes + * @return The sliced bytes + */ + function slice( + bytes memory _bytes, + uint _start, + uint _length + ) + internal + pure + returns (bytes memory) + { + require(_bytes.length >= (_start + _length)); + + bytes memory tempBytes; + + assembly { + switch iszero(_length) + case 0 { + // Get a location of some free memory and store it in tempBytes as + // Solidity does for memory variables. + tempBytes := mload(0x40) + + // The first word of the slice result is potentially a partial + // word read from the original array. To read it, we calculate + // the length of that partial word and start copying that many + // bytes into the array. The first word we copy will start with + // data we don't care about, but the last `lengthmod` bytes will + // land at the beginning of the contents of the new array. When + // we're done copying, we overwrite the full first word with + // the actual length of the slice. + // lengthmod <= _length % 32 + let lengthmod := and(_length, 31) + + // The multiplication in the next line is necessary + // because when slicing multiples of 32 bytes (lengthmod == 0) + // the following copy loop was copying the origin's length + // and then ending prematurely not copying everything it should. + let mc := add(add(tempBytes, lengthmod), mul(0x20, iszero(lengthmod))) + let end := add(mc, _length) + + for { + // The multiplication in the next line has the same exact purpose + // as the one above. + let cc := add(add(add(_bytes, lengthmod), mul(0x20, iszero(lengthmod))), _start) + } lt(mc, end) { + mc := add(mc, 0x20) + cc := add(cc, 0x20) + } { + mstore(mc, mload(cc)) + } + + mstore(tempBytes, _length) + + //update free-memory pointer + //allocating the array padded to 32 bytes like the compiler does now + mstore(0x40, and(add(mc, 31), not(31))) + } + //if we want a zero-length slice let's just return a zero-length array + default { + tempBytes := mload(0x40) + + mstore(0x40, add(tempBytes, 0x20)) + } + } + + return tempBytes; + } + /* @notice Check if the elements number of _signers within _keepers array is no less than _m + * @param _keepers The array consists of serveral address + * @param _signers Some specific addresses to be looked into + * @param _m The number requirement paramter + * @return True means containment, false meansdo do not contain. + */ + function containMAddresses(address[] memory _keepers, address[] memory _signers, uint _m) internal pure returns (bool){ + uint m = 0; + for(uint i = 0; i < _signers.length; i++){ + for (uint j = 0; j < _keepers.length; j++) { + if (_signers[i] == _keepers[j]) { + m++; + delete _keepers[j]; + } + } + } + return m >= _m; + } + + /* @notice TODO + * @param key + * @return + */ + function compressMCPubKey(bytes memory key) internal pure returns (bytes memory newkey) { + require(key.length >= 67, "key lenggh is too short"); + newkey = slice(key, 0, 35); + if (uint8(key[66]) % 2 == 0){ + newkey[2] = byte(0x02); + } else { + newkey[2] = byte(0x03); + } + return newkey; + } + + /** + * @dev Returns true if `account` is a contract. + * Refer from https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/Address.sol#L18 + * + * This test is non-exhaustive, and there may be false-negatives: during the + * execution of a contract's constructor, its address will be reported as + * not containing a contract. + * + * IMPORTANT: It is unsafe to assume that an address for which this + * function returns false is an externally-owned account (EOA) and not a + * contract. + */ + function isContract(address account) internal view returns (bool) { + // This method relies in extcodesize, which returns 0 for contracts in + // construction, since the code is only stored at the end of the + // constructor execution. + + // According to EIP-1052, 0x0 is the value returned for not-yet created accounts + // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned + // for accounts without code, i.e. `keccak256('')` + bytes32 codehash; + bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470; + // solhint-disable-next-line no-inline-assembly + assembly { codehash := extcodehash(account) } + return (codehash != 0x0 && codehash != accountHash); + } +} \ No newline at end of file diff --git a/contracts_v0.4/core/cross_chain_manager/data/EthCrossChainData.sol b/contracts_v0.4/core/cross_chain_manager/data/EthCrossChainData.sol new file mode 100644 index 0000000..58c7ecd --- /dev/null +++ b/contracts_v0.4/core/cross_chain_manager/data/EthCrossChainData.sol @@ -0,0 +1,103 @@ +pragma solidity ^0.4.25; +import "./../../../libs/ownership/Ownable.sol"; +import "./../../../libs/lifecycle/Pausable.sol"; +import "./../interface/IEthCrossChainData.sol"; + +contract EthCrossChainData is IEthCrossChainData, Ownable, Pausable{ + /* + Ethereum cross chain tx hash indexed by the automatically increased index. + This map exists for the reason that Poly chain can verify the existence of + cross chain request tx coming from Ethereum + */ + mapping(uint256 => bytes32) public EthToPolyTxHashMap; + // This index records the current Map length + uint256 public EthToPolyTxHashIndex; + + /* + When Poly chain switches the consensus epoch book keepers, the consensus peers public keys of Poly chain should be + changed into no-compressed version so that solidity smart contract can convert it to address type and + verify the signature derived from Poly chain account signature. + ConKeepersPkBytes means Consensus book Keepers Public Key Bytes + */ + bytes public ConKeepersPkBytes; + + // CurEpochStartHeight means Current Epoch Start Height of Poly chain block + uint32 public CurEpochStartHeight; + + // Record the from chain txs that have been processed + mapping(uint64 => mapping(bytes32 => bool)) FromChainTxExist; + + // Extra map for the usage of future potentially + mapping(bytes32 => mapping(bytes32 => bytes)) public ExtraData; + + // Store Current Epoch Start Height of Poly chain block + function putCurEpochStartHeight(uint32 curEpochStartHeight) public whenNotPaused onlyOwner returns (bool) { + CurEpochStartHeight = curEpochStartHeight; + return true; + } + + // Get Current Epoch Start Height of Poly chain block + function getCurEpochStartHeight() public view returns (uint32) { + return CurEpochStartHeight; + } + + // Store Consensus book Keepers Public Key Bytes + function putCurEpochConPubKeyBytes(bytes curEpochPkBytes) external whenNotPaused onlyOwner returns (bool) { + ConKeepersPkBytes = curEpochPkBytes; + return true; + } + + // Get Consensus book Keepers Public Key Bytes + function getCurEpochConPubKeyBytes() public view returns (bytes memory) { + return ConKeepersPkBytes; + } + + // Mark from chain tx fromChainTx as exist or processed + function markFromChainTxExist(uint64 fromChainId, bytes32 fromChainTx) public whenNotPaused onlyOwner returns (bool) { + FromChainTxExist[fromChainId][fromChainTx] = true; + return true; + } + + // Check if from chain tx fromChainTx has been processed before + function checkIfFromChainTxExist(uint64 fromChainId, bytes32 fromChainTx) public view returns (bool) { + return FromChainTxExist[fromChainId][fromChainTx]; + } + + // Get current recorded index of cross chain txs requesting from Ethereum to other public chains + // in order to help cross chain manager contract differenciate two cross chain tx requests + function getEthTxHashIndex() public view returns (uint256) { + return EthToPolyTxHashIndex; + } + + // Store Ethereum cross chain tx hash, increase the index record by 1 + function putEthTxHash(bytes32 ethTxHash) public whenNotPaused onlyOwner returns (bool) { + EthToPolyTxHashMap[EthToPolyTxHashIndex] = ethTxHash; + EthToPolyTxHashIndex = EthToPolyTxHashIndex + 1; + return true; + } + + // Get Ethereum cross chain tx hash indexed by ethTxHashIndex + function getEthTxHash(uint256 ethTxHashIndex) public view returns (bytes32) { + return EthToPolyTxHashMap[ethTxHashIndex]; + } + + // Store extra data, which may be used in the future + function putExtraData(bytes32 key1, bytes32 key2, bytes value) external whenNotPaused onlyOwner returns (bool) { + ExtraData[key1][key2] = value; + return true; + } + // Get extra data, which may be used in the future + function getExtraData(bytes32 key1, bytes32 key2) public view returns (bytes memory) { + return ExtraData[key1][key2]; + } + + function pause() onlyOwner whenNotPaused public returns (bool) { + _pause(); + return true; + } + + function unpause() onlyOwner whenPaused public returns (bool) { + _unpause(); + return true; + } +} \ No newline at end of file diff --git a/contracts_v0.4/core/cross_chain_manager/interface/IEthCrossChainData.sol b/contracts_v0.4/core/cross_chain_manager/interface/IEthCrossChainData.sol new file mode 100644 index 0000000..11cf8fe --- /dev/null +++ b/contracts_v0.4/core/cross_chain_manager/interface/IEthCrossChainData.sol @@ -0,0 +1,23 @@ +pragma solidity >=0.4.25; + +/** + * @dev Interface of the EthCrossChainData contract, the implementation is in EthCrossChainData.sol + */ +interface IEthCrossChainData { + function putCurEpochStartHeight(uint32 curEpochStartHeight) external returns (bool); + function getCurEpochStartHeight() external view returns (uint32); + function putCurEpochConPubKeyBytes(bytes curEpochPkBytes) external returns (bool); + function getCurEpochConPubKeyBytes() external view returns (bytes memory); + function markFromChainTxExist(uint64 fromChainId, bytes32 fromChainTx) external returns (bool); + function checkIfFromChainTxExist(uint64 fromChainId, bytes32 fromChainTx) external view returns (bool); + function getEthTxHashIndex() external view returns (uint256); + function putEthTxHash(bytes32 ethTxHash) external returns (bool); + function putExtraData(bytes32 key1, bytes32 key2, bytes value) external returns (bool); + function getExtraData(bytes32 key1, bytes32 key2) external view returns (bytes memory); + function transferOwnership(address newOwner) external; + function pause() external returns (bool); + function unpause() external returns (bool); + function paused() external view returns (bool); + // Not used currently by ECCM + function getEthTxHash(uint256 ethTxHashIndex) external view returns (bytes32); +} \ No newline at end of file diff --git a/contracts_v0.4/core/cross_chain_manager/interface/IEthCrossChainManager.sol b/contracts_v0.4/core/cross_chain_manager/interface/IEthCrossChainManager.sol new file mode 100644 index 0000000..88a9007 --- /dev/null +++ b/contracts_v0.4/core/cross_chain_manager/interface/IEthCrossChainManager.sol @@ -0,0 +1,8 @@ +pragma solidity >=0.4.25; + +/** + * @dev Interface of the EthCrossChainManager contract for business contract like LockProxy to request cross chain transaction + */ +interface IEthCrossChainManager { + function crossChain(uint64 _toChainId, bytes _toContract, bytes _method, bytes _txData) external returns (bool); +} diff --git a/contracts_v0.4/core/cross_chain_manager/interface/IEthCrossChainManagerProxy.sol b/contracts_v0.4/core/cross_chain_manager/interface/IEthCrossChainManagerProxy.sol new file mode 100644 index 0000000..202e70e --- /dev/null +++ b/contracts_v0.4/core/cross_chain_manager/interface/IEthCrossChainManagerProxy.sol @@ -0,0 +1,8 @@ +pragma solidity >=0.4.25; + +/** + * @dev Interface of the EthCrossChainManagerProxy for business contract like LockProxy to obtain the reliable EthCrossChainManager contract hash. + */ +interface IEthCrossChainManagerProxy { + function getEthCrossChainManager() external view returns (address); +} diff --git a/contracts_v0.4/core/cross_chain_manager/interface/IUpgradableECCM.sol b/contracts_v0.4/core/cross_chain_manager/interface/IUpgradableECCM.sol new file mode 100644 index 0000000..1221610 --- /dev/null +++ b/contracts_v0.4/core/cross_chain_manager/interface/IUpgradableECCM.sol @@ -0,0 +1,13 @@ +pragma solidity >=0.4.25; + +/** + * @dev Interface of upgradableECCM to make ECCM be upgradable, the implementation is in UpgradableECCM.sol + */ +interface IUpgradableECCM { + function pause() external returns (bool); + function unpause() external returns (bool); + function paused() external view returns (bool); + function upgradeToNew(address) external returns (bool); + function isOwner() external view returns (bool); + function setChainId(uint64 _newChainId) external returns (bool); +} diff --git a/contracts_v0.4/core/cross_chain_manager/libs/EthCrossChainUtils.sol b/contracts_v0.4/core/cross_chain_manager/libs/EthCrossChainUtils.sol new file mode 100644 index 0000000..f572503 --- /dev/null +++ b/contracts_v0.4/core/cross_chain_manager/libs/EthCrossChainUtils.sol @@ -0,0 +1,232 @@ +pragma solidity >=0.4.25; + +import "./../../../libs/common/ZeroCopySource.sol"; +import "./../../../libs/common/ZeroCopySink.sol"; +import "./../../../libs/utils/Utils.sol"; + +library ECCUtils { + struct Header { + uint32 version; + uint64 chainId; + uint32 timestamp; + uint32 height; + uint64 consensusData; + bytes32 prevBlockHash; + bytes32 transactionsRoot; + bytes32 crossStatesRoot; + bytes32 blockRoot; + bytes consensusPayload; + bytes20 nextBookkeeper; + } + + struct ToMerkleValue { + bytes txHash; // cross chain txhash + uint64 fromChainID; + TxParam makeTxParam; + } + + struct TxParam { + bytes txHash; // source chain txhash + bytes crossChainId; + bytes fromContract; + uint64 toChainId; + bytes toContract; + bytes method; + bytes args; + } + + uint constant POLYCHAIN_PUBKEY_LEN = 67; + uint constant POLYCHAIN_SIGNATURE_LEN = 65; + + /* @notice Verify Poly chain transaction whether exist or not + * @param _auditPath Poly chain merkle proof + * @param _root Poly chain root + * @return The verified value included in _auditPath + */ + function merkleProve(bytes memory _auditPath, bytes32 _root) internal pure returns (bytes memory) { + uint256 off = 0; + bytes memory value; + (value, off) = ZeroCopySource.NextVarBytes(_auditPath, off); + + bytes32 hash = Utils.hashLeaf(value); + uint size = (_auditPath.length - off) / 33; + bytes32 nodeHash; + byte pos; + for (uint i = 0; i < size; i++) { + (pos, off) = ZeroCopySource.NextByte(_auditPath, off); + (nodeHash, off) = ZeroCopySource.NextHash(_auditPath, off); + if (pos == 0x00) { + hash = Utils.hashChildren(nodeHash, hash); + } else if (pos == 0x01) { + hash = Utils.hashChildren(hash, nodeHash); + } else { + revert("merkleProve, NextByte for position info failed"); + } + } + require(hash == _root, "merkleProve, expect root is not equal actual root"); + return value; + } + + /* @notice calculate next book keeper according to public key list + * @param _keyLen consensus node number + * @param _m minimum signature number + * @param _pubKeyList consensus node public key list + * @return two element: next book keeper, consensus node signer addresses + */ + function _getBookKeeper(uint _keyLen, uint _m, bytes memory _pubKeyList) internal pure returns (bytes20, address[] memory){ + bytes memory buff; + buff = ZeroCopySink.WriteUint16(uint16(_keyLen)); + address[] memory keepers = new address[](_keyLen); + bytes32 hash; + bytes memory publicKey; + for(uint i = 0; i < _keyLen; i++){ + publicKey = Utils.slice(_pubKeyList, i*POLYCHAIN_PUBKEY_LEN, POLYCHAIN_PUBKEY_LEN); + buff = abi.encodePacked(buff, ZeroCopySink.WriteVarBytes(Utils.compressMCPubKey(publicKey))); + hash = keccak256(Utils.slice(publicKey, 3, 64)); + keepers[i] = address(uint160(uint256(hash))); + } + + buff = abi.encodePacked(buff, ZeroCopySink.WriteUint16(uint16(_m))); + bytes20 nextBookKeeper = ripemd160(abi.encodePacked(sha256(buff))); + return (nextBookKeeper, keepers); + } + + /* @notice Verify public key derived from Poly chain + * @param _pubKeyList serialized consensus node public key list + * @param _sigList consensus node signature list + * @return return two element: next book keeper, consensus node signer addresses + */ + function verifyPubkey(bytes memory _pubKeyList) internal pure returns (bytes20, address[] memory) { + require(_pubKeyList.length % POLYCHAIN_PUBKEY_LEN == 0, "_pubKeyList length illegal!"); + uint n = _pubKeyList.length / POLYCHAIN_PUBKEY_LEN; + require(n >= 1, "too short _pubKeyList!"); + return _getBookKeeper(n, n - (n - 1) / 3, _pubKeyList); + } + + /* @notice Verify Poly chain consensus node signature + * @param _rawHeader Poly chain block header raw bytes + * @param _sigList consensus node signature list + * @param _keepers addresses corresponding with Poly chain book keepers' public keys + * @param _m minimum signature number + * @return true or false + */ + function verifySig(bytes memory _rawHeader, bytes memory _sigList, address[] memory _keepers, uint _m) internal pure returns (bool){ + bytes32 hash = getHeaderHash(_rawHeader); + + uint sigCount = _sigList.length / POLYCHAIN_SIGNATURE_LEN; + address[] memory signers = new address[](sigCount); + bytes32 r; + bytes32 s; + uint8 v; + for(uint j = 0; j < sigCount; j++){ + r = Utils.bytesToBytes32(Utils.slice(_sigList, j*POLYCHAIN_SIGNATURE_LEN, 32)); + s = Utils.bytesToBytes32(Utils.slice(_sigList, j*POLYCHAIN_SIGNATURE_LEN + 32, 32)); + v = uint8(_sigList[j*POLYCHAIN_SIGNATURE_LEN + 64]) + 27; + signers[j] = ecrecover(sha256(abi.encodePacked(hash)), v, r, s); + } + return Utils.containMAddresses(_keepers, signers, _m); + } + + + /* @notice Serialize Poly chain book keepers' info in Ethereum addresses format into raw bytes + * @param keepersBytes The serialized addresses + * @return serialized bytes result + */ + function serializeKeepers(address[] memory keepers) internal pure returns (bytes memory) { + uint256 keeperLen = keepers.length; + bytes memory keepersBytes = ZeroCopySink.WriteUint64(uint64(keeperLen)); + for(uint i = 0; i < keeperLen; i++) { + keepersBytes = abi.encodePacked(keepersBytes, ZeroCopySink.WriteVarBytes(Utils.addressToBytes(keepers[i]))); + } + return keepersBytes; + } + + /* @notice Deserialize bytes into Ethereum addresses + * @param keepersBytes The serialized addresses derived from Poly chain book keepers in bytes format + * @return addresses + */ + function deserializeKeepers(bytes memory keepersBytes) internal pure returns (address[] memory) { + uint256 off = 0; + uint64 keeperLen; + (keeperLen, off) = ZeroCopySource.NextUint64(keepersBytes, off); + address[] memory keepers = new address[](keeperLen); + bytes memory keeperBytes; + for(uint i = 0; i < keeperLen; i++) { + (keeperBytes, off) = ZeroCopySource.NextVarBytes(keepersBytes, off); + keepers[i] = Utils.bytesToAddress(keeperBytes); + } + return keepers; + } + + /* @notice Deserialize Poly chain transaction raw value + * @param _valueBs Poly chain transaction raw bytes + * @return ToMerkleValue struct + */ + function deserializeMerkleValue(bytes memory _valueBs) internal pure returns (ToMerkleValue memory) { + ToMerkleValue memory toMerkleValue; + uint256 off = 0; + + (toMerkleValue.txHash, off) = ZeroCopySource.NextVarBytes(_valueBs, off); + + (toMerkleValue.fromChainID, off) = ZeroCopySource.NextUint64(_valueBs, off); + + TxParam memory txParam; + + (txParam.txHash, off) = ZeroCopySource.NextVarBytes(_valueBs, off); + + (txParam.crossChainId, off) = ZeroCopySource.NextVarBytes(_valueBs, off); + + (txParam.fromContract, off) = ZeroCopySource.NextVarBytes(_valueBs, off); + + (txParam.toChainId, off) = ZeroCopySource.NextUint64(_valueBs, off); + + (txParam.toContract, off) = ZeroCopySource.NextVarBytes(_valueBs, off); + + (txParam.method, off) = ZeroCopySource.NextVarBytes(_valueBs, off); + + (txParam.args, off) = ZeroCopySource.NextVarBytes(_valueBs, off); + toMerkleValue.makeTxParam = txParam; + + return toMerkleValue; + } + + /* @notice Deserialize Poly chain block header raw bytes + * @param _valueBs Poly chain block header raw bytes + * @return Header struct + */ + function deserializeHeader(bytes memory _headerBs) internal pure returns (Header memory) { + Header memory header; + uint256 off = 0; + (header.version, off) = ZeroCopySource.NextUint32(_headerBs, off); + + (header.chainId, off) = ZeroCopySource.NextUint64(_headerBs, off); + + (header.prevBlockHash, off) = ZeroCopySource.NextHash(_headerBs, off); + + (header.transactionsRoot, off) = ZeroCopySource.NextHash(_headerBs, off); + + (header.crossStatesRoot, off) = ZeroCopySource.NextHash(_headerBs, off); + + (header.blockRoot, off) = ZeroCopySource.NextHash(_headerBs, off); + + (header.timestamp, off) = ZeroCopySource.NextUint32(_headerBs, off); + + (header.height, off) = ZeroCopySource.NextUint32(_headerBs, off); + + (header.consensusData, off) = ZeroCopySource.NextUint64(_headerBs, off); + + (header.consensusPayload, off) = ZeroCopySource.NextVarBytes(_headerBs, off); + + (header.nextBookkeeper, off) = ZeroCopySource.NextBytes20(_headerBs, off); + + return header; + } + + /* @notice Deserialize Poly chain block header raw bytes + * @param rawHeader Poly chain block header raw bytes + * @return header hash same as Poly chain + */ + function getHeaderHash(bytes memory rawHeader) internal pure returns (bytes32) { + return sha256(abi.encodePacked(sha256(rawHeader))); + } +} \ No newline at end of file diff --git a/contracts_v0.4/core/cross_chain_manager/logic/EthCrossChainManager.sol b/contracts_v0.4/core/cross_chain_manager/logic/EthCrossChainManager.sol new file mode 100644 index 0000000..3d284c4 --- /dev/null +++ b/contracts_v0.4/core/cross_chain_manager/logic/EthCrossChainManager.sol @@ -0,0 +1,194 @@ +pragma solidity ^0.4.25; + +import "./../../../libs/math/SafeMath.sol"; +import "./../../../libs/common/ZeroCopySource.sol"; +import "./../../../libs/common/ZeroCopySink.sol"; +import "./../../../libs/utils/Utils.sol"; +import "./../upgrade/UpgradableECCM.sol"; +import "./../libs/EthCrossChainUtils.sol"; +import "./../interface/IEthCrossChainManager.sol"; +import "./../interface/IEthCrossChainData.sol"; + +contract EthCrossChainManager is IEthCrossChainManager, UpgradableECCM { + using SafeMath for uint256; + + event InitGenesisBlockEvent(uint256 height, bytes rawHeader); + event ChangeBookKeeperEvent(uint256 height, bytes rawHeader); + event CrossChainEvent(address indexed sender, bytes txId, address proxyOrAssetContract, uint64 toChainId, bytes toContract, bytes rawdata); + event VerifyHeaderAndExecuteTxEvent(uint64 fromChainID, bytes toContract, bytes crossChainTxHash, bytes fromChainTxHash); + + constructor(address _eccd, uint64 _chainId) UpgradableECCM(_eccd, _chainId) public {} + + /* @notice sync Poly chain genesis block header to smart contrat + * @dev this function can only be called once, nextbookkeeper of rawHeader can't be empty + * @param rawHeader Poly chain genesis block raw header or raw Header including switching consensus peers info + * @return true or false + */ + function initGenesisBlock(bytes memory rawHeader, bytes memory pubKeyList) whenNotPaused public returns(bool) { + // Load Ethereum cross chain data contract + IEthCrossChainData eccd = IEthCrossChainData(EthCrossChainDataAddress); + + // Make sure the contract has not been initialized before + require(eccd.getCurEpochConPubKeyBytes().length == 0, "EthCrossChainData contract has already been initialized!"); + + // Parse header and convit the public keys into nextBookKeeper and compare it with header.nextBookKeeper to verify the validity of signature + ECCUtils.Header memory header = ECCUtils.deserializeHeader(rawHeader); + (bytes20 nextBookKeeper, address[] memory keepers) = ECCUtils.verifyPubkey(pubKeyList); + require(header.nextBookkeeper == nextBookKeeper, "NextBookers illegal"); + + // Record current epoch start height and public keys (by storing them in address format) + require(eccd.putCurEpochStartHeight(header.height), "Save Poly chain current epoch start height to Data contract failed!"); + require(eccd.putCurEpochConPubKeyBytes(ECCUtils.serializeKeepers(keepers)), "Save Poly chain current epoch book keepers to Data contract failed!"); + + // Fire the event + emit InitGenesisBlockEvent(header.height, rawHeader); + return true; + } + + /* @notice change Poly chain consensus book keeper + * @param rawHeader Poly chain change book keeper block raw header + * @param pubKeyList Poly chain consensus nodes public key list + * @param sigList Poly chain consensus nodes signature list + * @return true or false + */ + function changeBookKeeper(bytes memory rawHeader, bytes memory pubKeyList, bytes memory sigList) whenNotPaused public returns(bool) { + // Load Ethereum cross chain data contract + ECCUtils.Header memory header = ECCUtils.deserializeHeader(rawHeader); + IEthCrossChainData eccd = IEthCrossChainData(EthCrossChainDataAddress); + + // Make sure rawHeader.height is higher than recorded current epoch start height + uint64 curEpochStartHeight = eccd.getCurEpochStartHeight(); + require(header.height > curEpochStartHeight, "The height of header is lower than current epoch start height!"); + + // Ensure the rawHeader is the key header including info of switching consensus peers by containing non-empty nextBookKeeper field + require(header.nextBookkeeper != bytes20(0), "The nextBookKeeper of header is empty"); + + // Verify signature of rawHeader comes from pubKeyList + address[] memory polyChainBKs = ECCUtils.deserializeKeepers(eccd.getCurEpochConPubKeyBytes()); + uint n = polyChainBKs.length; + require(ECCUtils.verifySig(rawHeader, sigList, polyChainBKs, n - (n - 1) / 3), "Verify signature failed!"); + + // Convert pubKeyList into ethereum address format and make sure the compound address from the converted ethereum addresses + // equals passed in header.nextBooker + (bytes20 nextBookKeeper, address[] memory keepers) = ECCUtils.verifyPubkey(pubKeyList); + require(header.nextBookkeeper == nextBookKeeper, "NextBookers illegal"); + + // update current epoch start height of Poly chain and current epoch consensus peers book keepers addresses + require(eccd.putCurEpochStartHeight(header.height), "Save MC LatestHeight to Data contract failed!"); + require(eccd.putCurEpochConPubKeyBytes(ECCUtils.serializeKeepers(keepers)), "Save Poly chain book keepers bytes to Data contract failed!"); + + // Fire the change book keeper event + emit ChangeBookKeeperEvent(header.height, rawHeader); + return true; + } + + + /* @notice ERC20 token cross chain to other blockchain. + * this function push tx event to blockchain + * @param toChainId Target chain id + * @param toContract Target smart contract address in target block chain + * @param txData Transaction data for target chain, include to_address, amount + * @return true or false + */ + function crossChain(uint64 toChainId, bytes toContract, bytes method, bytes txData) whenNotPaused external returns (bool) { + // Load Ethereum cross chain data contract + IEthCrossChainData eccd = IEthCrossChainData(EthCrossChainDataAddress); + + // To help differentiate two txs, the ethTxHashIndex is increasing automatically + uint256 txHashIndex = eccd.getEthTxHashIndex(); + + // Convert the uint256 into bytes + bytes memory paramTxHash = Utils.uint256ToBytes(txHashIndex); + + // Construct the makeTxParam, and put the hash info storage, to help provide proof of tx existence + bytes memory rawParam = abi.encodePacked(ZeroCopySink.WriteVarBytes(paramTxHash), + ZeroCopySink.WriteVarBytes(abi.encodePacked(sha256(abi.encodePacked(address(this), paramTxHash)))), + ZeroCopySink.WriteVarBytes(Utils.addressToBytes(msg.sender)), + ZeroCopySink.WriteUint64(toChainId), + ZeroCopySink.WriteVarBytes(toContract), + ZeroCopySink.WriteVarBytes(method), + ZeroCopySink.WriteVarBytes(txData) + ); + + // Must save it in the storage to be included in the proof to be verified. + require(eccd.putEthTxHash(keccak256(rawParam)), "Save ethTxHash by index to Data contract failed!"); + + // Fire the cross chain event denoting there is a cross chain request from Ethereum network to other public chains through Poly chain network + emit CrossChainEvent(tx.origin, paramTxHash, msg.sender, toChainId, toContract, rawParam); + return true; + } + /* @notice Verify Poly chain header and proof, execute the cross chain tx from Poly chain to Ethereum + * @param proof Poly chain tx merkle proof + * @param rawHeader The header containing crossStateRoot to verify the above tx merkle proof + * @param headerProof The header merkle proof used to verify rawHeader + * @param curRawHeader Any header in current epoch consensus of Poly chain + * @param headerSig The coverted signature veriable for solidity derived from Poly chain consensus nodes' signature + * used to verify the validity of curRawHeader + * @return true or false + */ + function verifyHeaderAndExecuteTx(bytes memory proof, bytes memory rawHeader, bytes memory headerProof, bytes memory curRawHeader,bytes memory headerSig) whenNotPaused public returns (bool){ + ECCUtils.Header memory header = ECCUtils.deserializeHeader(rawHeader); + // Load ehereum cross chain data contract + IEthCrossChainData eccd = IEthCrossChainData(EthCrossChainDataAddress); + + // Get stored consensus public key bytes of current poly chain epoch and deserialize Poly chain consensus public key bytes to address[] + address[] memory polyChainBKs = ECCUtils.deserializeKeepers(eccd.getCurEpochConPubKeyBytes()); + + uint256 curEpochStartHeight = eccd.getCurEpochStartHeight(); + + uint n = polyChainBKs.length; + if (header.height >= curEpochStartHeight) { + // It's enough to verify rawHeader signature + require(ECCUtils.verifySig(rawHeader, headerSig, polyChainBKs, n - ( n - 1) / 3), "Verify poly chain header signature failed!"); + } else { + // We need to verify the signature of curHeader + require(ECCUtils.verifySig(curRawHeader, headerSig, polyChainBKs, n - ( n - 1) / 3), "Verify poly chain current epoch header signature failed!"); + + // Then use curHeader.StateRoot and headerProof to verify rawHeader.CrossStateRoot + ECCUtils.Header memory curHeader = ECCUtils.deserializeHeader(curRawHeader); + require(ECCUtils.getHeaderHash(rawHeader) == Utils.bytesToBytes32(ECCUtils.merkleProve(headerProof, curHeader.blockRoot)), "verify header proof failed!"); + } + + // Through rawHeader.CrossStatesRoot, the toMerkleValue or cross chain msg can be verified and parsed from proof + bytes memory toMerkleValueBs = ECCUtils.merkleProve(proof, header.crossStatesRoot); + + // Parse the toMerkleValue struct and make sure the tx has not been processed, then mark this tx as processed + ECCUtils.ToMerkleValue memory toMerkleValue = ECCUtils.deserializeMerkleValue(toMerkleValueBs); + require(!eccd.checkIfFromChainTxExist(toMerkleValue.fromChainID, Utils.bytesToBytes32(toMerkleValue.txHash)), "the transaction has been executed!"); + require(eccd.markFromChainTxExist(toMerkleValue.fromChainID, Utils.bytesToBytes32(toMerkleValue.txHash)), "Save crosschain tx exist failed!"); + + // Ethereum ChainId is 2, we need to check the transaction is for Ethereum network + require(toMerkleValue.makeTxParam.toChainId == chainId, "This Tx is not aiming at Ethereum network!"); + + // Obtain the targeting contract, so that Ethereum cross chain manager contract can trigger the executation of cross chain tx on Ethereum side + address toContract = Utils.bytesToAddress(toMerkleValue.makeTxParam.toContract); + + //TODO: check this part to make sure we commit the next line when doing local net UT test + require(_executeCrossChainTx(toContract, toMerkleValue.makeTxParam.method, toMerkleValue.makeTxParam.args, toMerkleValue.makeTxParam.fromContract, toMerkleValue.fromChainID), "Execute CrossChain Tx failed!"); + + // Fire the cross chain event denoting the executation of cross chain tx is successful, + // and this tx is coming from other public chains to current Ethereum network + emit VerifyHeaderAndExecuteTxEvent(toMerkleValue.fromChainID, toMerkleValue.makeTxParam.toContract, toMerkleValue.txHash, toMerkleValue.makeTxParam.txHash); + + return true; + } + + /* @notice Dynamically invoke the targeting contract, and trigger executation of cross chain tx on Ethereum side + * @param _toContract The targeting contract that will be invoked by the Ethereum Cross Chain Manager contract + * @param _method At which method will be invoked within the targeting contract + * @param _args The parameter that will be passed into the targeting contract + * @param _fromContractAddr From chain smart contract address + * @param _fromChainId Indicate from which chain current cross chain tx comes + * @return true or false + */ + function _executeCrossChainTx(address _toContract, bytes memory _method, bytes memory _args, bytes memory _fromContractAddr, uint64 _fromChainId) internal returns (bool){ + // Ensure the targeting contract gonna be invoked is indeed a contract rather than a normal account address + require(Utils.isContract(_toContract), "The passed in address is not a contract!"); + + // The returnData will be bytes32, the last byte must be 01; + // Ensure the executation is successful + require(_toContract.call(abi.encodePacked(bytes4(keccak256(abi.encodePacked(_method, "(bytes,bytes,uint64)"))), abi.encode(_args, _fromContractAddr, _fromChainId))), "EthCrossChain call business contract failed"); + + return true; + } +} \ No newline at end of file diff --git a/contracts_v0.4/core/cross_chain_manager/upgrade/EthCrossChainManagerProxy.sol b/contracts_v0.4/core/cross_chain_manager/upgrade/EthCrossChainManagerProxy.sol new file mode 100644 index 0000000..cb0d6eb --- /dev/null +++ b/contracts_v0.4/core/cross_chain_manager/upgrade/EthCrossChainManagerProxy.sol @@ -0,0 +1,58 @@ +pragma solidity >=0.4.25 <=0.5.17; +import "./../../../libs/ownership/Ownable.sol"; +import "./../../../libs/lifecycle/Pausable.sol"; +import "./../interface/IUpgradableECCM.sol"; +import "./../interface/IEthCrossChainManagerProxy.sol"; + +contract EthCrossChainManagerProxy is IEthCrossChainManagerProxy, Ownable, Pausable { + address private EthCrossChainManagerAddr_; + + constructor(address _ethCrossChainManagerAddr) public { + EthCrossChainManagerAddr_ = _ethCrossChainManagerAddr; + } + + function pause() onlyOwner public returns (bool) { + if (paused()) { + return true; + } + _pause(); + return true; + } + function unpause() onlyOwner public returns (bool) { + if (!paused()) { + return true; + } + _unpause(); + return true; + } + function pauseEthCrossChainManager() onlyOwner whenNotPaused public returns (bool) { + IUpgradableECCM eccm = IUpgradableECCM(EthCrossChainManagerAddr_); + require(pause(), "pause EthCrossChainManagerProxy contract failed!"); + require(eccm.pause(), "pause EthCrossChainManager contract failed!"); + } + function upgradeEthCrossChainManager(address _newEthCrossChainManagerAddr) onlyOwner whenPaused public returns (bool) { + IUpgradableECCM eccm = IUpgradableECCM(EthCrossChainManagerAddr_); + if (!eccm.paused()) { + require(eccm.pause(), "Pause old EthCrossChainManager contract failed!"); + } + require(eccm.upgradeToNew(_newEthCrossChainManagerAddr), "EthCrossChainManager upgradeToNew failed!"); + IUpgradableECCM neweccm = IUpgradableECCM(_newEthCrossChainManagerAddr); + require(neweccm.isOwner(), "EthCrossChainManagerProxy is not owner of new EthCrossChainManager contract"); + EthCrossChainManagerAddr_ = _newEthCrossChainManagerAddr; + } + function unpauseEthCrossChainManager() onlyOwner whenPaused public returns (bool) { + IUpgradableECCM eccm = IUpgradableECCM(EthCrossChainManagerAddr_); + require(eccm.unpause(), "unpause EthCrossChainManager contract failed!"); + require(unpause(), "unpause EthCrossChainManagerProxy contract failed!"); + } + function getEthCrossChainManager() whenNotPaused public view returns (address) { + return EthCrossChainManagerAddr_; + } + function changeManagerChainID(uint64 _newChainId) onlyOwner whenPaused public { + IUpgradableECCM eccm = IUpgradableECCM(EthCrossChainManagerAddr_); + if (!eccm.paused()) { + require(eccm.pause(), "Pause old EthCrossChainManager contract failed!"); + } + require(eccm.setChainId(_newChainId), "set chain ID failed. "); + } +} \ No newline at end of file diff --git a/contracts_v0.4/core/cross_chain_manager/upgrade/UpgradableECCM.sol b/contracts_v0.4/core/cross_chain_manager/upgrade/UpgradableECCM.sol new file mode 100644 index 0000000..20e2840 --- /dev/null +++ b/contracts_v0.4/core/cross_chain_manager/upgrade/UpgradableECCM.sol @@ -0,0 +1,49 @@ +pragma solidity ^0.4.25; + +import "./../interface/IEthCrossChainData.sol"; +import "./../interface/IUpgradableECCM.sol"; +import "./../../../libs/lifecycle/Pausable.sol"; +import "./../../../libs/ownership/Ownable.sol"; + +contract UpgradableECCM is IUpgradableECCM, Ownable, Pausable { + address public EthCrossChainDataAddress; + uint64 public chainId; + + constructor (address ethCrossChainDataAddr, uint64 _chainId) Pausable() Ownable() public { + EthCrossChainDataAddress = ethCrossChainDataAddr; + chainId = _chainId; + } + function pause() onlyOwner public returns (bool) { + if (!paused()) { + _pause(); + } + IEthCrossChainData eccd = IEthCrossChainData(EthCrossChainDataAddress); + if (!eccd.paused()) { + require(eccd.pause(), "pause EthCrossChainData contract failed"); + } + return true; + } + + function unpause() onlyOwner public returns (bool) { + if (paused()) { + _unpause(); + } + IEthCrossChainData eccd = IEthCrossChainData(EthCrossChainDataAddress); + if (eccd.paused()) { + require(eccd.unpause(), "unpause EthCrossChainData contract failed"); + } + return true; + } + + // if we want to upgrade this contract, we need to invoke this method + function upgradeToNew(address newEthCrossChainManagerAddress) whenPaused onlyOwner public returns (bool) { + IEthCrossChainData eccd = IEthCrossChainData(EthCrossChainDataAddress); + eccd.transferOwnership(newEthCrossChainManagerAddress); + return true; + } + + function setChainId(uint64 _newChainId) whenPaused onlyOwner public returns (bool) { + chainId = _newChainId; + return true; + } +} \ No newline at end of file diff --git a/contracts_v0.4/libs/GSN/Context.sol b/contracts_v0.4/libs/GSN/Context.sol new file mode 100644 index 0000000..5d6f49a --- /dev/null +++ b/contracts_v0.4/libs/GSN/Context.sol @@ -0,0 +1,28 @@ +pragma solidity >=0.4.25; + +/* + * @dev Provides information about the current execution context, including the + * sender of the transaction and its data. While these are generally available + * via msg.sender and msg.data, they should not be accessed in such a direct + * manner, since when dealing with GSN meta-transactions the account sending and + * paying for execution may not be the actual sender (as far as an application + * is concerned). + * + * This contract is only required for intermediate, library-like contracts. + * Refer from https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/GSN/Context.sol + */ +contract Context { + // Empty internal constructor, to prevent people from mistakenly deploying + // an instance of this contract, which should be used via inheritance. + constructor () internal { } + // solhint-disable-previous-line no-empty-blocks + + function _msgSender() internal view returns (address) { + return msg.sender; + } + + function _msgData() internal view returns (bytes memory) { + this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 + return msg.data; + } +} diff --git a/contracts_v0.4/libs/common/ZeroCopySink.sol b/contracts_v0.4/libs/common/ZeroCopySink.sol new file mode 100644 index 0000000..4ead2a0 --- /dev/null +++ b/contracts_v0.4/libs/common/ZeroCopySink.sol @@ -0,0 +1,211 @@ +pragma solidity >=0.4.25; + +/** + * @dev Wrappers over encoding and serialization operation into bytes from bassic types in Solidity for PolyNetwork cross chain utility. + * + * Encode basic types in Solidity into bytes easily. It's designed to be used + * for PolyNetwork cross chain application, and the encoding rules on Ethereum chain + * and the decoding rules on other chains should be consistent. Here we + * follow the underlying serialization rule with implementation found here: + * https://github.com/polynetwork/poly/blob/master/common/zero_copy_sink.go + * + * Using this library instead of the unchecked serialization method can help reduce + * the risk of serious bugs and handfule, so it's recommended to use it. + * + * Please note that risk can be minimized, yet not eliminated. + */ +library ZeroCopySink { + /* @notice Convert boolean value into bytes + * @param b The boolean value + * @return Converted bytes array + */ + function WriteBool(bool b) internal pure returns (bytes memory) { + bytes memory buff; + assembly{ + buff := mload(0x40) + mstore(buff, 1) + switch iszero(b) + case 1 { + mstore(add(buff, 0x20), shl(248, 0x00)) + // mstore8(add(buff, 0x20), 0x00) + } + default { + mstore(add(buff, 0x20), shl(248, 0x01)) + // mstore8(add(buff, 0x20), 0x01) + } + mstore(0x40, add(buff, 0x21)) + } + return buff; + } + + /* @notice Convert byte value into bytes + * @param b The byte value + * @return Converted bytes array + */ + function WriteByte(byte b) internal pure returns (bytes memory) { + return WriteUint8(uint8(b)); + } + + /* @notice Convert uint8 value into bytes + * @param v The uint8 value + * @return Converted bytes array + */ + function WriteUint8(uint8 v) internal pure returns (bytes memory) { + bytes memory buff; + assembly{ + buff := mload(0x40) + mstore(buff, 1) + mstore(add(buff, 0x20), shl(248, v)) + // mstore(add(buff, 0x20), byte(0x1f, v)) + mstore(0x40, add(buff, 0x21)) + } + return buff; + } + + /* @notice Convert uint16 value into bytes + * @param v The uint16 value + * @return Converted bytes array + */ + function WriteUint16(uint16 v) internal pure returns (bytes memory) { + bytes memory buff; + + assembly{ + buff := mload(0x40) + let byteLen := 0x02 + mstore(buff, byteLen) + for { + let mindex := 0x00 + let vindex := 0x1f + } lt(mindex, byteLen) { + mindex := add(mindex, 0x01) + vindex := sub(vindex, 0x01) + }{ + mstore8(add(add(buff, 0x20), mindex), byte(vindex, v)) + } + mstore(0x40, add(buff, 0x22)) + } + return buff; + } + + /* @notice Convert uint32 value into bytes + * @param v The uint32 value + * @return Converted bytes array + */ + function WriteUint32(uint32 v) internal pure returns(bytes memory) { + bytes memory buff; + assembly{ + buff := mload(0x40) + let byteLen := 0x04 + mstore(buff, byteLen) + for { + let mindex := 0x00 + let vindex := 0x1f + } lt(mindex, byteLen) { + mindex := add(mindex, 0x01) + vindex := sub(vindex, 0x01) + }{ + mstore8(add(add(buff, 0x20), mindex), byte(vindex, v)) + } + mstore(0x40, add(buff, 0x24)) + } + return buff; + } + + /* @notice Convert uint64 value into bytes + * @param v The uint64 value + * @return Converted bytes array + */ + function WriteUint64(uint64 v) internal pure returns(bytes memory) { + bytes memory buff; + + assembly{ + buff := mload(0x40) + let byteLen := 0x08 + mstore(buff, byteLen) + for { + let mindex := 0x00 + let vindex := 0x1f + } lt(mindex, byteLen) { + mindex := add(mindex, 0x01) + vindex := sub(vindex, 0x01) + }{ + mstore8(add(add(buff, 0x20), mindex), byte(vindex, v)) + } + mstore(0x40, add(buff, 0x28)) + } + return buff; + } + + /* @notice Convert limited uint256 value into bytes + * @param v The uint256 value + * @return Converted bytes array + */ + function WriteUint255(uint256 v) internal pure returns (bytes memory) { + require(v <= 0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff, "Value exceeds uint255 range"); + bytes memory buff; + + assembly{ + buff := mload(0x40) + let byteLen := 0x20 + mstore(buff, byteLen) + for { + let mindex := 0x00 + let vindex := 0x1f + } lt(mindex, byteLen) { + mindex := add(mindex, 0x01) + vindex := sub(vindex, 0x01) + }{ + mstore8(add(add(buff, 0x20), mindex), byte(vindex, v)) + } + mstore(0x40, add(buff, 0x40)) + } + return buff; + } + + /* @notice Convert limited uint256 value into bytes + * @param v The uint256 value + * @return Converted bytes array + */ + function WriteUint256(uint256 v) internal pure returns (bytes memory) { + require(v <= uint256(-1), "Value exceeds uint256 range"); + bytes memory buff; + + assembly{ + buff := mload(0x40) + let byteLen := 0x20 + mstore(buff, byteLen) + for { + let mindex := 0x00 + let vindex := 0x1f + } lt(mindex, byteLen) { + mindex := add(mindex, 0x01) + vindex := sub(vindex, 0x01) + }{ + mstore8(add(add(buff, 0x20), mindex), byte(vindex, v)) + } + mstore(0x40, add(buff, 0x40)) + } + return buff; + } + + /* @notice Encode bytes format data into bytes + * @param data The bytes array data + * @return Encoded bytes array + */ + function WriteVarBytes(bytes memory data) internal pure returns (bytes memory) { + uint64 l = uint64(data.length); + return abi.encodePacked(WriteVarUint(l), data); + } + + function WriteVarUint(uint64 v) internal pure returns (bytes memory) { + if (v < 0xFD){ + return WriteUint8(uint8(v)); + } else if (v <= 0xFFFF) { + return abi.encodePacked(WriteByte(0xFD), WriteUint16(uint16(v))); + } else if (v <= 0xFFFFFFFF) { + return abi.encodePacked(WriteByte(0xFE), WriteUint32(uint32(v))); + } else { + return abi.encodePacked(WriteByte(0xFF), WriteUint64(uint64(v))); + } + } +} \ No newline at end of file diff --git a/contracts_v0.4/libs/common/ZeroCopySource.sol b/contracts_v0.4/libs/common/ZeroCopySource.sol new file mode 100644 index 0000000..141d1cc --- /dev/null +++ b/contracts_v0.4/libs/common/ZeroCopySource.sol @@ -0,0 +1,317 @@ +pragma solidity >=0.4.25; + +/** + * @dev Wrappers over decoding and deserialization operation from bytes into bassic types in Solidity for PolyNetwork cross chain utility. + * + * Decode into basic types in Solidity from bytes easily. It's designed to be used + * for PolyNetwork cross chain application, and the decoding rules on Ethereum chain + * and the encoding rule on other chains should be consistent, and . Here we + * follow the underlying deserialization rule with implementation found here: + * https://github.com/polynetwork/poly/blob/master/common/zero_copy_source.go + * + * Using this library instead of the unchecked serialization method can help reduce + * the risk of serious bugs and handfule, so it's recommended to use it. + * + * Please note that risk can be minimized, yet not eliminated. + */ +library ZeroCopySource { + /* @notice Read next byte as boolean type starting at offset from buff + * @param buff Source bytes array + * @param offset The position from where we read the boolean value + * @return The the read boolean value and new offset + */ + function NextBool(bytes memory buff, uint256 offset) internal pure returns(bool, uint256) { + require(offset + 1 <= buff.length && offset < offset + 1, "Offset exceeds limit"); + // byte === bytes1 + byte v; + assembly{ + v := mload(add(add(buff, 0x20), offset)) + } + bool value; + if (v == 0x01) { + value = true; + } else if (v == 0x00) { + value = false; + } else { + revert("NextBool value error"); + } + return (value, offset + 1); + } + + /* @notice Read next byte starting at offset from buff + * @param buff Source bytes array + * @param offset The position from where we read the byte value + * @return The read byte value and new offset + */ + function NextByte(bytes memory buff, uint256 offset) internal pure returns (byte, uint256) { + require(offset + 1 <= buff.length && offset < offset + 1, "NextByte, Offset exceeds maximum"); + byte v; + assembly{ + v := mload(add(add(buff, 0x20), offset)) + } + return (v, offset + 1); + } + + /* @notice Read next byte as uint8 starting at offset from buff + * @param buff Source bytes array + * @param offset The position from where we read the byte value + * @return The read uint8 value and new offset + */ + function NextUint8(bytes memory buff, uint256 offset) internal pure returns (uint8, uint256) { + require(offset + 1 <= buff.length && offset < offset + 1, "NextUint8, Offset exceeds maximum"); + uint8 v; + assembly{ + let tmpbytes := mload(0x40) + let bvalue := mload(add(add(buff, 0x20), offset)) + mstore8(tmpbytes, byte(0, bvalue)) + mstore(0x40, add(tmpbytes, 0x01)) + v := mload(sub(tmpbytes, 0x1f)) + } + return (v, offset + 1); + } + + /* @notice Read next two bytes as uint16 type starting from offset + * @param buff Source bytes array + * @param offset The position from where we read the uint16 value + * @return The read uint16 value and updated offset + */ + function NextUint16(bytes memory buff, uint256 offset) internal pure returns (uint16, uint256) { + require(offset + 2 <= buff.length && offset < offset + 2, "NextUint16, offset exceeds maximum"); + + uint16 v; + assembly { + let tmpbytes := mload(0x40) + let bvalue := mload(add(add(buff, 0x20), offset)) + mstore8(tmpbytes, byte(0x01, bvalue)) + mstore8(add(tmpbytes, 0x01), byte(0, bvalue)) + mstore(0x40, add(tmpbytes, 0x02)) + v := mload(sub(tmpbytes, 0x1e)) + } + return (v, offset + 2); + } + + + /* @notice Read next four bytes as uint32 type starting from offset + * @param buff Source bytes array + * @param offset The position from where we read the uint32 value + * @return The read uint32 value and updated offset + */ + function NextUint32(bytes memory buff, uint256 offset) internal pure returns (uint32, uint256) { + require(offset + 4 <= buff.length && offset < offset + 4, "NextUint32, offset exceeds maximum"); + uint32 v; + assembly { + let tmpbytes := mload(0x40) + let byteLen := 0x04 + for { + let tindex := 0x00 + let bindex := sub(byteLen, 0x01) + let bvalue := mload(add(add(buff, 0x20), offset)) + } lt(tindex, byteLen) { + tindex := add(tindex, 0x01) + bindex := sub(bindex, 0x01) + }{ + mstore8(add(tmpbytes, tindex), byte(bindex, bvalue)) + } + mstore(0x40, add(tmpbytes, byteLen)) + v := mload(sub(tmpbytes, sub(0x20, byteLen))) + } + return (v, offset + 4); + } + + /* @notice Read next eight bytes as uint64 type starting from offset + * @param buff Source bytes array + * @param offset The position from where we read the uint64 value + * @return The read uint64 value and updated offset + */ + function NextUint64(bytes memory buff, uint256 offset) internal pure returns (uint64, uint256) { + require(offset + 8 <= buff.length && offset < offset + 8, "NextUint64, offset exceeds maximum"); + uint64 v; + assembly { + let tmpbytes := mload(0x40) + let byteLen := 0x08 + for { + let tindex := 0x00 + let bindex := sub(byteLen, 0x01) + let bvalue := mload(add(add(buff, 0x20), offset)) + } lt(tindex, byteLen) { + tindex := add(tindex, 0x01) + bindex := sub(bindex, 0x01) + }{ + mstore8(add(tmpbytes, tindex), byte(bindex, bvalue)) + } + mstore(0x40, add(tmpbytes, byteLen)) + v := mload(sub(tmpbytes, sub(0x20, byteLen))) + } + return (v, offset + 8); + } + + /* @notice Read next 32 bytes as uint256 type starting from offset, + there are limits considering the numerical limits in multi-chain + * @param buff Source bytes array + * @param offset The position from where we read the uint256 value + * @return The read uint256 value and updated offset + */ + function NextUint255(bytes memory buff, uint256 offset) internal pure returns (uint256, uint256) { + require(offset + 32 <= buff.length && offset < offset + 32, "NextUint255, offset exceeds maximum"); + uint256 v; + assembly { + let tmpbytes := mload(0x40) + let byteLen := 0x20 + for { + let tindex := 0x00 + let bindex := sub(byteLen, 0x01) + let bvalue := mload(add(add(buff, 0x20), offset)) + } lt(tindex, byteLen) { + tindex := add(tindex, 0x01) + bindex := sub(bindex, 0x01) + }{ + mstore8(add(tmpbytes, tindex), byte(bindex, bvalue)) + } + mstore(0x40, add(tmpbytes, byteLen)) + v := mload(tmpbytes) + } + require(v <= 0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff, "Value exceeds the range"); + return (v, offset + 32); + } + + function NextUint256(bytes memory buff, uint256 offset) internal pure returns (uint256, uint256) { + require(offset + 32 <= buff.length && offset < offset + 32, "NextUint256, offset exceeds maximum"); + uint256 v; + assembly { + let tmpbytes := mload(0x40) + let byteLen := 0x20 + for { + let tindex := 0x00 + let bindex := sub(byteLen, 0x01) + let bvalue := mload(add(add(buff, 0x20), offset)) + } lt(tindex, byteLen) { + tindex := add(tindex, 0x01) + bindex := sub(bindex, 0x01) + }{ + mstore8(add(tmpbytes, tindex), byte(bindex, bvalue)) + } + mstore(0x40, add(tmpbytes, byteLen)) + v := mload(tmpbytes) + } + require(v <= uint256(-1), "Value exceeds the range"); + return (v, offset + 32); + } + + /* @notice Read next variable bytes starting from offset, + the decoding rule coming from multi-chain + * @param buff Source bytes array + * @param offset The position from where we read the bytes value + * @return The read variable bytes array value and updated offset + */ + function NextVarBytes(bytes memory buff, uint256 offset) internal pure returns(bytes memory, uint256) { + uint len; + (len, offset) = NextVarUint(buff, offset); + require(offset + len <= buff.length && offset < offset + len, "NextVarBytes, offset exceeds maximum"); + bytes memory tempBytes; + assembly{ + switch iszero(len) + case 0 { + // Get a location of some free memory and store it in tempBytes as + // Solidity does for memory variables. + tempBytes := mload(0x40) + + // The first word of the slice result is potentially a partial + // word read from the original array. To read it, we calculate + // the length of that partial word and start copying that many + // bytes into the array. The first word we copy will start with + // data we don't care about, but the last `lengthmod` bytes will + // land at the beginning of the contents of the new array. When + // we're done copying, we overwrite the full first word with + // the actual length of the slice. + let lengthmod := and(len, 31) + + // The multiplication in the next line is necessary + // because when slicing multiples of 32 bytes (lengthmod == 0) + // the following copy loop was copying the origin's length + // and then ending prematurely not copying everything it should. + let mc := add(add(tempBytes, lengthmod), mul(0x20, iszero(lengthmod))) + let end := add(mc, len) + + for { + // The multiplication in the next line has the same exact purpose + // as the one above. + let cc := add(add(add(buff, lengthmod), mul(0x20, iszero(lengthmod))), offset) + } lt(mc, end) { + mc := add(mc, 0x20) + cc := add(cc, 0x20) + } { + mstore(mc, mload(cc)) + } + + mstore(tempBytes, len) + + //update free-memory pointer + //allocating the array padded to 32 bytes like the compiler does now + mstore(0x40, and(add(mc, 31), not(31))) + } + //if we want a zero-length slice let's just return a zero-length array + default { + tempBytes := mload(0x40) + + mstore(0x40, add(tempBytes, 0x20)) + } + } + + return (tempBytes, offset + len); + } + /* @notice Read next 32 bytes starting from offset, + * @param buff Source bytes array + * @param offset The position from where we read the bytes value + * @return The read bytes32 value and updated offset + */ + function NextHash(bytes memory buff, uint256 offset) internal pure returns (bytes32 , uint256) { + require(offset + 32 <= buff.length && offset < offset + 32, "NextHash, offset exceeds maximum"); + bytes32 v; + assembly { + v := mload(add(buff, add(offset, 0x20))) + } + return (v, offset + 32); + } + + /* @notice Read next 20 bytes starting from offset, + * @param buff Source bytes array + * @param offset The position from where we read the bytes value + * @return The read bytes20 value and updated offset + */ + function NextBytes20(bytes memory buff, uint256 offset) internal pure returns (bytes20 , uint256) { + require(offset + 20 <= buff.length && offset < offset + 20, "NextBytes20, offset exceeds maximum"); + bytes20 v; + assembly { + v := mload(add(buff, add(offset, 0x20))) + } + return (v, offset + 20); + } + + function NextVarUint(bytes memory buff, uint256 offset) internal pure returns(uint, uint256) { + byte v; + (v, offset) = NextByte(buff, offset); + + uint value; + if (v == 0xFD) { + // return NextUint16(buff, offset); + (value, offset) = NextUint16(buff, offset); + require(value >= 0xFD && value <= 0xFFFF, "NextUint16, value outside range"); + return (value, offset); + } else if (v == 0xFE) { + // return NextUint32(buff, offset); + (value, offset) = NextUint32(buff, offset); + require(value > 0xFFFF && value <= 0xFFFFFFFF, "NextVarUint, value outside range"); + return (value, offset); + } else if (v == 0xFF) { + // return NextUint64(buff, offset); + (value, offset) = NextUint64(buff, offset); + require(value > 0xFFFFFFFF, "NextVarUint, value outside range"); + return (value, offset); + } else{ + // return (uint8(v), offset); + value = uint8(v); + require(value < 0xFD, "NextVarUint, value outside range"); + return (value, offset); + } + } +} \ No newline at end of file diff --git a/contracts_v0.4/libs/lifecycle/Pausable.sol b/contracts_v0.4/libs/lifecycle/Pausable.sol new file mode 100644 index 0000000..4f07461 --- /dev/null +++ b/contracts_v0.4/libs/lifecycle/Pausable.sol @@ -0,0 +1,72 @@ +pragma solidity >=0.4.25; + +import "../GSN/Context.sol"; + +/** + * @dev Contract module which allows children to implement an emergency stop + * mechanism that can be triggered by an authorized account. + * + * This module is used through inheritance. It will make available the + * modifiers `whenNotPaused` and `whenPaused`, which can be applied to + * the functions of your contract. Note that they will not be pausable by + * simply including this module, only once the modifiers are put in place. + */ +contract Pausable is Context { + /** + * @dev Emitted when the pause is triggered by a pauser (`account`). + */ + event Paused(address account); + + /** + * @dev Emitted when the pause is lifted by a pauser (`account`). + */ + event Unpaused(address account); + + bool private _paused; + + /** + * @dev Initializes the contract in unpaused state. + */ + constructor () internal { + _paused = false; + } + + /** + * @dev Returns true if the contract is paused, and false otherwise. + */ + function paused() public view returns (bool) { + return _paused; + } + + /** + * @dev Modifier to make a function callable only when the contract is not paused. + */ + modifier whenNotPaused() { + require(!_paused, "Pausable: paused"); + _; + } + + /** + * @dev Modifier to make a function callable only when the contract is paused. + */ + modifier whenPaused() { + require(_paused, "Pausable: not paused"); + _; + } + + /** + * @dev Called to pause, triggers stopped state. + */ + function _pause() internal whenNotPaused { + _paused = true; + emit Paused(_msgSender()); + } + + /** + * @dev Called to unpause, returns to normal state. + */ + function _unpause() internal whenPaused { + _paused = false; + emit Unpaused(_msgSender()); + } +} diff --git a/contracts_v0.4/libs/math/SafeMath.sol b/contracts_v0.4/libs/math/SafeMath.sol new file mode 100644 index 0000000..49bd70e --- /dev/null +++ b/contracts_v0.4/libs/math/SafeMath.sol @@ -0,0 +1,156 @@ +pragma solidity >=0.4.25; + +/** + * @dev Wrappers over Solidity's arithmetic operations with added overflow + * checks. + * + * Arithmetic operations in Solidity wrap on overflow. This can easily result + * in bugs, because programmers usually assume that an overflow raises an + * error, which is the standard behavior in high level programming languages. + * `SafeMath` restores this intuition by reverting the transaction when an + * operation overflows. + * + * Using this library instead of the unchecked operations eliminates an entire + * class of bugs, so it's recommended to use it always. + */ +library SafeMath { + /** + * @dev Returns the addition of two unsigned integers, reverting on + * overflow. + * + * Counterpart to Solidity's `+` operator. + * + * Requirements: + * - Addition cannot overflow. + */ + function add(uint256 a, uint256 b) internal pure returns (uint256) { + uint256 c = a + b; + require(c >= a, "SafeMath: addition overflow"); + + return c; + } + + /** + * @dev Returns the subtraction of two unsigned integers, reverting on + * overflow (when the result is negative). + * + * Counterpart to Solidity's `-` operator. + * + * Requirements: + * - Subtraction cannot overflow. + */ + function sub(uint256 a, uint256 b) internal pure returns (uint256) { + return sub(a, b, "SafeMath: subtraction overflow"); + } + + /** + * @dev Returns the subtraction of two unsigned integers, reverting with custom message on + * overflow (when the result is negative). + * + * Counterpart to Solidity's `-` operator. + * + * Requirements: + * - Subtraction cannot overflow. + * + * _Available since v2.4.0._ + */ + function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { + require(b <= a, errorMessage); + uint256 c = a - b; + + return c; + } + + /** + * @dev Returns the multiplication of two unsigned integers, reverting on + * overflow. + * + * Counterpart to Solidity's `*` operator. + * + * Requirements: + * - Multiplication cannot overflow. + */ + function mul(uint256 a, uint256 b) internal pure returns (uint256) { + // Gas optimization: this is cheaper than requiring 'a' not being zero, but the + // benefit is lost if 'b' is also tested. + // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 + if (a == 0) { + return 0; + } + + uint256 c = a * b; + require(c / a == b, "SafeMath: multiplication overflow"); + + return c; + } + + /** + * @dev Returns the integer division of two unsigned integers. Reverts on + * division by zero. The result is rounded towards zero. + * + * Counterpart to Solidity's `/` operator. Note: this function uses a + * `revert` opcode (which leaves remaining gas untouched) while Solidity + * uses an invalid opcode to revert (consuming all remaining gas). + * + * Requirements: + * - The divisor cannot be zero. + */ + function div(uint256 a, uint256 b) internal pure returns (uint256) { + return div(a, b, "SafeMath: division by zero"); + } + + /** + * @dev Returns the integer division of two unsigned integers. Reverts with custom message on + * division by zero. The result is rounded towards zero. + * + * Counterpart to Solidity's `/` operator. Note: this function uses a + * `revert` opcode (which leaves remaining gas untouched) while Solidity + * uses an invalid opcode to revert (consuming all remaining gas). + * + * Requirements: + * - The divisor cannot be zero. + * + * _Available since v2.4.0._ + */ + function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { + // Solidity only automatically asserts when dividing by 0 + require(b != 0, errorMessage); + uint256 c = a / b; + // assert(a == b * c + a % b); // There is no case in which this doesn't hold + + return c; + } + + /** + * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), + * Reverts when dividing by zero. + * + * Counterpart to Solidity's `%` operator. This function uses a `revert` + * opcode (which leaves remaining gas untouched) while Solidity uses an + * invalid opcode to revert (consuming all remaining gas). + * + * Requirements: + * - The divisor cannot be zero. + */ + function mod(uint256 a, uint256 b) internal pure returns (uint256) { + return mod(a, b, "SafeMath: modulo by zero"); + } + + /** + * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), + * Reverts with custom message when dividing by zero. + * + * Counterpart to Solidity's `%` operator. This function uses a `revert` + * opcode (which leaves remaining gas untouched) while Solidity uses an + * invalid opcode to revert (consuming all remaining gas). + * + * Requirements: + * - The divisor cannot be zero. + * + * _Available since v2.4.0._ + */ + function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { + require(b != 0, errorMessage); + return a % b; + } +} diff --git a/contracts_v0.4/libs/ownership/Ownable.sol b/contracts_v0.4/libs/ownership/Ownable.sol new file mode 100644 index 0000000..21f772e --- /dev/null +++ b/contracts_v0.4/libs/ownership/Ownable.sol @@ -0,0 +1,77 @@ +pragma solidity >=0.4.25; + +import "../GSN/Context.sol"; +/** + * @dev Contract module which provides a basic access control mechanism, where + * there is an account (an owner) that can be granted exclusive access to + * specific functions. + * + * This module is used through inheritance. It will make available the modifier + * `onlyOwner`, which can be applied to your functions to restrict their use to + * the owner. + */ +contract Ownable is Context { + address private _owner; + + event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); + + /** + * @dev Initializes the contract setting the deployer as the initial owner. + */ + constructor () internal { + address msgSender = _msgSender(); + _owner = msgSender; + emit OwnershipTransferred(address(0), msgSender); + } + + /** + * @dev Returns the address of the current owner. + */ + function owner() public view returns (address) { + return _owner; + } + + /** + * @dev Throws if called by any account other than the owner. + */ + modifier onlyOwner() { + require(isOwner(), "Ownable: caller is not the owner"); + _; + } + + /** + * @dev Returns true if the caller is the current owner. + */ + function isOwner() public view returns (bool) { + return _msgSender() == _owner; + } + + /** + * @dev Leaves the contract without owner. It will not be possible to call + * `onlyOwner` functions anymore. Can only be called by the current owner. + * + * NOTE: Renouncing ownership will leave the contract without an owner, + * thereby removing any functionality that is only available to the owner. + */ + function renounceOwnership() public onlyOwner { + emit OwnershipTransferred(_owner, address(0)); + _owner = address(0); + } + + /** + * @dev Transfers ownership of the contract to a new account (`newOwner`). + * Can only be called by the current owner. + */ + function transferOwnership(address newOwner) public onlyOwner { + _transferOwnership(newOwner); + } + + /** + * @dev Transfers ownership of the contract to a new account (`newOwner`). + */ + function _transferOwnership(address newOwner) internal { + require(newOwner != address(0), "Ownable: new owner is the zero address"); + emit OwnershipTransferred(_owner, newOwner); + _owner = newOwner; + } +} diff --git a/contracts_v0.4/libs/token/ERC20/ERC20.sol b/contracts_v0.4/libs/token/ERC20/ERC20.sol new file mode 100644 index 0000000..6749260 --- /dev/null +++ b/contracts_v0.4/libs/token/ERC20/ERC20.sol @@ -0,0 +1,231 @@ +pragma solidity >=0.4.25; + +import "./../../GSN/Context.sol"; +import "./IERC20.sol"; +import "./../../math/SafeMath.sol"; + +/** + * @dev Implementation of the {IERC20} interface. + * + * This implementation is agnostic to the way tokens are created. This means + * that a supply mechanism has to be added in a derived contract using {_mint}. + * For a generic mechanism see {ERC20Mintable}. + * + * TIP: For a detailed writeup see our guide + * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How + * to implement supply mechanisms]. + * + * We have followed general OpenZeppelin guidelines: functions revert instead + * of returning `false` on failure. This behavior is nonetheless conventional + * and does not conflict with the expectations of ERC20 applications. + * + * Additionally, an {Approval} event is emitted on calls to {transferFrom}. + * This allows applications to reconstruct the allowance for all accounts just + * by listening to said events. Other implementations of the EIP may not emit + * these events, as it isn't required by the specification. + * + * Finally, the non-standard {decreaseAllowance} and {increaseAllowance} + * functions have been added to mitigate the well-known issues around setting + * allowances. See {IERC20-approve}. + * Refer from https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/ERC20.sol + */ +contract ERC20 is Context, IERC20 { + using SafeMath for uint256; + + mapping (address => uint256) private _balances; + + mapping (address => mapping (address => uint256)) private _allowances; + + uint256 private _totalSupply; + + /** + * @dev See {IERC20-totalSupply}. + */ + function totalSupply() public view returns (uint256) { + return _totalSupply; + } + + /** + * @dev See {IERC20-balanceOf}. + */ + function balanceOf(address account) public view returns (uint256) { + return _balances[account]; + } + + /** + * @dev See {IERC20-transfer}. + * + * Requirements: + * + * - `recipient` cannot be the zero address. + * - the caller must have a balance of at least `amount`. + */ + function transfer(address recipient, uint256 amount) public returns (bool) { + _transfer(_msgSender(), recipient, amount); + return true; + } + + /** + * @dev See {IERC20-allowance}. + */ + function allowance(address owner, address spender) public view returns (uint256) { + return _allowances[owner][spender]; + } + + /** + * @dev See {IERC20-approve}. + * + * Requirements: + * + * - `spender` cannot be the zero address. + */ + function approve(address spender, uint256 amount) public returns (bool) { + _approve(_msgSender(), spender, amount); + return true; + } + + /** + * @dev See {IERC20-transferFrom}. + * + * Emits an {Approval} event indicating the updated allowance. This is not + * required by the EIP. See the note at the beginning of {ERC20}; + * + * Requirements: + * - `sender` and `recipient` cannot be the zero address. + * - `sender` must have a balance of at least `amount`. + * - the caller must have allowance for `sender`'s tokens of at least + * `amount`. + */ + function transferFrom(address sender, address recipient, uint256 amount) public returns (bool) { + _transfer(sender, recipient, amount); + _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); + return true; + } + + /** + * @dev Atomically increases the allowance granted to `spender` by the caller. + * + * This is an alternative to {approve} that can be used as a mitigation for + * problems described in {IERC20-approve}. + * + * Emits an {Approval} event indicating the updated allowance. + * + * Requirements: + * + * - `spender` cannot be the zero address. + */ + function increaseAllowance(address spender, uint256 addedValue) public returns (bool) { + _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue)); + return true; + } + + /** + * @dev Atomically decreases the allowance granted to `spender` by the caller. + * + * This is an alternative to {approve} that can be used as a mitigation for + * problems described in {IERC20-approve}. + * + * Emits an {Approval} event indicating the updated allowance. + * + * Requirements: + * + * - `spender` cannot be the zero address. + * - `spender` must have allowance for the caller of at least + * `subtractedValue`. + */ + function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) { + _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, "ERC20: decreased allowance below zero")); + return true; + } + + /** + * @dev Moves tokens `amount` from `sender` to `recipient`. + * + * This is internal function is equivalent to {transfer}, and can be used to + * e.g. implement automatic token fees, slashing mechanisms, etc. + * + * Emits a {Transfer} event. + * + * Requirements: + * + * - `sender` cannot be the zero address. + * - `recipient` cannot be the zero address. + * - `sender` must have a balance of at least `amount`. + */ + function _transfer(address sender, address recipient, uint256 amount) internal { + require(sender != address(0), "ERC20: transfer from the zero address"); + require(recipient != address(0), "ERC20: transfer to the zero address"); + + _balances[sender] = _balances[sender].sub(amount, "ERC20: transfer amount exceeds balance"); + _balances[recipient] = _balances[recipient].add(amount); + emit Transfer(sender, recipient, amount); + } + + /** @dev Creates `amount` tokens and assigns them to `account`, increasing + * the total supply. + * + * Emits a {Transfer} event with `from` set to the zero address. + * + * Requirements + * + * - `to` cannot be the zero address. + */ + function _mint(address account, uint256 amount) internal { + require(account != address(0), "ERC20: mint to the zero address"); + + _totalSupply = _totalSupply.add(amount); + _balances[account] = _balances[account].add(amount); + emit Transfer(address(0), account, amount); + } + + /** + * @dev Destroys `amount` tokens from `account`, reducing the + * total supply. + * + * Emits a {Transfer} event with `to` set to the zero address. + * + * Requirements + * + * - `account` cannot be the zero address. + * - `account` must have at least `amount` tokens. + */ + function _burn(address account, uint256 amount) internal { + require(account != address(0), "ERC20: burn from the zero address"); + + _balances[account] = _balances[account].sub(amount, "ERC20: burn amount exceeds balance"); + _totalSupply = _totalSupply.sub(amount); + emit Transfer(account, address(0), amount); + } + + /** + * @dev Sets `amount` as the allowance of `spender` over the `owner`s tokens. + * + * This is internal function is equivalent to `approve`, and can be used to + * e.g. set automatic allowances for certain subsystems, etc. + * + * Emits an {Approval} event. + * + * Requirements: + * + * - `owner` cannot be the zero address. + * - `spender` cannot be the zero address. + */ + function _approve(address owner, address spender, uint256 amount) internal { + require(owner != address(0), "ERC20: approve from the zero address"); + require(spender != address(0), "ERC20: approve to the zero address"); + + _allowances[owner][spender] = amount; + emit Approval(owner, spender, amount); + } + + /** + * @dev Destroys `amount` tokens from `account`.`amount` is then deducted + * from the caller's allowance. + * + * See {_burn} and {_approve}. + */ + function _burnFrom(address account, uint256 amount) internal { + _burn(account, amount); + _approve(account, _msgSender(), _allowances[account][_msgSender()].sub(amount, "ERC20: burn amount exceeds allowance")); + } +} diff --git a/contracts_v0.4/libs/token/ERC20/ERC20Detailed.sol b/contracts_v0.4/libs/token/ERC20/ERC20Detailed.sol new file mode 100644 index 0000000..149758b --- /dev/null +++ b/contracts_v0.4/libs/token/ERC20/ERC20Detailed.sol @@ -0,0 +1,55 @@ +pragma solidity ^0.4.25; + +import "./IERC20.sol"; + +/** + * @dev Optional functions from the ERC20 standard. + * Refer from https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/ERC20Detailed.sol + */ +contract ERC20Detailed is IERC20 { + string private _name; + string private _symbol; + uint8 private _decimals; + + /** + * @dev Sets the values for `name`, `symbol`, and `decimals`. All three of + * these values are immutable: they can only be set once during + * construction. + */ + constructor (string memory name, string memory symbol, uint8 decimals) public { + _name = name; + _symbol = symbol; + _decimals = decimals; + } + + /** + * @dev Returns the name of the token. + */ + function name() public view returns (string memory) { + return _name; + } + + /** + * @dev Returns the symbol of the token, usually a shorter version of the + * name. + */ + function symbol() public view returns (string memory) { + return _symbol; + } + + /** + * @dev Returns the number of decimals used to get its user representation. + * For example, if `decimals` equals `2`, a balance of `505` tokens should + * be displayed to a user as `5,05` (`505 / 10 ** 2`). + * + * Tokens usually opt for a value of 18, imitating the relationship between + * Ether and Wei. + * + * NOTE: This information is only used for _display_ purposes: it in + * no way affects any of the arithmetic of the contract, including + * {IERC20-balanceOf} and {IERC20-transfer}. + */ + function decimals() public view returns (uint8) { + return _decimals; + } +} diff --git a/contracts_v0.4/libs/token/ERC20/ERC20Extended.sol b/contracts_v0.4/libs/token/ERC20/ERC20Extended.sol new file mode 100644 index 0000000..d5c4ae7 --- /dev/null +++ b/contracts_v0.4/libs/token/ERC20/ERC20Extended.sol @@ -0,0 +1,65 @@ +pragma solidity ^0.4.25; + +import "./ERC20Detailed.sol"; +import "./../../GSN/Context.sol"; +import "./ERC20.sol"; +import "./../../../core/cross_chain_manager/interface/IEthCrossChainManagerProxy.sol"; + +contract ERC20Extended is Context, ERC20, ERC20Detailed { + + address public managerProxyContract; // here managerContract should only be set as the ETH cross chain managing contract address + address public operator; // operator should be the address who deploys this contract, and responsible for 'setManager' and 'bindContractAddrWithChainId' + mapping(uint64 => bytes) public bondAssetHashes; + + event BindAssetHash(uint64 chainId, bytes contractAddr); + event SetManagerProxyEvent(address managerContract); + + + modifier onlyManagerContract() { + IEthCrossChainManagerProxy ieccmp = IEthCrossChainManagerProxy(managerProxyContract); + require(_msgSender() == ieccmp.getEthCrossChainManager(), "msgSender is not EthCrossChainManagerContract"); + _; + } + + modifier onlyOperator() { + require(_msgSender() == operator) ; + _; + } + + /* @notice Mint amount of tokens to the account + * @param account The account which will receive the minted tokens + * @param amount The amount of tokens to be minted + */ + function mint(address account, uint256 amount) public onlyManagerContract returns (bool) { + _mint(account, amount); + return true; + } + + /* @notice Burn amount of tokens from the msg.sender's balance + * @param amount The amount of tokens to be burnt + */ + function burn(uint256 amount) public returns (bool) { + _burn(_msgSender(), amount); + return true; + } + + /* @notice Set the ETH cross chain contract as the manager such that the ETH cross chain contract + * will be able to mint tokens to the designated account after a certain amount of tokens + * are locked in the source chain + * @param ethCrossChainContractAddr The ETH cross chain management contract address + */ + function setManagerProxy(address ethCrossChainManagerProxyAddr) onlyOperator public { + managerProxyContract = ethCrossChainManagerProxyAddr; + emit SetManagerProxyEvent(managerProxyContract); + } + + /* @notice Bind the target chain with the target chain id + * @param chainId The target chain id + * @param contractAddr The specific contract address in bytes format in the target chain + */ + function bindAssetHash(uint64 chainId, bytes memory contractAddr) onlyOperator public { + require(chainId != 0, "chainId illegal!"); + bondAssetHashes[chainId] = contractAddr; + emit BindAssetHash(chainId, contractAddr); + } +} \ No newline at end of file diff --git a/contracts_v0.4/libs/token/ERC20/IERC20.sol b/contracts_v0.4/libs/token/ERC20/IERC20.sol new file mode 100644 index 0000000..2c59816 --- /dev/null +++ b/contracts_v0.4/libs/token/ERC20/IERC20.sol @@ -0,0 +1,76 @@ +pragma solidity >=0.4.25; + +/** + * @dev Interface of the ERC20 standard as defined in the EIP. Does not include + * the optional functions; to access them see {ERC20Detailed}. + */ +interface IERC20 { + /** + * @dev Returns the amount of tokens in existence. + */ + function totalSupply() external view returns (uint256); + + /** + * @dev Returns the amount of tokens owned by `account`. + */ + function balanceOf(address account) external view returns (uint256); + + /** + * @dev Moves `amount` tokens from the caller's account to `recipient`. + * + * Returns a boolean value indicating whether the operation succeeded. + * + * Emits a {Transfer} event. + */ + function transfer(address recipient, uint256 amount) external returns (bool); + + /** + * @dev Returns the remaining number of tokens that `spender` will be + * allowed to spend on behalf of `owner` through {transferFrom}. This is + * zero by default. + * + * This value changes when {approve} or {transferFrom} are called. + */ + function allowance(address owner, address spender) external view returns (uint256); + + /** + * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. + * + * Returns a boolean value indicating whether the operation succeeded. + * + * IMPORTANT: Beware that changing an allowance with this method brings the risk + * that someone may use both the old and the new allowance by unfortunate + * transaction ordering. One possible solution to mitigate this race + * condition is to first reduce the spender's allowance to 0 and set the + * desired value afterwards: + * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 + * + * Emits an {Approval} event. + */ + function approve(address spender, uint256 amount) external returns (bool); + + /** + * @dev Moves `amount` tokens from `sender` to `recipient` using the + * allowance mechanism. `amount` is then deducted from the caller's + * allowance. + * + * Returns a boolean value indicating whether the operation succeeded. + * + * Emits a {Transfer} event. + */ + function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); + + /** + * @dev Emitted when `value` tokens are moved from one account (`from`) to + * another (`to`). + * + * Note that `value` may be zero. + */ + event Transfer(address indexed from, address indexed to, uint256 value); + + /** + * @dev Emitted when the allowance of a `spender` for an `owner` is set by + * a call to {approve}. `value` is the new allowance. + */ + event Approval(address indexed owner, address indexed spender, uint256 value); +} diff --git a/contracts_v0.4/libs/utils/EnumerableMap.sol b/contracts_v0.4/libs/utils/EnumerableMap.sol new file mode 100644 index 0000000..2951970 --- /dev/null +++ b/contracts_v0.4/libs/utils/EnumerableMap.sol @@ -0,0 +1,237 @@ +// SPDX-License-Identifier: MIT + +pragma solidity >=0.4.25; + +/** + * @dev Library for managing an enumerable variant of Solidity's + * https://solidity.readthedocs.io/en/latest/types.html#mapping-types[`mapping`] + * type. + * + * Maps have the following properties: + * + * - Entries are added, removed, and checked for existence in constant time + * (O(1)). + * - Entries are enumerated in O(n). No guarantees are made on the ordering. + * + * ``` + * contract Example { + * // Add the library methods + * using EnumerableMap for EnumerableMap.UintToAddressMap; + * + * // Declare a set state variable + * EnumerableMap.UintToAddressMap private myMap; + * } + * ``` + * + * As of v3.0.0, only maps of type `uint256 -> address` (`UintToAddressMap`) are + * supported. + */ +library EnumerableMap { + // To implement this library for multiple types with as little code + // repetition as possible, we write it in terms of a generic Map type with + // bytes32 keys and values. + // The Map implementation uses private functions, and user-facing + // implementations (such as Uint256ToAddressMap) are just wrappers around + // the underlying Map. + // This means that we can only create new EnumerableMaps for types that fit + // in bytes32. + + struct MapEntry { + bytes32 _key; + bytes32 _value; + } + + struct Map { + // Storage of map keys and values + MapEntry[] _entries; + + // Position of the entry defined by a key in the `entries` array, plus 1 + // because index 0 means a key is not in the map. + mapping (bytes32 => uint256) _indexes; + } + + /** + * @dev Adds a key-value pair to a map, or updates the value for an existing + * key. O(1). + * + * Returns true if the key was added to the map, that is if it was not + * already present. + */ + function _set(Map storage map, bytes32 key, bytes32 value) private returns (bool) { + // We read and store the key's index to prevent multiple reads from the same storage slot + uint256 keyIndex = map._indexes[key]; + + if (keyIndex == 0) { // Equivalent to !contains(map, key) + map._entries.push(MapEntry({ _key: key, _value: value })); + // The entry is stored at length-1, but we add 1 to all indexes + // and use 0 as a sentinel value + map._indexes[key] = map._entries.length; + return true; + } else { + map._entries[keyIndex - 1]._value = value; + return false; + } + } + + /** + * @dev Removes a key-value pair from a map. O(1). + * + * Returns true if the key was removed from the map, that is if it was present. + */ + function _remove(Map storage map, bytes32 key) private returns (bool) { + // We read and store the key's index to prevent multiple reads from the same storage slot + uint256 keyIndex = map._indexes[key]; + + if (keyIndex != 0) { // Equivalent to contains(map, key) + // To delete a key-value pair from the _entries array in O(1), we swap the entry to delete with the last one + // in the array, and then remove the last entry (sometimes called as 'swap and pop'). + // This modifies the order of the array, as noted in {at}. + + uint256 toDeleteIndex = keyIndex - 1; + uint256 lastIndex = map._entries.length - 1; + + // When the entry to delete is the last one, the swap operation is unnecessary. However, since this occurs + // so rarely, we still do the swap anyway to avoid the gas cost of adding an 'if' statement. + + MapEntry storage lastEntry = map._entries[lastIndex]; + + // Move the last entry to the index where the entry to delete is + map._entries[toDeleteIndex] = lastEntry; + // Update the index for the moved entry + map._indexes[lastEntry._key] = toDeleteIndex + 1; // All indexes are 1-based + + // Delete the slot where the moved entry was stored + delete map._entries[lastIndex]; + + // Delete the index for the deleted slot + delete map._indexes[key]; + + return true; + } else { + return false; + } + } + + /** + * @dev Returns true if the key is in the map. O(1). + */ + function _contains(Map storage map, bytes32 key) private view returns (bool) { + return map._indexes[key] != 0; + } + + /** + * @dev Returns the number of key-value pairs in the map. O(1). + */ + function _length(Map storage map) private view returns (uint256) { + return map._entries.length; + } + + /** + * @dev Returns the key-value pair stored at position `index` in the map. O(1). + * + * Note that there are no guarantees on the ordering of entries inside the + * array, and it may change when more entries are added or removed. + * + * Requirements: + * + * - `index` must be strictly less than {length}. + */ + function _at(Map storage map, uint256 index) private view returns (bytes32, bytes32) { + require(map._entries.length > index, "EnumerableMap: index out of bounds"); + + MapEntry storage entry = map._entries[index]; + return (entry._key, entry._value); + } + + /** + * @dev Returns the value associated with `key`. O(1). + * + * Requirements: + * + * - `key` must be in the map. + */ + function _get(Map storage map, bytes32 key) private view returns (bytes32) { + return _get(map, key, "EnumerableMap: nonexistent key"); + } + + /** + * @dev Same as {_get}, with a custom error message when `key` is not in the map. + */ + function _get(Map storage map, bytes32 key, string memory errorMessage) private view returns (bytes32) { + uint256 keyIndex = map._indexes[key]; + require(keyIndex != 0, errorMessage); // Equivalent to contains(map, key) + return map._entries[keyIndex - 1]._value; // All indexes are 1-based + } + + // UintToAddressMap + + struct UintToAddressMap { + Map _inner; + } + + /** + * @dev Adds a key-value pair to a map, or updates the value for an existing + * key. O(1). + * + * Returns true if the key was added to the map, that is if it was not + * already present. + */ + function set(UintToAddressMap storage map, uint256 key, address value) internal returns (bool) { + return _set(map._inner, bytes32(key), bytes32(uint256(value))); + } + + /** + * @dev Removes a value from a set. O(1). + * + * Returns true if the key was removed from the map, that is if it was present. + */ + function remove(UintToAddressMap storage map, uint256 key) internal returns (bool) { + return _remove(map._inner, bytes32(key)); + } + + /** + * @dev Returns true if the key is in the map. O(1). + */ + function contains(UintToAddressMap storage map, uint256 key) internal view returns (bool) { + return _contains(map._inner, bytes32(key)); + } + + /** + * @dev Returns the number of elements in the map. O(1). + */ + function length(UintToAddressMap storage map) internal view returns (uint256) { + return _length(map._inner); + } + + /** + * @dev Returns the element stored at position `index` in the set. O(1). + * Note that there are no guarantees on the ordering of values inside the + * array, and it may change when more values are added or removed. + * + * Requirements: + * + * - `index` must be strictly less than {length}. + */ + function at(UintToAddressMap storage map, uint256 index) internal view returns (uint256, address) { + (bytes32 key, bytes32 value) = _at(map._inner, index); + return (uint256(key), address(uint256(value))); + } + + /** + * @dev Returns the value associated with `key`. O(1). + * + * Requirements: + * + * - `key` must be in the map. + */ + function get(UintToAddressMap storage map, uint256 key) internal view returns (address) { + return address(uint256(_get(map._inner, bytes32(key)))); + } + + /** + * @dev Same as {get}, with a custom error message when `key` is not in the map. + */ + function get(UintToAddressMap storage map, uint256 key, string memory errorMessage) internal view returns (address) { + return address(uint256(_get(map._inner, bytes32(key), errorMessage))); + } +} diff --git a/contracts_v0.4/libs/utils/EnumerableSet.sol b/contracts_v0.4/libs/utils/EnumerableSet.sol new file mode 100644 index 0000000..4a95a2b --- /dev/null +++ b/contracts_v0.4/libs/utils/EnumerableSet.sol @@ -0,0 +1,243 @@ +// SPDX-License-Identifier: MIT + +pragma solidity >=0.4.25; + +/** + * @dev Library for managing + * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive + * types. + * + * Sets have the following properties: + * + * - Elements are added, removed, and checked for existence in constant time + * (O(1)). + * - Elements are enumerated in O(n). No guarantees are made on the ordering. + * + * ``` + * contract Example { + * // Add the library methods + * using EnumerableSet for EnumerableSet.AddressSet; + * + * // Declare a set state variable + * EnumerableSet.AddressSet private mySet; + * } + * ``` + * + * As of v3.0.0, only sets of type `address` (`AddressSet`) and `uint256` + * (`UintSet`) are supported. + */ +library EnumerableSet { + // To implement this library for multiple types with as little code + // repetition as possible, we write it in terms of a generic Set type with + // bytes32 values. + // The Set implementation uses private functions, and user-facing + // implementations (such as AddressSet) are just wrappers around the + // underlying Set. + // This means that we can only create new EnumerableSets for types that fit + // in bytes32. + + struct Set { + // Storage of set values + bytes32[] _values; + + // Position of the value in the `values` array, plus 1 because index 0 + // means a value is not in the set. + mapping (bytes32 => uint256) _indexes; + } + + /** + * @dev Add a value to a set. O(1). + * + * Returns true if the value was added to the set, that is if it was not + * already present. + */ + function _add(Set storage set, bytes32 value) private returns (bool) { + if (!_contains(set, value)) { + set._values.push(value); + // The value is stored at length-1, but we add 1 to all indexes + // and use 0 as a sentinel value + set._indexes[value] = set._values.length; + return true; + } else { + return false; + } + } + + /** + * @dev Removes a value from a set. O(1). + * + * Returns true if the value was removed from the set, that is if it was + * present. + */ + function _remove(Set storage set, bytes32 value) private returns (bool) { + // We read and store the value's index to prevent multiple reads from the same storage slot + uint256 valueIndex = set._indexes[value]; + + if (valueIndex != 0) { // Equivalent to contains(set, value) + // To delete an element from the _values array in O(1), we swap the element to delete with the last one in + // the array, and then remove the last element (sometimes called as 'swap and pop'). + // This modifies the order of the array, as noted in {at}. + + uint256 toDeleteIndex = valueIndex - 1; + uint256 lastIndex = set._values.length - 1; + + // When the value to delete is the last one, the swap operation is unnecessary. However, since this occurs + // so rarely, we still do the swap anyway to avoid the gas cost of adding an 'if' statement. + + bytes32 lastvalue = set._values[lastIndex]; + + // Move the last value to the index where the value to delete is + set._values[toDeleteIndex] = lastvalue; + // Update the index for the moved value + set._indexes[lastvalue] = toDeleteIndex + 1; // All indexes are 1-based + + // Delete the slot where the moved value was stored + delete set._values[lastIndex]; + + // Delete the index for the deleted slot + delete set._indexes[value]; + + return true; + } else { + return false; + } + } + + /** + * @dev Returns true if the value is in the set. O(1). + */ + function _contains(Set storage set, bytes32 value) private view returns (bool) { + return set._indexes[value] != 0; + } + + /** + * @dev Returns the number of values on the set. O(1). + */ + function _length(Set storage set) private view returns (uint256) { + return set._values.length; + } + + /** + * @dev Returns the value stored at position `index` in the set. O(1). + * + * Note that there are no guarantees on the ordering of values inside the + * array, and it may change when more values are added or removed. + * + * Requirements: + * + * - `index` must be strictly less than {length}. + */ + function _at(Set storage set, uint256 index) private view returns (bytes32) { + require(set._values.length > index, "EnumerableSet: index out of bounds"); + return set._values[index]; + } + + // AddressSet + + struct AddressSet { + Set _inner; + } + + /** + * @dev Add a value to a set. O(1). + * + * Returns true if the value was added to the set, that is if it was not + * already present. + */ + function add(AddressSet storage set, address value) internal returns (bool) { + return _add(set._inner, bytes32(uint256(value))); + } + + /** + * @dev Removes a value from a set. O(1). + * + * Returns true if the value was removed from the set, that is if it was + * present. + */ + function remove(AddressSet storage set, address value) internal returns (bool) { + return _remove(set._inner, bytes32(uint256(value))); + } + + /** + * @dev Returns true if the value is in the set. O(1). + */ + function contains(AddressSet storage set, address value) internal view returns (bool) { + return _contains(set._inner, bytes32(uint256(value))); + } + + /** + * @dev Returns the number of values in the set. O(1). + */ + function length(AddressSet storage set) internal view returns (uint256) { + return _length(set._inner); + } + + /** + * @dev Returns the value stored at position `index` in the set. O(1). + * + * Note that there are no guarantees on the ordering of values inside the + * array, and it may change when more values are added or removed. + * + * Requirements: + * + * - `index` must be strictly less than {length}. + */ + function at(AddressSet storage set, uint256 index) internal view returns (address) { + return address(uint256(_at(set._inner, index))); + } + + + // UintSet + + struct UintSet { + Set _inner; + } + + /** + * @dev Add a value to a set. O(1). + * + * Returns true if the value was added to the set, that is if it was not + * already present. + */ + function add(UintSet storage set, uint256 value) internal returns (bool) { + return _add(set._inner, bytes32(value)); + } + + /** + * @dev Removes a value from a set. O(1). + * + * Returns true if the value was removed from the set, that is if it was + * present. + */ + function remove(UintSet storage set, uint256 value) internal returns (bool) { + return _remove(set._inner, bytes32(value)); + } + + /** + * @dev Returns true if the value is in the set. O(1). + */ + function contains(UintSet storage set, uint256 value) internal view returns (bool) { + return _contains(set._inner, bytes32(value)); + } + + /** + * @dev Returns the number of values on the set. O(1). + */ + function length(UintSet storage set) internal view returns (uint256) { + return _length(set._inner); + } + + /** + * @dev Returns the value stored at position `index` in the set. O(1). + * + * Note that there are no guarantees on the ordering of values inside the + * array, and it may change when more values are added or removed. + * + * Requirements: + * + * - `index` must be strictly less than {length}. + */ + function at(UintSet storage set, uint256 index) internal view returns (uint256) { + return uint256(_at(set._inner, index)); + } +} diff --git a/contracts_v0.4/libs/utils/Strings.sol b/contracts_v0.4/libs/utils/Strings.sol new file mode 100644 index 0000000..e9b79b0 --- /dev/null +++ b/contracts_v0.4/libs/utils/Strings.sol @@ -0,0 +1,34 @@ +// SPDX-License-Identifier: MIT + +pragma solidity >=0.4.25; + +/** + * @dev String operations. + */ +library Strings { + /** + * @dev Converts a `uint256` to its ASCII `string` representation. + */ + function toString(uint256 value) internal pure returns (string memory) { + // Inspired by OraclizeAPI's implementation - MIT licence + // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol + + if (value == 0) { + return "0"; + } + uint256 temp = value; + uint256 digits; + while (temp != 0) { + digits++; + temp /= 10; + } + bytes memory buffer = new bytes(digits); + uint256 index = digits - 1; + temp = value; + while (temp != 0) { + buffer[index--] = byte(uint8(48 + temp % 10)); + temp /= 10; + } + return string(buffer); + } +} diff --git a/contracts_v0.4/libs/utils/Utils.sol b/contracts_v0.4/libs/utils/Utils.sol new file mode 100644 index 0000000..836545f --- /dev/null +++ b/contracts_v0.4/libs/utils/Utils.sol @@ -0,0 +1,322 @@ +pragma solidity >=0.4.25; + + +library Utils { + + /* @notice Convert the bytes array to bytes32 type, the bytes array length must be 32 + * @param _bs Source bytes array + * @return bytes32 + */ + function bytesToBytes32(bytes memory _bs) internal pure returns (bytes32 value) { + require(_bs.length == 32, "bytes length is not 32."); + assembly { + // load 32 bytes from memory starting from position _bs + 0x20 since the first 0x20 bytes stores _bs length + value := mload(add(_bs, 0x20)) + } + } + + /* @notice Convert bytes to uint256 + * @param _b Source bytes should have length of 32 + * @return uint256 + */ + function bytesToUint256(bytes memory _bs) internal pure returns (uint256 value) { + require(_bs.length == 32, "bytes length is not 32."); + assembly { + // load 32 bytes from memory starting from position _bs + 32 + value := mload(add(_bs, 0x20)) + } + require(value <= 0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff, "Value exceeds the range"); + } + + /* @notice Convert uint256 to bytes + * @param _b uint256 that needs to be converted + * @return bytes + */ + function uint256ToBytes(uint256 _value) internal pure returns (bytes memory bs) { + require(_value <= 0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff, "Value exceeds the range"); + assembly { + // Get a location of some free memory and store it in result as + // Solidity does for memory variables. + bs := mload(0x40) + // Put 0x20 at the first word, the length of bytes for uint256 value + mstore(bs, 0x20) + //In the next word, put value in bytes format to the next 32 bytes + mstore(add(bs, 0x20), _value) + // Update the free-memory pointer by padding our last write location to 32 bytes + mstore(0x40, add(bs, 0x40)) + } + } + + /* @notice Convert bytes to address + * @param _bs Source bytes: bytes length must be 20 + * @return Converted address from source bytes + */ + function bytesToAddress(bytes memory _bs) internal pure returns (address addr) + { + require(_bs.length == 20, "bytes length does not match address"); + assembly { + // for _bs, first word store _bs.length, second word store _bs.value + // load 32 bytes from mem[_bs+20], convert it into Uint160, meaning we take last 20 bytes as addr (address). + addr := mload(add(_bs, 0x14)) + } + + } + + /* @notice Convert address to bytes + * @param _addr Address need to be converted + * @return Converted bytes from address + */ + function addressToBytes(address _addr) internal pure returns (bytes memory bs){ + assembly { + // Get a location of some free memory and store it in result as + // Solidity does for memory variables. + bs := mload(0x40) + // Put 20 (address byte length) at the first word, the length of bytes for uint256 value + mstore(bs, 0x14) + // logical shift left _a by 12 bytes, change _a from right-aligned to left-aligned + mstore(add(bs, 0x20), shl(96, _addr)) + // Update the free-memory pointer by padding our last write location to 32 bytes + mstore(0x40, add(bs, 0x40)) + } + } + + /* @notice Do hash leaf as the multi-chain does + * @param _data Data in bytes format + * @return Hashed value in bytes32 format + */ + function hashLeaf(bytes memory _data) internal pure returns (bytes32 result) { + result = sha256(abi.encodePacked(byte(0x0), _data)); + } + + /* @notice Do hash children as the multi-chain does + * @param _l Left node + * @param _r Right node + * @return Hashed value in bytes32 format + */ + function hashChildren(bytes32 _l, bytes32 _r) internal pure returns (bytes32 result) { + result = sha256(abi.encodePacked(bytes1(0x01), _l, _r)); + } + + /* @notice Compare if two bytes are equal, which are in storage and memory, seperately + Refer from https://github.com/summa-tx/bitcoin-spv/blob/master/solidity/contracts/BytesLib.sol#L368 + * @param _preBytes The bytes stored in storage + * @param _postBytes The bytes stored in memory + * @return Bool type indicating if they are equal + */ + function equalStorage(bytes storage _preBytes, bytes memory _postBytes) internal view returns (bool) { + bool success = true; + + assembly { + // we know _preBytes_offset is 0 + let fslot := sload(_preBytes_slot) + // Arrays of 31 bytes or less have an even value in their slot, + // while longer arrays have an odd value. The actual length is + // the slot divided by two for odd values, and the lowest order + // byte divided by two for even values. + // If the slot is even, bitwise and the slot with 255 and divide by + // two to get the length. If the slot is odd, bitwise and the slot + // with -1 and divide by two. + let slength := div(and(fslot, sub(mul(0x100, iszero(and(fslot, 1))), 1)), 2) + let mlength := mload(_postBytes) + + // if lengths don't match the arrays are not equal + switch eq(slength, mlength) + case 1 { + // fslot can contain both the length and contents of the array + // if slength < 32 bytes so let's prepare for that + // v. http://solidity.readthedocs.io/en/latest/miscellaneous.html#layout-of-state-variables-in-storage + // slength != 0 + if iszero(iszero(slength)) { + switch lt(slength, 32) + case 1 { + // blank the last byte which is the length + fslot := mul(div(fslot, 0x100), 0x100) + + if iszero(eq(fslot, mload(add(_postBytes, 0x20)))) { + // unsuccess: + success := 0 + } + } + default { + // cb is a circuit breaker in the for loop since there's + // no said feature for inline assembly loops + // cb = 1 - don't breaker + // cb = 0 - break + let cb := 1 + + // get the keccak hash to get the contents of the array + mstore(0x0, _preBytes_slot) + let sc := keccak256(0x0, 0x20) + + let mc := add(_postBytes, 0x20) + let end := add(mc, mlength) + + // the next line is the loop condition: + // while(uint(mc < end) + cb == 2) + for {} eq(add(lt(mc, end), cb), 2) { + sc := add(sc, 1) + mc := add(mc, 0x20) + } { + if iszero(eq(sload(sc), mload(mc))) { + // unsuccess: + success := 0 + cb := 0 + } + } + } + } + } + default { + // unsuccess: + success := 0 + } + } + + return success; + } + + /* @notice Slice the _bytes from _start index till the result has length of _length + Refer from https://github.com/summa-tx/bitcoin-spv/blob/master/solidity/contracts/BytesLib.sol#L246 + * @param _bytes The original bytes needs to be sliced + * @param _start The index of _bytes for the start of sliced bytes + * @param _length The index of _bytes for the end of sliced bytes + * @return The sliced bytes + */ + function slice( + bytes memory _bytes, + uint _start, + uint _length + ) + internal + pure + returns (bytes memory) + { + require(_bytes.length >= (_start + _length)); + + bytes memory tempBytes; + + assembly { + switch iszero(_length) + case 0 { + // Get a location of some free memory and store it in tempBytes as + // Solidity does for memory variables. + tempBytes := mload(0x40) + + // The first word of the slice result is potentially a partial + // word read from the original array. To read it, we calculate + // the length of that partial word and start copying that many + // bytes into the array. The first word we copy will start with + // data we don't care about, but the last `lengthmod` bytes will + // land at the beginning of the contents of the new array. When + // we're done copying, we overwrite the full first word with + // the actual length of the slice. + // lengthmod <= _length % 32 + let lengthmod := and(_length, 31) + + // The multiplication in the next line is necessary + // because when slicing multiples of 32 bytes (lengthmod == 0) + // the following copy loop was copying the origin's length + // and then ending prematurely not copying everything it should. + let mc := add(add(tempBytes, lengthmod), mul(0x20, iszero(lengthmod))) + let end := add(mc, _length) + + for { + // The multiplication in the next line has the same exact purpose + // as the one above. + let cc := add(add(add(_bytes, lengthmod), mul(0x20, iszero(lengthmod))), _start) + } lt(mc, end) { + mc := add(mc, 0x20) + cc := add(cc, 0x20) + } { + mstore(mc, mload(cc)) + } + + mstore(tempBytes, _length) + + //update free-memory pointer + //allocating the array padded to 32 bytes like the compiler does now + mstore(0x40, and(add(mc, 31), not(31))) + } + //if we want a zero-length slice let's just return a zero-length array + default { + tempBytes := mload(0x40) + + mstore(0x40, add(tempBytes, 0x20)) + } + } + + return tempBytes; + } + /* @notice Check if the elements number of _signers within _keepers array is no less than _m + * @param _keepers The array consists of serveral address + * @param _signers Some specific addresses to be looked into + * @param _m The number requirement paramter + * @return True means containment, false meansdo do not contain. + */ + function containMAddresses(address[] memory _keepers, address[] memory _signers, uint _m) internal pure returns (bool){ + uint m = 0; + for(uint i = 0; i < _signers.length; i++){ + for (uint j = 0; j < _keepers.length; j++) { + if (_signers[i] == _keepers[j]) { + m++; + delete _keepers[j]; + } + } + } + return m >= _m; + } + + /* @notice TODO + * @param key + * @return + */ + function compressMCPubKey(bytes memory key) internal pure returns (bytes memory newkey) { + require(key.length >= 67, "key lenggh is too short"); + newkey = slice(key, 0, 35); + if (uint8(key[66]) % 2 == 0){ + newkey[2] = byte(0x02); + } else { + newkey[2] = byte(0x03); + } + return newkey; + } + + /** + * @dev Returns true if `account` is a contract. + * Refer from https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/Address.sol#L18 + * + * This test is non-exhaustive, and there may be false-negatives: during the + * execution of a contract's constructor, its address will be reported as + * not containing a contract. + * + * IMPORTANT: It is unsafe to assume that an address for which this + * function returns false is an externally-owned account (EOA) and not a + * contract. + */ + function isContract(address addr) internal view returns (bool) { + uint256 size; + // XXX Currently there is no better way to check if there is a contract in an address + // than to check the size of the code at that address. + // See https://ethereum.stackexchange.com/a/14016/36603 + // for more details about how this works. + // TODO Check this again before the Serenity release, because all addresses will be + // contracts then. + // solium-disable-next-line security/no-inline-assembly + assembly { size := extcodesize(addr) } + return size > 0; + } + // function isContract(address account) internal view returns (bool) { + // // This method relies in extcodesize, which returns 0 for contracts in + // // construction, since the code is only stored at the end of the + // // constructor execution. + + // // According to EIP-1052, 0x0 is the value returned for not-yet created accounts + // // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned + // // for accounts without code, i.e. `keccak256('')` + // bytes32 codehash; + // bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470; + // // solhint-disable-next-line no-inline-assembly + // assembly { codehash := extcodehash(account) } + // return (codehash != 0x0 && codehash != accountHash); + // } +} \ No newline at end of file diff --git a/go_abi/eccd_abi/eccd_abi.go b/go_abi/eccd_abi/eccd_abi.go index 54b2b33..2d3d642 100644 --- a/go_abi/eccd_abi/eccd_abi.go +++ b/go_abi/eccd_abi/eccd_abi.go @@ -202,7 +202,7 @@ var EthCrossChainDataFuncSigs = map[string]string{ } // EthCrossChainDataBin is the compiled bytecode used for deploying new contracts. -var EthCrossChainDataBin = "0x608060405260006100176001600160e01b0361007316565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3506000805460ff60a01b19169055610077565b3390565b6110f7806100866000396000f3fe608060405234801561001057600080fd5b506004361061014c5760003560e01c80635c975abb116100c35780638da5cb5b1161007c5780638da5cb5b1461048c5780638f32d59b146104b0578063e90bfdcf146104b8578063f2fde38b146104e5578063fcbdc1e01461050b578063ff3d24a1146105135761014c565b80635c975abb1461043f57806367e31a741461044757806369d480741461044f578063715018a6146104575780638456cb59146104615780638a8bd17f146104695761014c565b80633f4ba83a116101155780633f4ba83a1461031357806340602bb51461031b57806341973cd91461033e5780634c3ccf64146103e4578063529caad8146104015780635ac407901461041e5761014c565b8062c5fff8146101515780630586763c1461016b5780631afe374e146101ac57806320bbde381461025e57806329927875146102f6575b600080fd5b61015961051b565b60408051918252519081900360200190f35b6101986004803603604081101561018157600080fd5b5067ffffffffffffffff8135169060200135610521565b604080519115158252519081900360200190f35b610198600480360360608110156101c257600080fd5b8135916020810135918101906060810160408201356401000000008111156101e957600080fd5b8201836020820111156101fb57600080fd5b8035906020019184600183028401116401000000008311171561021d57600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092955061054d945050505050565b6102816004803603604081101561027457600080fd5b5080359060200135610619565b6040805160208082528351818301528351919283929083019185019080838360005b838110156102bb5781810151838201526020016102a3565b50505050905090810190601f1680156102e85780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101596004803603602081101561030c57600080fd5b50356106bd565b6101986106cf565b6102816004803603604081101561033157600080fd5b508035906020013561077c565b6101986004803603602081101561035457600080fd5b81019060208101813564010000000081111561036f57600080fd5b82018360208201111561038157600080fd5b803590602001918460018302840111640100000000831117156103a357600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610826945050505050565b610198600480360360208110156103fa57600080fd5b50356108dc565b6101596004803603602081101561041757600080fd5b5035610999565b6104266109ab565b6040805163ffffffff9092168252519081900360200190f35b6101986109b7565b6104266109c7565b6102816109d3565b61045f610a69565b005b610198610afa565b6101986004803603602081101561047f57600080fd5b503563ffffffff16610b9d565b610494610c56565b604080516001600160a01b039092168252519081900360200190f35b610198610c65565b610198600480360360408110156104ce57600080fd5b5067ffffffffffffffff8135169060200135610c89565b61045f600480360360208110156104fb57600080fd5b50356001600160a01b0316610d5a565b610281610dad565b610159610e08565b60025481565b67ffffffffffffffff919091166000908152600560209081526040808320938352929052205460ff1690565b60008054600160a01b900460ff16156105a0576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b6105a8610c65565b6105e7576040805162461bcd60e51b815260206004820181905260248201526000805160206110a3833981519152604482015290519081900360640190fd5b60008481526006602090815260408083208684528252909120835161060e92850190610fe4565b506001949350505050565b60066020908152600092835260408084208252918352918190208054825160026001831615610100026000190190921691909104601f8101859004850282018501909352828152929091908301828280156106b55780601f1061068a576101008083540402835291602001916106b5565b820191906000526020600020905b81548152906001019060200180831161069857829003601f168201915b505050505081565b60009081526001602052604090205490565b60006106d9610c65565b610718576040805162461bcd60e51b815260206004820181905260248201526000805160206110a3833981519152604482015290519081900360640190fd5b600054600160a01b900460ff1661076d576040805162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015290519081900360640190fd5b610775610e0e565b5060015b90565b600082815260066020908152604080832084845282529182902080548351601f60026000196101006001861615020190931692909204918201849004840281018401909452808452606093928301828280156108195780601f106107ee57610100808354040283529160200191610819565b820191906000526020600020905b8154815290600101906020018083116107fc57829003601f168201915b5050505050905092915050565b60008054600160a01b900460ff1615610879576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b610881610c65565b6108c0576040805162461bcd60e51b815260206004820181905260248201526000805160206110a3833981519152604482015290519081900360640190fd5b81516108d3906003906020850190610fe4565b50600192915050565b60008054600160a01b900460ff161561092f576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b610937610c65565b610976576040805162461bcd60e51b815260206004820181905260248201526000805160206110a3833981519152604482015290519081900360640190fd5b506002805460009081526001602081905260409091209290925580548201905590565b60016020526000908152604090205481565b60045463ffffffff1690565b600054600160a01b900460ff1690565b60045463ffffffff1681565b60038054604080516020601f6002600019610100600188161502019095169490940493840181900481028201810190925282815260609390929091830182828015610a5f5780601f10610a3457610100808354040283529160200191610a5f565b820191906000526020600020905b815481529060010190602001808311610a4257829003601f168201915b5050505050905090565b610a71610c65565b610ab0576040805162461bcd60e51b815260206004820181905260248201526000805160206110a3833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000610b04610c65565b610b43576040805162461bcd60e51b815260206004820181905260248201526000805160206110a3833981519152604482015290519081900360640190fd5b600054600160a01b900460ff1615610b95576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b610775610eb6565b60008054600160a01b900460ff1615610bf0576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b610bf8610c65565b610c37576040805162461bcd60e51b815260206004820181905260248201526000805160206110a3833981519152604482015290519081900360640190fd5b506004805463ffffffff831663ffffffff199091161790556001919050565b6000546001600160a01b031690565b600080546001600160a01b0316610c7a610f40565b6001600160a01b031614905090565b60008054600160a01b900460ff1615610cdc576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b610ce4610c65565b610d23576040805162461bcd60e51b815260206004820181905260248201526000805160206110a3833981519152604482015290519081900360640190fd5b5067ffffffffffffffff91909116600090815260056020908152604080832093835292905220805460ff1916600190811790915590565b610d62610c65565b610da1576040805162461bcd60e51b815260206004820181905260248201526000805160206110a3833981519152604482015290519081900360640190fd5b610daa81610f44565b50565b6003805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156106b55780601f1061068a576101008083540402835291602001916106b5565b60025490565b600054600160a01b900460ff16610e63576040805162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015290519081900360640190fd5b6000805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa610e99610f40565b604080516001600160a01b039092168252519081900360200190a1565b600054600160a01b900460ff1615610f08576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b6000805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258610e995b3390565b6001600160a01b038116610f895760405162461bcd60e51b815260040180806020018281038252602681526020018061107d6026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061102557805160ff1916838001178555611052565b82800160010185558215611052579182015b82811115611052578251825591602001919060010190611037565b5061105e929150611062565b5090565b61077991905b8082111561105e576000815560010161106856fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f20616464726573734f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572a265627a7a723158200eb6a76a56ee84521b2fc487e8f8e4fad43dacfc2f087fe0bbdbc0b5c240a65a64736f6c634300050f0032" +var EthCrossChainDataBin = "0x608060405260006100176001600160e01b0361007316565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3506000805460ff60a01b19169055610077565b3390565b6110f7806100866000396000f3fe608060405234801561001057600080fd5b506004361061014c5760003560e01c80635c975abb116100c35780638da5cb5b1161007c5780638da5cb5b1461048c5780638f32d59b146104b0578063e90bfdcf146104b8578063f2fde38b146104e5578063fcbdc1e01461050b578063ff3d24a1146105135761014c565b80635c975abb1461043f57806367e31a741461044757806369d480741461044f578063715018a6146104575780638456cb59146104615780638a8bd17f146104695761014c565b80633f4ba83a116101155780633f4ba83a1461031357806340602bb51461031b57806341973cd91461033e5780634c3ccf64146103e4578063529caad8146104015780635ac407901461041e5761014c565b8062c5fff8146101515780630586763c1461016b5780631afe374e146101ac57806320bbde381461025e57806329927875146102f6575b600080fd5b61015961051b565b60408051918252519081900360200190f35b6101986004803603604081101561018157600080fd5b5067ffffffffffffffff8135169060200135610521565b604080519115158252519081900360200190f35b610198600480360360608110156101c257600080fd5b8135916020810135918101906060810160408201356401000000008111156101e957600080fd5b8201836020820111156101fb57600080fd5b8035906020019184600183028401116401000000008311171561021d57600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092955061054d945050505050565b6102816004803603604081101561027457600080fd5b5080359060200135610619565b6040805160208082528351818301528351919283929083019185019080838360005b838110156102bb5781810151838201526020016102a3565b50505050905090810190601f1680156102e85780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101596004803603602081101561030c57600080fd5b50356106bd565b6101986106cf565b6102816004803603604081101561033157600080fd5b508035906020013561077c565b6101986004803603602081101561035457600080fd5b81019060208101813564010000000081111561036f57600080fd5b82018360208201111561038157600080fd5b803590602001918460018302840111640100000000831117156103a357600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610826945050505050565b610198600480360360208110156103fa57600080fd5b50356108dc565b6101596004803603602081101561041757600080fd5b5035610999565b6104266109ab565b6040805163ffffffff9092168252519081900360200190f35b6101986109b7565b6104266109c7565b6102816109d3565b61045f610a69565b005b610198610afa565b6101986004803603602081101561047f57600080fd5b503563ffffffff16610b9d565b610494610c56565b604080516001600160a01b039092168252519081900360200190f35b610198610c65565b610198600480360360408110156104ce57600080fd5b5067ffffffffffffffff8135169060200135610c89565b61045f600480360360208110156104fb57600080fd5b50356001600160a01b0316610d5a565b610281610dad565b610159610e08565b60025481565b67ffffffffffffffff919091166000908152600560209081526040808320938352929052205460ff1690565b60008054600160a01b900460ff16156105a0576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b6105a8610c65565b6105e7576040805162461bcd60e51b815260206004820181905260248201526000805160206110a3833981519152604482015290519081900360640190fd5b60008481526006602090815260408083208684528252909120835161060e92850190610fe4565b506001949350505050565b60066020908152600092835260408084208252918352918190208054825160026001831615610100026000190190921691909104601f8101859004850282018501909352828152929091908301828280156106b55780601f1061068a576101008083540402835291602001916106b5565b820191906000526020600020905b81548152906001019060200180831161069857829003601f168201915b505050505081565b60009081526001602052604090205490565b60006106d9610c65565b610718576040805162461bcd60e51b815260206004820181905260248201526000805160206110a3833981519152604482015290519081900360640190fd5b600054600160a01b900460ff1661076d576040805162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015290519081900360640190fd5b610775610e0e565b5060015b90565b600082815260066020908152604080832084845282529182902080548351601f60026000196101006001861615020190931692909204918201849004840281018401909452808452606093928301828280156108195780601f106107ee57610100808354040283529160200191610819565b820191906000526020600020905b8154815290600101906020018083116107fc57829003601f168201915b5050505050905092915050565b60008054600160a01b900460ff1615610879576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b610881610c65565b6108c0576040805162461bcd60e51b815260206004820181905260248201526000805160206110a3833981519152604482015290519081900360640190fd5b81516108d3906003906020850190610fe4565b50600192915050565b60008054600160a01b900460ff161561092f576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b610937610c65565b610976576040805162461bcd60e51b815260206004820181905260248201526000805160206110a3833981519152604482015290519081900360640190fd5b506002805460009081526001602081905260409091209290925580548201905590565b60016020526000908152604090205481565b60045463ffffffff1690565b600054600160a01b900460ff1690565b60045463ffffffff1681565b60038054604080516020601f6002600019610100600188161502019095169490940493840181900481028201810190925282815260609390929091830182828015610a5f5780601f10610a3457610100808354040283529160200191610a5f565b820191906000526020600020905b815481529060010190602001808311610a4257829003601f168201915b5050505050905090565b610a71610c65565b610ab0576040805162461bcd60e51b815260206004820181905260248201526000805160206110a3833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000610b04610c65565b610b43576040805162461bcd60e51b815260206004820181905260248201526000805160206110a3833981519152604482015290519081900360640190fd5b600054600160a01b900460ff1615610b95576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b610775610eb6565b60008054600160a01b900460ff1615610bf0576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b610bf8610c65565b610c37576040805162461bcd60e51b815260206004820181905260248201526000805160206110a3833981519152604482015290519081900360640190fd5b506004805463ffffffff831663ffffffff199091161790556001919050565b6000546001600160a01b031690565b600080546001600160a01b0316610c7a610f40565b6001600160a01b031614905090565b60008054600160a01b900460ff1615610cdc576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b610ce4610c65565b610d23576040805162461bcd60e51b815260206004820181905260248201526000805160206110a3833981519152604482015290519081900360640190fd5b5067ffffffffffffffff91909116600090815260056020908152604080832093835292905220805460ff1916600190811790915590565b610d62610c65565b610da1576040805162461bcd60e51b815260206004820181905260248201526000805160206110a3833981519152604482015290519081900360640190fd5b610daa81610f44565b50565b6003805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156106b55780601f1061068a576101008083540402835291602001916106b5565b60025490565b600054600160a01b900460ff16610e63576040805162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015290519081900360640190fd5b6000805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa610e99610f40565b604080516001600160a01b039092168252519081900360200190a1565b600054600160a01b900460ff1615610f08576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b6000805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258610e995b3390565b6001600160a01b038116610f895760405162461bcd60e51b815260040180806020018281038252602681526020018061107d6026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061102557805160ff1916838001178555611052565b82800160010185558215611052579182015b82811115611052578251825591602001919060010190611037565b5061105e929150611062565b5090565b61077991905b8082111561105e576000815560010161106856fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f20616464726573734f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572a265627a7a72315820b88d1acf37f880e4798c79f7534cdd7ab1ca27646d5322313179a792888b2c8664736f6c63430005110032" // DeployEthCrossChainData deploys a new Ethereum contract, binding an instance of EthCrossChainData to it. func DeployEthCrossChainData(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *EthCrossChainData, error) { @@ -2685,4 +2685,3 @@ func (_Pausable *PausableFilterer) ParseUnpaused(log types.Log) (*PausableUnpaus } return event, nil } - diff --git a/go_abi/eccm_abi/eccm_abi.go b/go_abi/eccm_abi/eccm_abi.go index 5082735..42beb4e 100644 --- a/go_abi/eccm_abi/eccm_abi.go +++ b/go_abi/eccm_abi/eccm_abi.go @@ -175,7 +175,7 @@ func (_Context *ContextTransactorRaw) Transact(opts *bind.TransactOpts, method s const ECCUtilsABI = "[]" // ECCUtilsBin is the compiled bytecode used for deploying new contracts. -var ECCUtilsBin = "0x60556023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea265627a7a72315820481841f0a18cbac7c5fa370b0eb236fc81197ce6422941dd1fbaefaf303522a564736f6c634300050f0032" +var ECCUtilsBin = "0x60556023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea265627a7a72315820c0c7b1725706633adca0e00d7c655e8d75b731a9314fbe4434b243e82561399864736f6c63430005110032" // DeployECCUtils deploys a new Ethereum contract, binding an instance of ECCUtils to it. func DeployECCUtils(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *ECCUtils, error) { @@ -334,11 +334,12 @@ func (_ECCUtils *ECCUtilsTransactorRaw) Transact(opts *bind.TransactOpts, method } // EthCrossChainManagerABI is the input ABI used to generate the binding from. -const EthCrossChainManagerABI = "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_eccd\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"height\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"rawHeader\",\"type\":\"bytes\"}],\"name\":\"ChangeBookKeeperEvent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"txId\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"proxyOrAssetContract\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"toChainId\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"toContract\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"rawdata\",\"type\":\"bytes\"}],\"name\":\"CrossChainEvent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"height\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"rawHeader\",\"type\":\"bytes\"}],\"name\":\"InitGenesisBlockEvent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"fromChainID\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"toContract\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"crossChainTxHash\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"fromChainTxHash\",\"type\":\"bytes\"}],\"name\":\"VerifyHeaderAndExecuteTxEvent\",\"type\":\"event\"},{\"constant\":true,\"inputs\":[],\"name\":\"EthCrossChainDataAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"rawHeader\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"pubKeyList\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"sigList\",\"type\":\"bytes\"}],\"name\":\"changeBookKeeper\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"toChainId\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"toContract\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"method\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"txData\",\"type\":\"bytes\"}],\"name\":\"crossChain\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"rawHeader\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"pubKeyList\",\"type\":\"bytes\"}],\"name\":\"initGenesisBlock\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"isOwner\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"pause\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"unpause\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"newEthCrossChainManagerAddress\",\"type\":\"address\"}],\"name\":\"upgradeToNew\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"proof\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"rawHeader\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"headerProof\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"curRawHeader\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"headerSig\",\"type\":\"bytes\"}],\"name\":\"verifyHeaderAndExecuteTx\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]" +const EthCrossChainManagerABI = "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_eccd\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"_chainId\",\"type\":\"uint64\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"height\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"rawHeader\",\"type\":\"bytes\"}],\"name\":\"ChangeBookKeeperEvent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"txId\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"proxyOrAssetContract\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"toChainId\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"toContract\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"rawdata\",\"type\":\"bytes\"}],\"name\":\"CrossChainEvent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"height\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"rawHeader\",\"type\":\"bytes\"}],\"name\":\"InitGenesisBlockEvent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"fromChainID\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"toContract\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"crossChainTxHash\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"fromChainTxHash\",\"type\":\"bytes\"}],\"name\":\"VerifyHeaderAndExecuteTxEvent\",\"type\":\"event\"},{\"constant\":true,\"inputs\":[],\"name\":\"EthCrossChainDataAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"chainId\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"rawHeader\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"pubKeyList\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"sigList\",\"type\":\"bytes\"}],\"name\":\"changeBookKeeper\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"toChainId\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"toContract\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"method\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"txData\",\"type\":\"bytes\"}],\"name\":\"crossChain\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"rawHeader\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"pubKeyList\",\"type\":\"bytes\"}],\"name\":\"initGenesisBlock\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"isOwner\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"pause\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"_newChainId\",\"type\":\"uint64\"}],\"name\":\"setChainId\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"unpause\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"newEthCrossChainManagerAddress\",\"type\":\"address\"}],\"name\":\"upgradeToNew\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"proof\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"rawHeader\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"headerProof\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"curRawHeader\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"headerSig\",\"type\":\"bytes\"}],\"name\":\"verifyHeaderAndExecuteTx\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]" // EthCrossChainManagerFuncSigs maps the 4-byte function signature to its string representation. var EthCrossChainManagerFuncSigs = map[string]string{ "00ba1694": "EthCrossChainDataAddress()", + "9a8a0592": "chainId()", "29dcf4ab": "changeBookKeeper(bytes,bytes,bytes)", "bd5cf625": "crossChain(uint64,bytes,bytes,bytes)", "34a773eb": "initGenesisBlock(bytes,bytes)", @@ -347,6 +348,7 @@ var EthCrossChainManagerFuncSigs = map[string]string{ "8456cb59": "pause()", "5c975abb": "paused()", "715018a6": "renounceOwnership()", + "6f31031d": "setChainId(uint64)", "f2fde38b": "transferOwnership(address)", "3f4ba83a": "unpause()", "7e724ff3": "upgradeToNew(address)", @@ -354,16 +356,16 @@ var EthCrossChainManagerFuncSigs = map[string]string{ } // EthCrossChainManagerBin is the compiled bytecode used for deploying new contracts. -var EthCrossChainManagerBin = "0x60806040523480156200001157600080fd5b5060405162004e3038038062004e30833981810160405260208110156200003757600080fd5b50518060006200004f6001600160e01b03620000cd16565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3506000805460ff60a01b19169055600180546001600160a01b0319166001600160a01b039290921691909117905550620000d1565b3390565b614d4f80620000e16000396000f3fe608060405234801561001057600080fd5b50600436106100ce5760003560e01c80637e724ff31161008c5780638f32d59b116100665780638f32d59b14610432578063bd5cf6251461043a578063d450e04c14610558578063f2fde38b14610810576100ce565b80637e724ff3146103fc5780638456cb59146104225780638da5cb5b1461042a576100ce565b8062ba1694146100d357806329dcf4ab146100f757806334a773eb146102b95780633f4ba83a146103e25780635c975abb146103ea578063715018a6146103f2575b600080fd5b6100db610836565b604080516001600160a01b039092168252519081900360200190f35b6102a56004803603606081101561010d57600080fd5b810190602081018135600160201b81111561012757600080fd5b82018360208201111561013957600080fd5b803590602001918460018302840111600160201b8311171561015a57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b8111156101ac57600080fd5b8201836020820111156101be57600080fd5b803590602001918460018302840111600160201b831117156101df57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b81111561023157600080fd5b82018360208201111561024357600080fd5b803590602001918460018302840111600160201b8311171561026457600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610845945050505050565b604080519115158252519081900360200190f35b6102a5600480360360408110156102cf57600080fd5b810190602081018135600160201b8111156102e957600080fd5b8201836020820111156102fb57600080fd5b803590602001918460018302840111600160201b8311171561031c57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b81111561036e57600080fd5b82018360208201111561038057600080fd5b803590602001918460018302840111600160201b831117156103a157600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610e67945050505050565b6102a561133d565b6102a56114bc565b6103fa6114cc565b005b6102a56004803603602081101561041257600080fd5b50356001600160a01b031661155d565b6102a561166e565b6100db6117e3565b6102a56117f2565b6102a56004803603608081101561045057600080fd5b6001600160401b038235169190810190604081016020820135600160201b81111561047a57600080fd5b82018360208201111561048c57600080fd5b803590602001918460018302840111600160201b831117156104ad57600080fd5b919390929091602081019035600160201b8111156104ca57600080fd5b8201836020820111156104dc57600080fd5b803590602001918460018302840111600160201b831117156104fd57600080fd5b919390929091602081019035600160201b81111561051a57600080fd5b82018360208201111561052c57600080fd5b803590602001918460018302840111600160201b8311171561054d57600080fd5b509092509050611816565b6102a5600480360360a081101561056e57600080fd5b810190602081018135600160201b81111561058857600080fd5b82018360208201111561059a57600080fd5b803590602001918460018302840111600160201b831117156105bb57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b81111561060d57600080fd5b82018360208201111561061f57600080fd5b803590602001918460018302840111600160201b8311171561064057600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b81111561069257600080fd5b8201836020820111156106a457600080fd5b803590602001918460018302840111600160201b831117156106c557600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b81111561071757600080fd5b82018360208201111561072957600080fd5b803590602001918460018302840111600160201b8311171561074a57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b81111561079c57600080fd5b8201836020820111156107ae57600080fd5b803590602001918460018302840111600160201b831117156107cf57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550611f55945050505050565b6103fa6004803603602081101561082657600080fd5b50356001600160a01b0316612636565b6001546001600160a01b031681565b60008054600160a01b900460ff1615610898576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b6108a0614778565b6108a985612689565b90506000600160009054906101000a90046001600160a01b031690506000816001600160a01b0316635ac407906040518163ffffffff1660e01b815260040160206040518083038186803b15801561090057600080fd5b505afa158015610914573d6000803e3d6000fd5b505050506040513d602081101561092a57600080fd5b5051606084015163ffffffff91821692501681106109795760405162461bcd60e51b815260040180806020018281038252603e815260200180614993603e913960400191505060405180910390fd5b6101408301516bffffffffffffffffffffffff19166109c95760405162461bcd60e51b81526004018080602001828103825260258152602001806148656025913960400191505060405180910390fd5b6060610af7836001600160a01b03166369d480746040518163ffffffff1660e01b815260040160006040518083038186803b158015610a0757600080fd5b505afa158015610a1b573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526020811015610a4457600080fd5b8101908080516040519392919084600160201b821115610a6357600080fd5b908301906020820185811115610a7857600080fd5b8251600160201b811182820188101715610a9157600080fd5b82525081516020918201929091019080838360005b83811015610abe578181015183820152602001610aa6565b50505050905090810190601f168015610aeb5780820380516001836020036101000a031916815260200191505b506040525050506127a8565b8051909150610b12898884600360001986015b04850361285b565b610b63576040805162461bcd60e51b815260206004820152601860248201527f566572696679207369676e6174757265206661696c6564210000000000000000604482015290519081900360640190fd5b60006060610b708a612a60565b91509150816001600160601b0319168761014001516001600160601b03191614610bd7576040805162461bcd60e51b815260206004820152601360248201527213995e1d109bdbdad95c9cc81a5b1b1959d85b606a1b604482015290519081900360640190fd5b856001600160a01b0316638a8bd17f88606001516040518263ffffffff1660e01b8152600401808263ffffffff1663ffffffff168152602001915050602060405180830381600087803b158015610c2d57600080fd5b505af1158015610c41573d6000803e3d6000fd5b505050506040513d6020811015610c5757600080fd5b5051610c945760405162461bcd60e51b815260040180806020018281038252602d815260200180614aad602d913960400191505060405180910390fd5b856001600160a01b03166341973cd9610cac83612b3f565b6040518263ffffffff1660e01b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610cf8578181015183820152602001610ce0565b50505050905090810190601f168015610d255780820380516001836020036101000a031916815260200191505b5092505050602060405180830381600087803b158015610d4457600080fd5b505af1158015610d58573d6000803e3d6000fd5b505050506040513d6020811015610d6e57600080fd5b5051610dab5760405162461bcd60e51b815260040180806020018281038252603b8152602001806149fc603b913960400191505060405180910390fd5b7fe60d33488cba3977bf65766cd2f8ac9617f64bf3b3198aff6240ce5c7d43b69087606001518c604051808363ffffffff16815260200180602001828103825283818151815260200191508051906020019080838360005b83811015610e1b578181015183820152602001610e03565b50505050905090810190601f168015610e485780820380516001836020036101000a031916815260200191505b50935050505060405180910390a15060019a9950505050505050505050565b60008054600160a01b900460ff1615610eba576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b60015460408051631a75201d60e21b815290516001600160a01b039092169182916369d48074916004808301926000929190829003018186803b158015610f0057600080fd5b505afa158015610f14573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526020811015610f3d57600080fd5b8101908080516040519392919084600160201b821115610f5c57600080fd5b908301906020820185811115610f7157600080fd5b8251600160201b811182820188101715610f8a57600080fd5b82525081516020918201929091019080838360005b83811015610fb7578181015183820152602001610f9f565b50505050905090810190601f168015610fe45780820380516001836020036101000a031916815260200191505b506040525050505160001461102a5760405162461bcd60e51b8152600401808060200182810382526038815260200180614b926038913960400191505060405180910390fd5b611032614778565b61103b85612689565b90506000606061104a86612a60565b91509150816001600160601b0319168361014001516001600160601b031916146110b1576040805162461bcd60e51b815260206004820152601360248201527213995e1d109bdbdad95c9cc81a5b1b1959d85b606a1b604482015290519081900360640190fd5b836001600160a01b0316638a8bd17f84606001516040518263ffffffff1660e01b8152600401808263ffffffff1663ffffffff168152602001915050602060405180830381600087803b15801561110757600080fd5b505af115801561111b573d6000803e3d6000fd5b505050506040513d602081101561113157600080fd5b505161116e5760405162461bcd60e51b81526004018080602001828103825260438152602001806148fc6043913960600191505060405180910390fd5b836001600160a01b03166341973cd961118683612b3f565b6040518263ffffffff1660e01b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156111d25781810151838201526020016111ba565b50505050905090810190601f1680156111ff5780820380516001836020036101000a031916815260200191505b5092505050602060405180830381600087803b15801561121e57600080fd5b505af1158015611232573d6000803e3d6000fd5b505050506040513d602081101561124857600080fd5b50516112855760405162461bcd60e51b8152600401808060200182810382526043815260200180614bca6043913960600191505060405180910390fd5b7ff01968fc3a2655cf1b5144cb32de6dc898f91b9239c103744e8457152ab2fbde836060015188604051808363ffffffff16815260200180602001828103825283818151815260200191508051906020019080838360005b838110156112f55781810151838201526020016112dd565b50505050905090810190601f1680156113225780820380516001836020036101000a031916815260200191505b50935050505060405180910390a15060019695505050505050565b60006113476117f2565b611386576040805162461bcd60e51b81526020600482018190526024820152600080516020614a37833981519152604482015290519081900360640190fd5b61138e6114bc565b1561139b5761139b612c41565b60015460408051635c975abb60e01b815290516001600160a01b03909216918291635c975abb916004808301926020929190829003018186803b1580156113e157600080fd5b505afa1580156113f5573d6000803e3d6000fd5b505050506040513d602081101561140b57600080fd5b5051156114b457806001600160a01b0316633f4ba83a6040518163ffffffff1660e01b8152600401602060405180830381600087803b15801561144d57600080fd5b505af1158015611461573d6000803e3d6000fd5b505050506040513d602081101561147757600080fd5b50516114b45760405162461bcd60e51b815260040180806020018281038252602981526020018061488a6029913960400191505060405180910390fd5b600191505090565b600054600160a01b900460ff1690565b6114d46117f2565b611513576040805162461bcd60e51b81526020600482018190526024820152600080516020614a37833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b60008054600160a01b900460ff166115b3576040805162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015290519081900360640190fd5b6115bb6117f2565b6115fa576040805162461bcd60e51b81526020600482018190526024820152600080516020614a37833981519152604482015290519081900360640190fd5b6001546040805163f2fde38b60e01b81526001600160a01b03858116600483015291519190921691829163f2fde38b9160248082019260009290919082900301818387803b15801561164b57600080fd5b505af115801561165f573d6000803e3d6000fd5b5050505060019150505b919050565b60006116786117f2565b6116b7576040805162461bcd60e51b81526020600482018190526024820152600080516020614a37833981519152604482015290519081900360640190fd5b6116bf6114bc565b6116cb576116cb612ce9565b60015460408051635c975abb60e01b815290516001600160a01b03909216918291635c975abb916004808301926020929190829003018186803b15801561171157600080fd5b505afa158015611725573d6000803e3d6000fd5b505050506040513d602081101561173b57600080fd5b50516114b457806001600160a01b0316638456cb596040518163ffffffff1660e01b8152600401602060405180830381600087803b15801561177c57600080fd5b505af1158015611790573d6000803e3d6000fd5b505050506040513d60208110156117a657600080fd5b50516114b45760405162461bcd60e51b815260040180806020018281038252602781526020018061483e6027913960400191505060405180910390fd5b6000546001600160a01b031690565b600080546001600160a01b0316611807612d73565b6001600160a01b031614905090565b60008054600160a01b900460ff1615611869576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b60015460408051600162c2db5f60e01b0319815290516001600160a01b0390921691600091839163ff3d24a191600480820192602092909190829003018186803b1580156118b657600080fd5b505afa1580156118ca573d6000803e3d6000fd5b505050506040513d60208110156118e057600080fd5b5051905060606118ef82612d77565b905060606118fc82612df0565b611a2a6002308560405160200180836001600160a01b03166001600160a01b031660601b815260140182805190602001908083835b602083106119505780518252601f199092019160209182019101611931565b6001836020036101000a038019825116818451168082178552505050505050905001925050506040516020818303038152906040526040518082805190602001908083835b602083106119b45780518252601f199092019160209182019101611995565b51815160209384036101000a60001901801990921691161790526040519190930194509192505080830381855afa1580156119f3573d6000803e3d6000fd5b5050506040513d6020811015611a0857600080fd5b5051604080516020818101939093528151808203909301835281019052612df0565b611a3b611a3633612eb6565b612df0565b611a448f612ed1565b611a838f8f8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250612df092505050565b611ac28e8e8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250612df092505050565b611b018d8d8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250612df092505050565b6040516020018088805190602001908083835b60208310611b335780518252601f199092019160209182019101611b14565b51815160209384036101000a60001901801990921691161790528a5191909301928a0191508083835b60208310611b7b5780518252601f199092019160209182019101611b5c565b51815160209384036101000a600019018019909216911617905289519190930192890191508083835b60208310611bc35780518252601f199092019160209182019101611ba4565b51815160209384036101000a600019018019909216911617905288519190930192880191508083835b60208310611c0b5780518252601f199092019160209182019101611bec565b51815160209384036101000a600019018019909216911617905287519190930192870191508083835b60208310611c535780518252601f199092019160209182019101611c34565b51815160209384036101000a600019018019909216911617905286519190930192860191508083835b60208310611c9b5780518252601f199092019160209182019101611c7c565b51815160209384036101000a600019018019909216911617905285519190930192850191508083835b60208310611ce35780518252601f199092019160209182019101611cc4565b6001836020036101000a0380198251168184511680821785525050505050509050019750505050505050506040516020818303038152906040529050836001600160a01b0316634c3ccf6482805190602001206040518263ffffffff1660e01b815260040180828152602001915050602060405180830381600087803b158015611d6c57600080fd5b505af1158015611d80573d6000803e3d6000fd5b505050506040513d6020811015611d9657600080fd5b5051611dd35760405162461bcd60e51b8152600401808060200182810382526030815260200180614c516030913960400191505060405180910390fd5b326001600160a01b03167f6ad3bf15c1988bc04bc153490cab16db8efb9a3990215bf1c64ea6e28be8848383338f8f8f876040518080602001876001600160a01b03166001600160a01b03168152602001866001600160401b03166001600160401b03168152602001806020018060200184810384528a818151815260200191508051906020019080838360005b83811015611e79578181015183820152602001611e61565b50505050905090810190601f168015611ea65780820380516001836020036101000a031916815260200191505b5084810383528681526020018787808284376000838201819052601f909101601f191690920186810384528751815287516020918201939189019250908190849084905b83811015611f02578181015183820152602001611eea565b50505050905090810190601f168015611f2f5780820380516001836020036101000a031916815260200191505b50995050505050505050505060405180910390a25060019b9a5050505050505050505050565b60008054600160a01b900460ff1615611fa8576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b611fb0614778565b611fb986612689565b90506000600160009054906101000a90046001600160a01b031690506060612013826001600160a01b03166369d480746040518163ffffffff1660e01b815260040160006040518083038186803b158015610a0757600080fd5b90506000826001600160a01b0316635ac407906040518163ffffffff1660e01b815260040160206040518083038186803b15801561205057600080fd5b505afa158015612064573d6000803e3d6000fd5b505050506040513d602081101561207a57600080fd5b50518251606086015163ffffffff928316935090911682116120e8576120a88a888560036000198601610b0a565b6120e35760405162461bcd60e51b815260040180806020018281038252602a815260200180614cf1602a913960400191505060405180910390fd5b6121c2565b6120fa88888560036000198601610b0a565b6121355760405162461bcd60e51b8152600401808060200182810382526038815260200180614ada6038913960400191505060405180910390fd5b61213d614778565b61214689612689565b905060606121598b836101000151612f14565b90506121648161303a565b61216d8d61309a565b146121bf576040805162461bcd60e51b815260206004820152601b60248201527f766572696679206865616465722070726f6f66206661696c6564210000000000604482015290519081900360640190fd5b50505b60606121d28c8760e00151612f14565b90506121dc6147d3565b6121e5826131cb565b9050856001600160a01b0316630586763c8260200151612208846000015161303a565b6040518363ffffffff1660e01b815260040180836001600160401b03166001600160401b031681526020018281526020019250505060206040518083038186803b15801561225557600080fd5b505afa158015612269573d6000803e3d6000fd5b505050506040513d602081101561227f57600080fd5b5051156122bd5760405162461bcd60e51b8152600401808060200182810382526022815260200180614c2f6022913960400191505060405180910390fd5b856001600160a01b031663e90bfdcf82602001516122de846000015161303a565b6040518363ffffffff1660e01b815260040180836001600160401b03166001600160401b0316815260200182815260200192505050602060405180830381600087803b15801561232d57600080fd5b505af1158015612341573d6000803e3d6000fd5b505050506040513d602081101561235757600080fd5b50516123aa576040805162461bcd60e51b815260206004820181905260248201527f536176652063726f7373636861696e207478206578697374206661696c656421604482015290519081900360640190fd5b6040810151606001516001600160401b03166002146123fa5760405162461bcd60e51b815260040180806020018281038252602a815260200180614c81602a913960400191505060405180910390fd5b600061240d8260400151608001516132a7565b905061243881836040015160a00151846040015160c0015185604001516040015186602001516132f1565b612489576040805162461bcd60e51b815260206004820152601d60248201527f457865637574652043726f7373436861696e205478206661696c656421000000604482015290519081900360640190fd5b7f8a4a2663ce60ce4955c595da2894de0415240f1ace024cfbff85f513b656bdae8260200151836040015160800151846000015185604001516000015160405180856001600160401b03166001600160401b03168152602001806020018060200180602001848103845287818151815260200191508051906020019080838360005b8381101561252357818101518382015260200161250b565b50505050905090810190601f1680156125505780820380516001836020036101000a031916815260200191505b50848103835286518152865160209182019188019080838360005b8381101561258357818101518382015260200161256b565b50505050905090810190601f1680156125b05780820380516001836020036101000a031916815260200191505b50848103825285518152855160209182019187019080838360005b838110156125e35781810151838201526020016125cb565b50505050905090810190601f1680156126105780820380516001836020036101000a031916815260200191505b5097505050505050505060405180910390a15060019d9c50505050505050505050505050565b61263e6117f2565b61267d576040805162461bcd60e51b81526020600482018190526024820152600080516020614a37833981519152604482015290519081900360640190fd5b612686816136c5565b50565b612691614778565b612699614778565b60006126a58482613765565b63ffffffff909116835290506126bb848261380d565b6001600160401b03909116602084015290506126d784826138b3565b60a084019190915290506126eb84826138b3565b60c084019190915290506126ff84826138b3565b60e0840191909152905061271384826138b3565b61010084019190915290506127288482613765565b63ffffffff909116604084015290506127418482613765565b63ffffffff9091166060840152905061275a848261380d565b6001600160401b0390911660808401529050612776848261392d565b610120840191909152905061278b8482613a00565b506bffffffffffffffffffffffff19166101408301525092915050565b60606000806127b7848261380d565b80935081925050506060816001600160401b03166040519080825280602002602001820160405280156127f4578160200160208202803883390190505b509050606060005b836001600160401b031681101561285057612817878661392d565b95509150612824826132a7565b83828151811061283057fe5b6001600160a01b03909216602092830291909101909101526001016127fc565b509095945050505050565b6000806128678661309a565b905060008090506000604187518161287b57fe5b0490506060816040519080825280602002602001820160405280156128aa578160200160208202803883390190505b50905060008080805b85811015612a44576128d26128cd8d604184026020613a68565b61303a565b93506128e96128cd8d604184026020016020613a68565b92508b60418202604001815181106128fd57fe5b602001015160f81c60f81b60f81c601b0191506001600289604051602001808281526020019150506040516020818303038152906040526040518082805190602001908083835b602083106129635780518252601f199092019160209182019101612944565b51815160209384036101000a60001901801990921691161790526040519190930194509192505080830381855afa1580156129a2573d6000803e3d6000fd5b5050506040513d60208110156129b757600080fd5b5051604080516000815260208181018084529390935260ff8616818301526060810188905260808101879052905160a08083019392601f198301929081900390910190855afa158015612a0e573d6000803e3d6000fd5b50505060206040510351858281518110612a2457fe5b6001600160a01b03909216602092830291909101909101526001016128b3565b50612a508a858b613ae8565b9c9b505050505050505050505050565b600060606043835181612a6f57fe5b0615612ac2576040805162461bcd60e51b815260206004820152601b60248201527f5f7075624b65794c697374206c656e67746820696c6c6567616c210000000000604482015290519081900360640190fd5b60006043845181612acf57fe5b0490506001811015612b21576040805162461bcd60e51b8152602060048201526016602482015275746f6f2073686f7274205f7075624b65794c6973742160501b604482015290519081900360640190fd5b612b35816003600019820104830386613b89565b9250925050915091565b805160609081612b4e82612ed1565b905060005b82811015612c395781612b7b611a36878481518110612b6e57fe5b6020026020010151612eb6565b6040516020018083805190602001908083835b60208310612bad5780518252601f199092019160209182019101612b8e565b51815160209384036101000a600019018019909216911617905285519190930192850191508083835b60208310612bf55780518252601f199092019160209182019101612bd6565b6001836020036101000a0380198251168184511680821785525050505050509050019250505060405160208183030381529060405291508080600101915050612b53565b509392505050565b600054600160a01b900460ff16612c96576040805162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015290519081900360640190fd5b6000805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa612ccc612d73565b604080516001600160a01b039092168252519081900360200190a1565b600054600160a01b900460ff1615612d3b576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b6000805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258612ccc5b3390565b60606001600160ff1b03821115612dd5576040805162461bcd60e51b815260206004820152601760248201527f56616c75652065786365656473207468652072616e6765000000000000000000604482015290519081900360640190fd5b60405190506020815281602082015260408101604052919050565b8051606090612dfe81613ed6565b836040516020018083805190602001908083835b60208310612e315780518252601f199092019160209182019101612e12565b51815160209384036101000a600019018019909216911617905285519190930192850191508083835b60208310612e795780518252601f199092019160209182019101612e5a565b6001836020036101000a03801982511681845116808217855250505050505090500192505050604051602081830303815290604052915050919050565b604080516014815260609290921b6020830152818101905290565b6040516008808252606091906000601f5b82821015612f045785811a826020860101536001919091019060001901612ee2565b5050506028810160405292915050565b6060600081612f23858361392d565b925090506000612f328261401c565b9050600060218488510381612f4357fe5b049050600080805b83811015612fee57612f5d8a886140c3565b97509150612f6b8a886138b3565b975092506001600160f81b03198216612f8f57612f888386614141565b9450612fe6565b600160f81b6001600160f81b031983161415612faf57612f888584614141565b60405162461bcd60e51b815260040180806020018281038252602e815260200180614a57602e913960400191505060405180910390fd5b600101612f4b565b5087841461302d5760405162461bcd60e51b81526004018080602001828103825260318152602001806149626031913960400191505060405180910390fd5b5092979650505050505050565b60008151602014613092576040805162461bcd60e51b815260206004820152601760248201527f6279746573206c656e677468206973206e6f742033322e000000000000000000604482015290519081900360640190fd5b506020015190565b6000600280836040518082805190602001908083835b602083106130cf5780518252601f1990920191602091820191016130b0565b51815160209384036101000a60001901801990921691161790526040519190930194509192505080830381855afa15801561310e573d6000803e3d6000fd5b5050506040513d602081101561312357600080fd5b50516040805160208181019390935281518082038401815290820191829052805190928291908401908083835b6020831061316f5780518252601f199092019160209182019101613150565b51815160209384036101000a60001901801990921691161790526040519190930194509192505080830381855afa1580156131ae573d6000803e3d6000fd5b5050506040513d60208110156131c357600080fd5b505192915050565b6131d36147d3565b6131db6147d3565b60006131e7848261392d565b90835290506131f6848261380d565b6001600160401b03909116602084015290506132106147f7565b61321a858361392d565b9082529150613229858361392d565b6020830191909152915061323d858361392d565b60408301919091529150613251858361380d565b6001600160401b039091166060830152915061326d858361392d565b60808301919091529150613281858361392d565b60a08301919091529150613295858361392d565b5060c082015260408301525092915050565b600081516014146132e95760405162461bcd60e51b81526004018080602001828103825260238152602001806148b36023913960400191505060405180910390fd5b506014015190565b60006132fc86614205565b6133375760405162461bcd60e51b8152600401808060200182810382526028815260200180614a856028913960400191505060405180910390fd5b60606000876001600160a01b0316876040516020018082805190602001908083835b602083106133785780518252601f199092019160209182019101613359565b51815160001960209485036101000a01908116901991909116179052732862797465732c62797465732c75696e7436342960601b9390910192835260408051600b19818603018152601485019091528051908201206001600160401b038b1660748501526060603485019081528d5160948601528d519196508d95508c948c945090928392605483019260b4019188019080838360005b8381101561342757818101518382015260200161340f565b50505050905090810190601f1680156134545780820380516001836020036101000a031916815260200191505b50838103825285518152855160209182019187019080838360005b8381101561348757818101518382015260200161346f565b50505050905090810190601f1680156134b45780820380516001836020036101000a031916815260200191505b509550505050505060405160208183030381529060405260405160200180836001600160e01b0319166001600160e01b031916815260040182805190602001908083835b602083106135175780518252601f1990920191602091820191016134f8565b6001836020036101000a038019825116818451168082178552505050505050905001925050506040516020818303038152906040526040518082805190602001908083835b6020831061357b5780518252601f19909201916020918201910161355c565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d80600081146135dd576040519150601f19603f3d011682016040523d82523d6000602084013e6135e2565b606091505b50925090506001811515146136285760405162461bcd60e51b815260040180806020018281038252602b8152602001806149d1602b913960400191505060405180910390fd5b81516136655760405162461bcd60e51b8152600401808060200182810382526027815260200180614b126027913960400191505060405180910390fd5b600061367283601f614241565b5090506001811515146136b65760405162461bcd60e51b8152600401808060200182810382526037815260200180614b396037913960400191505060405180910390fd5b50600198975050505050505050565b6001600160a01b03811661370a5760405162461bcd60e51b81526004018080602001828103825260268152602001806148d66026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000808351836004011115801561377e57508260040183105b6137b95760405162461bcd60e51b8152600401808060200182810382526022815260200180614cab6022913960400191505060405180910390fd5b600060405160046000600182038760208a0101515b838310156137ee5780821a838601536001830192506001820391506137ce565b50505080820160405260200390035192505050600482015b9250929050565b6000808351836008011115801561382657508260080183105b6138615760405162461bcd60e51b8152600401808060200182810382526022815260200180614c0d6022913960400191505060405180910390fd5b600060405160086000600182038760208a0101515b838310156138965780821a83860153600183019250600182039150613876565b505050808201604052602003900351956008949094019450505050565b600080835183602001111580156138cc57508260200183105b61391d576040805162461bcd60e51b815260206004820181905260248201527f4e657874486173682c206f66667365742065786365656473206d6178696d756d604482015290519081900360640190fd5b5050602091810182015192910190565b606060008061393c8585614332565b865190955090915081850111801590613956575080840184105b6139915760405162461bcd60e51b8152600401808060200182810382526024815260200180614ccd6024913960400191505060405180910390fd5b6060811580156139ac576040519150602082016040526139f6565b6040519150601f8316801560200281840101848101888315602002848c0101015b818310156139e55780518352602092830192016139cd565b5050848452601f01601f1916604052505b5095930193505050565b60008083518360140111158015613a1957508260140183105b613a545760405162461bcd60e51b815260040180806020018281038252602381526020018061493f6023913960400191505060405180910390fd5b505081810160200151601482019250929050565b606081830184511015613a7a57600080fd5b606082158015613a9557604051915060208201604052613adf565b6040519150601f8416801560200281840101858101878315602002848b0101015b81831015613ace578051835260209283019201613ab6565b5050858452601f01601f1916604052505b50949350505050565b600080805b8451811015613b7d5760005b8651811015613b7457868181518110613b0e57fe5b60200260200101516001600160a01b0316868381518110613b2b57fe5b60200260200101516001600160a01b03161415613b6c578280600101935050868181518110613b5657fe5b6020026020010160006001600160a01b03168152505b600101613af9565b50600101613aed565b50909111159392505050565b6000606080613b978661454b565b9050606086604051908082528060200260200182016040528015613bc5578160200160208202803883390190505b50905060006060815b89811015613ceb57613be588604383026043613a68565b915084613bf4611a368461458e565b6040516020018083805190602001908083835b60208310613c265780518252601f199092019160209182019101613c07565b51815160209384036101000a600019018019909216911617905285519190930192850191508083835b60208310613c6e5780518252601f199092019160209182019101613c4f565b6001836020036101000a038019825116818451168082178552505050505050905001925050506040516020818303038152906040529450613cb28260036040613a68565b8051906020012092508260001c848281518110613ccb57fe5b6001600160a01b0390921660209283029190910190910152600101613bce565b5083613cf68961454b565b6040516020018083805190602001908083835b60208310613d285780518252601f199092019160209182019101613d09565b51815160209384036101000a600019018019909216911617905285519190930192850191508083835b60208310613d705780518252601f199092019160209182019101613d51565b6001836020036101000a038019825116818451168082178552505050505050905001925050506040516020818303038152906040529350600060036002866040518082805190602001908083835b60208310613ddd5780518252601f199092019160209182019101613dbe565b51815160209384036101000a60001901801990921691161790526040519190930194509192505080830381855afa158015613e1c573d6000803e3d6000fd5b5050506040513d6020811015613e3157600080fd5b50516040805160208181019390935281518082038401815290820191829052805190928291908401908083835b60208310613e7d5780518252601f199092019160209182019101613e5e565b51815160209384036101000a60001901801990921691161790526040519190930194509192505080830381855afa158015613ebc573d6000803e3d6000fd5b50506040515160601b9b949a509398505050505050505050565b606060fd826001600160401b03161015613efa57613ef38261467c565b9050611669565b61ffff826001600160401b031611613fd857613f1960fd60f81b614698565b613f228361454b565b6040516020018083805190602001908083835b60208310613f545780518252601f199092019160209182019101613f35565b51815160209384036101000a600019018019909216911617905285519190930192850191508083835b60208310613f9c5780518252601f199092019160209182019101613f7d565b6001836020036101000a038019825116818451168082178552505050505050905001925050506040516020818303038152906040529050611669565b63ffffffff826001600160401b03161161400257613ff9607f60f91b614698565b613f22836146ac565b6140136001600160f81b0319614698565b613f2283612ed1565b6040516000602080830182815284519293600293859387939260210191908401908083835b602083106140605780518252601f199092019160209182019101614041565b6001836020036101000a038019825116818451168082178552505050505050905001925050506040516020818303038152906040526040518082805190602001908083836020831061316f5780518252601f199092019160209182019101613150565b600080835183600101111580156140dc57508260010183105b61412d576040805162461bcd60e51b815260206004820181905260248201527f4e657874427974652c204f66667365742065786365656473206d6178696d756d604482015290519081900360640190fd5b505081810160200151600182019250929050565b60408051600160f81b60208083019190915260218201859052604180830185905283518084039091018152606190920192839052815160009360029392909182918401908083835b602083106141a85780518252601f199092019160209182019101614189565b51815160209384036101000a60001901801990921691161790526040519190930194509192505080830381855afa1580156141e7573d6000803e3d6000fd5b5050506040513d60208110156141fc57600080fd5b50519392505050565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47081158015906142395750808214155b949350505050565b6000808351836001011115801561425a57508260010183105b6142a2576040805162461bcd60e51b815260206004820152601460248201527313d9999cd95d08195e18d959591cc81b1a5b5a5d60621b604482015290519081900360640190fd5b838301602001516000600160f81b6001600160f81b0319831614156142c957506001614324565b6001600160f81b031982166142e057506000614324565b6040805162461bcd60e51b81526020600482015260146024820152732732bc3a2137b7b6103b30b63ab29032b93937b960611b604482015290519081900360640190fd5b956001949094019450505050565b600080600061434185856140c3565b94509050600060fd60f81b6001600160f81b0319831614156143df5761436786866146ef565b955061ffff16905060fd8110801590614382575061ffff8111155b6143d3576040805162461bcd60e51b815260206004820152601f60248201527f4e65787455696e7431362c2076616c7565206f7574736964652072616e676500604482015290519081900360640190fd5b92508391506138069050565b607f60f91b6001600160f81b03198316141561446f576143ff8686613765565b955063ffffffff16905061ffff8111801561441e575063ffffffff8111155b6143d3576040805162461bcd60e51b815260206004820181905260248201527f4e65787456617255696e742c2076616c7565206f7574736964652072616e6765604482015290519081900360640190fd5b6001600160f81b031980831614156144f05761448b868661380d565b95506001600160401b0316905063ffffffff81116143d3576040805162461bcd60e51b815260206004820181905260248201527f4e65787456617255696e742c2076616c7565206f7574736964652072616e6765604482015290519081900360640190fd5b5060f881901c60fd81106143d3576040805162461bcd60e51b815260206004820181905260248201527f4e65787456617255696e742c2076616c7565206f7574736964652072616e6765604482015290519081900360640190fd5b6040516002808252606091906000601f5b8282101561457e5785811a82602086010153600191909101906000190161455c565b5050506022810160405292915050565b60606043825110156145e7576040805162461bcd60e51b815260206004820152601760248201527f6b6579206c656e67676820697320746f6f2073686f7274000000000000000000604482015290519081900360640190fd5b6145f48260006023613a68565b905060028260428151811061460557fe5b016020015160f81c8161461457fe5b0660ff166000141561464e57600260f81b8160028151811061463257fe5b60200101906001600160f81b031916908160001a905350611669565b600360f81b8160028151811061466057fe5b60200101906001600160f81b031916908160001a905350919050565b604080516001815260f89290921b602083015260218201905290565b60606146a68260f81c61467c565b92915050565b6040516004808252606091906000601f5b828210156146df5785811a8260208601015360019190910190600019016146bd565b5050506024810160405292915050565b6000808351836002011115801561470857508260020183105b6147435760405162461bcd60e51b8152600401808060200182810382526022815260200180614b706022913960400191505060405180910390fd5b6000604051846020870101518060011a82538060001a6001830153506002818101604052601d19909101519694019450505050565b604080516101608101825260008082526020820181905291810182905260608082018390526080820183905260a0820183905260c0820183905260e08201839052610100820183905261012082015261014081019190915290565b60408051606080820183528152600060208201529081016147f26147f7565b905290565b6040518060e0016040528060608152602001606081526020016060815260200160006001600160401b03168152602001606081526020016060815260200160608152509056fe70617573652045746843726f7373436861696e4461746120636f6e7472616374206661696c6564546865206e657874426f6f6b4b6565706572206f662068656164657220697320656d707479756e70617573652045746843726f7373436861696e4461746120636f6e7472616374206661696c65646279746573206c656e67746820646f6573206e6f74206d6174636820616464726573734f776e61626c653a206e6577206f776e657220697320746865207a65726f20616464726573735361766520506f6c7920636861696e2063757272656e742065706f63682073746172742068656967687420746f204461746120636f6e7472616374206661696c6564214e657874427974657332302c206f66667365742065786365656473206d6178696d756d6d65726b6c6550726f76652c2065787065637420726f6f74206973206e6f7420657175616c2061637475616c20726f6f7454686520686569676874206f6620686561646572206973206c6f776572207468616e2063757272656e742065706f6368207374617274206865696768742145746843726f7373436861696e2063616c6c20627573696e65737320636f6e7472616374206661696c65645361766520506f6c7920636861696e20626f6f6b206b65657065727320627974657320746f204461746120636f6e7472616374206661696c6564214f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726d65726b6c6550726f76652c204e6578744279746520666f7220706f736974696f6e20696e666f206661696c65645468652070617373656420696e2061646472657373206973206e6f74206120636f6e74726163742153617665204d43204c617465737448656967687420746f204461746120636f6e7472616374206661696c65642156657269667920706f6c7920636861696e2063757272656e742065706f636820686561646572207369676e6174757265206661696c6564214e6f2072657475726e2076616c75652066726f6d20627573696e65737320636f6e74726163742145746843726f7373436861696e2063616c6c20627573696e65737320636f6e74726163742072657475726e206973206e6f7420747275654e65787455696e7431362c206f66667365742065786365656473206d6178696d756d45746843726f7373436861696e4461746120636f6e74726163742068617320616c7265616479206265656e20696e697469616c697a6564215361766520506f6c7920636861696e2063757272656e742065706f636820626f6f6b206b65657065727320746f204461746120636f6e7472616374206661696c6564214e65787455696e7436342c206f66667365742065786365656473206d6178696d756d746865207472616e73616374696f6e20686173206265656e20657865637574656421536176652065746854784861736820627920696e64657820746f204461746120636f6e7472616374206661696c65642154686973205478206973206e6f742061696d696e6720617420457468657265756d206e6574776f726b214e65787455696e7433322c206f66667365742065786365656473206d6178696d756d4e65787456617242797465732c206f66667365742065786365656473206d6178696d756d56657269667920706f6c7920636861696e20686561646572207369676e6174757265206661696c656421a265627a7a7231582031272db0ab2f24788c136102f4178cd522f2527784d04eb7529afa832f8c13e864736f6c634300050f0032" +var EthCrossChainManagerBin = "0x60806040523480156200001157600080fd5b5060405162004fb038038062004fb0833981810160405260408110156200003757600080fd5b50805160209091015181816000620000576001600160e01b03620000fa16565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3506000805460ff60a01b19169055600180546001600160401b03909216600160a01b02600160a01b600160e01b03196001600160a01b039094166001600160a01b0319909316929092179290921617905550620000fe9050565b3390565b614ea2806200010e6000396000f3fe608060405234801561001057600080fd5b50600436106100f45760003560e01c80637e724ff3116100975780639a8a0592116100665780639a8a059214610486578063bd5cf625146104aa578063d450e04c146105c8578063f2fde38b14610880576100f4565b80637e724ff3146104485780638456cb591461046e5780638da5cb5b146104765780638f32d59b1461047e576100f4565b80633f4ba83a116100d35780633f4ba83a146104085780635c975abb146104105780636f31031d14610418578063715018a61461043e576100f4565b8062ba1694146100f957806329dcf4ab1461011d57806334a773eb146102df575b600080fd5b6101016108a6565b604080516001600160a01b039092168252519081900360200190f35b6102cb6004803603606081101561013357600080fd5b810190602081018135600160201b81111561014d57600080fd5b82018360208201111561015f57600080fd5b803590602001918460018302840111600160201b8311171561018057600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b8111156101d257600080fd5b8201836020820111156101e457600080fd5b803590602001918460018302840111600160201b8311171561020557600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b81111561025757600080fd5b82018360208201111561026957600080fd5b803590602001918460018302840111600160201b8311171561028a57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506108b5945050505050565b604080519115158252519081900360200190f35b6102cb600480360360408110156102f557600080fd5b810190602081018135600160201b81111561030f57600080fd5b82018360208201111561032157600080fd5b803590602001918460018302840111600160201b8311171561034257600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b81111561039457600080fd5b8201836020820111156103a657600080fd5b803590602001918460018302840111600160201b831117156103c757600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610ed7945050505050565b6102cb6113ad565b6102cb61152c565b6102cb6004803603602081101561042e57600080fd5b50356001600160401b031661153c565b610446611605565b005b6102cb6004803603602081101561045e57600080fd5b50356001600160a01b0316611696565b6102cb6117a5565b61010161191a565b6102cb611929565b61048e61194d565b604080516001600160401b039092168252519081900360200190f35b6102cb600480360360808110156104c057600080fd5b6001600160401b038235169190810190604081016020820135600160201b8111156104ea57600080fd5b8201836020820111156104fc57600080fd5b803590602001918460018302840111600160201b8311171561051d57600080fd5b919390929091602081019035600160201b81111561053a57600080fd5b82018360208201111561054c57600080fd5b803590602001918460018302840111600160201b8311171561056d57600080fd5b919390929091602081019035600160201b81111561058a57600080fd5b82018360208201111561059c57600080fd5b803590602001918460018302840111600160201b831117156105bd57600080fd5b509092509050611963565b6102cb600480360360a08110156105de57600080fd5b810190602081018135600160201b8111156105f857600080fd5b82018360208201111561060a57600080fd5b803590602001918460018302840111600160201b8311171561062b57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b81111561067d57600080fd5b82018360208201111561068f57600080fd5b803590602001918460018302840111600160201b831117156106b057600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b81111561070257600080fd5b82018360208201111561071457600080fd5b803590602001918460018302840111600160201b8311171561073557600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b81111561078757600080fd5b82018360208201111561079957600080fd5b803590602001918460018302840111600160201b831117156107ba57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b81111561080c57600080fd5b82018360208201111561081e57600080fd5b803590602001918460018302840111600160201b8311171561083f57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506120a2945050505050565b6104466004803603602081101561089657600080fd5b50356001600160a01b031661278f565b6001546001600160a01b031681565b60008054600160a01b900460ff1615610908576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b6109106148cb565b610919856127e2565b90506000600160009054906101000a90046001600160a01b031690506000816001600160a01b0316635ac407906040518163ffffffff1660e01b815260040160206040518083038186803b15801561097057600080fd5b505afa158015610984573d6000803e3d6000fd5b505050506040513d602081101561099a57600080fd5b5051606084015163ffffffff91821692501681106109e95760405162461bcd60e51b815260040180806020018281038252603e815260200180614ae6603e913960400191505060405180910390fd5b6101408301516bffffffffffffffffffffffff1916610a395760405162461bcd60e51b81526004018080602001828103825260258152602001806149b86025913960400191505060405180910390fd5b6060610b67836001600160a01b03166369d480746040518163ffffffff1660e01b815260040160006040518083038186803b158015610a7757600080fd5b505afa158015610a8b573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526020811015610ab457600080fd5b8101908080516040519392919084600160201b821115610ad357600080fd5b908301906020820185811115610ae857600080fd5b8251600160201b811182820188101715610b0157600080fd5b82525081516020918201929091019080838360005b83811015610b2e578181015183820152602001610b16565b50505050905090810190601f168015610b5b5780820380516001836020036101000a031916815260200191505b50604052505050612901565b8051909150610b82898884600360001986015b0485036129b4565b610bd3576040805162461bcd60e51b815260206004820152601860248201527f566572696679207369676e6174757265206661696c6564210000000000000000604482015290519081900360640190fd5b60006060610be08a612bb3565b91509150816001600160601b0319168761014001516001600160601b03191614610c47576040805162461bcd60e51b815260206004820152601360248201527213995e1d109bdbdad95c9cc81a5b1b1959d85b606a1b604482015290519081900360640190fd5b856001600160a01b0316638a8bd17f88606001516040518263ffffffff1660e01b8152600401808263ffffffff1663ffffffff168152602001915050602060405180830381600087803b158015610c9d57600080fd5b505af1158015610cb1573d6000803e3d6000fd5b505050506040513d6020811015610cc757600080fd5b5051610d045760405162461bcd60e51b815260040180806020018281038252602d815260200180614c00602d913960400191505060405180910390fd5b856001600160a01b03166341973cd9610d1c83612c92565b6040518263ffffffff1660e01b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610d68578181015183820152602001610d50565b50505050905090810190601f168015610d955780820380516001836020036101000a031916815260200191505b5092505050602060405180830381600087803b158015610db457600080fd5b505af1158015610dc8573d6000803e3d6000fd5b505050506040513d6020811015610dde57600080fd5b5051610e1b5760405162461bcd60e51b815260040180806020018281038252603b815260200180614b4f603b913960400191505060405180910390fd5b7fe60d33488cba3977bf65766cd2f8ac9617f64bf3b3198aff6240ce5c7d43b69087606001518c604051808363ffffffff16815260200180602001828103825283818151815260200191508051906020019080838360005b83811015610e8b578181015183820152602001610e73565b50505050905090810190601f168015610eb85780820380516001836020036101000a031916815260200191505b50935050505060405180910390a15060019a9950505050505050505050565b60008054600160a01b900460ff1615610f2a576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b60015460408051631a75201d60e21b815290516001600160a01b039092169182916369d48074916004808301926000929190829003018186803b158015610f7057600080fd5b505afa158015610f84573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526020811015610fad57600080fd5b8101908080516040519392919084600160201b821115610fcc57600080fd5b908301906020820185811115610fe157600080fd5b8251600160201b811182820188101715610ffa57600080fd5b82525081516020918201929091019080838360005b8381101561102757818101518382015260200161100f565b50505050905090810190601f1680156110545780820380516001836020036101000a031916815260200191505b506040525050505160001461109a5760405162461bcd60e51b8152600401808060200182810382526038815260200180614ce56038913960400191505060405180910390fd5b6110a26148cb565b6110ab856127e2565b9050600060606110ba86612bb3565b91509150816001600160601b0319168361014001516001600160601b03191614611121576040805162461bcd60e51b815260206004820152601360248201527213995e1d109bdbdad95c9cc81a5b1b1959d85b606a1b604482015290519081900360640190fd5b836001600160a01b0316638a8bd17f84606001516040518263ffffffff1660e01b8152600401808263ffffffff1663ffffffff168152602001915050602060405180830381600087803b15801561117757600080fd5b505af115801561118b573d6000803e3d6000fd5b505050506040513d60208110156111a157600080fd5b50516111de5760405162461bcd60e51b8152600401808060200182810382526043815260200180614a4f6043913960600191505060405180910390fd5b836001600160a01b03166341973cd96111f683612c92565b6040518263ffffffff1660e01b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561124257818101518382015260200161122a565b50505050905090810190601f16801561126f5780820380516001836020036101000a031916815260200191505b5092505050602060405180830381600087803b15801561128e57600080fd5b505af11580156112a2573d6000803e3d6000fd5b505050506040513d60208110156112b857600080fd5b50516112f55760405162461bcd60e51b8152600401808060200182810382526043815260200180614d1d6043913960600191505060405180910390fd5b7ff01968fc3a2655cf1b5144cb32de6dc898f91b9239c103744e8457152ab2fbde836060015188604051808363ffffffff16815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561136557818101518382015260200161134d565b50505050905090810190601f1680156113925780820380516001836020036101000a031916815260200191505b50935050505060405180910390a15060019695505050505050565b60006113b7611929565b6113f6576040805162461bcd60e51b81526020600482018190526024820152600080516020614b8a833981519152604482015290519081900360640190fd5b6113fe61152c565b1561140b5761140b612d94565b60015460408051635c975abb60e01b815290516001600160a01b03909216918291635c975abb916004808301926020929190829003018186803b15801561145157600080fd5b505afa158015611465573d6000803e3d6000fd5b505050506040513d602081101561147b57600080fd5b50511561152457806001600160a01b0316633f4ba83a6040518163ffffffff1660e01b8152600401602060405180830381600087803b1580156114bd57600080fd5b505af11580156114d1573d6000803e3d6000fd5b505050506040513d60208110156114e757600080fd5b50516115245760405162461bcd60e51b81526004018080602001828103825260298152602001806149dd6029913960400191505060405180910390fd5b600191505090565b600054600160a01b900460ff1690565b60008054600160a01b900460ff16611592576040805162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015290519081900360640190fd5b61159a611929565b6115d9576040805162461bcd60e51b81526020600482018190526024820152600080516020614b8a833981519152604482015290519081900360640190fd5b506001805467ffffffffffffffff60a01b1916600160a01b6001600160401b038416021781555b919050565b61160d611929565b61164c576040805162461bcd60e51b81526020600482018190526024820152600080516020614b8a833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b60008054600160a01b900460ff166116ec576040805162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015290519081900360640190fd5b6116f4611929565b611733576040805162461bcd60e51b81526020600482018190526024820152600080516020614b8a833981519152604482015290519081900360640190fd5b6001546040805163f2fde38b60e01b81526001600160a01b03858116600483015291519190921691829163f2fde38b9160248082019260009290919082900301818387803b15801561178457600080fd5b505af1158015611798573d6000803e3d6000fd5b5060019695505050505050565b60006117af611929565b6117ee576040805162461bcd60e51b81526020600482018190526024820152600080516020614b8a833981519152604482015290519081900360640190fd5b6117f661152c565b61180257611802612e3c565b60015460408051635c975abb60e01b815290516001600160a01b03909216918291635c975abb916004808301926020929190829003018186803b15801561184857600080fd5b505afa15801561185c573d6000803e3d6000fd5b505050506040513d602081101561187257600080fd5b505161152457806001600160a01b0316638456cb596040518163ffffffff1660e01b8152600401602060405180830381600087803b1580156118b357600080fd5b505af11580156118c7573d6000803e3d6000fd5b505050506040513d60208110156118dd57600080fd5b50516115245760405162461bcd60e51b81526004018080602001828103825260278152602001806149916027913960400191505060405180910390fd5b6000546001600160a01b031690565b600080546001600160a01b031661193e612ec6565b6001600160a01b031614905090565b600154600160a01b90046001600160401b031681565b60008054600160a01b900460ff16156119b6576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b60015460408051600162c2db5f60e01b0319815290516001600160a01b0390921691600091839163ff3d24a191600480820192602092909190829003018186803b158015611a0357600080fd5b505afa158015611a17573d6000803e3d6000fd5b505050506040513d6020811015611a2d57600080fd5b505190506060611a3c82612eca565b90506060611a4982612f43565b611b776002308560405160200180836001600160a01b03166001600160a01b031660601b815260140182805190602001908083835b60208310611a9d5780518252601f199092019160209182019101611a7e565b6001836020036101000a038019825116818451168082178552505050505050905001925050506040516020818303038152906040526040518082805190602001908083835b60208310611b015780518252601f199092019160209182019101611ae2565b51815160209384036101000a60001901801990921691161790526040519190930194509192505080830381855afa158015611b40573d6000803e3d6000fd5b5050506040513d6020811015611b5557600080fd5b5051604080516020818101939093528151808203909301835281019052612f43565b611b88611b8333613009565b612f43565b611b918f613024565b611bd08f8f8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250612f4392505050565b611c0f8e8e8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250612f4392505050565b611c4e8d8d8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250612f4392505050565b6040516020018088805190602001908083835b60208310611c805780518252601f199092019160209182019101611c61565b51815160209384036101000a60001901801990921691161790528a5191909301928a0191508083835b60208310611cc85780518252601f199092019160209182019101611ca9565b51815160209384036101000a600019018019909216911617905289519190930192890191508083835b60208310611d105780518252601f199092019160209182019101611cf1565b51815160209384036101000a600019018019909216911617905288519190930192880191508083835b60208310611d585780518252601f199092019160209182019101611d39565b51815160209384036101000a600019018019909216911617905287519190930192870191508083835b60208310611da05780518252601f199092019160209182019101611d81565b51815160209384036101000a600019018019909216911617905286519190930192860191508083835b60208310611de85780518252601f199092019160209182019101611dc9565b51815160209384036101000a600019018019909216911617905285519190930192850191508083835b60208310611e305780518252601f199092019160209182019101611e11565b6001836020036101000a0380198251168184511680821785525050505050509050019750505050505050506040516020818303038152906040529050836001600160a01b0316634c3ccf6482805190602001206040518263ffffffff1660e01b815260040180828152602001915050602060405180830381600087803b158015611eb957600080fd5b505af1158015611ecd573d6000803e3d6000fd5b505050506040513d6020811015611ee357600080fd5b5051611f205760405162461bcd60e51b8152600401808060200182810382526030815260200180614da46030913960400191505060405180910390fd5b326001600160a01b03167f6ad3bf15c1988bc04bc153490cab16db8efb9a3990215bf1c64ea6e28be8848383338f8f8f876040518080602001876001600160a01b03166001600160a01b03168152602001866001600160401b03166001600160401b03168152602001806020018060200184810384528a818151815260200191508051906020019080838360005b83811015611fc6578181015183820152602001611fae565b50505050905090810190601f168015611ff35780820380516001836020036101000a031916815260200191505b5084810383528681526020018787808284376000838201819052601f909101601f191690920186810384528751815287516020918201939189019250908190849084905b8381101561204f578181015183820152602001612037565b50505050905090810190601f16801561207c5780820380516001836020036101000a031916815260200191505b50995050505050505050505060405180910390a25060019b9a5050505050505050505050565b60008054600160a01b900460ff16156120f5576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b6120fd6148cb565b612106866127e2565b90506000600160009054906101000a90046001600160a01b031690506060612160826001600160a01b03166369d480746040518163ffffffff1660e01b815260040160006040518083038186803b158015610a7757600080fd5b90506000826001600160a01b0316635ac407906040518163ffffffff1660e01b815260040160206040518083038186803b15801561219d57600080fd5b505afa1580156121b1573d6000803e3d6000fd5b505050506040513d60208110156121c757600080fd5b50518251606086015163ffffffff92831693509091168211612235576121f58a888560036000198601610b7a565b6122305760405162461bcd60e51b815260040180806020018281038252602a815260200180614e44602a913960400191505060405180910390fd5b61230f565b61224788888560036000198601610b7a565b6122825760405162461bcd60e51b8152600401808060200182810382526038815260200180614c2d6038913960400191505060405180910390fd5b61228a6148cb565b612293896127e2565b905060606122a68b836101000151613067565b90506122b18161318d565b6122ba8d6131ed565b1461230c576040805162461bcd60e51b815260206004820152601b60248201527f766572696679206865616465722070726f6f66206661696c6564210000000000604482015290519081900360640190fd5b50505b606061231f8c8760e00151613067565b9050612329614926565b6123328261331e565b9050856001600160a01b0316630586763c8260200151612355846000015161318d565b6040518363ffffffff1660e01b815260040180836001600160401b03166001600160401b031681526020018281526020019250505060206040518083038186803b1580156123a257600080fd5b505afa1580156123b6573d6000803e3d6000fd5b505050506040513d60208110156123cc57600080fd5b50511561240a5760405162461bcd60e51b8152600401808060200182810382526022815260200180614d826022913960400191505060405180910390fd5b856001600160a01b031663e90bfdcf826020015161242b846000015161318d565b6040518363ffffffff1660e01b815260040180836001600160401b03166001600160401b0316815260200182815260200192505050602060405180830381600087803b15801561247a57600080fd5b505af115801561248e573d6000803e3d6000fd5b505050506040513d60208110156124a457600080fd5b50516124f7576040805162461bcd60e51b815260206004820181905260248201527f536176652063726f7373636861696e207478206578697374206661696c656421604482015290519081900360640190fd5b6001546040820151606001516001600160401b03908116600160a01b90920416146125535760405162461bcd60e51b815260040180806020018281038252602a815260200180614dd4602a913960400191505060405180910390fd5b60006125668260400151608001516133fa565b905061259181836040015160a00151846040015160c001518560400151604001518660200151613444565b6125e2576040805162461bcd60e51b815260206004820152601d60248201527f457865637574652043726f7373436861696e205478206661696c656421000000604482015290519081900360640190fd5b7f8a4a2663ce60ce4955c595da2894de0415240f1ace024cfbff85f513b656bdae8260200151836040015160800151846000015185604001516000015160405180856001600160401b03166001600160401b03168152602001806020018060200180602001848103845287818151815260200191508051906020019080838360005b8381101561267c578181015183820152602001612664565b50505050905090810190601f1680156126a95780820380516001836020036101000a031916815260200191505b50848103835286518152865160209182019188019080838360005b838110156126dc5781810151838201526020016126c4565b50505050905090810190601f1680156127095780820380516001836020036101000a031916815260200191505b50848103825285518152855160209182019187019080838360005b8381101561273c578181015183820152602001612724565b50505050905090810190601f1680156127695780820380516001836020036101000a031916815260200191505b5097505050505050505060405180910390a15060019d9c50505050505050505050505050565b612797611929565b6127d6576040805162461bcd60e51b81526020600482018190526024820152600080516020614b8a833981519152604482015290519081900360640190fd5b6127df81613818565b50565b6127ea6148cb565b6127f26148cb565b60006127fe84826138b8565b63ffffffff909116835290506128148482613960565b6001600160401b03909116602084015290506128308482613a06565b60a084019190915290506128448482613a06565b60c084019190915290506128588482613a06565b60e0840191909152905061286c8482613a06565b610100840191909152905061288184826138b8565b63ffffffff9091166040840152905061289a84826138b8565b63ffffffff909116606084015290506128b38482613960565b6001600160401b03909116608084015290506128cf8482613a80565b61012084019190915290506128e48482613b53565b506bffffffffffffffffffffffff19166101408301525092915050565b60606000806129108482613960565b80935081925050506060816001600160401b031660405190808252806020026020018201604052801561294d578160200160208202803883390190505b509050606060005b836001600160401b03168110156129a9576129708786613a80565b9550915061297d826133fa565b83828151811061298957fe5b6001600160a01b0390921660209283029190910190910152600101612955565b509095945050505050565b6000806129c0866131ed565b9050600060418651816129cf57fe5b0490506060816040519080825280602002602001820160405280156129fe578160200160208202803883390190505b50905060008080805b85811015612b9857612a26612a218c604184026020613bbb565b61318d565b9350612a3d612a218c604184026020016020613bbb565b92508a6041820260400181518110612a5157fe5b602001015160f81c60f81b60f81c601b0191506001600288604051602001808281526020019150506040516020818303038152906040526040518082805190602001908083835b60208310612ab75780518252601f199092019160209182019101612a98565b51815160209384036101000a60001901801990921691161790526040519190930194509192505080830381855afa158015612af6573d6000803e3d6000fd5b5050506040513d6020811015612b0b57600080fd5b5051604080516000815260208181018084529390935260ff8616818301526060810188905260808101879052905160a08083019392601f198301929081900390910190855afa158015612b62573d6000803e3d6000fd5b50505060206040510351858281518110612b7857fe5b6001600160a01b0390921660209283029190910190910152600101612a07565b50612ba489858a613c3b565b9b9a5050505050505050505050565b600060606043835181612bc257fe5b0615612c15576040805162461bcd60e51b815260206004820152601b60248201527f5f7075624b65794c697374206c656e67746820696c6c6567616c210000000000604482015290519081900360640190fd5b60006043845181612c2257fe5b0490506001811015612c74576040805162461bcd60e51b8152602060048201526016602482015275746f6f2073686f7274205f7075624b65794c6973742160501b604482015290519081900360640190fd5b612c88816003600019820104830386613cdc565b9250925050915091565b805160609081612ca182613024565b905060005b82811015612d8c5781612cce611b83878481518110612cc157fe5b6020026020010151613009565b6040516020018083805190602001908083835b60208310612d005780518252601f199092019160209182019101612ce1565b51815160209384036101000a600019018019909216911617905285519190930192850191508083835b60208310612d485780518252601f199092019160209182019101612d29565b6001836020036101000a0380198251168184511680821785525050505050509050019250505060405160208183030381529060405291508080600101915050612ca6565b509392505050565b600054600160a01b900460ff16612de9576040805162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015290519081900360640190fd5b6000805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa612e1f612ec6565b604080516001600160a01b039092168252519081900360200190a1565b600054600160a01b900460ff1615612e8e576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b6000805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258612e1f5b3390565b60606001600160ff1b03821115612f28576040805162461bcd60e51b815260206004820152601760248201527f56616c75652065786365656473207468652072616e6765000000000000000000604482015290519081900360640190fd5b60405190506020815281602082015260408101604052919050565b8051606090612f5181614029565b836040516020018083805190602001908083835b60208310612f845780518252601f199092019160209182019101612f65565b51815160209384036101000a600019018019909216911617905285519190930192850191508083835b60208310612fcc5780518252601f199092019160209182019101612fad565b6001836020036101000a03801982511681845116808217855250505050505090500192505050604051602081830303815290604052915050919050565b604080516014815260609290921b6020830152818101905290565b6040516008808252606091906000601f5b828210156130575785811a826020860101536001919091019060001901613035565b5050506028810160405292915050565b60606000816130768583613a80565b9250905060006130858261416f565b905060006021848851038161309657fe5b049050600080805b83811015613141576130b08a88614216565b975091506130be8a88613a06565b975092506001600160f81b031982166130e2576130db8386614294565b9450613139565b600160f81b6001600160f81b031983161415613102576130db8584614294565b60405162461bcd60e51b815260040180806020018281038252602e815260200180614baa602e913960400191505060405180910390fd5b60010161309e565b508784146131805760405162461bcd60e51b8152600401808060200182810382526031815260200180614ab56031913960400191505060405180910390fd5b5092979650505050505050565b600081516020146131e5576040805162461bcd60e51b815260206004820152601760248201527f6279746573206c656e677468206973206e6f742033322e000000000000000000604482015290519081900360640190fd5b506020015190565b6000600280836040518082805190602001908083835b602083106132225780518252601f199092019160209182019101613203565b51815160209384036101000a60001901801990921691161790526040519190930194509192505080830381855afa158015613261573d6000803e3d6000fd5b5050506040513d602081101561327657600080fd5b50516040805160208181019390935281518082038401815290820191829052805190928291908401908083835b602083106132c25780518252601f1990920191602091820191016132a3565b51815160209384036101000a60001901801990921691161790526040519190930194509192505080830381855afa158015613301573d6000803e3d6000fd5b5050506040513d602081101561331657600080fd5b505192915050565b613326614926565b61332e614926565b600061333a8482613a80565b90835290506133498482613960565b6001600160401b039091166020840152905061336361494a565b61336d8583613a80565b908252915061337c8583613a80565b602083019190915291506133908583613a80565b604083019190915291506133a48583613960565b6001600160401b03909116606083015291506133c08583613a80565b608083019190915291506133d48583613a80565b60a083019190915291506133e88583613a80565b5060c082015260408301525092915050565b6000815160141461343c5760405162461bcd60e51b8152600401808060200182810382526023815260200180614a066023913960400191505060405180910390fd5b506014015190565b600061344f86614358565b61348a5760405162461bcd60e51b8152600401808060200182810382526028815260200180614bd86028913960400191505060405180910390fd5b60606000876001600160a01b0316876040516020018082805190602001908083835b602083106134cb5780518252601f1990920191602091820191016134ac565b51815160001960209485036101000a01908116901991909116179052732862797465732c62797465732c75696e7436342960601b9390910192835260408051600b19818603018152601485019091528051908201206001600160401b038b1660748501526060603485019081528d5160948601528d519196508d95508c948c945090928392605483019260b4019188019080838360005b8381101561357a578181015183820152602001613562565b50505050905090810190601f1680156135a75780820380516001836020036101000a031916815260200191505b50838103825285518152855160209182019187019080838360005b838110156135da5781810151838201526020016135c2565b50505050905090810190601f1680156136075780820380516001836020036101000a031916815260200191505b509550505050505060405160208183030381529060405260405160200180836001600160e01b0319166001600160e01b031916815260040182805190602001908083835b6020831061366a5780518252601f19909201916020918201910161364b565b6001836020036101000a038019825116818451168082178552505050505050905001925050506040516020818303038152906040526040518082805190602001908083835b602083106136ce5780518252601f1990920191602091820191016136af565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114613730576040519150601f19603f3d011682016040523d82523d6000602084013e613735565b606091505b509250905060018115151461377b5760405162461bcd60e51b815260040180806020018281038252602b815260200180614b24602b913960400191505060405180910390fd5b81516137b85760405162461bcd60e51b8152600401808060200182810382526027815260200180614c656027913960400191505060405180910390fd5b60006137c583601f614394565b5090506001811515146138095760405162461bcd60e51b8152600401808060200182810382526037815260200180614c8c6037913960400191505060405180910390fd5b50600198975050505050505050565b6001600160a01b03811661385d5760405162461bcd60e51b8152600401808060200182810382526026815260200180614a296026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b600080835183600401111580156138d157508260040183105b61390c5760405162461bcd60e51b8152600401808060200182810382526022815260200180614dfe6022913960400191505060405180910390fd5b600060405160046000600182038760208a0101515b838310156139415780821a83860153600183019250600182039150613921565b50505080820160405260200390035192505050600482015b9250929050565b6000808351836008011115801561397957508260080183105b6139b45760405162461bcd60e51b8152600401808060200182810382526022815260200180614d606022913960400191505060405180910390fd5b600060405160086000600182038760208a0101515b838310156139e95780821a838601536001830192506001820391506139c9565b505050808201604052602003900351956008949094019450505050565b60008083518360200111158015613a1f57508260200183105b613a70576040805162461bcd60e51b815260206004820181905260248201527f4e657874486173682c206f66667365742065786365656473206d6178696d756d604482015290519081900360640190fd5b5050602091810182015192910190565b6060600080613a8f8585614485565b865190955090915081850111801590613aa9575080840184105b613ae45760405162461bcd60e51b8152600401808060200182810382526024815260200180614e206024913960400191505060405180910390fd5b606081158015613aff57604051915060208201604052613b49565b6040519150601f8316801560200281840101848101888315602002848c0101015b81831015613b38578051835260209283019201613b20565b5050848452601f01601f1916604052505b5095930193505050565b60008083518360140111158015613b6c57508260140183105b613ba75760405162461bcd60e51b8152600401808060200182810382526023815260200180614a926023913960400191505060405180910390fd5b505081810160200151601482019250929050565b606081830184511015613bcd57600080fd5b606082158015613be857604051915060208201604052613c32565b6040519150601f8416801560200281840101858101878315602002848b0101015b81831015613c21578051835260209283019201613c09565b5050858452601f01601f1916604052505b50949350505050565b600080805b8451811015613cd05760005b8651811015613cc757868181518110613c6157fe5b60200260200101516001600160a01b0316868381518110613c7e57fe5b60200260200101516001600160a01b03161415613cbf578280600101935050868181518110613ca957fe5b6020026020010160006001600160a01b03168152505b600101613c4c565b50600101613c40565b50909111159392505050565b6000606080613cea8661469e565b9050606086604051908082528060200260200182016040528015613d18578160200160208202803883390190505b50905060006060815b89811015613e3e57613d3888604383026043613bbb565b915084613d47611b83846146e1565b6040516020018083805190602001908083835b60208310613d795780518252601f199092019160209182019101613d5a565b51815160209384036101000a600019018019909216911617905285519190930192850191508083835b60208310613dc15780518252601f199092019160209182019101613da2565b6001836020036101000a038019825116818451168082178552505050505050905001925050506040516020818303038152906040529450613e058260036040613bbb565b8051906020012092508260001c848281518110613e1e57fe5b6001600160a01b0390921660209283029190910190910152600101613d21565b5083613e498961469e565b6040516020018083805190602001908083835b60208310613e7b5780518252601f199092019160209182019101613e5c565b51815160209384036101000a600019018019909216911617905285519190930192850191508083835b60208310613ec35780518252601f199092019160209182019101613ea4565b6001836020036101000a038019825116818451168082178552505050505050905001925050506040516020818303038152906040529350600060036002866040518082805190602001908083835b60208310613f305780518252601f199092019160209182019101613f11565b51815160209384036101000a60001901801990921691161790526040519190930194509192505080830381855afa158015613f6f573d6000803e3d6000fd5b5050506040513d6020811015613f8457600080fd5b50516040805160208181019390935281518082038401815290820191829052805190928291908401908083835b60208310613fd05780518252601f199092019160209182019101613fb1565b51815160209384036101000a60001901801990921691161790526040519190930194509192505080830381855afa15801561400f573d6000803e3d6000fd5b50506040515160601b9b949a509398505050505050505050565b606060fd826001600160401b0316101561404d57614046826147cf565b9050611600565b61ffff826001600160401b03161161412b5761406c60fd60f81b6147eb565b6140758361469e565b6040516020018083805190602001908083835b602083106140a75780518252601f199092019160209182019101614088565b51815160209384036101000a600019018019909216911617905285519190930192850191508083835b602083106140ef5780518252601f1990920191602091820191016140d0565b6001836020036101000a038019825116818451168082178552505050505050905001925050506040516020818303038152906040529050611600565b63ffffffff826001600160401b0316116141555761414c607f60f91b6147eb565b614075836147ff565b6141666001600160f81b03196147eb565b61407583613024565b6040516000602080830182815284519293600293859387939260210191908401908083835b602083106141b35780518252601f199092019160209182019101614194565b6001836020036101000a03801982511681845116808217855250505050505090500192505050604051602081830303815290604052604051808280519060200190808383602083106132c25780518252601f1990920191602091820191016132a3565b6000808351836001011115801561422f57508260010183105b614280576040805162461bcd60e51b815260206004820181905260248201527f4e657874427974652c204f66667365742065786365656473206d6178696d756d604482015290519081900360640190fd5b505081810160200151600182019250929050565b60408051600160f81b60208083019190915260218201859052604180830185905283518084039091018152606190920192839052815160009360029392909182918401908083835b602083106142fb5780518252601f1990920191602091820191016142dc565b51815160209384036101000a60001901801990921691161790526040519190930194509192505080830381855afa15801561433a573d6000803e3d6000fd5b5050506040513d602081101561434f57600080fd5b50519392505050565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470811580159061438c5750808214155b949350505050565b600080835183600101111580156143ad57508260010183105b6143f5576040805162461bcd60e51b815260206004820152601460248201527313d9999cd95d08195e18d959591cc81b1a5b5a5d60621b604482015290519081900360640190fd5b838301602001516000600160f81b6001600160f81b03198316141561441c57506001614477565b6001600160f81b0319821661443357506000614477565b6040805162461bcd60e51b81526020600482015260146024820152732732bc3a2137b7b6103b30b63ab29032b93937b960611b604482015290519081900360640190fd5b956001949094019450505050565b60008060006144948585614216565b94509050600060fd60f81b6001600160f81b031983161415614532576144ba8686614842565b955061ffff16905060fd81108015906144d5575061ffff8111155b614526576040805162461bcd60e51b815260206004820152601f60248201527f4e65787455696e7431362c2076616c7565206f7574736964652072616e676500604482015290519081900360640190fd5b92508391506139599050565b607f60f91b6001600160f81b0319831614156145c25761455286866138b8565b955063ffffffff16905061ffff81118015614571575063ffffffff8111155b614526576040805162461bcd60e51b815260206004820181905260248201527f4e65787456617255696e742c2076616c7565206f7574736964652072616e6765604482015290519081900360640190fd5b6001600160f81b03198083161415614643576145de8686613960565b95506001600160401b0316905063ffffffff8111614526576040805162461bcd60e51b815260206004820181905260248201527f4e65787456617255696e742c2076616c7565206f7574736964652072616e6765604482015290519081900360640190fd5b5060f881901c60fd8110614526576040805162461bcd60e51b815260206004820181905260248201527f4e65787456617255696e742c2076616c7565206f7574736964652072616e6765604482015290519081900360640190fd5b6040516002808252606091906000601f5b828210156146d15785811a8260208601015360019190910190600019016146af565b5050506022810160405292915050565b606060438251101561473a576040805162461bcd60e51b815260206004820152601760248201527f6b6579206c656e67676820697320746f6f2073686f7274000000000000000000604482015290519081900360640190fd5b6147478260006023613bbb565b905060028260428151811061475857fe5b016020015160f81c8161476757fe5b0660ff16600014156147a157600260f81b8160028151811061478557fe5b60200101906001600160f81b031916908160001a905350611600565b600360f81b816002815181106147b357fe5b60200101906001600160f81b031916908160001a905350919050565b604080516001815260f89290921b602083015260218201905290565b60606147f98260f81c6147cf565b92915050565b6040516004808252606091906000601f5b828210156148325785811a826020860101536001919091019060001901614810565b5050506024810160405292915050565b6000808351836002011115801561485b57508260020183105b6148965760405162461bcd60e51b8152600401808060200182810382526022815260200180614cc36022913960400191505060405180910390fd5b6000604051846020870101518060011a82538060001a6001830153506002818101604052601d19909101519694019450505050565b604080516101608101825260008082526020820181905291810182905260608082018390526080820183905260a0820183905260c0820183905260e08201839052610100820183905261012082015261014081019190915290565b604080516060808201835281526000602082015290810161494561494a565b905290565b6040518060e0016040528060608152602001606081526020016060815260200160006001600160401b03168152602001606081526020016060815260200160608152509056fe70617573652045746843726f7373436861696e4461746120636f6e7472616374206661696c6564546865206e657874426f6f6b4b6565706572206f662068656164657220697320656d707479756e70617573652045746843726f7373436861696e4461746120636f6e7472616374206661696c65646279746573206c656e67746820646f6573206e6f74206d6174636820616464726573734f776e61626c653a206e6577206f776e657220697320746865207a65726f20616464726573735361766520506f6c7920636861696e2063757272656e742065706f63682073746172742068656967687420746f204461746120636f6e7472616374206661696c6564214e657874427974657332302c206f66667365742065786365656473206d6178696d756d6d65726b6c6550726f76652c2065787065637420726f6f74206973206e6f7420657175616c2061637475616c20726f6f7454686520686569676874206f6620686561646572206973206c6f776572207468616e2063757272656e742065706f6368207374617274206865696768742145746843726f7373436861696e2063616c6c20627573696e65737320636f6e7472616374206661696c65645361766520506f6c7920636861696e20626f6f6b206b65657065727320627974657320746f204461746120636f6e7472616374206661696c6564214f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726d65726b6c6550726f76652c204e6578744279746520666f7220706f736974696f6e20696e666f206661696c65645468652070617373656420696e2061646472657373206973206e6f74206120636f6e74726163742153617665204d43204c617465737448656967687420746f204461746120636f6e7472616374206661696c65642156657269667920706f6c7920636861696e2063757272656e742065706f636820686561646572207369676e6174757265206661696c6564214e6f2072657475726e2076616c75652066726f6d20627573696e65737320636f6e74726163742145746843726f7373436861696e2063616c6c20627573696e65737320636f6e74726163742072657475726e206973206e6f7420747275654e65787455696e7431362c206f66667365742065786365656473206d6178696d756d45746843726f7373436861696e4461746120636f6e74726163742068617320616c7265616479206265656e20696e697469616c697a6564215361766520506f6c7920636861696e2063757272656e742065706f636820626f6f6b206b65657065727320746f204461746120636f6e7472616374206661696c6564214e65787455696e7436342c206f66667365742065786365656473206d6178696d756d746865207472616e73616374696f6e20686173206265656e20657865637574656421536176652065746854784861736820627920696e64657820746f204461746120636f6e7472616374206661696c65642154686973205478206973206e6f742061696d696e6720617420457468657265756d206e6574776f726b214e65787455696e7433322c206f66667365742065786365656473206d6178696d756d4e65787456617242797465732c206f66667365742065786365656473206d6178696d756d56657269667920706f6c7920636861696e20686561646572207369676e6174757265206661696c656421a265627a7a723158202a37e077fb769c6b347df38db5506215ec5a6c7c6c132636f351c19f1cb8bc2664736f6c63430005110032" // DeployEthCrossChainManager deploys a new Ethereum contract, binding an instance of EthCrossChainManager to it. -func DeployEthCrossChainManager(auth *bind.TransactOpts, backend bind.ContractBackend, _eccd common.Address) (common.Address, *types.Transaction, *EthCrossChainManager, error) { +func DeployEthCrossChainManager(auth *bind.TransactOpts, backend bind.ContractBackend, _eccd common.Address, _chainId uint64) (common.Address, *types.Transaction, *EthCrossChainManager, error) { parsed, err := abi.JSON(strings.NewReader(EthCrossChainManagerABI)) if err != nil { return common.Address{}, nil, nil, err } - address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(EthCrossChainManagerBin), backend, _eccd) + address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(EthCrossChainManagerBin), backend, _eccd, _chainId) if err != nil { return common.Address{}, nil, nil, err } @@ -538,6 +540,32 @@ func (_EthCrossChainManager *EthCrossChainManagerCallerSession) EthCrossChainDat return _EthCrossChainManager.Contract.EthCrossChainDataAddress(&_EthCrossChainManager.CallOpts) } +// ChainId is a free data retrieval call binding the contract method 0x9a8a0592. +// +// Solidity: function chainId() view returns(uint64) +func (_EthCrossChainManager *EthCrossChainManagerCaller) ChainId(opts *bind.CallOpts) (uint64, error) { + var ( + ret0 = new(uint64) + ) + out := ret0 + err := _EthCrossChainManager.contract.Call(opts, out, "chainId") + return *ret0, err +} + +// ChainId is a free data retrieval call binding the contract method 0x9a8a0592. +// +// Solidity: function chainId() view returns(uint64) +func (_EthCrossChainManager *EthCrossChainManagerSession) ChainId() (uint64, error) { + return _EthCrossChainManager.Contract.ChainId(&_EthCrossChainManager.CallOpts) +} + +// ChainId is a free data retrieval call binding the contract method 0x9a8a0592. +// +// Solidity: function chainId() view returns(uint64) +func (_EthCrossChainManager *EthCrossChainManagerCallerSession) ChainId() (uint64, error) { + return _EthCrossChainManager.Contract.ChainId(&_EthCrossChainManager.CallOpts) +} + // IsOwner is a free data retrieval call binding the contract method 0x8f32d59b. // // Solidity: function isOwner() view returns(bool) @@ -721,6 +749,27 @@ func (_EthCrossChainManager *EthCrossChainManagerTransactorSession) RenounceOwne return _EthCrossChainManager.Contract.RenounceOwnership(&_EthCrossChainManager.TransactOpts) } +// SetChainId is a paid mutator transaction binding the contract method 0x6f31031d. +// +// Solidity: function setChainId(uint64 _newChainId) returns(bool) +func (_EthCrossChainManager *EthCrossChainManagerTransactor) SetChainId(opts *bind.TransactOpts, _newChainId uint64) (*types.Transaction, error) { + return _EthCrossChainManager.contract.Transact(opts, "setChainId", _newChainId) +} + +// SetChainId is a paid mutator transaction binding the contract method 0x6f31031d. +// +// Solidity: function setChainId(uint64 _newChainId) returns(bool) +func (_EthCrossChainManager *EthCrossChainManagerSession) SetChainId(_newChainId uint64) (*types.Transaction, error) { + return _EthCrossChainManager.Contract.SetChainId(&_EthCrossChainManager.TransactOpts, _newChainId) +} + +// SetChainId is a paid mutator transaction binding the contract method 0x6f31031d. +// +// Solidity: function setChainId(uint64 _newChainId) returns(bool) +func (_EthCrossChainManager *EthCrossChainManagerTransactorSession) SetChainId(_newChainId uint64) (*types.Transaction, error) { + return _EthCrossChainManager.Contract.SetChainId(&_EthCrossChainManager.TransactOpts, _newChainId) +} + // TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. // // Solidity: function transferOwnership(address newOwner) returns() @@ -2461,13 +2510,14 @@ func (_IEthCrossChainManager *IEthCrossChainManagerTransactorSession) CrossChain } // IUpgradableECCMABI is the input ABI used to generate the binding from. -const IUpgradableECCMABI = "[{\"constant\":true,\"inputs\":[],\"name\":\"isOwner\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"pause\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"unpause\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"upgradeToNew\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]" +const IUpgradableECCMABI = "[{\"constant\":true,\"inputs\":[],\"name\":\"isOwner\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"pause\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"_newChainId\",\"type\":\"uint64\"}],\"name\":\"setChainId\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"unpause\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"upgradeToNew\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]" // IUpgradableECCMFuncSigs maps the 4-byte function signature to its string representation. var IUpgradableECCMFuncSigs = map[string]string{ "8f32d59b": "isOwner()", "8456cb59": "pause()", "5c975abb": "paused()", + "6f31031d": "setChainId(uint64)", "3f4ba83a": "unpause()", "7e724ff3": "upgradeToNew(address)", } @@ -2687,6 +2737,27 @@ func (_IUpgradableECCM *IUpgradableECCMTransactorSession) Pause() (*types.Transa return _IUpgradableECCM.Contract.Pause(&_IUpgradableECCM.TransactOpts) } +// SetChainId is a paid mutator transaction binding the contract method 0x6f31031d. +// +// Solidity: function setChainId(uint64 _newChainId) returns(bool) +func (_IUpgradableECCM *IUpgradableECCMTransactor) SetChainId(opts *bind.TransactOpts, _newChainId uint64) (*types.Transaction, error) { + return _IUpgradableECCM.contract.Transact(opts, "setChainId", _newChainId) +} + +// SetChainId is a paid mutator transaction binding the contract method 0x6f31031d. +// +// Solidity: function setChainId(uint64 _newChainId) returns(bool) +func (_IUpgradableECCM *IUpgradableECCMSession) SetChainId(_newChainId uint64) (*types.Transaction, error) { + return _IUpgradableECCM.Contract.SetChainId(&_IUpgradableECCM.TransactOpts, _newChainId) +} + +// SetChainId is a paid mutator transaction binding the contract method 0x6f31031d. +// +// Solidity: function setChainId(uint64 _newChainId) returns(bool) +func (_IUpgradableECCM *IUpgradableECCMTransactorSession) SetChainId(_newChainId uint64) (*types.Transaction, error) { + return _IUpgradableECCM.Contract.SetChainId(&_IUpgradableECCM.TransactOpts, _newChainId) +} + // Unpause is a paid mutator transaction binding the contract method 0x3f4ba83a. // // Solidity: function unpause() returns(bool) @@ -3574,7 +3645,7 @@ func (_Pausable *PausableFilterer) ParseUnpaused(log types.Log) (*PausableUnpaus const SafeMathABI = "[]" // SafeMathBin is the compiled bytecode used for deploying new contracts. -var SafeMathBin = "0x60556023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea265627a7a723158203d1637be9b56ceb98635efac8ed78a3613aacd2af1a906d51f09e708c8864eee64736f6c634300050f0032" +var SafeMathBin = "0x60556023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea265627a7a723158205bdfac1f2f0a73d5ca76fe4de3bbf2459c1d5e641c635610af2a91304395b6d664736f6c63430005110032" // DeploySafeMath deploys a new Ethereum contract, binding an instance of SafeMath to it. func DeploySafeMath(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *SafeMath, error) { @@ -3733,32 +3804,34 @@ func (_SafeMath *SafeMathTransactorRaw) Transact(opts *bind.TransactOpts, method } // UpgradableECCMABI is the input ABI used to generate the binding from. -const UpgradableECCMABI = "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"ethCrossChainDataAddr\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"constant\":true,\"inputs\":[],\"name\":\"EthCrossChainDataAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"isOwner\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"pause\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"unpause\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"newEthCrossChainManagerAddress\",\"type\":\"address\"}],\"name\":\"upgradeToNew\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]" +const UpgradableECCMABI = "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"ethCrossChainDataAddr\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"_chainId\",\"type\":\"uint64\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"constant\":true,\"inputs\":[],\"name\":\"EthCrossChainDataAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"chainId\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"isOwner\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"pause\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"_newChainId\",\"type\":\"uint64\"}],\"name\":\"setChainId\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"unpause\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"newEthCrossChainManagerAddress\",\"type\":\"address\"}],\"name\":\"upgradeToNew\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]" // UpgradableECCMFuncSigs maps the 4-byte function signature to its string representation. var UpgradableECCMFuncSigs = map[string]string{ "00ba1694": "EthCrossChainDataAddress()", + "9a8a0592": "chainId()", "8f32d59b": "isOwner()", "8da5cb5b": "owner()", "8456cb59": "pause()", "5c975abb": "paused()", "715018a6": "renounceOwnership()", + "6f31031d": "setChainId(uint64)", "f2fde38b": "transferOwnership(address)", "3f4ba83a": "unpause()", "7e724ff3": "upgradeToNew(address)", } // UpgradableECCMBin is the compiled bytecode used for deploying new contracts. -var UpgradableECCMBin = "0x608060405234801561001057600080fd5b506040516109fe3803806109fe8339818101604052602081101561003357600080fd5b505160006100486001600160e01b036100c416565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3506000805460ff60a01b19169055600180546001600160a01b0319166001600160a01b03929092169190911790556100c8565b3390565b610927806100d76000396000f3fe608060405234801561001057600080fd5b50600436106100925760003560e01c80637e724ff3116100665780637e724ff3146100e95780638456cb591461010f5780638da5cb5b146101175780638f32d59b1461011f578063f2fde38b1461012757610092565b8062ba1694146100975780633f4ba83a146100bb5780635c975abb146100d7578063715018a6146100df575b600080fd5b61009f61014d565b604080516001600160a01b039092168252519081900360200190f35b6100c361015c565b604080519115158252519081900360200190f35b6100c36102db565b6100e76102eb565b005b6100c3600480360360208110156100ff57600080fd5b50356001600160a01b031661037c565b6100c361048b565b61009f610600565b6100c361060f565b6100e76004803603602081101561013d57600080fd5b50356001600160a01b0316610633565b6001546001600160a01b031681565b600061016661060f565b6101a5576040805162461bcd60e51b815260206004820181905260248201526000805160206108d3833981519152604482015290519081900360640190fd5b6101ad6102db565b156101ba576101ba610686565b60015460408051635c975abb60e01b815290516001600160a01b03909216918291635c975abb916004808301926020929190829003018186803b15801561020057600080fd5b505afa158015610214573d6000803e3d6000fd5b505050506040513d602081101561022a57600080fd5b5051156102d357806001600160a01b0316633f4ba83a6040518163ffffffff1660e01b8152600401602060405180830381600087803b15801561026c57600080fd5b505af1158015610280573d6000803e3d6000fd5b505050506040513d602081101561029657600080fd5b50516102d35760405162461bcd60e51b81526004018080602001828103825260298152602001806108846029913960400191505060405180910390fd5b600191505090565b600054600160a01b900460ff1690565b6102f361060f565b610332576040805162461bcd60e51b815260206004820181905260248201526000805160206108d3833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b60008054600160a01b900460ff166103d2576040805162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015290519081900360640190fd5b6103da61060f565b610419576040805162461bcd60e51b815260206004820181905260248201526000805160206108d3833981519152604482015290519081900360640190fd5b6001546040805163f2fde38b60e01b81526001600160a01b03858116600483015291519190921691829163f2fde38b9160248082019260009290919082900301818387803b15801561046a57600080fd5b505af115801561047e573d6000803e3d6000fd5b5060019695505050505050565b600061049561060f565b6104d4576040805162461bcd60e51b815260206004820181905260248201526000805160206108d3833981519152604482015290519081900360640190fd5b6104dc6102db565b6104e8576104e861072e565b60015460408051635c975abb60e01b815290516001600160a01b03909216918291635c975abb916004808301926020929190829003018186803b15801561052e57600080fd5b505afa158015610542573d6000803e3d6000fd5b505050506040513d602081101561055857600080fd5b50516102d357806001600160a01b0316638456cb596040518163ffffffff1660e01b8152600401602060405180830381600087803b15801561059957600080fd5b505af11580156105ad573d6000803e3d6000fd5b505050506040513d60208110156105c357600080fd5b50516102d35760405162461bcd60e51b815260040180806020018281038252602781526020018061085d6027913960400191505060405180910390fd5b6000546001600160a01b031690565b600080546001600160a01b03166106246107b8565b6001600160a01b031614905090565b61063b61060f565b61067a576040805162461bcd60e51b815260206004820181905260248201526000805160206108d3833981519152604482015290519081900360640190fd5b610683816107bc565b50565b600054600160a01b900460ff166106db576040805162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015290519081900360640190fd5b6000805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa6107116107b8565b604080516001600160a01b039092168252519081900360200190a1565b600054600160a01b900460ff1615610780576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b6000805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586107115b3390565b6001600160a01b0381166108015760405162461bcd60e51b81526004018080602001828103825260268152602001806108ad6026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b039290921691909117905556fe70617573652045746843726f7373436861696e4461746120636f6e7472616374206661696c6564756e70617573652045746843726f7373436861696e4461746120636f6e7472616374206661696c65644f776e61626c653a206e6577206f776e657220697320746865207a65726f20616464726573734f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572a265627a7a72315820f54ec198084503b41a8b39cfe0c5a16309d2a69c8246dc62857bb6486e63e2a564736f6c634300050f0032" +var UpgradableECCMBin = "0x608060405234801561001057600080fd5b50604051610b6c380380610b6c8339818101604052604081101561003357600080fd5b508051602090910151600061004f6001600160e01b036100ee16565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3506000805460ff60a01b19169055600180546001600160401b03909216600160a01b02600160a01b600160e01b03196001600160a01b039094166001600160a01b031990931692909217929092161790556100f2565b3390565b610a6b806101016000396000f3fe608060405234801561001057600080fd5b50600436106100a85760003560e01c80637e724ff3116100715780637e724ff3146101265780638456cb591461014c5780638da5cb5b146101545780638f32d59b1461015c5780639a8a059214610164578063f2fde38b14610189576100a8565b8062ba1694146100ad5780633f4ba83a146100d15780635c975abb146100ed5780636f31031d146100f5578063715018a61461011c575b600080fd5b6100b56101af565b604080516001600160a01b039092168252519081900360200190f35b6100d96101be565b604080519115158252519081900360200190f35b6100d961033d565b6100d96004803603602081101561010b57600080fd5b503567ffffffffffffffff1661034d565b610124610418565b005b6100d96004803603602081101561013c57600080fd5b50356001600160a01b03166104a9565b6100d96105b8565b6100b561072d565b6100d961073c565b61016c610760565b6040805167ffffffffffffffff9092168252519081900360200190f35b6101246004803603602081101561019f57600080fd5b50356001600160a01b0316610777565b6001546001600160a01b031681565b60006101c861073c565b610207576040805162461bcd60e51b81526020600482018190526024820152600080516020610a17833981519152604482015290519081900360640190fd5b61020f61033d565b1561021c5761021c6107ca565b60015460408051635c975abb60e01b815290516001600160a01b03909216918291635c975abb916004808301926020929190829003018186803b15801561026257600080fd5b505afa158015610276573d6000803e3d6000fd5b505050506040513d602081101561028c57600080fd5b50511561033557806001600160a01b0316633f4ba83a6040518163ffffffff1660e01b8152600401602060405180830381600087803b1580156102ce57600080fd5b505af11580156102e2573d6000803e3d6000fd5b505050506040513d60208110156102f857600080fd5b50516103355760405162461bcd60e51b81526004018080602001828103825260298152602001806109c86029913960400191505060405180910390fd5b600191505090565b600054600160a01b900460ff1690565b60008054600160a01b900460ff166103a3576040805162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015290519081900360640190fd5b6103ab61073c565b6103ea576040805162461bcd60e51b81526020600482018190526024820152600080516020610a17833981519152604482015290519081900360640190fd5b506001805467ffffffffffffffff8316600160a01b0267ffffffffffffffff60a01b19909116178155919050565b61042061073c565b61045f576040805162461bcd60e51b81526020600482018190526024820152600080516020610a17833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b60008054600160a01b900460ff166104ff576040805162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015290519081900360640190fd5b61050761073c565b610546576040805162461bcd60e51b81526020600482018190526024820152600080516020610a17833981519152604482015290519081900360640190fd5b6001546040805163f2fde38b60e01b81526001600160a01b03858116600483015291519190921691829163f2fde38b9160248082019260009290919082900301818387803b15801561059757600080fd5b505af11580156105ab573d6000803e3d6000fd5b5060019695505050505050565b60006105c261073c565b610601576040805162461bcd60e51b81526020600482018190526024820152600080516020610a17833981519152604482015290519081900360640190fd5b61060961033d565b61061557610615610872565b60015460408051635c975abb60e01b815290516001600160a01b03909216918291635c975abb916004808301926020929190829003018186803b15801561065b57600080fd5b505afa15801561066f573d6000803e3d6000fd5b505050506040513d602081101561068557600080fd5b505161033557806001600160a01b0316638456cb596040518163ffffffff1660e01b8152600401602060405180830381600087803b1580156106c657600080fd5b505af11580156106da573d6000803e3d6000fd5b505050506040513d60208110156106f057600080fd5b50516103355760405162461bcd60e51b81526004018080602001828103825260278152602001806109a16027913960400191505060405180910390fd5b6000546001600160a01b031690565b600080546001600160a01b03166107516108fc565b6001600160a01b031614905090565b600154600160a01b900467ffffffffffffffff1681565b61077f61073c565b6107be576040805162461bcd60e51b81526020600482018190526024820152600080516020610a17833981519152604482015290519081900360640190fd5b6107c781610900565b50565b600054600160a01b900460ff1661081f576040805162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015290519081900360640190fd5b6000805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa6108556108fc565b604080516001600160a01b039092168252519081900360200190a1565b600054600160a01b900460ff16156108c4576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b6000805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586108555b3390565b6001600160a01b0381166109455760405162461bcd60e51b81526004018080602001828103825260268152602001806109f16026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b039290921691909117905556fe70617573652045746843726f7373436861696e4461746120636f6e7472616374206661696c6564756e70617573652045746843726f7373436861696e4461746120636f6e7472616374206661696c65644f776e61626c653a206e6577206f776e657220697320746865207a65726f20616464726573734f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572a265627a7a7231582069f15e43b6d85063e8073df87b20a1bbff05e30af7f54734d1ffeabd424fc3ad64736f6c63430005110032" // DeployUpgradableECCM deploys a new Ethereum contract, binding an instance of UpgradableECCM to it. -func DeployUpgradableECCM(auth *bind.TransactOpts, backend bind.ContractBackend, ethCrossChainDataAddr common.Address) (common.Address, *types.Transaction, *UpgradableECCM, error) { +func DeployUpgradableECCM(auth *bind.TransactOpts, backend bind.ContractBackend, ethCrossChainDataAddr common.Address, _chainId uint64) (common.Address, *types.Transaction, *UpgradableECCM, error) { parsed, err := abi.JSON(strings.NewReader(UpgradableECCMABI)) if err != nil { return common.Address{}, nil, nil, err } - address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(UpgradableECCMBin), backend, ethCrossChainDataAddr) + address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(UpgradableECCMBin), backend, ethCrossChainDataAddr, _chainId) if err != nil { return common.Address{}, nil, nil, err } @@ -3933,6 +4006,32 @@ func (_UpgradableECCM *UpgradableECCMCallerSession) EthCrossChainDataAddress() ( return _UpgradableECCM.Contract.EthCrossChainDataAddress(&_UpgradableECCM.CallOpts) } +// ChainId is a free data retrieval call binding the contract method 0x9a8a0592. +// +// Solidity: function chainId() view returns(uint64) +func (_UpgradableECCM *UpgradableECCMCaller) ChainId(opts *bind.CallOpts) (uint64, error) { + var ( + ret0 = new(uint64) + ) + out := ret0 + err := _UpgradableECCM.contract.Call(opts, out, "chainId") + return *ret0, err +} + +// ChainId is a free data retrieval call binding the contract method 0x9a8a0592. +// +// Solidity: function chainId() view returns(uint64) +func (_UpgradableECCM *UpgradableECCMSession) ChainId() (uint64, error) { + return _UpgradableECCM.Contract.ChainId(&_UpgradableECCM.CallOpts) +} + +// ChainId is a free data retrieval call binding the contract method 0x9a8a0592. +// +// Solidity: function chainId() view returns(uint64) +func (_UpgradableECCM *UpgradableECCMCallerSession) ChainId() (uint64, error) { + return _UpgradableECCM.Contract.ChainId(&_UpgradableECCM.CallOpts) +} + // IsOwner is a free data retrieval call binding the contract method 0x8f32d59b. // // Solidity: function isOwner() view returns(bool) @@ -4053,6 +4152,27 @@ func (_UpgradableECCM *UpgradableECCMTransactorSession) RenounceOwnership() (*ty return _UpgradableECCM.Contract.RenounceOwnership(&_UpgradableECCM.TransactOpts) } +// SetChainId is a paid mutator transaction binding the contract method 0x6f31031d. +// +// Solidity: function setChainId(uint64 _newChainId) returns(bool) +func (_UpgradableECCM *UpgradableECCMTransactor) SetChainId(opts *bind.TransactOpts, _newChainId uint64) (*types.Transaction, error) { + return _UpgradableECCM.contract.Transact(opts, "setChainId", _newChainId) +} + +// SetChainId is a paid mutator transaction binding the contract method 0x6f31031d. +// +// Solidity: function setChainId(uint64 _newChainId) returns(bool) +func (_UpgradableECCM *UpgradableECCMSession) SetChainId(_newChainId uint64) (*types.Transaction, error) { + return _UpgradableECCM.Contract.SetChainId(&_UpgradableECCM.TransactOpts, _newChainId) +} + +// SetChainId is a paid mutator transaction binding the contract method 0x6f31031d. +// +// Solidity: function setChainId(uint64 _newChainId) returns(bool) +func (_UpgradableECCM *UpgradableECCMTransactorSession) SetChainId(_newChainId uint64) (*types.Transaction, error) { + return _UpgradableECCM.Contract.SetChainId(&_UpgradableECCM.TransactOpts, _newChainId) +} + // TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. // // Solidity: function transferOwnership(address newOwner) returns() @@ -4538,7 +4658,7 @@ func (_UpgradableECCM *UpgradableECCMFilterer) ParseUnpaused(log types.Log) (*Up const UtilsABI = "[]" // UtilsBin is the compiled bytecode used for deploying new contracts. -var UtilsBin = "0x60556023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea265627a7a72315820050dca012050b404de47b755368d860587e735c8b8ad9500f58b365fbb406df664736f6c634300050f0032" +var UtilsBin = "0x60556023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea265627a7a72315820689d0786dcdacc8d21500f09c0f3e21e12c02a31b67a0205cfb1eb53b3280e1064736f6c63430005110032" // DeployUtils deploys a new Ethereum contract, binding an instance of Utils to it. func DeployUtils(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *Utils, error) { @@ -4700,7 +4820,7 @@ func (_Utils *UtilsTransactorRaw) Transact(opts *bind.TransactOpts, method strin const ZeroCopySinkABI = "[]" // ZeroCopySinkBin is the compiled bytecode used for deploying new contracts. -var ZeroCopySinkBin = "0x60556023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea265627a7a723158200d7209163aef4edca6e943dc5ba5502dc1fbcfa0829e293d0819c8c05dd6f69e64736f6c634300050f0032" +var ZeroCopySinkBin = "0x60556023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea265627a7a7231582013efd9c35b74c73b1fbf508fc85f90d8d9efd36edcafcab688c8557ea10fc43764736f6c63430005110032" // DeployZeroCopySink deploys a new Ethereum contract, binding an instance of ZeroCopySink to it. func DeployZeroCopySink(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *ZeroCopySink, error) { @@ -4862,7 +4982,7 @@ func (_ZeroCopySink *ZeroCopySinkTransactorRaw) Transact(opts *bind.TransactOpts const ZeroCopySourceABI = "[]" // ZeroCopySourceBin is the compiled bytecode used for deploying new contracts. -var ZeroCopySourceBin = "0x60556023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea265627a7a72315820a657b3a40ce034eca00b3cb7dad6596556e4a01575d19c83524645676fc4efaf64736f6c634300050f0032" +var ZeroCopySourceBin = "0x60556023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea265627a7a72315820779c16b3c1f7d5c100913978d0cc133bd6e1e1cf2969faab2aae93d32edbd67864736f6c63430005110032" // DeployZeroCopySource deploys a new Ethereum contract, binding an instance of ZeroCopySource to it. func DeployZeroCopySource(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *ZeroCopySource, error) { @@ -5019,4 +5139,3 @@ func (_ZeroCopySource *ZeroCopySourceTransactorRaw) Transfer(opts *bind.Transact func (_ZeroCopySource *ZeroCopySourceTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { return _ZeroCopySource.Contract.contract.Transact(opts, method, params...) } - diff --git a/go_abi/eccmp_abi/eccmp_abi.go b/go_abi/eccmp_abi/eccmp_abi.go index 9abee73..dd00db1 100644 --- a/go_abi/eccmp_abi/eccmp_abi.go +++ b/go_abi/eccmp_abi/eccmp_abi.go @@ -172,10 +172,11 @@ func (_Context *ContextTransactorRaw) Transact(opts *bind.TransactOpts, method s } // EthCrossChainManagerProxyABI is the input ABI used to generate the binding from. -const EthCrossChainManagerProxyABI = "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_ethCrossChainManagerAddr\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"constant\":true,\"inputs\":[],\"name\":\"getEthCrossChainManager\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"isOwner\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"pause\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"pauseEthCrossChainManager\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"unpause\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"unpauseEthCrossChainManager\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"_newEthCrossChainManagerAddr\",\"type\":\"address\"}],\"name\":\"upgradeEthCrossChainManager\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]" +const EthCrossChainManagerProxyABI = "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_ethCrossChainManagerAddr\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"_newChainId\",\"type\":\"uint64\"}],\"name\":\"changeManagerChainID\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"getEthCrossChainManager\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"isOwner\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"pause\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"pauseEthCrossChainManager\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"unpause\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"unpauseEthCrossChainManager\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"_newEthCrossChainManagerAddr\",\"type\":\"address\"}],\"name\":\"upgradeEthCrossChainManager\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]" // EthCrossChainManagerProxyFuncSigs maps the 4-byte function signature to its string representation. var EthCrossChainManagerProxyFuncSigs = map[string]string{ + "a2681d28": "changeManagerChainID(uint64)", "87939a7f": "getEthCrossChainManager()", "8f32d59b": "isOwner()", "8da5cb5b": "owner()", @@ -190,7 +191,7 @@ var EthCrossChainManagerProxyFuncSigs = map[string]string{ } // EthCrossChainManagerProxyBin is the compiled bytecode used for deploying new contracts. -var EthCrossChainManagerProxyBin = "0x608060405234801561001057600080fd5b50604051610eb5380380610eb58339818101604052602081101561003357600080fd5b505160006100486001600160e01b036100c416565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3506000805460ff60a01b19169055600180546001600160a01b0319166001600160a01b03929092169190911790556100c8565b3390565b610dde806100d76000396000f3fe608060405234801561001057600080fd5b50600436106100a95760003560e01c80638456cb59116100715780638456cb59146100ec57806387939a7f146100f45780638da5cb5b146101185780638f32d59b14610120578063ab59d32d14610128578063f2fde38b1461014e576100a9565b80633b9a80b8146100ae5780633f4ba83a146100ca5780634390c707146100d25780635c975abb146100da578063715018a6146100e2575b600080fd5b6100b6610174565b604080519115158252519081900360200190f35b6100b6610304565b6100b6610370565b6100b6610500565b6100ea610510565b005b6100b66105a1565b6100fc610607565b604080516001600160a01b039092168252519081900360200190f35b6100fc61066a565b6100b6610679565b6100b66004803603602081101561013e57600080fd5b50356001600160a01b031661069d565b6100ea6004803603602081101561016457600080fd5b50356001600160a01b03166109dd565b600061017e610679565b6101bd576040805162461bcd60e51b81526020600482018190526024820152600080516020610d5f833981519152604482015290519081900360640190fd5b600054600160a01b900460ff161561020f576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b6001546001600160a01b03166102236105a1565b61025e5760405162461bcd60e51b8152600401808060200182810382526030815260200180610cd36030913960400191505060405180910390fd5b806001600160a01b0316638456cb596040518163ffffffff1660e01b8152600401602060405180830381600087803b15801561029957600080fd5b505af11580156102ad573d6000803e3d6000fd5b505050506040513d60208110156102c357600080fd5b50516103005760405162461bcd60e51b815260040180806020018281038252602b815260200180610d7f602b913960400191505060405180910390fd5b5090565b600061030e610679565b61034d576040805162461bcd60e51b81526020600482018190526024820152600080516020610d5f833981519152604482015290519081900360640190fd5b610355610500565b6103615750600161036d565b610369610a30565b5060015b90565b600061037a610679565b6103b9576040805162461bcd60e51b81526020600482018190526024820152600080516020610d5f833981519152604482015290519081900360640190fd5b600054600160a01b900460ff1661040e576040805162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015290519081900360640190fd5b60015460408051631fa5d41d60e11b815290516001600160a01b03909216918291633f4ba83a9160048083019260209291908290030181600087803b15801561045657600080fd5b505af115801561046a573d6000803e3d6000fd5b505050506040513d602081101561048057600080fd5b50516104bd5760405162461bcd60e51b815260040180806020018281038252602d815260200180610d32602d913960400191505060405180910390fd5b6104c5610304565b6103005760405162461bcd60e51b8152600401808060200182810382526032815260200180610ca16032913960400191505060405180910390fd5b600054600160a01b900460ff1690565b610518610679565b610557576040805162461bcd60e51b81526020600482018190526024820152600080516020610d5f833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b60006105ab610679565b6105ea576040805162461bcd60e51b81526020600482018190526024820152600080516020610d5f833981519152604482015290519081900360640190fd5b6105f2610500565b156105ff5750600161036d565b610369610ad8565b60008054600160a01b900460ff161561065a576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b506001546001600160a01b031690565b6000546001600160a01b031690565b600080546001600160a01b031661068e610b62565b6001600160a01b031614905090565b60006106a7610679565b6106e6576040805162461bcd60e51b81526020600482018190526024820152600080516020610d5f833981519152604482015290519081900360640190fd5b600054600160a01b900460ff1661073b576040805162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015290519081900360640190fd5b60015460408051635c975abb60e01b815290516001600160a01b03909216918291635c975abb916004808301926020929190829003018186803b15801561078157600080fd5b505afa158015610795573d6000803e3d6000fd5b505050506040513d60208110156107ab57600080fd5b505161085357806001600160a01b0316638456cb596040518163ffffffff1660e01b8152600401602060405180830381600087803b1580156107ec57600080fd5b505af1158015610800573d6000803e3d6000fd5b505050506040513d602081101561081657600080fd5b50516108535760405162461bcd60e51b815260040180806020018281038252602f815260200180610d03602f913960400191505060405180910390fd5b806001600160a01b0316637e724ff3846040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b03168152602001915050602060405180830381600087803b1580156108ab57600080fd5b505af11580156108bf573d6000803e3d6000fd5b505050506040513d60208110156108d557600080fd5b50516109125760405162461bcd60e51b8152600401808060200182810382526029815260200180610c526029913960400191505060405180910390fd5b6000839050806001600160a01b0316638f32d59b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561095057600080fd5b505afa158015610964573d6000803e3d6000fd5b505050506040513d602081101561097a57600080fd5b50516109b75760405162461bcd60e51b815260040180806020018281038252604b815260200180610c07604b913960600191505060405180910390fd5b5050600180546001600160a01b0319166001600160a01b03939093169290921790915590565b6109e5610679565b610a24576040805162461bcd60e51b81526020600482018190526024820152600080516020610d5f833981519152604482015290519081900360640190fd5b610a2d81610b66565b50565b600054600160a01b900460ff16610a85576040805162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015290519081900360640190fd5b6000805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa610abb610b62565b604080516001600160a01b039092168252519081900360200190a1565b600054600160a01b900460ff1615610b2a576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b6000805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258610abb5b3390565b6001600160a01b038116610bab5760405162461bcd60e51b8152600401808060200182810382526026815260200180610c7b6026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b039290921691909117905556fe45746843726f7373436861696e4d616e6167657250726f7879206973206e6f74206f776e6572206f66206e65772045746843726f7373436861696e4d616e6167657220636f6e747261637445746843726f7373436861696e4d616e616765722075706772616465546f4e6577206661696c6564214f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373756e70617573652045746843726f7373436861696e4d616e6167657250726f787920636f6e7472616374206661696c65642170617573652045746843726f7373436861696e4d616e6167657250726f787920636f6e7472616374206661696c6564215061757365206f6c642045746843726f7373436861696e4d616e6167657220636f6e7472616374206661696c656421756e70617573652045746843726f7373436861696e4d616e6167657220636f6e7472616374206661696c6564214f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657270617573652045746843726f7373436861696e4d616e6167657220636f6e7472616374206661696c656421a265627a7a72315820b030bae42ef27559773fcac534baf8f077c77b7aa4dc521648eef8974746569a64736f6c634300050f0032" +var EthCrossChainManagerProxyBin = "0x608060405234801561001057600080fd5b506040516111663803806111668339818101604052602081101561003357600080fd5b505160006100486001600160e01b036100c416565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3506000805460ff60a01b19169055600180546001600160a01b0319166001600160a01b03929092169190911790556100c8565b3390565b61108f806100d76000396000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c806387939a7f1161007157806387939a7f146100ff5780638da5cb5b146101235780638f32d59b1461012b578063a2681d2814610133578063ab59d32d1461015a578063f2fde38b14610180576100b4565b80633b9a80b8146100b95780633f4ba83a146100d55780634390c707146100dd5780635c975abb146100e5578063715018a6146100ed5780638456cb59146100f7575b600080fd5b6100c16101a6565b604080519115158252519081900360200190f35b6100c1610336565b6100c16103a2565b6100c1610532565b6100f5610542565b005b6100c16105d3565b610107610639565b604080516001600160a01b039092168252519081900360200190f35b61010761069c565b6100c16106ab565b6100f56004803603602081101561014957600080fd5b503567ffffffffffffffff166106cf565b6100c16004803603602081101561017057600080fd5b50356001600160a01b031661094e565b6100f56004803603602081101561019657600080fd5b50356001600160a01b0316610c8e565b60006101b06106ab565b6101ef576040805162461bcd60e51b81526020600482018190526024820152600080516020611010833981519152604482015290519081900360640190fd5b600054600160a01b900460ff1615610241576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b6001546001600160a01b03166102556105d3565b6102905760405162461bcd60e51b8152600401808060200182810382526030815260200180610f846030913960400191505060405180910390fd5b806001600160a01b0316638456cb596040518163ffffffff1660e01b8152600401602060405180830381600087803b1580156102cb57600080fd5b505af11580156102df573d6000803e3d6000fd5b505050506040513d60208110156102f557600080fd5b50516103325760405162461bcd60e51b815260040180806020018281038252602b815260200180611030602b913960400191505060405180910390fd5b5090565b60006103406106ab565b61037f576040805162461bcd60e51b81526020600482018190526024820152600080516020611010833981519152604482015290519081900360640190fd5b610387610532565b6103935750600161039f565b61039b610ce1565b5060015b90565b60006103ac6106ab565b6103eb576040805162461bcd60e51b81526020600482018190526024820152600080516020611010833981519152604482015290519081900360640190fd5b600054600160a01b900460ff16610440576040805162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015290519081900360640190fd5b60015460408051631fa5d41d60e11b815290516001600160a01b03909216918291633f4ba83a9160048083019260209291908290030181600087803b15801561048857600080fd5b505af115801561049c573d6000803e3d6000fd5b505050506040513d60208110156104b257600080fd5b50516104ef5760405162461bcd60e51b815260040180806020018281038252602d815260200180610fe3602d913960400191505060405180910390fd5b6104f7610336565b6103325760405162461bcd60e51b8152600401808060200182810382526032815260200180610f526032913960400191505060405180910390fd5b600054600160a01b900460ff1690565b61054a6106ab565b610589576040805162461bcd60e51b81526020600482018190526024820152600080516020611010833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b60006105dd6106ab565b61061c576040805162461bcd60e51b81526020600482018190526024820152600080516020611010833981519152604482015290519081900360640190fd5b610624610532565b156106315750600161039f565b61039b610d89565b60008054600160a01b900460ff161561068c576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b506001546001600160a01b031690565b6000546001600160a01b031690565b600080546001600160a01b03166106c0610e13565b6001600160a01b031614905090565b6106d76106ab565b610716576040805162461bcd60e51b81526020600482018190526024820152600080516020611010833981519152604482015290519081900360640190fd5b600054600160a01b900460ff1661076b576040805162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015290519081900360640190fd5b60015460408051635c975abb60e01b815290516001600160a01b03909216918291635c975abb916004808301926020929190829003018186803b1580156107b157600080fd5b505afa1580156107c5573d6000803e3d6000fd5b505050506040513d60208110156107db57600080fd5b505161088357806001600160a01b0316638456cb596040518163ffffffff1660e01b8152600401602060405180830381600087803b15801561081c57600080fd5b505af1158015610830573d6000803e3d6000fd5b505050506040513d602081101561084657600080fd5b50516108835760405162461bcd60e51b815260040180806020018281038252602f815260200180610fb4602f913960400191505060405180910390fd5b60408051636f31031d60e01b815267ffffffffffffffff8416600482015290516001600160a01b03831691636f31031d9160248083019260209291908290030181600087803b1580156108d557600080fd5b505af11580156108e9573d6000803e3d6000fd5b505050506040513d60208110156108ff57600080fd5b505161094a576040805162461bcd60e51b8152602060048201526015602482015274039b2ba1031b430b4b71024a2103330b4b632b2171605d1b604482015290519081900360640190fd5b5050565b60006109586106ab565b610997576040805162461bcd60e51b81526020600482018190526024820152600080516020611010833981519152604482015290519081900360640190fd5b600054600160a01b900460ff166109ec576040805162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015290519081900360640190fd5b60015460408051635c975abb60e01b815290516001600160a01b03909216918291635c975abb916004808301926020929190829003018186803b158015610a3257600080fd5b505afa158015610a46573d6000803e3d6000fd5b505050506040513d6020811015610a5c57600080fd5b5051610b0457806001600160a01b0316638456cb596040518163ffffffff1660e01b8152600401602060405180830381600087803b158015610a9d57600080fd5b505af1158015610ab1573d6000803e3d6000fd5b505050506040513d6020811015610ac757600080fd5b5051610b045760405162461bcd60e51b815260040180806020018281038252602f815260200180610fb4602f913960400191505060405180910390fd5b806001600160a01b0316637e724ff3846040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b03168152602001915050602060405180830381600087803b158015610b5c57600080fd5b505af1158015610b70573d6000803e3d6000fd5b505050506040513d6020811015610b8657600080fd5b5051610bc35760405162461bcd60e51b8152600401808060200182810382526029815260200180610f036029913960400191505060405180910390fd5b6000839050806001600160a01b0316638f32d59b6040518163ffffffff1660e01b815260040160206040518083038186803b158015610c0157600080fd5b505afa158015610c15573d6000803e3d6000fd5b505050506040513d6020811015610c2b57600080fd5b5051610c685760405162461bcd60e51b815260040180806020018281038252604b815260200180610eb8604b913960600191505060405180910390fd5b5050600180546001600160a01b0319166001600160a01b03939093169290921790915590565b610c966106ab565b610cd5576040805162461bcd60e51b81526020600482018190526024820152600080516020611010833981519152604482015290519081900360640190fd5b610cde81610e17565b50565b600054600160a01b900460ff16610d36576040805162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015290519081900360640190fd5b6000805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa610d6c610e13565b604080516001600160a01b039092168252519081900360200190a1565b600054600160a01b900460ff1615610ddb576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b6000805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258610d6c5b3390565b6001600160a01b038116610e5c5760405162461bcd60e51b8152600401808060200182810382526026815260200180610f2c6026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b039290921691909117905556fe45746843726f7373436861696e4d616e6167657250726f7879206973206e6f74206f776e6572206f66206e65772045746843726f7373436861696e4d616e6167657220636f6e747261637445746843726f7373436861696e4d616e616765722075706772616465546f4e6577206661696c6564214f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373756e70617573652045746843726f7373436861696e4d616e6167657250726f787920636f6e7472616374206661696c65642170617573652045746843726f7373436861696e4d616e6167657250726f787920636f6e7472616374206661696c6564215061757365206f6c642045746843726f7373436861696e4d616e6167657220636f6e7472616374206661696c656421756e70617573652045746843726f7373436861696e4d616e6167657220636f6e7472616374206661696c6564214f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657270617573652045746843726f7373436861696e4d616e6167657220636f6e7472616374206661696c656421a265627a7a723158209912c574c151da270e940daefb46dbfdd2a4c2b2b7b49bffaec9045c6055abc464736f6c63430005110032" // DeployEthCrossChainManagerProxy deploys a new Ethereum contract, binding an instance of EthCrossChainManagerProxy to it. func DeployEthCrossChainManagerProxy(auth *bind.TransactOpts, backend bind.ContractBackend, _ethCrossChainManagerAddr common.Address) (common.Address, *types.Transaction, *EthCrossChainManagerProxy, error) { @@ -452,6 +453,27 @@ func (_EthCrossChainManagerProxy *EthCrossChainManagerProxyCallerSession) Paused return _EthCrossChainManagerProxy.Contract.Paused(&_EthCrossChainManagerProxy.CallOpts) } +// ChangeManagerChainID is a paid mutator transaction binding the contract method 0xa2681d28. +// +// Solidity: function changeManagerChainID(uint64 _newChainId) returns() +func (_EthCrossChainManagerProxy *EthCrossChainManagerProxyTransactor) ChangeManagerChainID(opts *bind.TransactOpts, _newChainId uint64) (*types.Transaction, error) { + return _EthCrossChainManagerProxy.contract.Transact(opts, "changeManagerChainID", _newChainId) +} + +// ChangeManagerChainID is a paid mutator transaction binding the contract method 0xa2681d28. +// +// Solidity: function changeManagerChainID(uint64 _newChainId) returns() +func (_EthCrossChainManagerProxy *EthCrossChainManagerProxySession) ChangeManagerChainID(_newChainId uint64) (*types.Transaction, error) { + return _EthCrossChainManagerProxy.Contract.ChangeManagerChainID(&_EthCrossChainManagerProxy.TransactOpts, _newChainId) +} + +// ChangeManagerChainID is a paid mutator transaction binding the contract method 0xa2681d28. +// +// Solidity: function changeManagerChainID(uint64 _newChainId) returns() +func (_EthCrossChainManagerProxy *EthCrossChainManagerProxyTransactorSession) ChangeManagerChainID(_newChainId uint64) (*types.Transaction, error) { + return _EthCrossChainManagerProxy.Contract.ChangeManagerChainID(&_EthCrossChainManagerProxy.TransactOpts, _newChainId) +} + // Pause is a paid mutator transaction binding the contract method 0x8456cb59. // // Solidity: function pause() returns(bool) @@ -1194,13 +1216,14 @@ func (_IEthCrossChainManagerProxy *IEthCrossChainManagerProxyCallerSession) GetE } // IUpgradableECCMABI is the input ABI used to generate the binding from. -const IUpgradableECCMABI = "[{\"constant\":true,\"inputs\":[],\"name\":\"isOwner\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"pause\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"unpause\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"upgradeToNew\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]" +const IUpgradableECCMABI = "[{\"constant\":true,\"inputs\":[],\"name\":\"isOwner\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"pause\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"_newChainId\",\"type\":\"uint64\"}],\"name\":\"setChainId\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"unpause\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"upgradeToNew\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]" // IUpgradableECCMFuncSigs maps the 4-byte function signature to its string representation. var IUpgradableECCMFuncSigs = map[string]string{ "8f32d59b": "isOwner()", "8456cb59": "pause()", "5c975abb": "paused()", + "6f31031d": "setChainId(uint64)", "3f4ba83a": "unpause()", "7e724ff3": "upgradeToNew(address)", } @@ -1420,6 +1443,27 @@ func (_IUpgradableECCM *IUpgradableECCMTransactorSession) Pause() (*types.Transa return _IUpgradableECCM.Contract.Pause(&_IUpgradableECCM.TransactOpts) } +// SetChainId is a paid mutator transaction binding the contract method 0x6f31031d. +// +// Solidity: function setChainId(uint64 _newChainId) returns(bool) +func (_IUpgradableECCM *IUpgradableECCMTransactor) SetChainId(opts *bind.TransactOpts, _newChainId uint64) (*types.Transaction, error) { + return _IUpgradableECCM.contract.Transact(opts, "setChainId", _newChainId) +} + +// SetChainId is a paid mutator transaction binding the contract method 0x6f31031d. +// +// Solidity: function setChainId(uint64 _newChainId) returns(bool) +func (_IUpgradableECCM *IUpgradableECCMSession) SetChainId(_newChainId uint64) (*types.Transaction, error) { + return _IUpgradableECCM.Contract.SetChainId(&_IUpgradableECCM.TransactOpts, _newChainId) +} + +// SetChainId is a paid mutator transaction binding the contract method 0x6f31031d. +// +// Solidity: function setChainId(uint64 _newChainId) returns(bool) +func (_IUpgradableECCM *IUpgradableECCMTransactorSession) SetChainId(_newChainId uint64) (*types.Transaction, error) { + return _IUpgradableECCM.Contract.SetChainId(&_IUpgradableECCM.TransactOpts, _newChainId) +} + // Unpause is a paid mutator transaction binding the contract method 0x3f4ba83a. // // Solidity: function unpause() returns(bool) @@ -2302,4 +2346,3 @@ func (_Pausable *PausableFilterer) ParseUnpaused(log types.Log) (*PausableUnpaus } return event, nil } - diff --git a/go_abi/nftlp/NFTLockProxy.go b/go_abi/nftlp/NFTLockProxy.go new file mode 100644 index 0000000..81b0f54 --- /dev/null +++ b/go_abi/nftlp/NFTLockProxy.go @@ -0,0 +1,5176 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package nftlp + +import ( + "math/big" + "strings" + + ethereum "github.com/ethereum/go-ethereum" + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/event" +) + +// Reference imports to suppress errors if they are not otherwise used. +var ( + _ = big.NewInt + _ = strings.NewReader + _ = ethereum.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription +) + +// AddressABI is the input ABI used to generate the binding from. +const AddressABI = "[]" + +// AddressBin is the compiled bytecode used for deploying new contracts. +var AddressBin = "0x60566023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220dc27caae7886715053b24e3f988fd3a3f2de72d492ab9b2ec3cbbf0c3236957664736f6c634300060c0033" + +// DeployAddress deploys a new Ethereum contract, binding an instance of Address to it. +func DeployAddress(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *Address, error) { + parsed, err := abi.JSON(strings.NewReader(AddressABI)) + if err != nil { + return common.Address{}, nil, nil, err + } + + address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(AddressBin), backend) + if err != nil { + return common.Address{}, nil, nil, err + } + return address, tx, &Address{AddressCaller: AddressCaller{contract: contract}, AddressTransactor: AddressTransactor{contract: contract}, AddressFilterer: AddressFilterer{contract: contract}}, nil +} + +// Address is an auto generated Go binding around an Ethereum contract. +type Address struct { + AddressCaller // Read-only binding to the contract + AddressTransactor // Write-only binding to the contract + AddressFilterer // Log filterer for contract events +} + +// AddressCaller is an auto generated read-only Go binding around an Ethereum contract. +type AddressCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// AddressTransactor is an auto generated write-only Go binding around an Ethereum contract. +type AddressTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// AddressFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type AddressFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// AddressSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type AddressSession struct { + Contract *Address // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// AddressCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type AddressCallerSession struct { + Contract *AddressCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// AddressTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type AddressTransactorSession struct { + Contract *AddressTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// AddressRaw is an auto generated low-level Go binding around an Ethereum contract. +type AddressRaw struct { + Contract *Address // Generic contract binding to access the raw methods on +} + +// AddressCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type AddressCallerRaw struct { + Contract *AddressCaller // Generic read-only contract binding to access the raw methods on +} + +// AddressTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type AddressTransactorRaw struct { + Contract *AddressTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewAddress creates a new instance of Address, bound to a specific deployed contract. +func NewAddress(address common.Address, backend bind.ContractBackend) (*Address, error) { + contract, err := bindAddress(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &Address{AddressCaller: AddressCaller{contract: contract}, AddressTransactor: AddressTransactor{contract: contract}, AddressFilterer: AddressFilterer{contract: contract}}, nil +} + +// NewAddressCaller creates a new read-only instance of Address, bound to a specific deployed contract. +func NewAddressCaller(address common.Address, caller bind.ContractCaller) (*AddressCaller, error) { + contract, err := bindAddress(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &AddressCaller{contract: contract}, nil +} + +// NewAddressTransactor creates a new write-only instance of Address, bound to a specific deployed contract. +func NewAddressTransactor(address common.Address, transactor bind.ContractTransactor) (*AddressTransactor, error) { + contract, err := bindAddress(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &AddressTransactor{contract: contract}, nil +} + +// NewAddressFilterer creates a new log filterer instance of Address, bound to a specific deployed contract. +func NewAddressFilterer(address common.Address, filterer bind.ContractFilterer) (*AddressFilterer, error) { + contract, err := bindAddress(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &AddressFilterer{contract: contract}, nil +} + +// bindAddress binds a generic wrapper to an already deployed contract. +func bindAddress(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := abi.JSON(strings.NewReader(AddressABI)) + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_Address *AddressRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { + return _Address.Contract.AddressCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_Address *AddressRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Address.Contract.AddressTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_Address *AddressRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _Address.Contract.AddressTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_Address *AddressCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { + return _Address.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_Address *AddressTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Address.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_Address *AddressTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _Address.Contract.contract.Transact(opts, method, params...) +} + +// ContextABI is the input ABI used to generate the binding from. +const ContextABI = "[]" + +// Context is an auto generated Go binding around an Ethereum contract. +type Context struct { + ContextCaller // Read-only binding to the contract + ContextTransactor // Write-only binding to the contract + ContextFilterer // Log filterer for contract events +} + +// ContextCaller is an auto generated read-only Go binding around an Ethereum contract. +type ContextCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// ContextTransactor is an auto generated write-only Go binding around an Ethereum contract. +type ContextTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// ContextFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type ContextFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// ContextSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type ContextSession struct { + Contract *Context // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// ContextCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type ContextCallerSession struct { + Contract *ContextCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// ContextTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type ContextTransactorSession struct { + Contract *ContextTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// ContextRaw is an auto generated low-level Go binding around an Ethereum contract. +type ContextRaw struct { + Contract *Context // Generic contract binding to access the raw methods on +} + +// ContextCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type ContextCallerRaw struct { + Contract *ContextCaller // Generic read-only contract binding to access the raw methods on +} + +// ContextTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type ContextTransactorRaw struct { + Contract *ContextTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewContext creates a new instance of Context, bound to a specific deployed contract. +func NewContext(address common.Address, backend bind.ContractBackend) (*Context, error) { + contract, err := bindContext(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &Context{ContextCaller: ContextCaller{contract: contract}, ContextTransactor: ContextTransactor{contract: contract}, ContextFilterer: ContextFilterer{contract: contract}}, nil +} + +// NewContextCaller creates a new read-only instance of Context, bound to a specific deployed contract. +func NewContextCaller(address common.Address, caller bind.ContractCaller) (*ContextCaller, error) { + contract, err := bindContext(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &ContextCaller{contract: contract}, nil +} + +// NewContextTransactor creates a new write-only instance of Context, bound to a specific deployed contract. +func NewContextTransactor(address common.Address, transactor bind.ContractTransactor) (*ContextTransactor, error) { + contract, err := bindContext(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &ContextTransactor{contract: contract}, nil +} + +// NewContextFilterer creates a new log filterer instance of Context, bound to a specific deployed contract. +func NewContextFilterer(address common.Address, filterer bind.ContractFilterer) (*ContextFilterer, error) { + contract, err := bindContext(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &ContextFilterer{contract: contract}, nil +} + +// bindContext binds a generic wrapper to an already deployed contract. +func bindContext(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := abi.JSON(strings.NewReader(ContextABI)) + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_Context *ContextRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { + return _Context.Contract.ContextCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_Context *ContextRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Context.Contract.ContextTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_Context *ContextRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _Context.Contract.ContextTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_Context *ContextCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { + return _Context.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_Context *ContextTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Context.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_Context *ContextTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _Context.Contract.contract.Transact(opts, method, params...) +} + +// IERC165ABI is the input ABI used to generate the binding from. +const IERC165ABI = "[{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]" + +// IERC165FuncSigs maps the 4-byte function signature to its string representation. +var IERC165FuncSigs = map[string]string{ + "01ffc9a7": "supportsInterface(bytes4)", +} + +// IERC165 is an auto generated Go binding around an Ethereum contract. +type IERC165 struct { + IERC165Caller // Read-only binding to the contract + IERC165Transactor // Write-only binding to the contract + IERC165Filterer // Log filterer for contract events +} + +// IERC165Caller is an auto generated read-only Go binding around an Ethereum contract. +type IERC165Caller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// IERC165Transactor is an auto generated write-only Go binding around an Ethereum contract. +type IERC165Transactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// IERC165Filterer is an auto generated log filtering Go binding around an Ethereum contract events. +type IERC165Filterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// IERC165Session is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type IERC165Session struct { + Contract *IERC165 // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// IERC165CallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type IERC165CallerSession struct { + Contract *IERC165Caller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// IERC165TransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type IERC165TransactorSession struct { + Contract *IERC165Transactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// IERC165Raw is an auto generated low-level Go binding around an Ethereum contract. +type IERC165Raw struct { + Contract *IERC165 // Generic contract binding to access the raw methods on +} + +// IERC165CallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type IERC165CallerRaw struct { + Contract *IERC165Caller // Generic read-only contract binding to access the raw methods on +} + +// IERC165TransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type IERC165TransactorRaw struct { + Contract *IERC165Transactor // Generic write-only contract binding to access the raw methods on +} + +// NewIERC165 creates a new instance of IERC165, bound to a specific deployed contract. +func NewIERC165(address common.Address, backend bind.ContractBackend) (*IERC165, error) { + contract, err := bindIERC165(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &IERC165{IERC165Caller: IERC165Caller{contract: contract}, IERC165Transactor: IERC165Transactor{contract: contract}, IERC165Filterer: IERC165Filterer{contract: contract}}, nil +} + +// NewIERC165Caller creates a new read-only instance of IERC165, bound to a specific deployed contract. +func NewIERC165Caller(address common.Address, caller bind.ContractCaller) (*IERC165Caller, error) { + contract, err := bindIERC165(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &IERC165Caller{contract: contract}, nil +} + +// NewIERC165Transactor creates a new write-only instance of IERC165, bound to a specific deployed contract. +func NewIERC165Transactor(address common.Address, transactor bind.ContractTransactor) (*IERC165Transactor, error) { + contract, err := bindIERC165(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &IERC165Transactor{contract: contract}, nil +} + +// NewIERC165Filterer creates a new log filterer instance of IERC165, bound to a specific deployed contract. +func NewIERC165Filterer(address common.Address, filterer bind.ContractFilterer) (*IERC165Filterer, error) { + contract, err := bindIERC165(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &IERC165Filterer{contract: contract}, nil +} + +// bindIERC165 binds a generic wrapper to an already deployed contract. +func bindIERC165(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := abi.JSON(strings.NewReader(IERC165ABI)) + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_IERC165 *IERC165Raw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { + return _IERC165.Contract.IERC165Caller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_IERC165 *IERC165Raw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _IERC165.Contract.IERC165Transactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_IERC165 *IERC165Raw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _IERC165.Contract.IERC165Transactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_IERC165 *IERC165CallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { + return _IERC165.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_IERC165 *IERC165TransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _IERC165.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_IERC165 *IERC165TransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _IERC165.Contract.contract.Transact(opts, method, params...) +} + +// SupportsInterface is a free data retrieval call binding the contract method 0x01ffc9a7. +// +// Solidity: function supportsInterface(bytes4 interfaceId) view returns(bool) +func (_IERC165 *IERC165Caller) SupportsInterface(opts *bind.CallOpts, interfaceId [4]byte) (bool, error) { + var ( + ret0 = new(bool) + ) + out := ret0 + err := _IERC165.contract.Call(opts, out, "supportsInterface", interfaceId) + return *ret0, err +} + +// SupportsInterface is a free data retrieval call binding the contract method 0x01ffc9a7. +// +// Solidity: function supportsInterface(bytes4 interfaceId) view returns(bool) +func (_IERC165 *IERC165Session) SupportsInterface(interfaceId [4]byte) (bool, error) { + return _IERC165.Contract.SupportsInterface(&_IERC165.CallOpts, interfaceId) +} + +// SupportsInterface is a free data retrieval call binding the contract method 0x01ffc9a7. +// +// Solidity: function supportsInterface(bytes4 interfaceId) view returns(bool) +func (_IERC165 *IERC165CallerSession) SupportsInterface(interfaceId [4]byte) (bool, error) { + return _IERC165.Contract.SupportsInterface(&_IERC165.CallOpts, interfaceId) +} + +// IERC721ABI is the input ABI used to generate the binding from. +const IERC721ABI = "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"approved\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"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\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"balance\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"getApproved\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"isApprovedForAll\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"ownerOf\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"safeTransferFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"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\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]" + +// IERC721FuncSigs maps the 4-byte function signature to its string representation. +var IERC721FuncSigs = map[string]string{ + "095ea7b3": "approve(address,uint256)", + "70a08231": "balanceOf(address)", + "081812fc": "getApproved(uint256)", + "e985e9c5": "isApprovedForAll(address,address)", + "6352211e": "ownerOf(uint256)", + "42842e0e": "safeTransferFrom(address,address,uint256)", + "b88d4fde": "safeTransferFrom(address,address,uint256,bytes)", + "a22cb465": "setApprovalForAll(address,bool)", + "01ffc9a7": "supportsInterface(bytes4)", + "23b872dd": "transferFrom(address,address,uint256)", +} + +// IERC721 is an auto generated Go binding around an Ethereum contract. +type IERC721 struct { + IERC721Caller // Read-only binding to the contract + IERC721Transactor // Write-only binding to the contract + IERC721Filterer // Log filterer for contract events +} + +// IERC721Caller is an auto generated read-only Go binding around an Ethereum contract. +type IERC721Caller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// IERC721Transactor is an auto generated write-only Go binding around an Ethereum contract. +type IERC721Transactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// IERC721Filterer is an auto generated log filtering Go binding around an Ethereum contract events. +type IERC721Filterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// IERC721Session is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type IERC721Session struct { + Contract *IERC721 // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// IERC721CallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type IERC721CallerSession struct { + Contract *IERC721Caller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// IERC721TransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type IERC721TransactorSession struct { + Contract *IERC721Transactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// IERC721Raw is an auto generated low-level Go binding around an Ethereum contract. +type IERC721Raw struct { + Contract *IERC721 // Generic contract binding to access the raw methods on +} + +// IERC721CallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type IERC721CallerRaw struct { + Contract *IERC721Caller // Generic read-only contract binding to access the raw methods on +} + +// IERC721TransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type IERC721TransactorRaw struct { + Contract *IERC721Transactor // Generic write-only contract binding to access the raw methods on +} + +// NewIERC721 creates a new instance of IERC721, bound to a specific deployed contract. +func NewIERC721(address common.Address, backend bind.ContractBackend) (*IERC721, error) { + contract, err := bindIERC721(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &IERC721{IERC721Caller: IERC721Caller{contract: contract}, IERC721Transactor: IERC721Transactor{contract: contract}, IERC721Filterer: IERC721Filterer{contract: contract}}, nil +} + +// NewIERC721Caller creates a new read-only instance of IERC721, bound to a specific deployed contract. +func NewIERC721Caller(address common.Address, caller bind.ContractCaller) (*IERC721Caller, error) { + contract, err := bindIERC721(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &IERC721Caller{contract: contract}, nil +} + +// NewIERC721Transactor creates a new write-only instance of IERC721, bound to a specific deployed contract. +func NewIERC721Transactor(address common.Address, transactor bind.ContractTransactor) (*IERC721Transactor, error) { + contract, err := bindIERC721(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &IERC721Transactor{contract: contract}, nil +} + +// NewIERC721Filterer creates a new log filterer instance of IERC721, bound to a specific deployed contract. +func NewIERC721Filterer(address common.Address, filterer bind.ContractFilterer) (*IERC721Filterer, error) { + contract, err := bindIERC721(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &IERC721Filterer{contract: contract}, nil +} + +// bindIERC721 binds a generic wrapper to an already deployed contract. +func bindIERC721(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := abi.JSON(strings.NewReader(IERC721ABI)) + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_IERC721 *IERC721Raw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { + return _IERC721.Contract.IERC721Caller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_IERC721 *IERC721Raw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _IERC721.Contract.IERC721Transactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_IERC721 *IERC721Raw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _IERC721.Contract.IERC721Transactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_IERC721 *IERC721CallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { + return _IERC721.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_IERC721 *IERC721TransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _IERC721.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_IERC721 *IERC721TransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _IERC721.Contract.contract.Transact(opts, method, params...) +} + +// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. +// +// Solidity: function balanceOf(address owner) view returns(uint256 balance) +func (_IERC721 *IERC721Caller) BalanceOf(opts *bind.CallOpts, owner common.Address) (*big.Int, error) { + var ( + ret0 = new(*big.Int) + ) + out := ret0 + err := _IERC721.contract.Call(opts, out, "balanceOf", owner) + return *ret0, err +} + +// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. +// +// Solidity: function balanceOf(address owner) view returns(uint256 balance) +func (_IERC721 *IERC721Session) BalanceOf(owner common.Address) (*big.Int, error) { + return _IERC721.Contract.BalanceOf(&_IERC721.CallOpts, owner) +} + +// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. +// +// Solidity: function balanceOf(address owner) view returns(uint256 balance) +func (_IERC721 *IERC721CallerSession) BalanceOf(owner common.Address) (*big.Int, error) { + return _IERC721.Contract.BalanceOf(&_IERC721.CallOpts, owner) +} + +// GetApproved is a free data retrieval call binding the contract method 0x081812fc. +// +// Solidity: function getApproved(uint256 tokenId) view returns(address operator) +func (_IERC721 *IERC721Caller) GetApproved(opts *bind.CallOpts, tokenId *big.Int) (common.Address, error) { + var ( + ret0 = new(common.Address) + ) + out := ret0 + err := _IERC721.contract.Call(opts, out, "getApproved", tokenId) + return *ret0, err +} + +// GetApproved is a free data retrieval call binding the contract method 0x081812fc. +// +// Solidity: function getApproved(uint256 tokenId) view returns(address operator) +func (_IERC721 *IERC721Session) GetApproved(tokenId *big.Int) (common.Address, error) { + return _IERC721.Contract.GetApproved(&_IERC721.CallOpts, tokenId) +} + +// GetApproved is a free data retrieval call binding the contract method 0x081812fc. +// +// Solidity: function getApproved(uint256 tokenId) view returns(address operator) +func (_IERC721 *IERC721CallerSession) GetApproved(tokenId *big.Int) (common.Address, error) { + return _IERC721.Contract.GetApproved(&_IERC721.CallOpts, tokenId) +} + +// IsApprovedForAll is a free data retrieval call binding the contract method 0xe985e9c5. +// +// Solidity: function isApprovedForAll(address owner, address operator) view returns(bool) +func (_IERC721 *IERC721Caller) IsApprovedForAll(opts *bind.CallOpts, owner common.Address, operator common.Address) (bool, error) { + var ( + ret0 = new(bool) + ) + out := ret0 + err := _IERC721.contract.Call(opts, out, "isApprovedForAll", owner, operator) + return *ret0, err +} + +// IsApprovedForAll is a free data retrieval call binding the contract method 0xe985e9c5. +// +// Solidity: function isApprovedForAll(address owner, address operator) view returns(bool) +func (_IERC721 *IERC721Session) IsApprovedForAll(owner common.Address, operator common.Address) (bool, error) { + return _IERC721.Contract.IsApprovedForAll(&_IERC721.CallOpts, owner, operator) +} + +// IsApprovedForAll is a free data retrieval call binding the contract method 0xe985e9c5. +// +// Solidity: function isApprovedForAll(address owner, address operator) view returns(bool) +func (_IERC721 *IERC721CallerSession) IsApprovedForAll(owner common.Address, operator common.Address) (bool, error) { + return _IERC721.Contract.IsApprovedForAll(&_IERC721.CallOpts, owner, operator) +} + +// OwnerOf is a free data retrieval call binding the contract method 0x6352211e. +// +// Solidity: function ownerOf(uint256 tokenId) view returns(address owner) +func (_IERC721 *IERC721Caller) OwnerOf(opts *bind.CallOpts, tokenId *big.Int) (common.Address, error) { + var ( + ret0 = new(common.Address) + ) + out := ret0 + err := _IERC721.contract.Call(opts, out, "ownerOf", tokenId) + return *ret0, err +} + +// OwnerOf is a free data retrieval call binding the contract method 0x6352211e. +// +// Solidity: function ownerOf(uint256 tokenId) view returns(address owner) +func (_IERC721 *IERC721Session) OwnerOf(tokenId *big.Int) (common.Address, error) { + return _IERC721.Contract.OwnerOf(&_IERC721.CallOpts, tokenId) +} + +// OwnerOf is a free data retrieval call binding the contract method 0x6352211e. +// +// Solidity: function ownerOf(uint256 tokenId) view returns(address owner) +func (_IERC721 *IERC721CallerSession) OwnerOf(tokenId *big.Int) (common.Address, error) { + return _IERC721.Contract.OwnerOf(&_IERC721.CallOpts, tokenId) +} + +// SupportsInterface is a free data retrieval call binding the contract method 0x01ffc9a7. +// +// Solidity: function supportsInterface(bytes4 interfaceId) view returns(bool) +func (_IERC721 *IERC721Caller) SupportsInterface(opts *bind.CallOpts, interfaceId [4]byte) (bool, error) { + var ( + ret0 = new(bool) + ) + out := ret0 + err := _IERC721.contract.Call(opts, out, "supportsInterface", interfaceId) + return *ret0, err +} + +// SupportsInterface is a free data retrieval call binding the contract method 0x01ffc9a7. +// +// Solidity: function supportsInterface(bytes4 interfaceId) view returns(bool) +func (_IERC721 *IERC721Session) SupportsInterface(interfaceId [4]byte) (bool, error) { + return _IERC721.Contract.SupportsInterface(&_IERC721.CallOpts, interfaceId) +} + +// SupportsInterface is a free data retrieval call binding the contract method 0x01ffc9a7. +// +// Solidity: function supportsInterface(bytes4 interfaceId) view returns(bool) +func (_IERC721 *IERC721CallerSession) SupportsInterface(interfaceId [4]byte) (bool, error) { + return _IERC721.Contract.SupportsInterface(&_IERC721.CallOpts, interfaceId) +} + +// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. +// +// Solidity: function approve(address to, uint256 tokenId) returns() +func (_IERC721 *IERC721Transactor) Approve(opts *bind.TransactOpts, to common.Address, tokenId *big.Int) (*types.Transaction, error) { + return _IERC721.contract.Transact(opts, "approve", to, tokenId) +} + +// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. +// +// Solidity: function approve(address to, uint256 tokenId) returns() +func (_IERC721 *IERC721Session) Approve(to common.Address, tokenId *big.Int) (*types.Transaction, error) { + return _IERC721.Contract.Approve(&_IERC721.TransactOpts, to, tokenId) +} + +// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. +// +// Solidity: function approve(address to, uint256 tokenId) returns() +func (_IERC721 *IERC721TransactorSession) Approve(to common.Address, tokenId *big.Int) (*types.Transaction, error) { + return _IERC721.Contract.Approve(&_IERC721.TransactOpts, to, tokenId) +} + +// SafeTransferFrom is a paid mutator transaction binding the contract method 0x42842e0e. +// +// Solidity: function safeTransferFrom(address from, address to, uint256 tokenId) returns() +func (_IERC721 *IERC721Transactor) SafeTransferFrom(opts *bind.TransactOpts, from common.Address, to common.Address, tokenId *big.Int) (*types.Transaction, error) { + return _IERC721.contract.Transact(opts, "safeTransferFrom", from, to, tokenId) +} + +// SafeTransferFrom is a paid mutator transaction binding the contract method 0x42842e0e. +// +// Solidity: function safeTransferFrom(address from, address to, uint256 tokenId) returns() +func (_IERC721 *IERC721Session) SafeTransferFrom(from common.Address, to common.Address, tokenId *big.Int) (*types.Transaction, error) { + return _IERC721.Contract.SafeTransferFrom(&_IERC721.TransactOpts, from, to, tokenId) +} + +// SafeTransferFrom is a paid mutator transaction binding the contract method 0x42842e0e. +// +// Solidity: function safeTransferFrom(address from, address to, uint256 tokenId) returns() +func (_IERC721 *IERC721TransactorSession) SafeTransferFrom(from common.Address, to common.Address, tokenId *big.Int) (*types.Transaction, error) { + return _IERC721.Contract.SafeTransferFrom(&_IERC721.TransactOpts, from, to, tokenId) +} + +// SafeTransferFrom0 is a paid mutator transaction binding the contract method 0xb88d4fde. +// +// Solidity: function safeTransferFrom(address from, address to, uint256 tokenId, bytes data) returns() +func (_IERC721 *IERC721Transactor) SafeTransferFrom0(opts *bind.TransactOpts, from common.Address, to common.Address, tokenId *big.Int, data []byte) (*types.Transaction, error) { + return _IERC721.contract.Transact(opts, "safeTransferFrom0", from, to, tokenId, data) +} + +// SafeTransferFrom0 is a paid mutator transaction binding the contract method 0xb88d4fde. +// +// Solidity: function safeTransferFrom(address from, address to, uint256 tokenId, bytes data) returns() +func (_IERC721 *IERC721Session) SafeTransferFrom0(from common.Address, to common.Address, tokenId *big.Int, data []byte) (*types.Transaction, error) { + return _IERC721.Contract.SafeTransferFrom0(&_IERC721.TransactOpts, from, to, tokenId, data) +} + +// SafeTransferFrom0 is a paid mutator transaction binding the contract method 0xb88d4fde. +// +// Solidity: function safeTransferFrom(address from, address to, uint256 tokenId, bytes data) returns() +func (_IERC721 *IERC721TransactorSession) SafeTransferFrom0(from common.Address, to common.Address, tokenId *big.Int, data []byte) (*types.Transaction, error) { + return _IERC721.Contract.SafeTransferFrom0(&_IERC721.TransactOpts, from, to, tokenId, data) +} + +// SetApprovalForAll is a paid mutator transaction binding the contract method 0xa22cb465. +// +// Solidity: function setApprovalForAll(address operator, bool _approved) returns() +func (_IERC721 *IERC721Transactor) SetApprovalForAll(opts *bind.TransactOpts, operator common.Address, _approved bool) (*types.Transaction, error) { + return _IERC721.contract.Transact(opts, "setApprovalForAll", operator, _approved) +} + +// SetApprovalForAll is a paid mutator transaction binding the contract method 0xa22cb465. +// +// Solidity: function setApprovalForAll(address operator, bool _approved) returns() +func (_IERC721 *IERC721Session) SetApprovalForAll(operator common.Address, _approved bool) (*types.Transaction, error) { + return _IERC721.Contract.SetApprovalForAll(&_IERC721.TransactOpts, operator, _approved) +} + +// SetApprovalForAll is a paid mutator transaction binding the contract method 0xa22cb465. +// +// Solidity: function setApprovalForAll(address operator, bool _approved) returns() +func (_IERC721 *IERC721TransactorSession) SetApprovalForAll(operator common.Address, _approved bool) (*types.Transaction, error) { + return _IERC721.Contract.SetApprovalForAll(&_IERC721.TransactOpts, operator, _approved) +} + +// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. +// +// Solidity: function transferFrom(address from, address to, uint256 tokenId) returns() +func (_IERC721 *IERC721Transactor) TransferFrom(opts *bind.TransactOpts, from common.Address, to common.Address, tokenId *big.Int) (*types.Transaction, error) { + return _IERC721.contract.Transact(opts, "transferFrom", from, to, tokenId) +} + +// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. +// +// Solidity: function transferFrom(address from, address to, uint256 tokenId) returns() +func (_IERC721 *IERC721Session) TransferFrom(from common.Address, to common.Address, tokenId *big.Int) (*types.Transaction, error) { + return _IERC721.Contract.TransferFrom(&_IERC721.TransactOpts, from, to, tokenId) +} + +// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. +// +// Solidity: function transferFrom(address from, address to, uint256 tokenId) returns() +func (_IERC721 *IERC721TransactorSession) TransferFrom(from common.Address, to common.Address, tokenId *big.Int) (*types.Transaction, error) { + return _IERC721.Contract.TransferFrom(&_IERC721.TransactOpts, from, to, tokenId) +} + +// IERC721ApprovalIterator is returned from FilterApproval and is used to iterate over the raw logs and unpacked data for Approval events raised by the IERC721 contract. +type IERC721ApprovalIterator struct { + Event *IERC721Approval // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *IERC721ApprovalIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(IERC721Approval) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(IERC721Approval) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *IERC721ApprovalIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *IERC721ApprovalIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// IERC721Approval represents a Approval event raised by the IERC721 contract. +type IERC721Approval struct { + Owner common.Address + Approved common.Address + TokenId *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterApproval is a free log retrieval operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. +// +// Solidity: event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId) +func (_IERC721 *IERC721Filterer) FilterApproval(opts *bind.FilterOpts, owner []common.Address, approved []common.Address, tokenId []*big.Int) (*IERC721ApprovalIterator, error) { + + var ownerRule []interface{} + for _, ownerItem := range owner { + ownerRule = append(ownerRule, ownerItem) + } + var approvedRule []interface{} + for _, approvedItem := range approved { + approvedRule = append(approvedRule, approvedItem) + } + var tokenIdRule []interface{} + for _, tokenIdItem := range tokenId { + tokenIdRule = append(tokenIdRule, tokenIdItem) + } + + logs, sub, err := _IERC721.contract.FilterLogs(opts, "Approval", ownerRule, approvedRule, tokenIdRule) + if err != nil { + return nil, err + } + return &IERC721ApprovalIterator{contract: _IERC721.contract, event: "Approval", logs: logs, sub: sub}, nil +} + +// WatchApproval is a free log subscription operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. +// +// Solidity: event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId) +func (_IERC721 *IERC721Filterer) WatchApproval(opts *bind.WatchOpts, sink chan<- *IERC721Approval, owner []common.Address, approved []common.Address, tokenId []*big.Int) (event.Subscription, error) { + + var ownerRule []interface{} + for _, ownerItem := range owner { + ownerRule = append(ownerRule, ownerItem) + } + var approvedRule []interface{} + for _, approvedItem := range approved { + approvedRule = append(approvedRule, approvedItem) + } + var tokenIdRule []interface{} + for _, tokenIdItem := range tokenId { + tokenIdRule = append(tokenIdRule, tokenIdItem) + } + + logs, sub, err := _IERC721.contract.WatchLogs(opts, "Approval", ownerRule, approvedRule, tokenIdRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(IERC721Approval) + if err := _IERC721.contract.UnpackLog(event, "Approval", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseApproval is a log parse operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. +// +// Solidity: event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId) +func (_IERC721 *IERC721Filterer) ParseApproval(log types.Log) (*IERC721Approval, error) { + event := new(IERC721Approval) + if err := _IERC721.contract.UnpackLog(event, "Approval", log); err != nil { + return nil, err + } + return event, nil +} + +// IERC721ApprovalForAllIterator is returned from FilterApprovalForAll and is used to iterate over the raw logs and unpacked data for ApprovalForAll events raised by the IERC721 contract. +type IERC721ApprovalForAllIterator struct { + Event *IERC721ApprovalForAll // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *IERC721ApprovalForAllIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(IERC721ApprovalForAll) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(IERC721ApprovalForAll) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *IERC721ApprovalForAllIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *IERC721ApprovalForAllIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// IERC721ApprovalForAll represents a ApprovalForAll event raised by the IERC721 contract. +type IERC721ApprovalForAll struct { + Owner common.Address + Operator common.Address + Approved bool + Raw types.Log // Blockchain specific contextual infos +} + +// FilterApprovalForAll is a free log retrieval operation binding the contract event 0x17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31. +// +// Solidity: event ApprovalForAll(address indexed owner, address indexed operator, bool approved) +func (_IERC721 *IERC721Filterer) FilterApprovalForAll(opts *bind.FilterOpts, owner []common.Address, operator []common.Address) (*IERC721ApprovalForAllIterator, error) { + + var ownerRule []interface{} + for _, ownerItem := range owner { + ownerRule = append(ownerRule, ownerItem) + } + var operatorRule []interface{} + for _, operatorItem := range operator { + operatorRule = append(operatorRule, operatorItem) + } + + logs, sub, err := _IERC721.contract.FilterLogs(opts, "ApprovalForAll", ownerRule, operatorRule) + if err != nil { + return nil, err + } + return &IERC721ApprovalForAllIterator{contract: _IERC721.contract, event: "ApprovalForAll", logs: logs, sub: sub}, nil +} + +// WatchApprovalForAll is a free log subscription operation binding the contract event 0x17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31. +// +// Solidity: event ApprovalForAll(address indexed owner, address indexed operator, bool approved) +func (_IERC721 *IERC721Filterer) WatchApprovalForAll(opts *bind.WatchOpts, sink chan<- *IERC721ApprovalForAll, owner []common.Address, operator []common.Address) (event.Subscription, error) { + + var ownerRule []interface{} + for _, ownerItem := range owner { + ownerRule = append(ownerRule, ownerItem) + } + var operatorRule []interface{} + for _, operatorItem := range operator { + operatorRule = append(operatorRule, operatorItem) + } + + logs, sub, err := _IERC721.contract.WatchLogs(opts, "ApprovalForAll", ownerRule, operatorRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(IERC721ApprovalForAll) + if err := _IERC721.contract.UnpackLog(event, "ApprovalForAll", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseApprovalForAll is a log parse operation binding the contract event 0x17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31. +// +// Solidity: event ApprovalForAll(address indexed owner, address indexed operator, bool approved) +func (_IERC721 *IERC721Filterer) ParseApprovalForAll(log types.Log) (*IERC721ApprovalForAll, error) { + event := new(IERC721ApprovalForAll) + if err := _IERC721.contract.UnpackLog(event, "ApprovalForAll", log); err != nil { + return nil, err + } + return event, nil +} + +// IERC721TransferIterator is returned from FilterTransfer and is used to iterate over the raw logs and unpacked data for Transfer events raised by the IERC721 contract. +type IERC721TransferIterator struct { + Event *IERC721Transfer // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *IERC721TransferIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(IERC721Transfer) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(IERC721Transfer) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *IERC721TransferIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *IERC721TransferIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// IERC721Transfer represents a Transfer event raised by the IERC721 contract. +type IERC721Transfer struct { + From common.Address + To common.Address + TokenId *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterTransfer is a free log retrieval operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. +// +// Solidity: event Transfer(address indexed from, address indexed to, uint256 indexed tokenId) +func (_IERC721 *IERC721Filterer) FilterTransfer(opts *bind.FilterOpts, from []common.Address, to []common.Address, tokenId []*big.Int) (*IERC721TransferIterator, error) { + + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + var tokenIdRule []interface{} + for _, tokenIdItem := range tokenId { + tokenIdRule = append(tokenIdRule, tokenIdItem) + } + + logs, sub, err := _IERC721.contract.FilterLogs(opts, "Transfer", fromRule, toRule, tokenIdRule) + if err != nil { + return nil, err + } + return &IERC721TransferIterator{contract: _IERC721.contract, event: "Transfer", logs: logs, sub: sub}, nil +} + +// WatchTransfer is a free log subscription operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. +// +// Solidity: event Transfer(address indexed from, address indexed to, uint256 indexed tokenId) +func (_IERC721 *IERC721Filterer) WatchTransfer(opts *bind.WatchOpts, sink chan<- *IERC721Transfer, from []common.Address, to []common.Address, tokenId []*big.Int) (event.Subscription, error) { + + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + var tokenIdRule []interface{} + for _, tokenIdItem := range tokenId { + tokenIdRule = append(tokenIdRule, tokenIdItem) + } + + logs, sub, err := _IERC721.contract.WatchLogs(opts, "Transfer", fromRule, toRule, tokenIdRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(IERC721Transfer) + if err := _IERC721.contract.UnpackLog(event, "Transfer", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseTransfer is a log parse operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. +// +// Solidity: event Transfer(address indexed from, address indexed to, uint256 indexed tokenId) +func (_IERC721 *IERC721Filterer) ParseTransfer(log types.Log) (*IERC721Transfer, error) { + event := new(IERC721Transfer) + if err := _IERC721.contract.UnpackLog(event, "Transfer", log); err != nil { + return nil, err + } + return event, nil +} + +// IERC721MetadataABI is the input ABI used to generate the binding from. +const IERC721MetadataABI = "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"approved\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"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\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"balance\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"getApproved\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"isApprovedForAll\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"ownerOf\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"safeTransferFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"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\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"tokenURI\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]" + +// IERC721MetadataFuncSigs maps the 4-byte function signature to its string representation. +var IERC721MetadataFuncSigs = map[string]string{ + "095ea7b3": "approve(address,uint256)", + "70a08231": "balanceOf(address)", + "081812fc": "getApproved(uint256)", + "e985e9c5": "isApprovedForAll(address,address)", + "06fdde03": "name()", + "6352211e": "ownerOf(uint256)", + "42842e0e": "safeTransferFrom(address,address,uint256)", + "b88d4fde": "safeTransferFrom(address,address,uint256,bytes)", + "a22cb465": "setApprovalForAll(address,bool)", + "01ffc9a7": "supportsInterface(bytes4)", + "95d89b41": "symbol()", + "c87b56dd": "tokenURI(uint256)", + "23b872dd": "transferFrom(address,address,uint256)", +} + +// IERC721Metadata is an auto generated Go binding around an Ethereum contract. +type IERC721Metadata struct { + IERC721MetadataCaller // Read-only binding to the contract + IERC721MetadataTransactor // Write-only binding to the contract + IERC721MetadataFilterer // Log filterer for contract events +} + +// IERC721MetadataCaller is an auto generated read-only Go binding around an Ethereum contract. +type IERC721MetadataCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// IERC721MetadataTransactor is an auto generated write-only Go binding around an Ethereum contract. +type IERC721MetadataTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// IERC721MetadataFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type IERC721MetadataFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// IERC721MetadataSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type IERC721MetadataSession struct { + Contract *IERC721Metadata // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// IERC721MetadataCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type IERC721MetadataCallerSession struct { + Contract *IERC721MetadataCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// IERC721MetadataTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type IERC721MetadataTransactorSession struct { + Contract *IERC721MetadataTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// IERC721MetadataRaw is an auto generated low-level Go binding around an Ethereum contract. +type IERC721MetadataRaw struct { + Contract *IERC721Metadata // Generic contract binding to access the raw methods on +} + +// IERC721MetadataCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type IERC721MetadataCallerRaw struct { + Contract *IERC721MetadataCaller // Generic read-only contract binding to access the raw methods on +} + +// IERC721MetadataTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type IERC721MetadataTransactorRaw struct { + Contract *IERC721MetadataTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewIERC721Metadata creates a new instance of IERC721Metadata, bound to a specific deployed contract. +func NewIERC721Metadata(address common.Address, backend bind.ContractBackend) (*IERC721Metadata, error) { + contract, err := bindIERC721Metadata(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &IERC721Metadata{IERC721MetadataCaller: IERC721MetadataCaller{contract: contract}, IERC721MetadataTransactor: IERC721MetadataTransactor{contract: contract}, IERC721MetadataFilterer: IERC721MetadataFilterer{contract: contract}}, nil +} + +// NewIERC721MetadataCaller creates a new read-only instance of IERC721Metadata, bound to a specific deployed contract. +func NewIERC721MetadataCaller(address common.Address, caller bind.ContractCaller) (*IERC721MetadataCaller, error) { + contract, err := bindIERC721Metadata(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &IERC721MetadataCaller{contract: contract}, nil +} + +// NewIERC721MetadataTransactor creates a new write-only instance of IERC721Metadata, bound to a specific deployed contract. +func NewIERC721MetadataTransactor(address common.Address, transactor bind.ContractTransactor) (*IERC721MetadataTransactor, error) { + contract, err := bindIERC721Metadata(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &IERC721MetadataTransactor{contract: contract}, nil +} + +// NewIERC721MetadataFilterer creates a new log filterer instance of IERC721Metadata, bound to a specific deployed contract. +func NewIERC721MetadataFilterer(address common.Address, filterer bind.ContractFilterer) (*IERC721MetadataFilterer, error) { + contract, err := bindIERC721Metadata(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &IERC721MetadataFilterer{contract: contract}, nil +} + +// bindIERC721Metadata binds a generic wrapper to an already deployed contract. +func bindIERC721Metadata(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := abi.JSON(strings.NewReader(IERC721MetadataABI)) + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_IERC721Metadata *IERC721MetadataRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { + return _IERC721Metadata.Contract.IERC721MetadataCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_IERC721Metadata *IERC721MetadataRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _IERC721Metadata.Contract.IERC721MetadataTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_IERC721Metadata *IERC721MetadataRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _IERC721Metadata.Contract.IERC721MetadataTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_IERC721Metadata *IERC721MetadataCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { + return _IERC721Metadata.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_IERC721Metadata *IERC721MetadataTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _IERC721Metadata.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_IERC721Metadata *IERC721MetadataTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _IERC721Metadata.Contract.contract.Transact(opts, method, params...) +} + +// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. +// +// Solidity: function balanceOf(address owner) view returns(uint256 balance) +func (_IERC721Metadata *IERC721MetadataCaller) BalanceOf(opts *bind.CallOpts, owner common.Address) (*big.Int, error) { + var ( + ret0 = new(*big.Int) + ) + out := ret0 + err := _IERC721Metadata.contract.Call(opts, out, "balanceOf", owner) + return *ret0, err +} + +// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. +// +// Solidity: function balanceOf(address owner) view returns(uint256 balance) +func (_IERC721Metadata *IERC721MetadataSession) BalanceOf(owner common.Address) (*big.Int, error) { + return _IERC721Metadata.Contract.BalanceOf(&_IERC721Metadata.CallOpts, owner) +} + +// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. +// +// Solidity: function balanceOf(address owner) view returns(uint256 balance) +func (_IERC721Metadata *IERC721MetadataCallerSession) BalanceOf(owner common.Address) (*big.Int, error) { + return _IERC721Metadata.Contract.BalanceOf(&_IERC721Metadata.CallOpts, owner) +} + +// GetApproved is a free data retrieval call binding the contract method 0x081812fc. +// +// Solidity: function getApproved(uint256 tokenId) view returns(address operator) +func (_IERC721Metadata *IERC721MetadataCaller) GetApproved(opts *bind.CallOpts, tokenId *big.Int) (common.Address, error) { + var ( + ret0 = new(common.Address) + ) + out := ret0 + err := _IERC721Metadata.contract.Call(opts, out, "getApproved", tokenId) + return *ret0, err +} + +// GetApproved is a free data retrieval call binding the contract method 0x081812fc. +// +// Solidity: function getApproved(uint256 tokenId) view returns(address operator) +func (_IERC721Metadata *IERC721MetadataSession) GetApproved(tokenId *big.Int) (common.Address, error) { + return _IERC721Metadata.Contract.GetApproved(&_IERC721Metadata.CallOpts, tokenId) +} + +// GetApproved is a free data retrieval call binding the contract method 0x081812fc. +// +// Solidity: function getApproved(uint256 tokenId) view returns(address operator) +func (_IERC721Metadata *IERC721MetadataCallerSession) GetApproved(tokenId *big.Int) (common.Address, error) { + return _IERC721Metadata.Contract.GetApproved(&_IERC721Metadata.CallOpts, tokenId) +} + +// IsApprovedForAll is a free data retrieval call binding the contract method 0xe985e9c5. +// +// Solidity: function isApprovedForAll(address owner, address operator) view returns(bool) +func (_IERC721Metadata *IERC721MetadataCaller) IsApprovedForAll(opts *bind.CallOpts, owner common.Address, operator common.Address) (bool, error) { + var ( + ret0 = new(bool) + ) + out := ret0 + err := _IERC721Metadata.contract.Call(opts, out, "isApprovedForAll", owner, operator) + return *ret0, err +} + +// IsApprovedForAll is a free data retrieval call binding the contract method 0xe985e9c5. +// +// Solidity: function isApprovedForAll(address owner, address operator) view returns(bool) +func (_IERC721Metadata *IERC721MetadataSession) IsApprovedForAll(owner common.Address, operator common.Address) (bool, error) { + return _IERC721Metadata.Contract.IsApprovedForAll(&_IERC721Metadata.CallOpts, owner, operator) +} + +// IsApprovedForAll is a free data retrieval call binding the contract method 0xe985e9c5. +// +// Solidity: function isApprovedForAll(address owner, address operator) view returns(bool) +func (_IERC721Metadata *IERC721MetadataCallerSession) IsApprovedForAll(owner common.Address, operator common.Address) (bool, error) { + return _IERC721Metadata.Contract.IsApprovedForAll(&_IERC721Metadata.CallOpts, owner, operator) +} + +// Name is a free data retrieval call binding the contract method 0x06fdde03. +// +// Solidity: function name() view returns(string) +func (_IERC721Metadata *IERC721MetadataCaller) Name(opts *bind.CallOpts) (string, error) { + var ( + ret0 = new(string) + ) + out := ret0 + err := _IERC721Metadata.contract.Call(opts, out, "name") + return *ret0, err +} + +// Name is a free data retrieval call binding the contract method 0x06fdde03. +// +// Solidity: function name() view returns(string) +func (_IERC721Metadata *IERC721MetadataSession) Name() (string, error) { + return _IERC721Metadata.Contract.Name(&_IERC721Metadata.CallOpts) +} + +// Name is a free data retrieval call binding the contract method 0x06fdde03. +// +// Solidity: function name() view returns(string) +func (_IERC721Metadata *IERC721MetadataCallerSession) Name() (string, error) { + return _IERC721Metadata.Contract.Name(&_IERC721Metadata.CallOpts) +} + +// OwnerOf is a free data retrieval call binding the contract method 0x6352211e. +// +// Solidity: function ownerOf(uint256 tokenId) view returns(address owner) +func (_IERC721Metadata *IERC721MetadataCaller) OwnerOf(opts *bind.CallOpts, tokenId *big.Int) (common.Address, error) { + var ( + ret0 = new(common.Address) + ) + out := ret0 + err := _IERC721Metadata.contract.Call(opts, out, "ownerOf", tokenId) + return *ret0, err +} + +// OwnerOf is a free data retrieval call binding the contract method 0x6352211e. +// +// Solidity: function ownerOf(uint256 tokenId) view returns(address owner) +func (_IERC721Metadata *IERC721MetadataSession) OwnerOf(tokenId *big.Int) (common.Address, error) { + return _IERC721Metadata.Contract.OwnerOf(&_IERC721Metadata.CallOpts, tokenId) +} + +// OwnerOf is a free data retrieval call binding the contract method 0x6352211e. +// +// Solidity: function ownerOf(uint256 tokenId) view returns(address owner) +func (_IERC721Metadata *IERC721MetadataCallerSession) OwnerOf(tokenId *big.Int) (common.Address, error) { + return _IERC721Metadata.Contract.OwnerOf(&_IERC721Metadata.CallOpts, tokenId) +} + +// SupportsInterface is a free data retrieval call binding the contract method 0x01ffc9a7. +// +// Solidity: function supportsInterface(bytes4 interfaceId) view returns(bool) +func (_IERC721Metadata *IERC721MetadataCaller) SupportsInterface(opts *bind.CallOpts, interfaceId [4]byte) (bool, error) { + var ( + ret0 = new(bool) + ) + out := ret0 + err := _IERC721Metadata.contract.Call(opts, out, "supportsInterface", interfaceId) + return *ret0, err +} + +// SupportsInterface is a free data retrieval call binding the contract method 0x01ffc9a7. +// +// Solidity: function supportsInterface(bytes4 interfaceId) view returns(bool) +func (_IERC721Metadata *IERC721MetadataSession) SupportsInterface(interfaceId [4]byte) (bool, error) { + return _IERC721Metadata.Contract.SupportsInterface(&_IERC721Metadata.CallOpts, interfaceId) +} + +// SupportsInterface is a free data retrieval call binding the contract method 0x01ffc9a7. +// +// Solidity: function supportsInterface(bytes4 interfaceId) view returns(bool) +func (_IERC721Metadata *IERC721MetadataCallerSession) SupportsInterface(interfaceId [4]byte) (bool, error) { + return _IERC721Metadata.Contract.SupportsInterface(&_IERC721Metadata.CallOpts, interfaceId) +} + +// Symbol is a free data retrieval call binding the contract method 0x95d89b41. +// +// Solidity: function symbol() view returns(string) +func (_IERC721Metadata *IERC721MetadataCaller) Symbol(opts *bind.CallOpts) (string, error) { + var ( + ret0 = new(string) + ) + out := ret0 + err := _IERC721Metadata.contract.Call(opts, out, "symbol") + return *ret0, err +} + +// Symbol is a free data retrieval call binding the contract method 0x95d89b41. +// +// Solidity: function symbol() view returns(string) +func (_IERC721Metadata *IERC721MetadataSession) Symbol() (string, error) { + return _IERC721Metadata.Contract.Symbol(&_IERC721Metadata.CallOpts) +} + +// Symbol is a free data retrieval call binding the contract method 0x95d89b41. +// +// Solidity: function symbol() view returns(string) +func (_IERC721Metadata *IERC721MetadataCallerSession) Symbol() (string, error) { + return _IERC721Metadata.Contract.Symbol(&_IERC721Metadata.CallOpts) +} + +// TokenURI is a free data retrieval call binding the contract method 0xc87b56dd. +// +// Solidity: function tokenURI(uint256 tokenId) view returns(string) +func (_IERC721Metadata *IERC721MetadataCaller) TokenURI(opts *bind.CallOpts, tokenId *big.Int) (string, error) { + var ( + ret0 = new(string) + ) + out := ret0 + err := _IERC721Metadata.contract.Call(opts, out, "tokenURI", tokenId) + return *ret0, err +} + +// TokenURI is a free data retrieval call binding the contract method 0xc87b56dd. +// +// Solidity: function tokenURI(uint256 tokenId) view returns(string) +func (_IERC721Metadata *IERC721MetadataSession) TokenURI(tokenId *big.Int) (string, error) { + return _IERC721Metadata.Contract.TokenURI(&_IERC721Metadata.CallOpts, tokenId) +} + +// TokenURI is a free data retrieval call binding the contract method 0xc87b56dd. +// +// Solidity: function tokenURI(uint256 tokenId) view returns(string) +func (_IERC721Metadata *IERC721MetadataCallerSession) TokenURI(tokenId *big.Int) (string, error) { + return _IERC721Metadata.Contract.TokenURI(&_IERC721Metadata.CallOpts, tokenId) +} + +// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. +// +// Solidity: function approve(address to, uint256 tokenId) returns() +func (_IERC721Metadata *IERC721MetadataTransactor) Approve(opts *bind.TransactOpts, to common.Address, tokenId *big.Int) (*types.Transaction, error) { + return _IERC721Metadata.contract.Transact(opts, "approve", to, tokenId) +} + +// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. +// +// Solidity: function approve(address to, uint256 tokenId) returns() +func (_IERC721Metadata *IERC721MetadataSession) Approve(to common.Address, tokenId *big.Int) (*types.Transaction, error) { + return _IERC721Metadata.Contract.Approve(&_IERC721Metadata.TransactOpts, to, tokenId) +} + +// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. +// +// Solidity: function approve(address to, uint256 tokenId) returns() +func (_IERC721Metadata *IERC721MetadataTransactorSession) Approve(to common.Address, tokenId *big.Int) (*types.Transaction, error) { + return _IERC721Metadata.Contract.Approve(&_IERC721Metadata.TransactOpts, to, tokenId) +} + +// SafeTransferFrom is a paid mutator transaction binding the contract method 0x42842e0e. +// +// Solidity: function safeTransferFrom(address from, address to, uint256 tokenId) returns() +func (_IERC721Metadata *IERC721MetadataTransactor) SafeTransferFrom(opts *bind.TransactOpts, from common.Address, to common.Address, tokenId *big.Int) (*types.Transaction, error) { + return _IERC721Metadata.contract.Transact(opts, "safeTransferFrom", from, to, tokenId) +} + +// SafeTransferFrom is a paid mutator transaction binding the contract method 0x42842e0e. +// +// Solidity: function safeTransferFrom(address from, address to, uint256 tokenId) returns() +func (_IERC721Metadata *IERC721MetadataSession) SafeTransferFrom(from common.Address, to common.Address, tokenId *big.Int) (*types.Transaction, error) { + return _IERC721Metadata.Contract.SafeTransferFrom(&_IERC721Metadata.TransactOpts, from, to, tokenId) +} + +// SafeTransferFrom is a paid mutator transaction binding the contract method 0x42842e0e. +// +// Solidity: function safeTransferFrom(address from, address to, uint256 tokenId) returns() +func (_IERC721Metadata *IERC721MetadataTransactorSession) SafeTransferFrom(from common.Address, to common.Address, tokenId *big.Int) (*types.Transaction, error) { + return _IERC721Metadata.Contract.SafeTransferFrom(&_IERC721Metadata.TransactOpts, from, to, tokenId) +} + +// SafeTransferFrom0 is a paid mutator transaction binding the contract method 0xb88d4fde. +// +// Solidity: function safeTransferFrom(address from, address to, uint256 tokenId, bytes data) returns() +func (_IERC721Metadata *IERC721MetadataTransactor) SafeTransferFrom0(opts *bind.TransactOpts, from common.Address, to common.Address, tokenId *big.Int, data []byte) (*types.Transaction, error) { + return _IERC721Metadata.contract.Transact(opts, "safeTransferFrom0", from, to, tokenId, data) +} + +// SafeTransferFrom0 is a paid mutator transaction binding the contract method 0xb88d4fde. +// +// Solidity: function safeTransferFrom(address from, address to, uint256 tokenId, bytes data) returns() +func (_IERC721Metadata *IERC721MetadataSession) SafeTransferFrom0(from common.Address, to common.Address, tokenId *big.Int, data []byte) (*types.Transaction, error) { + return _IERC721Metadata.Contract.SafeTransferFrom0(&_IERC721Metadata.TransactOpts, from, to, tokenId, data) +} + +// SafeTransferFrom0 is a paid mutator transaction binding the contract method 0xb88d4fde. +// +// Solidity: function safeTransferFrom(address from, address to, uint256 tokenId, bytes data) returns() +func (_IERC721Metadata *IERC721MetadataTransactorSession) SafeTransferFrom0(from common.Address, to common.Address, tokenId *big.Int, data []byte) (*types.Transaction, error) { + return _IERC721Metadata.Contract.SafeTransferFrom0(&_IERC721Metadata.TransactOpts, from, to, tokenId, data) +} + +// SetApprovalForAll is a paid mutator transaction binding the contract method 0xa22cb465. +// +// Solidity: function setApprovalForAll(address operator, bool _approved) returns() +func (_IERC721Metadata *IERC721MetadataTransactor) SetApprovalForAll(opts *bind.TransactOpts, operator common.Address, _approved bool) (*types.Transaction, error) { + return _IERC721Metadata.contract.Transact(opts, "setApprovalForAll", operator, _approved) +} + +// SetApprovalForAll is a paid mutator transaction binding the contract method 0xa22cb465. +// +// Solidity: function setApprovalForAll(address operator, bool _approved) returns() +func (_IERC721Metadata *IERC721MetadataSession) SetApprovalForAll(operator common.Address, _approved bool) (*types.Transaction, error) { + return _IERC721Metadata.Contract.SetApprovalForAll(&_IERC721Metadata.TransactOpts, operator, _approved) +} + +// SetApprovalForAll is a paid mutator transaction binding the contract method 0xa22cb465. +// +// Solidity: function setApprovalForAll(address operator, bool _approved) returns() +func (_IERC721Metadata *IERC721MetadataTransactorSession) SetApprovalForAll(operator common.Address, _approved bool) (*types.Transaction, error) { + return _IERC721Metadata.Contract.SetApprovalForAll(&_IERC721Metadata.TransactOpts, operator, _approved) +} + +// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. +// +// Solidity: function transferFrom(address from, address to, uint256 tokenId) returns() +func (_IERC721Metadata *IERC721MetadataTransactor) TransferFrom(opts *bind.TransactOpts, from common.Address, to common.Address, tokenId *big.Int) (*types.Transaction, error) { + return _IERC721Metadata.contract.Transact(opts, "transferFrom", from, to, tokenId) +} + +// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. +// +// Solidity: function transferFrom(address from, address to, uint256 tokenId) returns() +func (_IERC721Metadata *IERC721MetadataSession) TransferFrom(from common.Address, to common.Address, tokenId *big.Int) (*types.Transaction, error) { + return _IERC721Metadata.Contract.TransferFrom(&_IERC721Metadata.TransactOpts, from, to, tokenId) +} + +// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. +// +// Solidity: function transferFrom(address from, address to, uint256 tokenId) returns() +func (_IERC721Metadata *IERC721MetadataTransactorSession) TransferFrom(from common.Address, to common.Address, tokenId *big.Int) (*types.Transaction, error) { + return _IERC721Metadata.Contract.TransferFrom(&_IERC721Metadata.TransactOpts, from, to, tokenId) +} + +// IERC721MetadataApprovalIterator is returned from FilterApproval and is used to iterate over the raw logs and unpacked data for Approval events raised by the IERC721Metadata contract. +type IERC721MetadataApprovalIterator struct { + Event *IERC721MetadataApproval // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *IERC721MetadataApprovalIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(IERC721MetadataApproval) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(IERC721MetadataApproval) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *IERC721MetadataApprovalIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *IERC721MetadataApprovalIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// IERC721MetadataApproval represents a Approval event raised by the IERC721Metadata contract. +type IERC721MetadataApproval struct { + Owner common.Address + Approved common.Address + TokenId *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterApproval is a free log retrieval operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. +// +// Solidity: event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId) +func (_IERC721Metadata *IERC721MetadataFilterer) FilterApproval(opts *bind.FilterOpts, owner []common.Address, approved []common.Address, tokenId []*big.Int) (*IERC721MetadataApprovalIterator, error) { + + var ownerRule []interface{} + for _, ownerItem := range owner { + ownerRule = append(ownerRule, ownerItem) + } + var approvedRule []interface{} + for _, approvedItem := range approved { + approvedRule = append(approvedRule, approvedItem) + } + var tokenIdRule []interface{} + for _, tokenIdItem := range tokenId { + tokenIdRule = append(tokenIdRule, tokenIdItem) + } + + logs, sub, err := _IERC721Metadata.contract.FilterLogs(opts, "Approval", ownerRule, approvedRule, tokenIdRule) + if err != nil { + return nil, err + } + return &IERC721MetadataApprovalIterator{contract: _IERC721Metadata.contract, event: "Approval", logs: logs, sub: sub}, nil +} + +// WatchApproval is a free log subscription operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. +// +// Solidity: event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId) +func (_IERC721Metadata *IERC721MetadataFilterer) WatchApproval(opts *bind.WatchOpts, sink chan<- *IERC721MetadataApproval, owner []common.Address, approved []common.Address, tokenId []*big.Int) (event.Subscription, error) { + + var ownerRule []interface{} + for _, ownerItem := range owner { + ownerRule = append(ownerRule, ownerItem) + } + var approvedRule []interface{} + for _, approvedItem := range approved { + approvedRule = append(approvedRule, approvedItem) + } + var tokenIdRule []interface{} + for _, tokenIdItem := range tokenId { + tokenIdRule = append(tokenIdRule, tokenIdItem) + } + + logs, sub, err := _IERC721Metadata.contract.WatchLogs(opts, "Approval", ownerRule, approvedRule, tokenIdRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(IERC721MetadataApproval) + if err := _IERC721Metadata.contract.UnpackLog(event, "Approval", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseApproval is a log parse operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. +// +// Solidity: event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId) +func (_IERC721Metadata *IERC721MetadataFilterer) ParseApproval(log types.Log) (*IERC721MetadataApproval, error) { + event := new(IERC721MetadataApproval) + if err := _IERC721Metadata.contract.UnpackLog(event, "Approval", log); err != nil { + return nil, err + } + return event, nil +} + +// IERC721MetadataApprovalForAllIterator is returned from FilterApprovalForAll and is used to iterate over the raw logs and unpacked data for ApprovalForAll events raised by the IERC721Metadata contract. +type IERC721MetadataApprovalForAllIterator struct { + Event *IERC721MetadataApprovalForAll // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *IERC721MetadataApprovalForAllIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(IERC721MetadataApprovalForAll) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(IERC721MetadataApprovalForAll) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *IERC721MetadataApprovalForAllIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *IERC721MetadataApprovalForAllIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// IERC721MetadataApprovalForAll represents a ApprovalForAll event raised by the IERC721Metadata contract. +type IERC721MetadataApprovalForAll struct { + Owner common.Address + Operator common.Address + Approved bool + Raw types.Log // Blockchain specific contextual infos +} + +// FilterApprovalForAll is a free log retrieval operation binding the contract event 0x17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31. +// +// Solidity: event ApprovalForAll(address indexed owner, address indexed operator, bool approved) +func (_IERC721Metadata *IERC721MetadataFilterer) FilterApprovalForAll(opts *bind.FilterOpts, owner []common.Address, operator []common.Address) (*IERC721MetadataApprovalForAllIterator, error) { + + var ownerRule []interface{} + for _, ownerItem := range owner { + ownerRule = append(ownerRule, ownerItem) + } + var operatorRule []interface{} + for _, operatorItem := range operator { + operatorRule = append(operatorRule, operatorItem) + } + + logs, sub, err := _IERC721Metadata.contract.FilterLogs(opts, "ApprovalForAll", ownerRule, operatorRule) + if err != nil { + return nil, err + } + return &IERC721MetadataApprovalForAllIterator{contract: _IERC721Metadata.contract, event: "ApprovalForAll", logs: logs, sub: sub}, nil +} + +// WatchApprovalForAll is a free log subscription operation binding the contract event 0x17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31. +// +// Solidity: event ApprovalForAll(address indexed owner, address indexed operator, bool approved) +func (_IERC721Metadata *IERC721MetadataFilterer) WatchApprovalForAll(opts *bind.WatchOpts, sink chan<- *IERC721MetadataApprovalForAll, owner []common.Address, operator []common.Address) (event.Subscription, error) { + + var ownerRule []interface{} + for _, ownerItem := range owner { + ownerRule = append(ownerRule, ownerItem) + } + var operatorRule []interface{} + for _, operatorItem := range operator { + operatorRule = append(operatorRule, operatorItem) + } + + logs, sub, err := _IERC721Metadata.contract.WatchLogs(opts, "ApprovalForAll", ownerRule, operatorRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(IERC721MetadataApprovalForAll) + if err := _IERC721Metadata.contract.UnpackLog(event, "ApprovalForAll", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseApprovalForAll is a log parse operation binding the contract event 0x17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31. +// +// Solidity: event ApprovalForAll(address indexed owner, address indexed operator, bool approved) +func (_IERC721Metadata *IERC721MetadataFilterer) ParseApprovalForAll(log types.Log) (*IERC721MetadataApprovalForAll, error) { + event := new(IERC721MetadataApprovalForAll) + if err := _IERC721Metadata.contract.UnpackLog(event, "ApprovalForAll", log); err != nil { + return nil, err + } + return event, nil +} + +// IERC721MetadataTransferIterator is returned from FilterTransfer and is used to iterate over the raw logs and unpacked data for Transfer events raised by the IERC721Metadata contract. +type IERC721MetadataTransferIterator struct { + Event *IERC721MetadataTransfer // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *IERC721MetadataTransferIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(IERC721MetadataTransfer) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(IERC721MetadataTransfer) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *IERC721MetadataTransferIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *IERC721MetadataTransferIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// IERC721MetadataTransfer represents a Transfer event raised by the IERC721Metadata contract. +type IERC721MetadataTransfer struct { + From common.Address + To common.Address + TokenId *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterTransfer is a free log retrieval operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. +// +// Solidity: event Transfer(address indexed from, address indexed to, uint256 indexed tokenId) +func (_IERC721Metadata *IERC721MetadataFilterer) FilterTransfer(opts *bind.FilterOpts, from []common.Address, to []common.Address, tokenId []*big.Int) (*IERC721MetadataTransferIterator, error) { + + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + var tokenIdRule []interface{} + for _, tokenIdItem := range tokenId { + tokenIdRule = append(tokenIdRule, tokenIdItem) + } + + logs, sub, err := _IERC721Metadata.contract.FilterLogs(opts, "Transfer", fromRule, toRule, tokenIdRule) + if err != nil { + return nil, err + } + return &IERC721MetadataTransferIterator{contract: _IERC721Metadata.contract, event: "Transfer", logs: logs, sub: sub}, nil +} + +// WatchTransfer is a free log subscription operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. +// +// Solidity: event Transfer(address indexed from, address indexed to, uint256 indexed tokenId) +func (_IERC721Metadata *IERC721MetadataFilterer) WatchTransfer(opts *bind.WatchOpts, sink chan<- *IERC721MetadataTransfer, from []common.Address, to []common.Address, tokenId []*big.Int) (event.Subscription, error) { + + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + var tokenIdRule []interface{} + for _, tokenIdItem := range tokenId { + tokenIdRule = append(tokenIdRule, tokenIdItem) + } + + logs, sub, err := _IERC721Metadata.contract.WatchLogs(opts, "Transfer", fromRule, toRule, tokenIdRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(IERC721MetadataTransfer) + if err := _IERC721Metadata.contract.UnpackLog(event, "Transfer", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseTransfer is a log parse operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. +// +// Solidity: event Transfer(address indexed from, address indexed to, uint256 indexed tokenId) +func (_IERC721Metadata *IERC721MetadataFilterer) ParseTransfer(log types.Log) (*IERC721MetadataTransfer, error) { + event := new(IERC721MetadataTransfer) + if err := _IERC721Metadata.contract.UnpackLog(event, "Transfer", log); err != nil { + return nil, err + } + return event, nil +} + +// IERC721ReceiverABI is the input ABI used to generate the binding from. +const IERC721ReceiverABI = "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"onERC721Received\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]" + +// IERC721ReceiverFuncSigs maps the 4-byte function signature to its string representation. +var IERC721ReceiverFuncSigs = map[string]string{ + "150b7a02": "onERC721Received(address,address,uint256,bytes)", +} + +// IERC721Receiver is an auto generated Go binding around an Ethereum contract. +type IERC721Receiver struct { + IERC721ReceiverCaller // Read-only binding to the contract + IERC721ReceiverTransactor // Write-only binding to the contract + IERC721ReceiverFilterer // Log filterer for contract events +} + +// IERC721ReceiverCaller is an auto generated read-only Go binding around an Ethereum contract. +type IERC721ReceiverCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// IERC721ReceiverTransactor is an auto generated write-only Go binding around an Ethereum contract. +type IERC721ReceiverTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// IERC721ReceiverFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type IERC721ReceiverFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// IERC721ReceiverSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type IERC721ReceiverSession struct { + Contract *IERC721Receiver // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// IERC721ReceiverCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type IERC721ReceiverCallerSession struct { + Contract *IERC721ReceiverCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// IERC721ReceiverTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type IERC721ReceiverTransactorSession struct { + Contract *IERC721ReceiverTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// IERC721ReceiverRaw is an auto generated low-level Go binding around an Ethereum contract. +type IERC721ReceiverRaw struct { + Contract *IERC721Receiver // Generic contract binding to access the raw methods on +} + +// IERC721ReceiverCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type IERC721ReceiverCallerRaw struct { + Contract *IERC721ReceiverCaller // Generic read-only contract binding to access the raw methods on +} + +// IERC721ReceiverTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type IERC721ReceiverTransactorRaw struct { + Contract *IERC721ReceiverTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewIERC721Receiver creates a new instance of IERC721Receiver, bound to a specific deployed contract. +func NewIERC721Receiver(address common.Address, backend bind.ContractBackend) (*IERC721Receiver, error) { + contract, err := bindIERC721Receiver(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &IERC721Receiver{IERC721ReceiverCaller: IERC721ReceiverCaller{contract: contract}, IERC721ReceiverTransactor: IERC721ReceiverTransactor{contract: contract}, IERC721ReceiverFilterer: IERC721ReceiverFilterer{contract: contract}}, nil +} + +// NewIERC721ReceiverCaller creates a new read-only instance of IERC721Receiver, bound to a specific deployed contract. +func NewIERC721ReceiverCaller(address common.Address, caller bind.ContractCaller) (*IERC721ReceiverCaller, error) { + contract, err := bindIERC721Receiver(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &IERC721ReceiverCaller{contract: contract}, nil +} + +// NewIERC721ReceiverTransactor creates a new write-only instance of IERC721Receiver, bound to a specific deployed contract. +func NewIERC721ReceiverTransactor(address common.Address, transactor bind.ContractTransactor) (*IERC721ReceiverTransactor, error) { + contract, err := bindIERC721Receiver(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &IERC721ReceiverTransactor{contract: contract}, nil +} + +// NewIERC721ReceiverFilterer creates a new log filterer instance of IERC721Receiver, bound to a specific deployed contract. +func NewIERC721ReceiverFilterer(address common.Address, filterer bind.ContractFilterer) (*IERC721ReceiverFilterer, error) { + contract, err := bindIERC721Receiver(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &IERC721ReceiverFilterer{contract: contract}, nil +} + +// bindIERC721Receiver binds a generic wrapper to an already deployed contract. +func bindIERC721Receiver(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := abi.JSON(strings.NewReader(IERC721ReceiverABI)) + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_IERC721Receiver *IERC721ReceiverRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { + return _IERC721Receiver.Contract.IERC721ReceiverCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_IERC721Receiver *IERC721ReceiverRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _IERC721Receiver.Contract.IERC721ReceiverTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_IERC721Receiver *IERC721ReceiverRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _IERC721Receiver.Contract.IERC721ReceiverTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_IERC721Receiver *IERC721ReceiverCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { + return _IERC721Receiver.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_IERC721Receiver *IERC721ReceiverTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _IERC721Receiver.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_IERC721Receiver *IERC721ReceiverTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _IERC721Receiver.Contract.contract.Transact(opts, method, params...) +} + +// OnERC721Received is a paid mutator transaction binding the contract method 0x150b7a02. +// +// Solidity: function onERC721Received(address operator, address from, uint256 tokenId, bytes data) returns(bytes4) +func (_IERC721Receiver *IERC721ReceiverTransactor) OnERC721Received(opts *bind.TransactOpts, operator common.Address, from common.Address, tokenId *big.Int, data []byte) (*types.Transaction, error) { + return _IERC721Receiver.contract.Transact(opts, "onERC721Received", operator, from, tokenId, data) +} + +// OnERC721Received is a paid mutator transaction binding the contract method 0x150b7a02. +// +// Solidity: function onERC721Received(address operator, address from, uint256 tokenId, bytes data) returns(bytes4) +func (_IERC721Receiver *IERC721ReceiverSession) OnERC721Received(operator common.Address, from common.Address, tokenId *big.Int, data []byte) (*types.Transaction, error) { + return _IERC721Receiver.Contract.OnERC721Received(&_IERC721Receiver.TransactOpts, operator, from, tokenId, data) +} + +// OnERC721Received is a paid mutator transaction binding the contract method 0x150b7a02. +// +// Solidity: function onERC721Received(address operator, address from, uint256 tokenId, bytes data) returns(bytes4) +func (_IERC721Receiver *IERC721ReceiverTransactorSession) OnERC721Received(operator common.Address, from common.Address, tokenId *big.Int, data []byte) (*types.Transaction, error) { + return _IERC721Receiver.Contract.OnERC721Received(&_IERC721Receiver.TransactOpts, operator, from, tokenId, data) +} + +// IEthCrossChainManagerABI is the input ABI used to generate the binding from. +const IEthCrossChainManagerABI = "[{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"_toChainId\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"_toContract\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"_method\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"_txData\",\"type\":\"bytes\"}],\"name\":\"crossChain\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]" + +// IEthCrossChainManagerFuncSigs maps the 4-byte function signature to its string representation. +var IEthCrossChainManagerFuncSigs = map[string]string{ + "bd5cf625": "crossChain(uint64,bytes,bytes,bytes)", +} + +// IEthCrossChainManager is an auto generated Go binding around an Ethereum contract. +type IEthCrossChainManager struct { + IEthCrossChainManagerCaller // Read-only binding to the contract + IEthCrossChainManagerTransactor // Write-only binding to the contract + IEthCrossChainManagerFilterer // Log filterer for contract events +} + +// IEthCrossChainManagerCaller is an auto generated read-only Go binding around an Ethereum contract. +type IEthCrossChainManagerCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// IEthCrossChainManagerTransactor is an auto generated write-only Go binding around an Ethereum contract. +type IEthCrossChainManagerTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// IEthCrossChainManagerFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type IEthCrossChainManagerFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// IEthCrossChainManagerSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type IEthCrossChainManagerSession struct { + Contract *IEthCrossChainManager // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// IEthCrossChainManagerCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type IEthCrossChainManagerCallerSession struct { + Contract *IEthCrossChainManagerCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// IEthCrossChainManagerTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type IEthCrossChainManagerTransactorSession struct { + Contract *IEthCrossChainManagerTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// IEthCrossChainManagerRaw is an auto generated low-level Go binding around an Ethereum contract. +type IEthCrossChainManagerRaw struct { + Contract *IEthCrossChainManager // Generic contract binding to access the raw methods on +} + +// IEthCrossChainManagerCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type IEthCrossChainManagerCallerRaw struct { + Contract *IEthCrossChainManagerCaller // Generic read-only contract binding to access the raw methods on +} + +// IEthCrossChainManagerTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type IEthCrossChainManagerTransactorRaw struct { + Contract *IEthCrossChainManagerTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewIEthCrossChainManager creates a new instance of IEthCrossChainManager, bound to a specific deployed contract. +func NewIEthCrossChainManager(address common.Address, backend bind.ContractBackend) (*IEthCrossChainManager, error) { + contract, err := bindIEthCrossChainManager(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &IEthCrossChainManager{IEthCrossChainManagerCaller: IEthCrossChainManagerCaller{contract: contract}, IEthCrossChainManagerTransactor: IEthCrossChainManagerTransactor{contract: contract}, IEthCrossChainManagerFilterer: IEthCrossChainManagerFilterer{contract: contract}}, nil +} + +// NewIEthCrossChainManagerCaller creates a new read-only instance of IEthCrossChainManager, bound to a specific deployed contract. +func NewIEthCrossChainManagerCaller(address common.Address, caller bind.ContractCaller) (*IEthCrossChainManagerCaller, error) { + contract, err := bindIEthCrossChainManager(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &IEthCrossChainManagerCaller{contract: contract}, nil +} + +// NewIEthCrossChainManagerTransactor creates a new write-only instance of IEthCrossChainManager, bound to a specific deployed contract. +func NewIEthCrossChainManagerTransactor(address common.Address, transactor bind.ContractTransactor) (*IEthCrossChainManagerTransactor, error) { + contract, err := bindIEthCrossChainManager(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &IEthCrossChainManagerTransactor{contract: contract}, nil +} + +// NewIEthCrossChainManagerFilterer creates a new log filterer instance of IEthCrossChainManager, bound to a specific deployed contract. +func NewIEthCrossChainManagerFilterer(address common.Address, filterer bind.ContractFilterer) (*IEthCrossChainManagerFilterer, error) { + contract, err := bindIEthCrossChainManager(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &IEthCrossChainManagerFilterer{contract: contract}, nil +} + +// bindIEthCrossChainManager binds a generic wrapper to an already deployed contract. +func bindIEthCrossChainManager(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := abi.JSON(strings.NewReader(IEthCrossChainManagerABI)) + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_IEthCrossChainManager *IEthCrossChainManagerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { + return _IEthCrossChainManager.Contract.IEthCrossChainManagerCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_IEthCrossChainManager *IEthCrossChainManagerRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _IEthCrossChainManager.Contract.IEthCrossChainManagerTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_IEthCrossChainManager *IEthCrossChainManagerRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _IEthCrossChainManager.Contract.IEthCrossChainManagerTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_IEthCrossChainManager *IEthCrossChainManagerCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { + return _IEthCrossChainManager.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_IEthCrossChainManager *IEthCrossChainManagerTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _IEthCrossChainManager.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_IEthCrossChainManager *IEthCrossChainManagerTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _IEthCrossChainManager.Contract.contract.Transact(opts, method, params...) +} + +// CrossChain is a paid mutator transaction binding the contract method 0xbd5cf625. +// +// Solidity: function crossChain(uint64 _toChainId, bytes _toContract, bytes _method, bytes _txData) returns(bool) +func (_IEthCrossChainManager *IEthCrossChainManagerTransactor) CrossChain(opts *bind.TransactOpts, _toChainId uint64, _toContract []byte, _method []byte, _txData []byte) (*types.Transaction, error) { + return _IEthCrossChainManager.contract.Transact(opts, "crossChain", _toChainId, _toContract, _method, _txData) +} + +// CrossChain is a paid mutator transaction binding the contract method 0xbd5cf625. +// +// Solidity: function crossChain(uint64 _toChainId, bytes _toContract, bytes _method, bytes _txData) returns(bool) +func (_IEthCrossChainManager *IEthCrossChainManagerSession) CrossChain(_toChainId uint64, _toContract []byte, _method []byte, _txData []byte) (*types.Transaction, error) { + return _IEthCrossChainManager.Contract.CrossChain(&_IEthCrossChainManager.TransactOpts, _toChainId, _toContract, _method, _txData) +} + +// CrossChain is a paid mutator transaction binding the contract method 0xbd5cf625. +// +// Solidity: function crossChain(uint64 _toChainId, bytes _toContract, bytes _method, bytes _txData) returns(bool) +func (_IEthCrossChainManager *IEthCrossChainManagerTransactorSession) CrossChain(_toChainId uint64, _toContract []byte, _method []byte, _txData []byte) (*types.Transaction, error) { + return _IEthCrossChainManager.Contract.CrossChain(&_IEthCrossChainManager.TransactOpts, _toChainId, _toContract, _method, _txData) +} + +// IEthCrossChainManagerProxyABI is the input ABI used to generate the binding from. +const IEthCrossChainManagerProxyABI = "[{\"inputs\":[],\"name\":\"getEthCrossChainManager\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]" + +// IEthCrossChainManagerProxyFuncSigs maps the 4-byte function signature to its string representation. +var IEthCrossChainManagerProxyFuncSigs = map[string]string{ + "87939a7f": "getEthCrossChainManager()", +} + +// IEthCrossChainManagerProxy is an auto generated Go binding around an Ethereum contract. +type IEthCrossChainManagerProxy struct { + IEthCrossChainManagerProxyCaller // Read-only binding to the contract + IEthCrossChainManagerProxyTransactor // Write-only binding to the contract + IEthCrossChainManagerProxyFilterer // Log filterer for contract events +} + +// IEthCrossChainManagerProxyCaller is an auto generated read-only Go binding around an Ethereum contract. +type IEthCrossChainManagerProxyCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// IEthCrossChainManagerProxyTransactor is an auto generated write-only Go binding around an Ethereum contract. +type IEthCrossChainManagerProxyTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// IEthCrossChainManagerProxyFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type IEthCrossChainManagerProxyFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// IEthCrossChainManagerProxySession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type IEthCrossChainManagerProxySession struct { + Contract *IEthCrossChainManagerProxy // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// IEthCrossChainManagerProxyCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type IEthCrossChainManagerProxyCallerSession struct { + Contract *IEthCrossChainManagerProxyCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// IEthCrossChainManagerProxyTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type IEthCrossChainManagerProxyTransactorSession struct { + Contract *IEthCrossChainManagerProxyTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// IEthCrossChainManagerProxyRaw is an auto generated low-level Go binding around an Ethereum contract. +type IEthCrossChainManagerProxyRaw struct { + Contract *IEthCrossChainManagerProxy // Generic contract binding to access the raw methods on +} + +// IEthCrossChainManagerProxyCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type IEthCrossChainManagerProxyCallerRaw struct { + Contract *IEthCrossChainManagerProxyCaller // Generic read-only contract binding to access the raw methods on +} + +// IEthCrossChainManagerProxyTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type IEthCrossChainManagerProxyTransactorRaw struct { + Contract *IEthCrossChainManagerProxyTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewIEthCrossChainManagerProxy creates a new instance of IEthCrossChainManagerProxy, bound to a specific deployed contract. +func NewIEthCrossChainManagerProxy(address common.Address, backend bind.ContractBackend) (*IEthCrossChainManagerProxy, error) { + contract, err := bindIEthCrossChainManagerProxy(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &IEthCrossChainManagerProxy{IEthCrossChainManagerProxyCaller: IEthCrossChainManagerProxyCaller{contract: contract}, IEthCrossChainManagerProxyTransactor: IEthCrossChainManagerProxyTransactor{contract: contract}, IEthCrossChainManagerProxyFilterer: IEthCrossChainManagerProxyFilterer{contract: contract}}, nil +} + +// NewIEthCrossChainManagerProxyCaller creates a new read-only instance of IEthCrossChainManagerProxy, bound to a specific deployed contract. +func NewIEthCrossChainManagerProxyCaller(address common.Address, caller bind.ContractCaller) (*IEthCrossChainManagerProxyCaller, error) { + contract, err := bindIEthCrossChainManagerProxy(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &IEthCrossChainManagerProxyCaller{contract: contract}, nil +} + +// NewIEthCrossChainManagerProxyTransactor creates a new write-only instance of IEthCrossChainManagerProxy, bound to a specific deployed contract. +func NewIEthCrossChainManagerProxyTransactor(address common.Address, transactor bind.ContractTransactor) (*IEthCrossChainManagerProxyTransactor, error) { + contract, err := bindIEthCrossChainManagerProxy(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &IEthCrossChainManagerProxyTransactor{contract: contract}, nil +} + +// NewIEthCrossChainManagerProxyFilterer creates a new log filterer instance of IEthCrossChainManagerProxy, bound to a specific deployed contract. +func NewIEthCrossChainManagerProxyFilterer(address common.Address, filterer bind.ContractFilterer) (*IEthCrossChainManagerProxyFilterer, error) { + contract, err := bindIEthCrossChainManagerProxy(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &IEthCrossChainManagerProxyFilterer{contract: contract}, nil +} + +// bindIEthCrossChainManagerProxy binds a generic wrapper to an already deployed contract. +func bindIEthCrossChainManagerProxy(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := abi.JSON(strings.NewReader(IEthCrossChainManagerProxyABI)) + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_IEthCrossChainManagerProxy *IEthCrossChainManagerProxyRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { + return _IEthCrossChainManagerProxy.Contract.IEthCrossChainManagerProxyCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_IEthCrossChainManagerProxy *IEthCrossChainManagerProxyRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _IEthCrossChainManagerProxy.Contract.IEthCrossChainManagerProxyTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_IEthCrossChainManagerProxy *IEthCrossChainManagerProxyRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _IEthCrossChainManagerProxy.Contract.IEthCrossChainManagerProxyTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_IEthCrossChainManagerProxy *IEthCrossChainManagerProxyCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { + return _IEthCrossChainManagerProxy.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_IEthCrossChainManagerProxy *IEthCrossChainManagerProxyTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _IEthCrossChainManagerProxy.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_IEthCrossChainManagerProxy *IEthCrossChainManagerProxyTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _IEthCrossChainManagerProxy.Contract.contract.Transact(opts, method, params...) +} + +// GetEthCrossChainManager is a free data retrieval call binding the contract method 0x87939a7f. +// +// Solidity: function getEthCrossChainManager() view returns(address) +func (_IEthCrossChainManagerProxy *IEthCrossChainManagerProxyCaller) GetEthCrossChainManager(opts *bind.CallOpts) (common.Address, error) { + var ( + ret0 = new(common.Address) + ) + out := ret0 + err := _IEthCrossChainManagerProxy.contract.Call(opts, out, "getEthCrossChainManager") + return *ret0, err +} + +// GetEthCrossChainManager is a free data retrieval call binding the contract method 0x87939a7f. +// +// Solidity: function getEthCrossChainManager() view returns(address) +func (_IEthCrossChainManagerProxy *IEthCrossChainManagerProxySession) GetEthCrossChainManager() (common.Address, error) { + return _IEthCrossChainManagerProxy.Contract.GetEthCrossChainManager(&_IEthCrossChainManagerProxy.CallOpts) +} + +// GetEthCrossChainManager is a free data retrieval call binding the contract method 0x87939a7f. +// +// Solidity: function getEthCrossChainManager() view returns(address) +func (_IEthCrossChainManagerProxy *IEthCrossChainManagerProxyCallerSession) GetEthCrossChainManager() (common.Address, error) { + return _IEthCrossChainManagerProxy.Contract.GetEthCrossChainManager(&_IEthCrossChainManagerProxy.CallOpts) +} + +// NFTLockProxyABI is the input ABI used to generate the binding from. +const NFTLockProxyABI = "[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"fromAssetHash\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"toChainId\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"targetProxyHash\",\"type\":\"bytes\"}],\"name\":\"BindAssetEvent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"toChainId\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"targetProxyHash\",\"type\":\"bytes\"}],\"name\":\"BindProxyEvent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"fromAssetHash\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"fromAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"toAssetHash\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"toAddress\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"toChainId\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"LockEvent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"manager\",\"type\":\"address\"}],\"name\":\"SetManagerProxyEvent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"toAssetHash\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"toAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"UnlockEvent\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"name\":\"assetHashMap\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"fromAssetHash\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"toChainId\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"toAssetHash\",\"type\":\"bytes\"}],\"name\":\"bindAssetHash\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"toChainId\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"targetProxyHash\",\"type\":\"bytes\"}],\"name\":\"bindProxyHash\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isOwner\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"managerProxyContract\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"onERC721Received\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"name\":\"proxyHashMap\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"ethCCMProxyAddr\",\"type\":\"address\"}],\"name\":\"setManagerProxy\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"argsBs\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"fromContractAddr\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"fromChainId\",\"type\":\"uint64\"}],\"name\":\"unlock\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]" + +// NFTLockProxyFuncSigs maps the 4-byte function signature to its string representation. +var NFTLockProxyFuncSigs = map[string]string{ + "4f7d9808": "assetHashMap(address,uint64)", + "3348f63b": "bindAssetHash(address,uint64,bytes)", + "379b98f6": "bindProxyHash(uint64,bytes)", + "8f32d59b": "isOwner()", + "d798f881": "managerProxyContract()", + "150b7a02": "onERC721Received(address,address,uint256,bytes)", + "8da5cb5b": "owner()", + "9e5767aa": "proxyHashMap(uint64)", + "715018a6": "renounceOwnership()", + "af9980f0": "setManagerProxy(address)", + "f2fde38b": "transferOwnership(address)", + "06af4b9f": "unlock(bytes,bytes,uint64)", +} + +// NFTLockProxyBin is the compiled bytecode used for deploying new contracts. +var NFTLockProxyBin = "0x608060405234801561001057600080fd5b50600061001b61006a565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a35061006e565b3390565b612aa48061007d6000396000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c80638da5cb5b116100715780638da5cb5b146104d65780638f32d59b146104fa5780639e5767aa14610502578063af9980f014610528578063d798f8811461054e578063f2fde38b14610556576100b4565b806306af4b9f146100b9578063150b7a02146102015780633348f63b146102ac578063379b98f61461036e5780634f7d980814610422578063715018a6146104cc575b600080fd5b6101ed600480360360608110156100cf57600080fd5b810190602081018135600160201b8111156100e957600080fd5b8201836020820111156100fb57600080fd5b803590602001918460018302840111600160201b8311171561011c57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b81111561016e57600080fd5b82018360208201111561018057600080fd5b803590602001918460018302840111600160201b831117156101a157600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550505090356001600160401b0316915061057c9050565b604080519115158252519081900360200190f35b61028f6004803603608081101561021757600080fd5b6001600160a01b03823581169260208101359091169160408201359190810190608081016060820135600160201b81111561025157600080fd5b82018360208201111561026357600080fd5b803590602001918460018302840111600160201b8311171561028457600080fd5b509092509050610c96565b604080516001600160e01b03199092168252519081900360200190f35b6101ed600480360360608110156102c257600080fd5b6001600160a01b03823516916001600160401b0360208201351691810190606081016040820135600160201b8111156102fa57600080fd5b82018360208201111561030c57600080fd5b803590602001918460018302840111600160201b8311171561032d57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550611551945050505050565b6101ed6004803603604081101561038457600080fd5b6001600160401b038235169190810190604081016020820135600160201b8111156103ae57600080fd5b8201836020820111156103c057600080fd5b803590602001918460018302840111600160201b831117156103e157600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092955061169a945050505050565b6104576004803603604081101561043857600080fd5b5080356001600160a01b031690602001356001600160401b03166117c0565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610491578181015183820152602001610479565b50505050905090810190601f1680156104be5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6104d4611864565b005b6104de6118f5565b604080516001600160a01b039092168252519081900360200190f35b6101ed611904565b6104576004803603602081101561051857600080fd5b50356001600160401b0316611928565b6104d46004803603602081101561053e57600080fd5b50356001600160a01b031661198e565b6104de611a2f565b6104d46004803603602081101561056c57600080fd5b50356001600160a01b0316611a3e565b600154604080516387939a7f60e01b815290516000926001600160a01b03169182916387939a7f91600480820192602092909190829003018186803b1580156105c457600080fd5b505afa1580156105d8573d6000803e3d6000fd5b505050506040513d60208110156105ee57600080fd5b50516001600160a01b0316610601611a91565b6001600160a01b0316146106465760405162461bcd60e51b815260040180806020018281038252602d8152602001806128af602d913960400191505060405180910390fd5b61064e612776565b61065786611a95565b905084516000141561069a5760405162461bcd60e51b815260040180806020018281038252602b8152602001806128dc602b913960400191505060405180910390fd5b6001600160401b03841660009081526002602052604090206106bc9086611af7565b6106f75760405162461bcd60e51b8152600401808060200182810382526022815260200180612a266022913960400191505060405180910390fd5b80515161074b576040805162461bcd60e51b815260206004820152601b60248201527f746f4173736574486173682063616e6e6f7420626520656d7074790000000000604482015290519081900360640190fd5b600061075a8260000151611bab565b9050816020015151600014156107b7576040805162461bcd60e51b815260206004820152601960248201527f746f416464726573732063616e6e6f7420626520656d70747900000000000000604482015290519081900360640190fd5b60006107c68360200151611bab565b60408085015181516024808201929092528251808203909201825260440182526020810180516001600160e01b03166331a9108f60e11b178152915181519394506000936060938593926001600160a01b03891692849282918083835b602083106108425780518252601f199092019160209182019101610823565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d80600081146108a4576040519150601f19603f3d011682016040523d82523d6000602084013e6108a9565b606091505b5090945092508315610a7b578280602001905160208110156108ca57600080fd5b505191506001600160a01b0382163014806108ec57506001600160a01b038216155b6109275760405162461bcd60e51b8152600401808060200182810382526027815260200180612a486027913960400191505060405180910390fd5b6001600160a01b038216301415610a7b575060408087015181513060248201526001600160a01b03808816604483015260648083019390935283518083039093018352608490910183526020820180516001600160e01b0316632142170760e11b17815292518251929391891692849282918083835b602083106109bc5780518252601f19909201916020918201910161099d565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114610a1e576040519150601f19603f3d011682016040523d82523d6000602084013e610a23565b606091505b50508094505083610a7b576040805162461bcd60e51b815260206004820152601f60248201527f6661696c656420746f2063616c6c20736166655472616e7366657246726f6d00604482015290519081900360640190fd5b831580610a8f57506001600160a01b038216155b15610c3557848760400151886060015160405160240180846001600160a01b0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015610af4578181015183820152602001610adc565b50505050905090810190601f168015610b215780820380516001836020036101000a031916815260200191505b5060408051601f198184030181529181526020820180516001600160e01b0316634a99950b60e01b178152905182519298506001600160a01b038e169750889650945084935091508083835b60208310610b8c5780518252601f199092019160209182019101610b6d565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114610bee576040519150601f19603f3d011682016040523d82523d6000602084013e610bf3565b606091505b50508094505083610c355760405162461bcd60e51b815260040180806020018281038252603481526020018061287b6034913960400191505060405180910390fd5b60408088015181516001600160a01b03808a168252881660208201528083019190915290517fd90288730b87c2b8e0c45bd82260fd22478aba30ae1c4d578b8daba9261604df9181900360600190a15060019b9a5050505050505050505050565b600080610ca1611a91565b905082610cdf5760405162461bcd60e51b81526004018080602001828103825260238152602001806129796023913960400191505060405180910390fd5b610cf1816001600160a01b0316611bf5565b610d42576040805162461bcd60e51b815260206004820152601b60248201527f63616c6c6572206d757374206265206120636f6e74726163742e200000000000604482015290519081900360640190fd5b606060006060610d8787878080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250611bfb92505050565b6001600160a01b03861660009081526003602090815260408083206001600160401b03851684528252918290208054835160026001831615610100026000190190921691909104601f8101849004840282018401909452838152949750929550830182828015610e385780601f10610e0d57610100808354040283529160200191610e38565b820191906000526020600020905b815481529060010190602001808311610e1b57829003601f168201915b50505050509050805160001415610e96576040805162461bcd60e51b815260206004820152601960248201527f656d70747920696c6c6567616c20746f41737365744861736800000000000000604482015290519081900360640190fd5b604080516331a9108f60e11b8152600481018a90529051859130916001600160a01b03841691636352211e916024808301926020929190829003018186803b158015610ee157600080fd5b505afa158015610ef5573d6000803e3d6000fd5b505050506040513d6020811015610f0b57600080fd5b50516001600160a01b031614610f68576040805162461bcd60e51b815260206004820152601d60248201527f77726f6e67206f776e657220666f72207468697320746f6b656e204944000000604482015290519081900360640190fd5b6060816001600160a01b031663c87b56dd8b6040518263ffffffff1660e01b81526004018082815260200191505060006040518083038186803b158015610fae57600080fd5b505afa158015610fc2573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526020811015610feb57600080fd5b8101908080516040519392919084600160201b82111561100a57600080fd5b90830190602082018581111561101f57600080fd5b8251600160201b81118282018810171561103857600080fd5b82525081516020918201929091019080838360005b8381101561106557818101518382015260200161104d565b50505050905090810190601f1680156110925780820380516001836020036101000a031916815260200191505b5060405250505090506110a3612776565b60405180608001604052808581526020018781526020018c815260200183815250905060606110d182611c29565b90506000600160009054906101000a90046001600160a01b03166001600160a01b03166387939a7f6040518163ffffffff1660e01b815260040160206040518083038186803b15801561112357600080fd5b505afa158015611137573d6000803e3d6000fd5b505050506040513d602081101561114d57600080fd5b50516001600160401b038816600090815260026020818152604092839020805484516001821615610100026000190190911693909304601f81018390048302840183019094528383529394506060939192908301828280156111f05780601f106111c5576101008083540402835291602001916111f0565b820191906000526020600020905b8154815290600101906020018083116111d357829003601f168201915b5050505050905080516000141561124e576040805162461bcd60e51b815260206004820152601960248201527f656d70747920696c6c6567616c20746f50726f78794861736800000000000000604482015290519081900360640190fd5b816001600160a01b031663bd5cf6258983866040518463ffffffff1660e01b815260040180846001600160401b03168152602001806020018060200180602001848103845286818151815260200191508051906020019080838360005b838110156112c35781810151838201526020016112ab565b50505050905090810190601f1680156112f05780820380516001836020036101000a031916815260200191505b508481038352600681526020018065756e6c6f636b60d01b815250602001848103825285818151815260200191508051906020019080838360005b8381101561134357818101518382015260200161132b565b50505050905090810190601f1680156113705780820380516001836020036101000a031916815260200191505b509650505050505050602060405180830381600087803b15801561139357600080fd5b505af11580156113a7573d6000803e3d6000fd5b505050506040513d60208110156113bd57600080fd5b50516113fa5760405162461bcd60e51b815260040180806020018281038252602f815260200180612927602f913960400191505060405180910390fd5b5050505050507f98081b3037dc78e7a7ffa56932222cfc7ea9325ad6a3e7b0b3b4e3e678d7fd13848a8386868d60405180876001600160a01b03168152602001866001600160a01b031681526020018060200180602001856001600160401b03168152602001848152602001838103835287818151815260200191508051906020019080838360005b8381101561149b578181015183820152602001611483565b50505050905090810190601f1680156114c85780820380516001836020036101000a031916815260200191505b50838103825286518152865160209182019188019080838360005b838110156114fb5781810151838201526020016114e3565b50505050905090810190601f1680156115285780820380516001836020036101000a031916815260200191505b509850505050505050505060405180910390a150630a85bd0160e11b9998505050505050505050565b600061155b611904565b61159a576040805162461bcd60e51b81526020600482018190526024820152600080516020612907833981519152604482015290519081900360640190fd5b6001600160a01b03841660009081526003602090815260408083206001600160401b0387168452825290912083516115d49285019061279e565b507f661ffcb37a4682f1f64221cc81f683e2317505737d6425dd6799fcd39bc3753f84848460405180846001600160a01b03168152602001836001600160401b0316815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561165457818101518382015260200161163c565b50505050905090810190601f1680156116815780820380516001836020036101000a031916815260200191505b5094505050505060405180910390a15060019392505050565b60006116a4611904565b6116e3576040805162461bcd60e51b81526020600482018190526024820152600080516020612907833981519152604482015290519081900360640190fd5b6001600160401b0383166000908152600260209081526040909120835161170c9285019061279e565b507fdacd7d303272a3b58aec6620d6d1fb588f4996a5b46858ed437f1c34348f2d0f838360405180836001600160401b0316815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561177c578181015183820152602001611764565b50505050905090810190601f1680156117a95780820380516001836020036101000a031916815260200191505b50935050505060405180910390a150600192915050565b60036020908152600092835260408084208252918352918190208054825160026001831615610100026000190190921691909104601f81018590048502820185019093528281529290919083018282801561185c5780601f106118315761010080835404028352916020019161185c565b820191906000526020600020905b81548152906001019060200180831161183f57829003601f168201915b505050505081565b61186c611904565b6118ab576040805162461bcd60e51b81526020600482018190526024820152600080516020612907833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031690565b600080546001600160a01b0316611919611a91565b6001600160a01b031614905090565b600260208181526000928352604092839020805484516001821615610100026000190190911693909304601f810183900483028401830190945283835291929083018282801561185c5780601f106118315761010080835404028352916020019161185c565b611996611904565b6119d5576040805162461bcd60e51b81526020600482018190526024820152600080516020612907833981519152604482015290519081900360640190fd5b600180546001600160a01b0319166001600160a01b03838116919091179182905560408051929091168252517f43b1a8ec337adb61e8311ed025d99c80db65c02fe5c5027c1b6a93b40970cec4916020908290030190a150565b6001546001600160a01b031681565b611a46611904565b611a85576040805162461bcd60e51b81526020600482018190526024820152600080516020612907833981519152604482015290519081900360640190fd5b611a8e81611dac565b50565b3390565b611a9d612776565b611aa5612776565b6000611ab18482611e4c565b9083529050611ac08482611e4c565b60208401919091529050611ad48482611f24565b60408401919091529050611ae88482611e4c565b5060608301525090505b919050565b60008060019050835460026001808316156101000203821604845180821460018114611b265760009450611b9f565b8215611b9f576020831060018114611b8457600189600052602060002060208a018581015b600284828410011415611b7b578151835414611b6a5760009950600093505b600183019250602082019150611b4b565b50505050611b9d565b61010080860402945060208801518514611b9d57600095505b505b50929695505050505050565b60008151601414611bed5760405162461bcd60e51b81526004018080602001828103825260238152602001806128326023913960400191505060405180910390fd5b506014015190565b3b151590565b60606000818180611c0c8682611e4c565b9093509050611c1b8682611fc4565b509294509192505050915091565b606080611c39836000015161206a565b611c46846020015161206a565b611c538560400151612130565b611c60866060015161206a565b6040516020018085805190602001908083835b60208310611c925780518252601f199092019160209182019101611c73565b51815160209384036101000a600019018019909216911617905287519190930192870191508083835b60208310611cda5780518252601f199092019160209182019101611cbb565b51815160209384036101000a600019018019909216911617905286519190930192860191508083835b60208310611d225780518252601f199092019160209182019101611d03565b51815160209384036101000a600019018019909216911617905285519190930192850191508083835b60208310611d6a5780518252601f199092019160209182019101611d4b565b6001836020036101000a038019825116818451168082178552505050505050905001945050505050604051602081830303815290604052905080915050919050565b6001600160a01b038116611df15760405162461bcd60e51b81526004018080602001828103825260268152602001806128556026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6060600080611e5b8585612171565b865190955090915081850111801590611e75575080840184105b611eb05760405162461bcd60e51b8152600401808060200182810382526024815260200180612a026024913960400191505060405180910390fd5b606081158015611ecb57604051915060208201604052611f15565b6040519150601f8316801560200281840101848101888315602002848c0101015b81831015611f04578051835260209283019201611eec565b5050848452601f01601f1916604052505b509250830190505b9250929050565b60008083518360200111158015611f3d57508260200183105b611f785760405162461bcd60e51b81526004018080602001828103825260238152602001806129566023913960400191505060405180910390fd5b600060405160206000600182038760208a0101515b83831015611fad5780821a83860153600183019250600182039150611f8d565b505050810160405251956020949094019450505050565b60008083518360080111158015611fdd57508260080183105b6120185760405162461bcd60e51b81526004018080602001828103825260228152602001806129be6022913960400191505060405180910390fd5b600060405160086000600182038760208a0101515b8383101561204d5780821a8386015360018301925060018203915061202d565b505050808201604052602003900351956008949094019450505050565b80516060906120788161238a565b836040516020018083805190602001908083835b602083106120ab5780518252601f19909201916020918201910161208c565b51815160209384036101000a600019018019909216911617905285519190930192850191508083835b602083106120f35780518252601f1990920191602091820191016120d4565b6001836020036101000a03801982511681845116808217855250505050505090500192505050604051602081830303815290604052915050919050565b606060405160208082526000601f5b828210156121615785811a82602086010153600191909101906000190161213f565b5050506040818101905292915050565b600080600061218085856124d0565b94509050600060fd60f81b6001600160f81b03198316141561221e576121a6868661254e565b955061ffff16905060fd81108015906121c1575061ffff8111155b612212576040805162461bcd60e51b815260206004820152601f60248201527f4e65787455696e7431362c2076616c7565206f7574736964652072616e676500604482015290519081900360640190fd5b9250839150611f1d9050565b607f60f91b6001600160f81b0319831614156122ae5761223e86866125d7565b955063ffffffff16905061ffff8111801561225d575063ffffffff8111155b612212576040805162461bcd60e51b815260206004820181905260248201527f4e65787456617255696e742c2076616c7565206f7574736964652072616e6765604482015290519081900360640190fd5b6001600160f81b0319808316141561232f576122ca8686611fc4565b95506001600160401b0316905063ffffffff8111612212576040805162461bcd60e51b815260206004820181905260248201527f4e65787456617255696e742c2076616c7565206f7574736964652072616e6765604482015290519081900360640190fd5b5060f881901c60fd8110612212576040805162461bcd60e51b815260206004820181905260248201527f4e65787456617255696e742c2076616c7565206f7574736964652072616e6765604482015290519081900360640190fd5b606060fd826001600160401b031610156123ae576123a78261267d565b9050611af2565b61ffff826001600160401b03161161248c576123cd60fd60f81b612699565b6123d6836126ad565b6040516020018083805190602001908083835b602083106124085780518252601f1990920191602091820191016123e9565b51815160209384036101000a600019018019909216911617905285519190930192850191508083835b602083106124505780518252601f199092019160209182019101612431565b6001836020036101000a038019825116818451168082178552505050505050905001925050506040516020818303038152906040529050611af2565b63ffffffff826001600160401b0316116124b6576124ad607f60f91b612699565b6123d6836126f0565b6124c76001600160f81b0319612699565b6123d683612733565b600080835183600101111580156124e957508260010183105b61253a576040805162461bcd60e51b815260206004820181905260248201527f4e657874427974652c204f66667365742065786365656473206d6178696d756d604482015290519081900360640190fd5b505081810160200151600182019250929050565b6000808351836002011115801561256757508260020183105b6125a25760405162461bcd60e51b815260040180806020018281038252602281526020018061299c6022913960400191505060405180910390fd5b6000604051846020870101518060011a82538060001a6001830153506002818101604052601d19909101519694019450505050565b600080835183600401111580156125f057508260040183105b61262b5760405162461bcd60e51b81526004018080602001828103825260228152602001806129e06022913960400191505060405180910390fd5b600060405160046000600182038760208a0101515b838310156126605780821a83860153600183019250600182039150612640565b505050808201604052602003900351956004949094019450505050565b604080516001815260f89290921b602083015260218201905290565b60606126a78260f81c61267d565b92915050565b6040516002808252606091906000601f5b828210156126e05785811a8260208601015360019190910190600019016126be565b5050506022810160405292915050565b6040516004808252606091906000601f5b828210156127235785811a826020860101536001919091019060001901612701565b5050506024810160405292915050565b6040516008808252606091906000601f5b828210156127665785811a826020860101536001919091019060001901612744565b5050506028810160405292915050565b6040518060800160405280606081526020016060815260200160008152602001606081525090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106127df57805160ff191683800117855561280c565b8280016001018555821561280c579182015b8281111561280c5782518255916020019190600101906127f1565b5061281892915061281c565b5090565b5b80821115612818576000815560010161281d56fe6279746573206c656e67746820646f6573206e6f74206d6174636820616464726573734f776e61626c653a206e6577206f776e657220697320746865207a65726f20616464726573736661696c656420746f2063616c6c206d696e745769746855524920746f206d696e742061206e6577206d617070696e67204e46546d736753656e646572206973206e6f742045746843726f7373436861696e4d616e61676572436f6e747261637466726f6d2070726f787920636f6e747261637420616464726573732063616e6e6f7420626520656d7074794f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657245746843726f7373436861696e4d616e616765722063726f7373436861696e206578656375746564206572726f72214e65787455696e743235362c206f66667365742065786365656473206d6178696d756d6c656e677468206f6620746f416464726573732063616e2774206265207a65726f2e204e65787455696e7431362c206f66667365742065786365656473206d6178696d756d4e65787455696e7436342c206f66667365742065786365656473206d6178696d756d4e65787455696e7433322c206f66667365742065786365656473206d6178696d756d4e65787456617242797465732c206f66667365742065786365656473206d6178696d756d46726f6d2050726f787920636f6e74726163742061646472657373206572726f7221796f757220746f6b656e204944206973206e6f7420686f6c64206279206c6f636b70726f78792ea2646970667358221220c26463aef51a44a5fd017cc32f8bcbc4158be8aeaecf3a7cdcd9783bda78133864736f6c634300060c0033" + +// DeployNFTLockProxy deploys a new Ethereum contract, binding an instance of NFTLockProxy to it. +func DeployNFTLockProxy(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *NFTLockProxy, error) { + parsed, err := abi.JSON(strings.NewReader(NFTLockProxyABI)) + if err != nil { + return common.Address{}, nil, nil, err + } + + address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(NFTLockProxyBin), backend) + if err != nil { + return common.Address{}, nil, nil, err + } + return address, tx, &NFTLockProxy{NFTLockProxyCaller: NFTLockProxyCaller{contract: contract}, NFTLockProxyTransactor: NFTLockProxyTransactor{contract: contract}, NFTLockProxyFilterer: NFTLockProxyFilterer{contract: contract}}, nil +} + +// NFTLockProxy is an auto generated Go binding around an Ethereum contract. +type NFTLockProxy struct { + NFTLockProxyCaller // Read-only binding to the contract + NFTLockProxyTransactor // Write-only binding to the contract + NFTLockProxyFilterer // Log filterer for contract events +} + +// NFTLockProxyCaller is an auto generated read-only Go binding around an Ethereum contract. +type NFTLockProxyCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// NFTLockProxyTransactor is an auto generated write-only Go binding around an Ethereum contract. +type NFTLockProxyTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// NFTLockProxyFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type NFTLockProxyFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// NFTLockProxySession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type NFTLockProxySession struct { + Contract *NFTLockProxy // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// NFTLockProxyCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type NFTLockProxyCallerSession struct { + Contract *NFTLockProxyCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// NFTLockProxyTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type NFTLockProxyTransactorSession struct { + Contract *NFTLockProxyTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// NFTLockProxyRaw is an auto generated low-level Go binding around an Ethereum contract. +type NFTLockProxyRaw struct { + Contract *NFTLockProxy // Generic contract binding to access the raw methods on +} + +// NFTLockProxyCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type NFTLockProxyCallerRaw struct { + Contract *NFTLockProxyCaller // Generic read-only contract binding to access the raw methods on +} + +// NFTLockProxyTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type NFTLockProxyTransactorRaw struct { + Contract *NFTLockProxyTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewNFTLockProxy creates a new instance of NFTLockProxy, bound to a specific deployed contract. +func NewNFTLockProxy(address common.Address, backend bind.ContractBackend) (*NFTLockProxy, error) { + contract, err := bindNFTLockProxy(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &NFTLockProxy{NFTLockProxyCaller: NFTLockProxyCaller{contract: contract}, NFTLockProxyTransactor: NFTLockProxyTransactor{contract: contract}, NFTLockProxyFilterer: NFTLockProxyFilterer{contract: contract}}, nil +} + +// NewNFTLockProxyCaller creates a new read-only instance of NFTLockProxy, bound to a specific deployed contract. +func NewNFTLockProxyCaller(address common.Address, caller bind.ContractCaller) (*NFTLockProxyCaller, error) { + contract, err := bindNFTLockProxy(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &NFTLockProxyCaller{contract: contract}, nil +} + +// NewNFTLockProxyTransactor creates a new write-only instance of NFTLockProxy, bound to a specific deployed contract. +func NewNFTLockProxyTransactor(address common.Address, transactor bind.ContractTransactor) (*NFTLockProxyTransactor, error) { + contract, err := bindNFTLockProxy(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &NFTLockProxyTransactor{contract: contract}, nil +} + +// NewNFTLockProxyFilterer creates a new log filterer instance of NFTLockProxy, bound to a specific deployed contract. +func NewNFTLockProxyFilterer(address common.Address, filterer bind.ContractFilterer) (*NFTLockProxyFilterer, error) { + contract, err := bindNFTLockProxy(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &NFTLockProxyFilterer{contract: contract}, nil +} + +// bindNFTLockProxy binds a generic wrapper to an already deployed contract. +func bindNFTLockProxy(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := abi.JSON(strings.NewReader(NFTLockProxyABI)) + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_NFTLockProxy *NFTLockProxyRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { + return _NFTLockProxy.Contract.NFTLockProxyCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_NFTLockProxy *NFTLockProxyRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _NFTLockProxy.Contract.NFTLockProxyTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_NFTLockProxy *NFTLockProxyRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _NFTLockProxy.Contract.NFTLockProxyTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_NFTLockProxy *NFTLockProxyCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { + return _NFTLockProxy.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_NFTLockProxy *NFTLockProxyTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _NFTLockProxy.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_NFTLockProxy *NFTLockProxyTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _NFTLockProxy.Contract.contract.Transact(opts, method, params...) +} + +// AssetHashMap is a free data retrieval call binding the contract method 0x4f7d9808. +// +// Solidity: function assetHashMap(address , uint64 ) view returns(bytes) +func (_NFTLockProxy *NFTLockProxyCaller) AssetHashMap(opts *bind.CallOpts, arg0 common.Address, arg1 uint64) ([]byte, error) { + var ( + ret0 = new([]byte) + ) + out := ret0 + err := _NFTLockProxy.contract.Call(opts, out, "assetHashMap", arg0, arg1) + return *ret0, err +} + +// AssetHashMap is a free data retrieval call binding the contract method 0x4f7d9808. +// +// Solidity: function assetHashMap(address , uint64 ) view returns(bytes) +func (_NFTLockProxy *NFTLockProxySession) AssetHashMap(arg0 common.Address, arg1 uint64) ([]byte, error) { + return _NFTLockProxy.Contract.AssetHashMap(&_NFTLockProxy.CallOpts, arg0, arg1) +} + +// AssetHashMap is a free data retrieval call binding the contract method 0x4f7d9808. +// +// Solidity: function assetHashMap(address , uint64 ) view returns(bytes) +func (_NFTLockProxy *NFTLockProxyCallerSession) AssetHashMap(arg0 common.Address, arg1 uint64) ([]byte, error) { + return _NFTLockProxy.Contract.AssetHashMap(&_NFTLockProxy.CallOpts, arg0, arg1) +} + +// IsOwner is a free data retrieval call binding the contract method 0x8f32d59b. +// +// Solidity: function isOwner() view returns(bool) +func (_NFTLockProxy *NFTLockProxyCaller) IsOwner(opts *bind.CallOpts) (bool, error) { + var ( + ret0 = new(bool) + ) + out := ret0 + err := _NFTLockProxy.contract.Call(opts, out, "isOwner") + return *ret0, err +} + +// IsOwner is a free data retrieval call binding the contract method 0x8f32d59b. +// +// Solidity: function isOwner() view returns(bool) +func (_NFTLockProxy *NFTLockProxySession) IsOwner() (bool, error) { + return _NFTLockProxy.Contract.IsOwner(&_NFTLockProxy.CallOpts) +} + +// IsOwner is a free data retrieval call binding the contract method 0x8f32d59b. +// +// Solidity: function isOwner() view returns(bool) +func (_NFTLockProxy *NFTLockProxyCallerSession) IsOwner() (bool, error) { + return _NFTLockProxy.Contract.IsOwner(&_NFTLockProxy.CallOpts) +} + +// ManagerProxyContract is a free data retrieval call binding the contract method 0xd798f881. +// +// Solidity: function managerProxyContract() view returns(address) +func (_NFTLockProxy *NFTLockProxyCaller) ManagerProxyContract(opts *bind.CallOpts) (common.Address, error) { + var ( + ret0 = new(common.Address) + ) + out := ret0 + err := _NFTLockProxy.contract.Call(opts, out, "managerProxyContract") + return *ret0, err +} + +// ManagerProxyContract is a free data retrieval call binding the contract method 0xd798f881. +// +// Solidity: function managerProxyContract() view returns(address) +func (_NFTLockProxy *NFTLockProxySession) ManagerProxyContract() (common.Address, error) { + return _NFTLockProxy.Contract.ManagerProxyContract(&_NFTLockProxy.CallOpts) +} + +// ManagerProxyContract is a free data retrieval call binding the contract method 0xd798f881. +// +// Solidity: function managerProxyContract() view returns(address) +func (_NFTLockProxy *NFTLockProxyCallerSession) ManagerProxyContract() (common.Address, error) { + return _NFTLockProxy.Contract.ManagerProxyContract(&_NFTLockProxy.CallOpts) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_NFTLockProxy *NFTLockProxyCaller) Owner(opts *bind.CallOpts) (common.Address, error) { + var ( + ret0 = new(common.Address) + ) + out := ret0 + err := _NFTLockProxy.contract.Call(opts, out, "owner") + return *ret0, err +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_NFTLockProxy *NFTLockProxySession) Owner() (common.Address, error) { + return _NFTLockProxy.Contract.Owner(&_NFTLockProxy.CallOpts) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_NFTLockProxy *NFTLockProxyCallerSession) Owner() (common.Address, error) { + return _NFTLockProxy.Contract.Owner(&_NFTLockProxy.CallOpts) +} + +// ProxyHashMap is a free data retrieval call binding the contract method 0x9e5767aa. +// +// Solidity: function proxyHashMap(uint64 ) view returns(bytes) +func (_NFTLockProxy *NFTLockProxyCaller) ProxyHashMap(opts *bind.CallOpts, arg0 uint64) ([]byte, error) { + var ( + ret0 = new([]byte) + ) + out := ret0 + err := _NFTLockProxy.contract.Call(opts, out, "proxyHashMap", arg0) + return *ret0, err +} + +// ProxyHashMap is a free data retrieval call binding the contract method 0x9e5767aa. +// +// Solidity: function proxyHashMap(uint64 ) view returns(bytes) +func (_NFTLockProxy *NFTLockProxySession) ProxyHashMap(arg0 uint64) ([]byte, error) { + return _NFTLockProxy.Contract.ProxyHashMap(&_NFTLockProxy.CallOpts, arg0) +} + +// ProxyHashMap is a free data retrieval call binding the contract method 0x9e5767aa. +// +// Solidity: function proxyHashMap(uint64 ) view returns(bytes) +func (_NFTLockProxy *NFTLockProxyCallerSession) ProxyHashMap(arg0 uint64) ([]byte, error) { + return _NFTLockProxy.Contract.ProxyHashMap(&_NFTLockProxy.CallOpts, arg0) +} + +// BindAssetHash is a paid mutator transaction binding the contract method 0x3348f63b. +// +// Solidity: function bindAssetHash(address fromAssetHash, uint64 toChainId, bytes toAssetHash) returns(bool) +func (_NFTLockProxy *NFTLockProxyTransactor) BindAssetHash(opts *bind.TransactOpts, fromAssetHash common.Address, toChainId uint64, toAssetHash []byte) (*types.Transaction, error) { + return _NFTLockProxy.contract.Transact(opts, "bindAssetHash", fromAssetHash, toChainId, toAssetHash) +} + +// BindAssetHash is a paid mutator transaction binding the contract method 0x3348f63b. +// +// Solidity: function bindAssetHash(address fromAssetHash, uint64 toChainId, bytes toAssetHash) returns(bool) +func (_NFTLockProxy *NFTLockProxySession) BindAssetHash(fromAssetHash common.Address, toChainId uint64, toAssetHash []byte) (*types.Transaction, error) { + return _NFTLockProxy.Contract.BindAssetHash(&_NFTLockProxy.TransactOpts, fromAssetHash, toChainId, toAssetHash) +} + +// BindAssetHash is a paid mutator transaction binding the contract method 0x3348f63b. +// +// Solidity: function bindAssetHash(address fromAssetHash, uint64 toChainId, bytes toAssetHash) returns(bool) +func (_NFTLockProxy *NFTLockProxyTransactorSession) BindAssetHash(fromAssetHash common.Address, toChainId uint64, toAssetHash []byte) (*types.Transaction, error) { + return _NFTLockProxy.Contract.BindAssetHash(&_NFTLockProxy.TransactOpts, fromAssetHash, toChainId, toAssetHash) +} + +// BindProxyHash is a paid mutator transaction binding the contract method 0x379b98f6. +// +// Solidity: function bindProxyHash(uint64 toChainId, bytes targetProxyHash) returns(bool) +func (_NFTLockProxy *NFTLockProxyTransactor) BindProxyHash(opts *bind.TransactOpts, toChainId uint64, targetProxyHash []byte) (*types.Transaction, error) { + return _NFTLockProxy.contract.Transact(opts, "bindProxyHash", toChainId, targetProxyHash) +} + +// BindProxyHash is a paid mutator transaction binding the contract method 0x379b98f6. +// +// Solidity: function bindProxyHash(uint64 toChainId, bytes targetProxyHash) returns(bool) +func (_NFTLockProxy *NFTLockProxySession) BindProxyHash(toChainId uint64, targetProxyHash []byte) (*types.Transaction, error) { + return _NFTLockProxy.Contract.BindProxyHash(&_NFTLockProxy.TransactOpts, toChainId, targetProxyHash) +} + +// BindProxyHash is a paid mutator transaction binding the contract method 0x379b98f6. +// +// Solidity: function bindProxyHash(uint64 toChainId, bytes targetProxyHash) returns(bool) +func (_NFTLockProxy *NFTLockProxyTransactorSession) BindProxyHash(toChainId uint64, targetProxyHash []byte) (*types.Transaction, error) { + return _NFTLockProxy.Contract.BindProxyHash(&_NFTLockProxy.TransactOpts, toChainId, targetProxyHash) +} + +// OnERC721Received is a paid mutator transaction binding the contract method 0x150b7a02. +// +// Solidity: function onERC721Received(address operator, address from, uint256 tokenId, bytes data) returns(bytes4) +func (_NFTLockProxy *NFTLockProxyTransactor) OnERC721Received(opts *bind.TransactOpts, operator common.Address, from common.Address, tokenId *big.Int, data []byte) (*types.Transaction, error) { + return _NFTLockProxy.contract.Transact(opts, "onERC721Received", operator, from, tokenId, data) +} + +// OnERC721Received is a paid mutator transaction binding the contract method 0x150b7a02. +// +// Solidity: function onERC721Received(address operator, address from, uint256 tokenId, bytes data) returns(bytes4) +func (_NFTLockProxy *NFTLockProxySession) OnERC721Received(operator common.Address, from common.Address, tokenId *big.Int, data []byte) (*types.Transaction, error) { + return _NFTLockProxy.Contract.OnERC721Received(&_NFTLockProxy.TransactOpts, operator, from, tokenId, data) +} + +// OnERC721Received is a paid mutator transaction binding the contract method 0x150b7a02. +// +// Solidity: function onERC721Received(address operator, address from, uint256 tokenId, bytes data) returns(bytes4) +func (_NFTLockProxy *NFTLockProxyTransactorSession) OnERC721Received(operator common.Address, from common.Address, tokenId *big.Int, data []byte) (*types.Transaction, error) { + return _NFTLockProxy.Contract.OnERC721Received(&_NFTLockProxy.TransactOpts, operator, from, tokenId, data) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_NFTLockProxy *NFTLockProxyTransactor) RenounceOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { + return _NFTLockProxy.contract.Transact(opts, "renounceOwnership") +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_NFTLockProxy *NFTLockProxySession) RenounceOwnership() (*types.Transaction, error) { + return _NFTLockProxy.Contract.RenounceOwnership(&_NFTLockProxy.TransactOpts) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_NFTLockProxy *NFTLockProxyTransactorSession) RenounceOwnership() (*types.Transaction, error) { + return _NFTLockProxy.Contract.RenounceOwnership(&_NFTLockProxy.TransactOpts) +} + +// SetManagerProxy is a paid mutator transaction binding the contract method 0xaf9980f0. +// +// Solidity: function setManagerProxy(address ethCCMProxyAddr) returns() +func (_NFTLockProxy *NFTLockProxyTransactor) SetManagerProxy(opts *bind.TransactOpts, ethCCMProxyAddr common.Address) (*types.Transaction, error) { + return _NFTLockProxy.contract.Transact(opts, "setManagerProxy", ethCCMProxyAddr) +} + +// SetManagerProxy is a paid mutator transaction binding the contract method 0xaf9980f0. +// +// Solidity: function setManagerProxy(address ethCCMProxyAddr) returns() +func (_NFTLockProxy *NFTLockProxySession) SetManagerProxy(ethCCMProxyAddr common.Address) (*types.Transaction, error) { + return _NFTLockProxy.Contract.SetManagerProxy(&_NFTLockProxy.TransactOpts, ethCCMProxyAddr) +} + +// SetManagerProxy is a paid mutator transaction binding the contract method 0xaf9980f0. +// +// Solidity: function setManagerProxy(address ethCCMProxyAddr) returns() +func (_NFTLockProxy *NFTLockProxyTransactorSession) SetManagerProxy(ethCCMProxyAddr common.Address) (*types.Transaction, error) { + return _NFTLockProxy.Contract.SetManagerProxy(&_NFTLockProxy.TransactOpts, ethCCMProxyAddr) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_NFTLockProxy *NFTLockProxyTransactor) TransferOwnership(opts *bind.TransactOpts, newOwner common.Address) (*types.Transaction, error) { + return _NFTLockProxy.contract.Transact(opts, "transferOwnership", newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_NFTLockProxy *NFTLockProxySession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _NFTLockProxy.Contract.TransferOwnership(&_NFTLockProxy.TransactOpts, newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_NFTLockProxy *NFTLockProxyTransactorSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _NFTLockProxy.Contract.TransferOwnership(&_NFTLockProxy.TransactOpts, newOwner) +} + +// Unlock is a paid mutator transaction binding the contract method 0x06af4b9f. +// +// Solidity: function unlock(bytes argsBs, bytes fromContractAddr, uint64 fromChainId) returns(bool) +func (_NFTLockProxy *NFTLockProxyTransactor) Unlock(opts *bind.TransactOpts, argsBs []byte, fromContractAddr []byte, fromChainId uint64) (*types.Transaction, error) { + return _NFTLockProxy.contract.Transact(opts, "unlock", argsBs, fromContractAddr, fromChainId) +} + +// Unlock is a paid mutator transaction binding the contract method 0x06af4b9f. +// +// Solidity: function unlock(bytes argsBs, bytes fromContractAddr, uint64 fromChainId) returns(bool) +func (_NFTLockProxy *NFTLockProxySession) Unlock(argsBs []byte, fromContractAddr []byte, fromChainId uint64) (*types.Transaction, error) { + return _NFTLockProxy.Contract.Unlock(&_NFTLockProxy.TransactOpts, argsBs, fromContractAddr, fromChainId) +} + +// Unlock is a paid mutator transaction binding the contract method 0x06af4b9f. +// +// Solidity: function unlock(bytes argsBs, bytes fromContractAddr, uint64 fromChainId) returns(bool) +func (_NFTLockProxy *NFTLockProxyTransactorSession) Unlock(argsBs []byte, fromContractAddr []byte, fromChainId uint64) (*types.Transaction, error) { + return _NFTLockProxy.Contract.Unlock(&_NFTLockProxy.TransactOpts, argsBs, fromContractAddr, fromChainId) +} + +// NFTLockProxyBindAssetEventIterator is returned from FilterBindAssetEvent and is used to iterate over the raw logs and unpacked data for BindAssetEvent events raised by the NFTLockProxy contract. +type NFTLockProxyBindAssetEventIterator struct { + Event *NFTLockProxyBindAssetEvent // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *NFTLockProxyBindAssetEventIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(NFTLockProxyBindAssetEvent) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(NFTLockProxyBindAssetEvent) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *NFTLockProxyBindAssetEventIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *NFTLockProxyBindAssetEventIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// NFTLockProxyBindAssetEvent represents a BindAssetEvent event raised by the NFTLockProxy contract. +type NFTLockProxyBindAssetEvent struct { + FromAssetHash common.Address + ToChainId uint64 + TargetProxyHash []byte + Raw types.Log // Blockchain specific contextual infos +} + +// FilterBindAssetEvent is a free log retrieval operation binding the contract event 0x661ffcb37a4682f1f64221cc81f683e2317505737d6425dd6799fcd39bc3753f. +// +// Solidity: event BindAssetEvent(address fromAssetHash, uint64 toChainId, bytes targetProxyHash) +func (_NFTLockProxy *NFTLockProxyFilterer) FilterBindAssetEvent(opts *bind.FilterOpts) (*NFTLockProxyBindAssetEventIterator, error) { + + logs, sub, err := _NFTLockProxy.contract.FilterLogs(opts, "BindAssetEvent") + if err != nil { + return nil, err + } + return &NFTLockProxyBindAssetEventIterator{contract: _NFTLockProxy.contract, event: "BindAssetEvent", logs: logs, sub: sub}, nil +} + +// WatchBindAssetEvent is a free log subscription operation binding the contract event 0x661ffcb37a4682f1f64221cc81f683e2317505737d6425dd6799fcd39bc3753f. +// +// Solidity: event BindAssetEvent(address fromAssetHash, uint64 toChainId, bytes targetProxyHash) +func (_NFTLockProxy *NFTLockProxyFilterer) WatchBindAssetEvent(opts *bind.WatchOpts, sink chan<- *NFTLockProxyBindAssetEvent) (event.Subscription, error) { + + logs, sub, err := _NFTLockProxy.contract.WatchLogs(opts, "BindAssetEvent") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(NFTLockProxyBindAssetEvent) + if err := _NFTLockProxy.contract.UnpackLog(event, "BindAssetEvent", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseBindAssetEvent is a log parse operation binding the contract event 0x661ffcb37a4682f1f64221cc81f683e2317505737d6425dd6799fcd39bc3753f. +// +// Solidity: event BindAssetEvent(address fromAssetHash, uint64 toChainId, bytes targetProxyHash) +func (_NFTLockProxy *NFTLockProxyFilterer) ParseBindAssetEvent(log types.Log) (*NFTLockProxyBindAssetEvent, error) { + event := new(NFTLockProxyBindAssetEvent) + if err := _NFTLockProxy.contract.UnpackLog(event, "BindAssetEvent", log); err != nil { + return nil, err + } + return event, nil +} + +// NFTLockProxyBindProxyEventIterator is returned from FilterBindProxyEvent and is used to iterate over the raw logs and unpacked data for BindProxyEvent events raised by the NFTLockProxy contract. +type NFTLockProxyBindProxyEventIterator struct { + Event *NFTLockProxyBindProxyEvent // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *NFTLockProxyBindProxyEventIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(NFTLockProxyBindProxyEvent) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(NFTLockProxyBindProxyEvent) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *NFTLockProxyBindProxyEventIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *NFTLockProxyBindProxyEventIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// NFTLockProxyBindProxyEvent represents a BindProxyEvent event raised by the NFTLockProxy contract. +type NFTLockProxyBindProxyEvent struct { + ToChainId uint64 + TargetProxyHash []byte + Raw types.Log // Blockchain specific contextual infos +} + +// FilterBindProxyEvent is a free log retrieval operation binding the contract event 0xdacd7d303272a3b58aec6620d6d1fb588f4996a5b46858ed437f1c34348f2d0f. +// +// Solidity: event BindProxyEvent(uint64 toChainId, bytes targetProxyHash) +func (_NFTLockProxy *NFTLockProxyFilterer) FilterBindProxyEvent(opts *bind.FilterOpts) (*NFTLockProxyBindProxyEventIterator, error) { + + logs, sub, err := _NFTLockProxy.contract.FilterLogs(opts, "BindProxyEvent") + if err != nil { + return nil, err + } + return &NFTLockProxyBindProxyEventIterator{contract: _NFTLockProxy.contract, event: "BindProxyEvent", logs: logs, sub: sub}, nil +} + +// WatchBindProxyEvent is a free log subscription operation binding the contract event 0xdacd7d303272a3b58aec6620d6d1fb588f4996a5b46858ed437f1c34348f2d0f. +// +// Solidity: event BindProxyEvent(uint64 toChainId, bytes targetProxyHash) +func (_NFTLockProxy *NFTLockProxyFilterer) WatchBindProxyEvent(opts *bind.WatchOpts, sink chan<- *NFTLockProxyBindProxyEvent) (event.Subscription, error) { + + logs, sub, err := _NFTLockProxy.contract.WatchLogs(opts, "BindProxyEvent") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(NFTLockProxyBindProxyEvent) + if err := _NFTLockProxy.contract.UnpackLog(event, "BindProxyEvent", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseBindProxyEvent is a log parse operation binding the contract event 0xdacd7d303272a3b58aec6620d6d1fb588f4996a5b46858ed437f1c34348f2d0f. +// +// Solidity: event BindProxyEvent(uint64 toChainId, bytes targetProxyHash) +func (_NFTLockProxy *NFTLockProxyFilterer) ParseBindProxyEvent(log types.Log) (*NFTLockProxyBindProxyEvent, error) { + event := new(NFTLockProxyBindProxyEvent) + if err := _NFTLockProxy.contract.UnpackLog(event, "BindProxyEvent", log); err != nil { + return nil, err + } + return event, nil +} + +// NFTLockProxyLockEventIterator is returned from FilterLockEvent and is used to iterate over the raw logs and unpacked data for LockEvent events raised by the NFTLockProxy contract. +type NFTLockProxyLockEventIterator struct { + Event *NFTLockProxyLockEvent // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *NFTLockProxyLockEventIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(NFTLockProxyLockEvent) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(NFTLockProxyLockEvent) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *NFTLockProxyLockEventIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *NFTLockProxyLockEventIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// NFTLockProxyLockEvent represents a LockEvent event raised by the NFTLockProxy contract. +type NFTLockProxyLockEvent struct { + FromAssetHash common.Address + FromAddress common.Address + ToAssetHash []byte + ToAddress []byte + ToChainId uint64 + TokenId *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterLockEvent is a free log retrieval operation binding the contract event 0x98081b3037dc78e7a7ffa56932222cfc7ea9325ad6a3e7b0b3b4e3e678d7fd13. +// +// Solidity: event LockEvent(address fromAssetHash, address fromAddress, bytes toAssetHash, bytes toAddress, uint64 toChainId, uint256 tokenId) +func (_NFTLockProxy *NFTLockProxyFilterer) FilterLockEvent(opts *bind.FilterOpts) (*NFTLockProxyLockEventIterator, error) { + + logs, sub, err := _NFTLockProxy.contract.FilterLogs(opts, "LockEvent") + if err != nil { + return nil, err + } + return &NFTLockProxyLockEventIterator{contract: _NFTLockProxy.contract, event: "LockEvent", logs: logs, sub: sub}, nil +} + +// WatchLockEvent is a free log subscription operation binding the contract event 0x98081b3037dc78e7a7ffa56932222cfc7ea9325ad6a3e7b0b3b4e3e678d7fd13. +// +// Solidity: event LockEvent(address fromAssetHash, address fromAddress, bytes toAssetHash, bytes toAddress, uint64 toChainId, uint256 tokenId) +func (_NFTLockProxy *NFTLockProxyFilterer) WatchLockEvent(opts *bind.WatchOpts, sink chan<- *NFTLockProxyLockEvent) (event.Subscription, error) { + + logs, sub, err := _NFTLockProxy.contract.WatchLogs(opts, "LockEvent") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(NFTLockProxyLockEvent) + if err := _NFTLockProxy.contract.UnpackLog(event, "LockEvent", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseLockEvent is a log parse operation binding the contract event 0x98081b3037dc78e7a7ffa56932222cfc7ea9325ad6a3e7b0b3b4e3e678d7fd13. +// +// Solidity: event LockEvent(address fromAssetHash, address fromAddress, bytes toAssetHash, bytes toAddress, uint64 toChainId, uint256 tokenId) +func (_NFTLockProxy *NFTLockProxyFilterer) ParseLockEvent(log types.Log) (*NFTLockProxyLockEvent, error) { + event := new(NFTLockProxyLockEvent) + if err := _NFTLockProxy.contract.UnpackLog(event, "LockEvent", log); err != nil { + return nil, err + } + return event, nil +} + +// NFTLockProxyOwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the NFTLockProxy contract. +type NFTLockProxyOwnershipTransferredIterator struct { + Event *NFTLockProxyOwnershipTransferred // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *NFTLockProxyOwnershipTransferredIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(NFTLockProxyOwnershipTransferred) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(NFTLockProxyOwnershipTransferred) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *NFTLockProxyOwnershipTransferredIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *NFTLockProxyOwnershipTransferredIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// NFTLockProxyOwnershipTransferred represents a OwnershipTransferred event raised by the NFTLockProxy contract. +type NFTLockProxyOwnershipTransferred struct { + PreviousOwner common.Address + NewOwner common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterOwnershipTransferred is a free log retrieval operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_NFTLockProxy *NFTLockProxyFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*NFTLockProxyOwnershipTransferredIterator, error) { + + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + } + var newOwnerRule []interface{} + for _, newOwnerItem := range newOwner { + newOwnerRule = append(newOwnerRule, newOwnerItem) + } + + logs, sub, err := _NFTLockProxy.contract.FilterLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return &NFTLockProxyOwnershipTransferredIterator{contract: _NFTLockProxy.contract, event: "OwnershipTransferred", logs: logs, sub: sub}, nil +} + +// WatchOwnershipTransferred is a free log subscription operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_NFTLockProxy *NFTLockProxyFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *NFTLockProxyOwnershipTransferred, previousOwner []common.Address, newOwner []common.Address) (event.Subscription, error) { + + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + } + var newOwnerRule []interface{} + for _, newOwnerItem := range newOwner { + newOwnerRule = append(newOwnerRule, newOwnerItem) + } + + logs, sub, err := _NFTLockProxy.contract.WatchLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(NFTLockProxyOwnershipTransferred) + if err := _NFTLockProxy.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseOwnershipTransferred is a log parse operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_NFTLockProxy *NFTLockProxyFilterer) ParseOwnershipTransferred(log types.Log) (*NFTLockProxyOwnershipTransferred, error) { + event := new(NFTLockProxyOwnershipTransferred) + if err := _NFTLockProxy.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return nil, err + } + return event, nil +} + +// NFTLockProxySetManagerProxyEventIterator is returned from FilterSetManagerProxyEvent and is used to iterate over the raw logs and unpacked data for SetManagerProxyEvent events raised by the NFTLockProxy contract. +type NFTLockProxySetManagerProxyEventIterator struct { + Event *NFTLockProxySetManagerProxyEvent // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *NFTLockProxySetManagerProxyEventIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(NFTLockProxySetManagerProxyEvent) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(NFTLockProxySetManagerProxyEvent) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *NFTLockProxySetManagerProxyEventIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *NFTLockProxySetManagerProxyEventIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// NFTLockProxySetManagerProxyEvent represents a SetManagerProxyEvent event raised by the NFTLockProxy contract. +type NFTLockProxySetManagerProxyEvent struct { + Manager common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterSetManagerProxyEvent is a free log retrieval operation binding the contract event 0x43b1a8ec337adb61e8311ed025d99c80db65c02fe5c5027c1b6a93b40970cec4. +// +// Solidity: event SetManagerProxyEvent(address manager) +func (_NFTLockProxy *NFTLockProxyFilterer) FilterSetManagerProxyEvent(opts *bind.FilterOpts) (*NFTLockProxySetManagerProxyEventIterator, error) { + + logs, sub, err := _NFTLockProxy.contract.FilterLogs(opts, "SetManagerProxyEvent") + if err != nil { + return nil, err + } + return &NFTLockProxySetManagerProxyEventIterator{contract: _NFTLockProxy.contract, event: "SetManagerProxyEvent", logs: logs, sub: sub}, nil +} + +// WatchSetManagerProxyEvent is a free log subscription operation binding the contract event 0x43b1a8ec337adb61e8311ed025d99c80db65c02fe5c5027c1b6a93b40970cec4. +// +// Solidity: event SetManagerProxyEvent(address manager) +func (_NFTLockProxy *NFTLockProxyFilterer) WatchSetManagerProxyEvent(opts *bind.WatchOpts, sink chan<- *NFTLockProxySetManagerProxyEvent) (event.Subscription, error) { + + logs, sub, err := _NFTLockProxy.contract.WatchLogs(opts, "SetManagerProxyEvent") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(NFTLockProxySetManagerProxyEvent) + if err := _NFTLockProxy.contract.UnpackLog(event, "SetManagerProxyEvent", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseSetManagerProxyEvent is a log parse operation binding the contract event 0x43b1a8ec337adb61e8311ed025d99c80db65c02fe5c5027c1b6a93b40970cec4. +// +// Solidity: event SetManagerProxyEvent(address manager) +func (_NFTLockProxy *NFTLockProxyFilterer) ParseSetManagerProxyEvent(log types.Log) (*NFTLockProxySetManagerProxyEvent, error) { + event := new(NFTLockProxySetManagerProxyEvent) + if err := _NFTLockProxy.contract.UnpackLog(event, "SetManagerProxyEvent", log); err != nil { + return nil, err + } + return event, nil +} + +// NFTLockProxyUnlockEventIterator is returned from FilterUnlockEvent and is used to iterate over the raw logs and unpacked data for UnlockEvent events raised by the NFTLockProxy contract. +type NFTLockProxyUnlockEventIterator struct { + Event *NFTLockProxyUnlockEvent // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *NFTLockProxyUnlockEventIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(NFTLockProxyUnlockEvent) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(NFTLockProxyUnlockEvent) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *NFTLockProxyUnlockEventIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *NFTLockProxyUnlockEventIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// NFTLockProxyUnlockEvent represents a UnlockEvent event raised by the NFTLockProxy contract. +type NFTLockProxyUnlockEvent struct { + ToAssetHash common.Address + ToAddress common.Address + TokenId *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterUnlockEvent is a free log retrieval operation binding the contract event 0xd90288730b87c2b8e0c45bd82260fd22478aba30ae1c4d578b8daba9261604df. +// +// Solidity: event UnlockEvent(address toAssetHash, address toAddress, uint256 tokenId) +func (_NFTLockProxy *NFTLockProxyFilterer) FilterUnlockEvent(opts *bind.FilterOpts) (*NFTLockProxyUnlockEventIterator, error) { + + logs, sub, err := _NFTLockProxy.contract.FilterLogs(opts, "UnlockEvent") + if err != nil { + return nil, err + } + return &NFTLockProxyUnlockEventIterator{contract: _NFTLockProxy.contract, event: "UnlockEvent", logs: logs, sub: sub}, nil +} + +// WatchUnlockEvent is a free log subscription operation binding the contract event 0xd90288730b87c2b8e0c45bd82260fd22478aba30ae1c4d578b8daba9261604df. +// +// Solidity: event UnlockEvent(address toAssetHash, address toAddress, uint256 tokenId) +func (_NFTLockProxy *NFTLockProxyFilterer) WatchUnlockEvent(opts *bind.WatchOpts, sink chan<- *NFTLockProxyUnlockEvent) (event.Subscription, error) { + + logs, sub, err := _NFTLockProxy.contract.WatchLogs(opts, "UnlockEvent") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(NFTLockProxyUnlockEvent) + if err := _NFTLockProxy.contract.UnpackLog(event, "UnlockEvent", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseUnlockEvent is a log parse operation binding the contract event 0xd90288730b87c2b8e0c45bd82260fd22478aba30ae1c4d578b8daba9261604df. +// +// Solidity: event UnlockEvent(address toAssetHash, address toAddress, uint256 tokenId) +func (_NFTLockProxy *NFTLockProxyFilterer) ParseUnlockEvent(log types.Log) (*NFTLockProxyUnlockEvent, error) { + event := new(NFTLockProxyUnlockEvent) + if err := _NFTLockProxy.contract.UnpackLog(event, "UnlockEvent", log); err != nil { + return nil, err + } + return event, nil +} + +// OwnableABI is the input ABI used to generate the binding from. +const OwnableABI = "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"isOwner\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]" + +// OwnableFuncSigs maps the 4-byte function signature to its string representation. +var OwnableFuncSigs = map[string]string{ + "8f32d59b": "isOwner()", + "8da5cb5b": "owner()", + "715018a6": "renounceOwnership()", + "f2fde38b": "transferOwnership(address)", +} + +// Ownable is an auto generated Go binding around an Ethereum contract. +type Ownable struct { + OwnableCaller // Read-only binding to the contract + OwnableTransactor // Write-only binding to the contract + OwnableFilterer // Log filterer for contract events +} + +// OwnableCaller is an auto generated read-only Go binding around an Ethereum contract. +type OwnableCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// OwnableTransactor is an auto generated write-only Go binding around an Ethereum contract. +type OwnableTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// OwnableFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type OwnableFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// OwnableSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type OwnableSession struct { + Contract *Ownable // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// OwnableCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type OwnableCallerSession struct { + Contract *OwnableCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// OwnableTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type OwnableTransactorSession struct { + Contract *OwnableTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// OwnableRaw is an auto generated low-level Go binding around an Ethereum contract. +type OwnableRaw struct { + Contract *Ownable // Generic contract binding to access the raw methods on +} + +// OwnableCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type OwnableCallerRaw struct { + Contract *OwnableCaller // Generic read-only contract binding to access the raw methods on +} + +// OwnableTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type OwnableTransactorRaw struct { + Contract *OwnableTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewOwnable creates a new instance of Ownable, bound to a specific deployed contract. +func NewOwnable(address common.Address, backend bind.ContractBackend) (*Ownable, error) { + contract, err := bindOwnable(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &Ownable{OwnableCaller: OwnableCaller{contract: contract}, OwnableTransactor: OwnableTransactor{contract: contract}, OwnableFilterer: OwnableFilterer{contract: contract}}, nil +} + +// NewOwnableCaller creates a new read-only instance of Ownable, bound to a specific deployed contract. +func NewOwnableCaller(address common.Address, caller bind.ContractCaller) (*OwnableCaller, error) { + contract, err := bindOwnable(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &OwnableCaller{contract: contract}, nil +} + +// NewOwnableTransactor creates a new write-only instance of Ownable, bound to a specific deployed contract. +func NewOwnableTransactor(address common.Address, transactor bind.ContractTransactor) (*OwnableTransactor, error) { + contract, err := bindOwnable(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &OwnableTransactor{contract: contract}, nil +} + +// NewOwnableFilterer creates a new log filterer instance of Ownable, bound to a specific deployed contract. +func NewOwnableFilterer(address common.Address, filterer bind.ContractFilterer) (*OwnableFilterer, error) { + contract, err := bindOwnable(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &OwnableFilterer{contract: contract}, nil +} + +// bindOwnable binds a generic wrapper to an already deployed contract. +func bindOwnable(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := abi.JSON(strings.NewReader(OwnableABI)) + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_Ownable *OwnableRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { + return _Ownable.Contract.OwnableCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_Ownable *OwnableRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Ownable.Contract.OwnableTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_Ownable *OwnableRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _Ownable.Contract.OwnableTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_Ownable *OwnableCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { + return _Ownable.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_Ownable *OwnableTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Ownable.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_Ownable *OwnableTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _Ownable.Contract.contract.Transact(opts, method, params...) +} + +// IsOwner is a free data retrieval call binding the contract method 0x8f32d59b. +// +// Solidity: function isOwner() view returns(bool) +func (_Ownable *OwnableCaller) IsOwner(opts *bind.CallOpts) (bool, error) { + var ( + ret0 = new(bool) + ) + out := ret0 + err := _Ownable.contract.Call(opts, out, "isOwner") + return *ret0, err +} + +// IsOwner is a free data retrieval call binding the contract method 0x8f32d59b. +// +// Solidity: function isOwner() view returns(bool) +func (_Ownable *OwnableSession) IsOwner() (bool, error) { + return _Ownable.Contract.IsOwner(&_Ownable.CallOpts) +} + +// IsOwner is a free data retrieval call binding the contract method 0x8f32d59b. +// +// Solidity: function isOwner() view returns(bool) +func (_Ownable *OwnableCallerSession) IsOwner() (bool, error) { + return _Ownable.Contract.IsOwner(&_Ownable.CallOpts) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_Ownable *OwnableCaller) Owner(opts *bind.CallOpts) (common.Address, error) { + var ( + ret0 = new(common.Address) + ) + out := ret0 + err := _Ownable.contract.Call(opts, out, "owner") + return *ret0, err +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_Ownable *OwnableSession) Owner() (common.Address, error) { + return _Ownable.Contract.Owner(&_Ownable.CallOpts) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_Ownable *OwnableCallerSession) Owner() (common.Address, error) { + return _Ownable.Contract.Owner(&_Ownable.CallOpts) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_Ownable *OwnableTransactor) RenounceOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Ownable.contract.Transact(opts, "renounceOwnership") +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_Ownable *OwnableSession) RenounceOwnership() (*types.Transaction, error) { + return _Ownable.Contract.RenounceOwnership(&_Ownable.TransactOpts) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_Ownable *OwnableTransactorSession) RenounceOwnership() (*types.Transaction, error) { + return _Ownable.Contract.RenounceOwnership(&_Ownable.TransactOpts) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_Ownable *OwnableTransactor) TransferOwnership(opts *bind.TransactOpts, newOwner common.Address) (*types.Transaction, error) { + return _Ownable.contract.Transact(opts, "transferOwnership", newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_Ownable *OwnableSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _Ownable.Contract.TransferOwnership(&_Ownable.TransactOpts, newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_Ownable *OwnableTransactorSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _Ownable.Contract.TransferOwnership(&_Ownable.TransactOpts, newOwner) +} + +// OwnableOwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the Ownable contract. +type OwnableOwnershipTransferredIterator struct { + Event *OwnableOwnershipTransferred // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *OwnableOwnershipTransferredIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(OwnableOwnershipTransferred) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(OwnableOwnershipTransferred) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *OwnableOwnershipTransferredIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *OwnableOwnershipTransferredIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// OwnableOwnershipTransferred represents a OwnershipTransferred event raised by the Ownable contract. +type OwnableOwnershipTransferred struct { + PreviousOwner common.Address + NewOwner common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterOwnershipTransferred is a free log retrieval operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_Ownable *OwnableFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*OwnableOwnershipTransferredIterator, error) { + + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + } + var newOwnerRule []interface{} + for _, newOwnerItem := range newOwner { + newOwnerRule = append(newOwnerRule, newOwnerItem) + } + + logs, sub, err := _Ownable.contract.FilterLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return &OwnableOwnershipTransferredIterator{contract: _Ownable.contract, event: "OwnershipTransferred", logs: logs, sub: sub}, nil +} + +// WatchOwnershipTransferred is a free log subscription operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_Ownable *OwnableFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *OwnableOwnershipTransferred, previousOwner []common.Address, newOwner []common.Address) (event.Subscription, error) { + + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + } + var newOwnerRule []interface{} + for _, newOwnerItem := range newOwner { + newOwnerRule = append(newOwnerRule, newOwnerItem) + } + + logs, sub, err := _Ownable.contract.WatchLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(OwnableOwnershipTransferred) + if err := _Ownable.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseOwnershipTransferred is a log parse operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_Ownable *OwnableFilterer) ParseOwnershipTransferred(log types.Log) (*OwnableOwnershipTransferred, error) { + event := new(OwnableOwnershipTransferred) + if err := _Ownable.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return nil, err + } + return event, nil +} + +// SafeMathABI is the input ABI used to generate the binding from. +const SafeMathABI = "[]" + +// SafeMathBin is the compiled bytecode used for deploying new contracts. +var SafeMathBin = "0x60566023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea264697066735822122078dc014d2d339b07d3f6259f70196bf0be1b873dd80a5ef8b74af1273abdab7464736f6c634300060c0033" + +// DeploySafeMath deploys a new Ethereum contract, binding an instance of SafeMath to it. +func DeploySafeMath(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *SafeMath, error) { + parsed, err := abi.JSON(strings.NewReader(SafeMathABI)) + if err != nil { + return common.Address{}, nil, nil, err + } + + address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(SafeMathBin), backend) + if err != nil { + return common.Address{}, nil, nil, err + } + return address, tx, &SafeMath{SafeMathCaller: SafeMathCaller{contract: contract}, SafeMathTransactor: SafeMathTransactor{contract: contract}, SafeMathFilterer: SafeMathFilterer{contract: contract}}, nil +} + +// SafeMath is an auto generated Go binding around an Ethereum contract. +type SafeMath struct { + SafeMathCaller // Read-only binding to the contract + SafeMathTransactor // Write-only binding to the contract + SafeMathFilterer // Log filterer for contract events +} + +// SafeMathCaller is an auto generated read-only Go binding around an Ethereum contract. +type SafeMathCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// SafeMathTransactor is an auto generated write-only Go binding around an Ethereum contract. +type SafeMathTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// SafeMathFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type SafeMathFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// SafeMathSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type SafeMathSession struct { + Contract *SafeMath // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// SafeMathCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type SafeMathCallerSession struct { + Contract *SafeMathCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// SafeMathTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type SafeMathTransactorSession struct { + Contract *SafeMathTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// SafeMathRaw is an auto generated low-level Go binding around an Ethereum contract. +type SafeMathRaw struct { + Contract *SafeMath // Generic contract binding to access the raw methods on +} + +// SafeMathCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type SafeMathCallerRaw struct { + Contract *SafeMathCaller // Generic read-only contract binding to access the raw methods on +} + +// SafeMathTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type SafeMathTransactorRaw struct { + Contract *SafeMathTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewSafeMath creates a new instance of SafeMath, bound to a specific deployed contract. +func NewSafeMath(address common.Address, backend bind.ContractBackend) (*SafeMath, error) { + contract, err := bindSafeMath(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &SafeMath{SafeMathCaller: SafeMathCaller{contract: contract}, SafeMathTransactor: SafeMathTransactor{contract: contract}, SafeMathFilterer: SafeMathFilterer{contract: contract}}, nil +} + +// NewSafeMathCaller creates a new read-only instance of SafeMath, bound to a specific deployed contract. +func NewSafeMathCaller(address common.Address, caller bind.ContractCaller) (*SafeMathCaller, error) { + contract, err := bindSafeMath(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &SafeMathCaller{contract: contract}, nil +} + +// NewSafeMathTransactor creates a new write-only instance of SafeMath, bound to a specific deployed contract. +func NewSafeMathTransactor(address common.Address, transactor bind.ContractTransactor) (*SafeMathTransactor, error) { + contract, err := bindSafeMath(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &SafeMathTransactor{contract: contract}, nil +} + +// NewSafeMathFilterer creates a new log filterer instance of SafeMath, bound to a specific deployed contract. +func NewSafeMathFilterer(address common.Address, filterer bind.ContractFilterer) (*SafeMathFilterer, error) { + contract, err := bindSafeMath(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &SafeMathFilterer{contract: contract}, nil +} + +// bindSafeMath binds a generic wrapper to an already deployed contract. +func bindSafeMath(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := abi.JSON(strings.NewReader(SafeMathABI)) + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_SafeMath *SafeMathRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { + return _SafeMath.Contract.SafeMathCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_SafeMath *SafeMathRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _SafeMath.Contract.SafeMathTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_SafeMath *SafeMathRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _SafeMath.Contract.SafeMathTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_SafeMath *SafeMathCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { + return _SafeMath.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_SafeMath *SafeMathTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _SafeMath.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_SafeMath *SafeMathTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _SafeMath.Contract.contract.Transact(opts, method, params...) +} + +// UtilsABI is the input ABI used to generate the binding from. +const UtilsABI = "[]" + +// UtilsBin is the compiled bytecode used for deploying new contracts. +var UtilsBin = "0x60566023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220882fbcdd16a9cfaee97255458a1f2656d192d7c4712ecb272d06d20e341ca9b864736f6c634300060c0033" + +// DeployUtils deploys a new Ethereum contract, binding an instance of Utils to it. +func DeployUtils(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *Utils, error) { + parsed, err := abi.JSON(strings.NewReader(UtilsABI)) + if err != nil { + return common.Address{}, nil, nil, err + } + + address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(UtilsBin), backend) + if err != nil { + return common.Address{}, nil, nil, err + } + return address, tx, &Utils{UtilsCaller: UtilsCaller{contract: contract}, UtilsTransactor: UtilsTransactor{contract: contract}, UtilsFilterer: UtilsFilterer{contract: contract}}, nil +} + +// Utils is an auto generated Go binding around an Ethereum contract. +type Utils struct { + UtilsCaller // Read-only binding to the contract + UtilsTransactor // Write-only binding to the contract + UtilsFilterer // Log filterer for contract events +} + +// UtilsCaller is an auto generated read-only Go binding around an Ethereum contract. +type UtilsCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// UtilsTransactor is an auto generated write-only Go binding around an Ethereum contract. +type UtilsTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// UtilsFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type UtilsFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// UtilsSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type UtilsSession struct { + Contract *Utils // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// UtilsCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type UtilsCallerSession struct { + Contract *UtilsCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// UtilsTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type UtilsTransactorSession struct { + Contract *UtilsTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// UtilsRaw is an auto generated low-level Go binding around an Ethereum contract. +type UtilsRaw struct { + Contract *Utils // Generic contract binding to access the raw methods on +} + +// UtilsCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type UtilsCallerRaw struct { + Contract *UtilsCaller // Generic read-only contract binding to access the raw methods on +} + +// UtilsTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type UtilsTransactorRaw struct { + Contract *UtilsTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewUtils creates a new instance of Utils, bound to a specific deployed contract. +func NewUtils(address common.Address, backend bind.ContractBackend) (*Utils, error) { + contract, err := bindUtils(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &Utils{UtilsCaller: UtilsCaller{contract: contract}, UtilsTransactor: UtilsTransactor{contract: contract}, UtilsFilterer: UtilsFilterer{contract: contract}}, nil +} + +// NewUtilsCaller creates a new read-only instance of Utils, bound to a specific deployed contract. +func NewUtilsCaller(address common.Address, caller bind.ContractCaller) (*UtilsCaller, error) { + contract, err := bindUtils(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &UtilsCaller{contract: contract}, nil +} + +// NewUtilsTransactor creates a new write-only instance of Utils, bound to a specific deployed contract. +func NewUtilsTransactor(address common.Address, transactor bind.ContractTransactor) (*UtilsTransactor, error) { + contract, err := bindUtils(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &UtilsTransactor{contract: contract}, nil +} + +// NewUtilsFilterer creates a new log filterer instance of Utils, bound to a specific deployed contract. +func NewUtilsFilterer(address common.Address, filterer bind.ContractFilterer) (*UtilsFilterer, error) { + contract, err := bindUtils(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &UtilsFilterer{contract: contract}, nil +} + +// bindUtils binds a generic wrapper to an already deployed contract. +func bindUtils(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := abi.JSON(strings.NewReader(UtilsABI)) + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_Utils *UtilsRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { + return _Utils.Contract.UtilsCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_Utils *UtilsRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Utils.Contract.UtilsTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_Utils *UtilsRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _Utils.Contract.UtilsTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_Utils *UtilsCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { + return _Utils.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_Utils *UtilsTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Utils.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_Utils *UtilsTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _Utils.Contract.contract.Transact(opts, method, params...) +} + +// ZeroCopySinkABI is the input ABI used to generate the binding from. +const ZeroCopySinkABI = "[]" + +// ZeroCopySinkBin is the compiled bytecode used for deploying new contracts. +var ZeroCopySinkBin = "0x60566023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea264697066735822122026bdda92ae017624ff3ee7b8c4dc19ff53c1a2bfd713ac2b62dc134e1e780b8864736f6c634300060c0033" + +// DeployZeroCopySink deploys a new Ethereum contract, binding an instance of ZeroCopySink to it. +func DeployZeroCopySink(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *ZeroCopySink, error) { + parsed, err := abi.JSON(strings.NewReader(ZeroCopySinkABI)) + if err != nil { + return common.Address{}, nil, nil, err + } + + address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(ZeroCopySinkBin), backend) + if err != nil { + return common.Address{}, nil, nil, err + } + return address, tx, &ZeroCopySink{ZeroCopySinkCaller: ZeroCopySinkCaller{contract: contract}, ZeroCopySinkTransactor: ZeroCopySinkTransactor{contract: contract}, ZeroCopySinkFilterer: ZeroCopySinkFilterer{contract: contract}}, nil +} + +// ZeroCopySink is an auto generated Go binding around an Ethereum contract. +type ZeroCopySink struct { + ZeroCopySinkCaller // Read-only binding to the contract + ZeroCopySinkTransactor // Write-only binding to the contract + ZeroCopySinkFilterer // Log filterer for contract events +} + +// ZeroCopySinkCaller is an auto generated read-only Go binding around an Ethereum contract. +type ZeroCopySinkCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// ZeroCopySinkTransactor is an auto generated write-only Go binding around an Ethereum contract. +type ZeroCopySinkTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// ZeroCopySinkFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type ZeroCopySinkFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// ZeroCopySinkSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type ZeroCopySinkSession struct { + Contract *ZeroCopySink // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// ZeroCopySinkCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type ZeroCopySinkCallerSession struct { + Contract *ZeroCopySinkCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// ZeroCopySinkTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type ZeroCopySinkTransactorSession struct { + Contract *ZeroCopySinkTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// ZeroCopySinkRaw is an auto generated low-level Go binding around an Ethereum contract. +type ZeroCopySinkRaw struct { + Contract *ZeroCopySink // Generic contract binding to access the raw methods on +} + +// ZeroCopySinkCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type ZeroCopySinkCallerRaw struct { + Contract *ZeroCopySinkCaller // Generic read-only contract binding to access the raw methods on +} + +// ZeroCopySinkTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type ZeroCopySinkTransactorRaw struct { + Contract *ZeroCopySinkTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewZeroCopySink creates a new instance of ZeroCopySink, bound to a specific deployed contract. +func NewZeroCopySink(address common.Address, backend bind.ContractBackend) (*ZeroCopySink, error) { + contract, err := bindZeroCopySink(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &ZeroCopySink{ZeroCopySinkCaller: ZeroCopySinkCaller{contract: contract}, ZeroCopySinkTransactor: ZeroCopySinkTransactor{contract: contract}, ZeroCopySinkFilterer: ZeroCopySinkFilterer{contract: contract}}, nil +} + +// NewZeroCopySinkCaller creates a new read-only instance of ZeroCopySink, bound to a specific deployed contract. +func NewZeroCopySinkCaller(address common.Address, caller bind.ContractCaller) (*ZeroCopySinkCaller, error) { + contract, err := bindZeroCopySink(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &ZeroCopySinkCaller{contract: contract}, nil +} + +// NewZeroCopySinkTransactor creates a new write-only instance of ZeroCopySink, bound to a specific deployed contract. +func NewZeroCopySinkTransactor(address common.Address, transactor bind.ContractTransactor) (*ZeroCopySinkTransactor, error) { + contract, err := bindZeroCopySink(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &ZeroCopySinkTransactor{contract: contract}, nil +} + +// NewZeroCopySinkFilterer creates a new log filterer instance of ZeroCopySink, bound to a specific deployed contract. +func NewZeroCopySinkFilterer(address common.Address, filterer bind.ContractFilterer) (*ZeroCopySinkFilterer, error) { + contract, err := bindZeroCopySink(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &ZeroCopySinkFilterer{contract: contract}, nil +} + +// bindZeroCopySink binds a generic wrapper to an already deployed contract. +func bindZeroCopySink(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := abi.JSON(strings.NewReader(ZeroCopySinkABI)) + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_ZeroCopySink *ZeroCopySinkRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { + return _ZeroCopySink.Contract.ZeroCopySinkCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_ZeroCopySink *ZeroCopySinkRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _ZeroCopySink.Contract.ZeroCopySinkTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_ZeroCopySink *ZeroCopySinkRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _ZeroCopySink.Contract.ZeroCopySinkTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_ZeroCopySink *ZeroCopySinkCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { + return _ZeroCopySink.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_ZeroCopySink *ZeroCopySinkTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _ZeroCopySink.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_ZeroCopySink *ZeroCopySinkTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _ZeroCopySink.Contract.contract.Transact(opts, method, params...) +} + +// ZeroCopySourceABI is the input ABI used to generate the binding from. +const ZeroCopySourceABI = "[]" + +// ZeroCopySourceBin is the compiled bytecode used for deploying new contracts. +var ZeroCopySourceBin = "0x60566023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212206a1d506f4b4f37c863ede647b65c26cd9cfeaa18cd096d00da68d8f25970d60764736f6c634300060c0033" + +// DeployZeroCopySource deploys a new Ethereum contract, binding an instance of ZeroCopySource to it. +func DeployZeroCopySource(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *ZeroCopySource, error) { + parsed, err := abi.JSON(strings.NewReader(ZeroCopySourceABI)) + if err != nil { + return common.Address{}, nil, nil, err + } + + address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(ZeroCopySourceBin), backend) + if err != nil { + return common.Address{}, nil, nil, err + } + return address, tx, &ZeroCopySource{ZeroCopySourceCaller: ZeroCopySourceCaller{contract: contract}, ZeroCopySourceTransactor: ZeroCopySourceTransactor{contract: contract}, ZeroCopySourceFilterer: ZeroCopySourceFilterer{contract: contract}}, nil +} + +// ZeroCopySource is an auto generated Go binding around an Ethereum contract. +type ZeroCopySource struct { + ZeroCopySourceCaller // Read-only binding to the contract + ZeroCopySourceTransactor // Write-only binding to the contract + ZeroCopySourceFilterer // Log filterer for contract events +} + +// ZeroCopySourceCaller is an auto generated read-only Go binding around an Ethereum contract. +type ZeroCopySourceCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// ZeroCopySourceTransactor is an auto generated write-only Go binding around an Ethereum contract. +type ZeroCopySourceTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// ZeroCopySourceFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type ZeroCopySourceFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// ZeroCopySourceSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type ZeroCopySourceSession struct { + Contract *ZeroCopySource // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// ZeroCopySourceCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type ZeroCopySourceCallerSession struct { + Contract *ZeroCopySourceCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// ZeroCopySourceTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type ZeroCopySourceTransactorSession struct { + Contract *ZeroCopySourceTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// ZeroCopySourceRaw is an auto generated low-level Go binding around an Ethereum contract. +type ZeroCopySourceRaw struct { + Contract *ZeroCopySource // Generic contract binding to access the raw methods on +} + +// ZeroCopySourceCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type ZeroCopySourceCallerRaw struct { + Contract *ZeroCopySourceCaller // Generic read-only contract binding to access the raw methods on +} + +// ZeroCopySourceTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type ZeroCopySourceTransactorRaw struct { + Contract *ZeroCopySourceTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewZeroCopySource creates a new instance of ZeroCopySource, bound to a specific deployed contract. +func NewZeroCopySource(address common.Address, backend bind.ContractBackend) (*ZeroCopySource, error) { + contract, err := bindZeroCopySource(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &ZeroCopySource{ZeroCopySourceCaller: ZeroCopySourceCaller{contract: contract}, ZeroCopySourceTransactor: ZeroCopySourceTransactor{contract: contract}, ZeroCopySourceFilterer: ZeroCopySourceFilterer{contract: contract}}, nil +} + +// NewZeroCopySourceCaller creates a new read-only instance of ZeroCopySource, bound to a specific deployed contract. +func NewZeroCopySourceCaller(address common.Address, caller bind.ContractCaller) (*ZeroCopySourceCaller, error) { + contract, err := bindZeroCopySource(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &ZeroCopySourceCaller{contract: contract}, nil +} + +// NewZeroCopySourceTransactor creates a new write-only instance of ZeroCopySource, bound to a specific deployed contract. +func NewZeroCopySourceTransactor(address common.Address, transactor bind.ContractTransactor) (*ZeroCopySourceTransactor, error) { + contract, err := bindZeroCopySource(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &ZeroCopySourceTransactor{contract: contract}, nil +} + +// NewZeroCopySourceFilterer creates a new log filterer instance of ZeroCopySource, bound to a specific deployed contract. +func NewZeroCopySourceFilterer(address common.Address, filterer bind.ContractFilterer) (*ZeroCopySourceFilterer, error) { + contract, err := bindZeroCopySource(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &ZeroCopySourceFilterer{contract: contract}, nil +} + +// bindZeroCopySource binds a generic wrapper to an already deployed contract. +func bindZeroCopySource(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := abi.JSON(strings.NewReader(ZeroCopySourceABI)) + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_ZeroCopySource *ZeroCopySourceRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { + return _ZeroCopySource.Contract.ZeroCopySourceCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_ZeroCopySource *ZeroCopySourceRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _ZeroCopySource.Contract.ZeroCopySourceTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_ZeroCopySource *ZeroCopySourceRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _ZeroCopySource.Contract.ZeroCopySourceTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_ZeroCopySource *ZeroCopySourceCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { + return _ZeroCopySource.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_ZeroCopySource *ZeroCopySourceTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _ZeroCopySource.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_ZeroCopySource *ZeroCopySourceTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _ZeroCopySource.Contract.contract.Transact(opts, method, params...) +} diff --git a/go_abi/nftmapping_abi/nftmapping_abi_abi.go b/go_abi/nftmapping_abi/nftmapping_abi_abi.go new file mode 100644 index 0000000..f5b4ebc --- /dev/null +++ b/go_abi/nftmapping_abi/nftmapping_abi_abi.go @@ -0,0 +1,6446 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package nftmapping_abi + +import ( + "math/big" + "strings" + + ethereum "github.com/ethereum/go-ethereum" + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/event" +) + +// Reference imports to suppress errors if they are not otherwise used. +var ( + _ = big.NewInt + _ = strings.NewReader + _ = ethereum.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription +) + +// AddressABI is the input ABI used to generate the binding from. +const AddressABI = "[]" + +// AddressBin is the compiled bytecode used for deploying new contracts. +var AddressBin = "0x60566023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220dc27caae7886715053b24e3f988fd3a3f2de72d492ab9b2ec3cbbf0c3236957664736f6c634300060c0033" + +// DeployAddress deploys a new Ethereum contract, binding an instance of Address to it. +func DeployAddress(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *Address, error) { + parsed, err := abi.JSON(strings.NewReader(AddressABI)) + if err != nil { + return common.Address{}, nil, nil, err + } + + address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(AddressBin), backend) + if err != nil { + return common.Address{}, nil, nil, err + } + return address, tx, &Address{AddressCaller: AddressCaller{contract: contract}, AddressTransactor: AddressTransactor{contract: contract}, AddressFilterer: AddressFilterer{contract: contract}}, nil +} + +// Address is an auto generated Go binding around an Ethereum contract. +type Address struct { + AddressCaller // Read-only binding to the contract + AddressTransactor // Write-only binding to the contract + AddressFilterer // Log filterer for contract events +} + +// AddressCaller is an auto generated read-only Go binding around an Ethereum contract. +type AddressCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// AddressTransactor is an auto generated write-only Go binding around an Ethereum contract. +type AddressTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// AddressFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type AddressFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// AddressSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type AddressSession struct { + Contract *Address // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// AddressCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type AddressCallerSession struct { + Contract *AddressCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// AddressTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type AddressTransactorSession struct { + Contract *AddressTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// AddressRaw is an auto generated low-level Go binding around an Ethereum contract. +type AddressRaw struct { + Contract *Address // Generic contract binding to access the raw methods on +} + +// AddressCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type AddressCallerRaw struct { + Contract *AddressCaller // Generic read-only contract binding to access the raw methods on +} + +// AddressTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type AddressTransactorRaw struct { + Contract *AddressTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewAddress creates a new instance of Address, bound to a specific deployed contract. +func NewAddress(address common.Address, backend bind.ContractBackend) (*Address, error) { + contract, err := bindAddress(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &Address{AddressCaller: AddressCaller{contract: contract}, AddressTransactor: AddressTransactor{contract: contract}, AddressFilterer: AddressFilterer{contract: contract}}, nil +} + +// NewAddressCaller creates a new read-only instance of Address, bound to a specific deployed contract. +func NewAddressCaller(address common.Address, caller bind.ContractCaller) (*AddressCaller, error) { + contract, err := bindAddress(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &AddressCaller{contract: contract}, nil +} + +// NewAddressTransactor creates a new write-only instance of Address, bound to a specific deployed contract. +func NewAddressTransactor(address common.Address, transactor bind.ContractTransactor) (*AddressTransactor, error) { + contract, err := bindAddress(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &AddressTransactor{contract: contract}, nil +} + +// NewAddressFilterer creates a new log filterer instance of Address, bound to a specific deployed contract. +func NewAddressFilterer(address common.Address, filterer bind.ContractFilterer) (*AddressFilterer, error) { + contract, err := bindAddress(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &AddressFilterer{contract: contract}, nil +} + +// bindAddress binds a generic wrapper to an already deployed contract. +func bindAddress(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := abi.JSON(strings.NewReader(AddressABI)) + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_Address *AddressRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { + return _Address.Contract.AddressCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_Address *AddressRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Address.Contract.AddressTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_Address *AddressRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _Address.Contract.AddressTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_Address *AddressCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { + return _Address.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_Address *AddressTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Address.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_Address *AddressTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _Address.Contract.contract.Transact(opts, method, params...) +} + +// ContextABI is the input ABI used to generate the binding from. +const ContextABI = "[]" + +// Context is an auto generated Go binding around an Ethereum contract. +type Context struct { + ContextCaller // Read-only binding to the contract + ContextTransactor // Write-only binding to the contract + ContextFilterer // Log filterer for contract events +} + +// ContextCaller is an auto generated read-only Go binding around an Ethereum contract. +type ContextCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// ContextTransactor is an auto generated write-only Go binding around an Ethereum contract. +type ContextTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// ContextFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type ContextFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// ContextSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type ContextSession struct { + Contract *Context // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// ContextCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type ContextCallerSession struct { + Contract *ContextCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// ContextTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type ContextTransactorSession struct { + Contract *ContextTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// ContextRaw is an auto generated low-level Go binding around an Ethereum contract. +type ContextRaw struct { + Contract *Context // Generic contract binding to access the raw methods on +} + +// ContextCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type ContextCallerRaw struct { + Contract *ContextCaller // Generic read-only contract binding to access the raw methods on +} + +// ContextTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type ContextTransactorRaw struct { + Contract *ContextTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewContext creates a new instance of Context, bound to a specific deployed contract. +func NewContext(address common.Address, backend bind.ContractBackend) (*Context, error) { + contract, err := bindContext(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &Context{ContextCaller: ContextCaller{contract: contract}, ContextTransactor: ContextTransactor{contract: contract}, ContextFilterer: ContextFilterer{contract: contract}}, nil +} + +// NewContextCaller creates a new read-only instance of Context, bound to a specific deployed contract. +func NewContextCaller(address common.Address, caller bind.ContractCaller) (*ContextCaller, error) { + contract, err := bindContext(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &ContextCaller{contract: contract}, nil +} + +// NewContextTransactor creates a new write-only instance of Context, bound to a specific deployed contract. +func NewContextTransactor(address common.Address, transactor bind.ContractTransactor) (*ContextTransactor, error) { + contract, err := bindContext(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &ContextTransactor{contract: contract}, nil +} + +// NewContextFilterer creates a new log filterer instance of Context, bound to a specific deployed contract. +func NewContextFilterer(address common.Address, filterer bind.ContractFilterer) (*ContextFilterer, error) { + contract, err := bindContext(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &ContextFilterer{contract: contract}, nil +} + +// bindContext binds a generic wrapper to an already deployed contract. +func bindContext(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := abi.JSON(strings.NewReader(ContextABI)) + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_Context *ContextRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { + return _Context.Contract.ContextCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_Context *ContextRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Context.Contract.ContextTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_Context *ContextRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _Context.Contract.ContextTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_Context *ContextCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { + return _Context.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_Context *ContextTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Context.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_Context *ContextTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _Context.Contract.contract.Transact(opts, method, params...) +} + +// CrossChainNFTMappingABI is the input ABI used to generate the binding from. +const CrossChainNFTMappingABI = "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_lpAddr\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"symbol\",\"type\":\"string\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"approved\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"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\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"baseURI\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"getApproved\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"isApprovedForAll\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"uri\",\"type\":\"string\"}],\"name\":\"mintWithURI\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"ownerOf\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"safeTransferFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"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\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"tokenByIndex\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"tokenOfOwnerByIndex\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"tokenURI\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]" + +// CrossChainNFTMappingFuncSigs maps the 4-byte function signature to its string representation. +var CrossChainNFTMappingFuncSigs = map[string]string{ + "095ea7b3": "approve(address,uint256)", + "70a08231": "balanceOf(address)", + "6c0360eb": "baseURI()", + "081812fc": "getApproved(uint256)", + "e985e9c5": "isApprovedForAll(address,address)", + "4a99950b": "mintWithURI(address,uint256,string)", + "06fdde03": "name()", + "6352211e": "ownerOf(uint256)", + "42842e0e": "safeTransferFrom(address,address,uint256)", + "b88d4fde": "safeTransferFrom(address,address,uint256,bytes)", + "a22cb465": "setApprovalForAll(address,bool)", + "01ffc9a7": "supportsInterface(bytes4)", + "95d89b41": "symbol()", + "4f6ccce7": "tokenByIndex(uint256)", + "2f745c59": "tokenOfOwnerByIndex(address,uint256)", + "c87b56dd": "tokenURI(uint256)", + "18160ddd": "totalSupply()", + "23b872dd": "transferFrom(address,address,uint256)", +} + +// CrossChainNFTMappingBin is the compiled bytecode used for deploying new contracts. +var CrossChainNFTMappingBin = "0x60806040523480156200001157600080fd5b50604051620021c7380380620021c7833981810160405260608110156200003757600080fd5b8151602083018051604051929492938301929190846401000000008211156200005f57600080fd5b9083019060208201858111156200007557600080fd5b82516401000000008111828201881017156200009057600080fd5b82525081516020918201929091019080838360005b83811015620000bf578181015183820152602001620000a5565b50505050905090810190601f168015620000ed5780820380516001836020036101000a031916815260200191505b50604052602001805160405193929190846401000000008211156200011157600080fd5b9083019060208201858111156200012757600080fd5b82516401000000008111828201881017156200014257600080fd5b82525081516020918201929091019080838360005b838110156200017157818101518382015260200162000157565b50505050905090810190601f1680156200019f5780820380516001836020036101000a031916815260200191505b5060405250839150829050620001bc6301ffc9a760e01b620002a4565b8151620001d19060069060208501906200032f565b508051620001e79060079060208401906200032f565b50620001fa6380ac58cd60e01b620002a4565b6200020c635b5e139f60e01b620002a4565b6200021e63780e9d6360e01b620002a4565b50506200023f836001600160a01b03166200032960201b62000e3b1760201c565b6200027c5760405162461bcd60e51b8152600401808060200182810382526023815260200180620021a46023913960400191505060405180910390fd5b5050600a80546001600160a01b0319166001600160a01b0392909216919091179055620003cb565b6001600160e01b0319808216141562000304576040805162461bcd60e51b815260206004820152601c60248201527f4552433136353a20696e76616c696420696e7465726661636520696400000000604482015290519081900360640190fd5b6001600160e01b0319166000908152602081905260409020805460ff19166001179055565b3b151590565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106200037257805160ff1916838001178555620003a2565b82800160010185558215620003a2579182015b82811115620003a257825182559160200191906001019062000385565b50620003b0929150620003b4565b5090565b5b80821115620003b05760008155600101620003b5565b611dc980620003db6000396000f3fe608060405234801561001057600080fd5b50600436106101165760003560e01c80634f6ccce7116100a257806395d89b411161007157806395d89b411461040f578063a22cb46514610417578063b88d4fde14610445578063c87b56dd1461050b578063e985e9c51461052857610116565b80634f6ccce7146103a75780636352211e146103c45780636c0360eb146103e157806370a08231146103e957610116565b806318160ddd116100e957806318160ddd1461023a57806323b872dd146102545780632f745c591461028a57806342842e0e146102b65780634a99950b146102ec57610116565b806301ffc9a71461011b57806306fdde0314610156578063081812fc146101d3578063095ea7b31461020c575b600080fd5b6101426004803603602081101561013157600080fd5b50356001600160e01b031916610556565b604080519115158252519081900360200190f35b61015e610579565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610198578181015183820152602001610180565b50505050905090810190601f1680156101c55780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101f0600480360360208110156101e957600080fd5b503561060f565b604080516001600160a01b039092168252519081900360200190f35b6102386004803603604081101561022257600080fd5b506001600160a01b038135169060200135610671565b005b61024261074c565b60408051918252519081900360200190f35b6102386004803603606081101561026a57600080fd5b506001600160a01b0381358116916020810135909116906040013561075d565b610242600480360360408110156102a057600080fd5b506001600160a01b0381351690602001356107b4565b610238600480360360608110156102cc57600080fd5b506001600160a01b038135811691602081013590911690604001356107df565b6102386004803603606081101561030257600080fd5b6001600160a01b038235169160208101359181019060608101604082013564010000000081111561033257600080fd5b82018360208201111561034457600080fd5b8035906020019184600183028401116401000000008311171561036657600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506107fa945050505050565b610242600480360360208110156103bd57600080fd5b503561089b565b6101f0600480360360208110156103da57600080fd5b50356108b1565b61015e6108d9565b610242600480360360208110156103ff57600080fd5b50356001600160a01b031661093a565b61015e6109a2565b6102386004803603604081101561042d57600080fd5b506001600160a01b0381351690602001351515610a03565b6102386004803603608081101561045b57600080fd5b6001600160a01b0382358116926020810135909116916040820135919081019060808101606082013564010000000081111561049657600080fd5b8201836020820111156104a857600080fd5b803590602001918460018302840111640100000000831117156104ca57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610b08945050505050565b61015e6004803603602081101561052157600080fd5b5035610b66565b6101426004803603604081101561053e57600080fd5b506001600160a01b0381358116916020013516610e0d565b6001600160e01b0319811660009081526020819052604090205460ff165b919050565b60068054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156106055780601f106105da57610100808354040283529160200191610605565b820191906000526020600020905b8154815290600101906020018083116105e857829003601f168201915b5050505050905090565b600061061a82610e41565b6106555760405162461bcd60e51b815260040180806020018281038252602c815260200180611c92602c913960400191505060405180910390fd5b506000908152600460205260409020546001600160a01b031690565b600061067c826108b1565b9050806001600160a01b0316836001600160a01b031614156106cf5760405162461bcd60e51b8152600401808060200182810382526021815260200180611d426021913960400191505060405180910390fd5b806001600160a01b03166106e1610e4e565b6001600160a01b031614806107025750610702816106fd610e4e565b610e0d565b61073d5760405162461bcd60e51b8152600401808060200182810382526038815260200180611be56038913960400191505060405180910390fd5b6107478383610e52565b505050565b60006107586002610ec0565b905090565b61076e610768610e4e565b82610ecb565b6107a95760405162461bcd60e51b8152600401808060200182810382526031815260200180611d636031913960400191505060405180910390fd5b610747838383610f6f565b6001600160a01b03821660009081526001602052604081206107d690836110bb565b90505b92915050565b61074783838360405180602001604052806000815250610b08565b600a546001600160a01b03163314610833576040805162461bcd60e51b8152602060048201526000602482015290519081900360640190fd5b61083c82610e41565b15610887576040805162461bcd60e51b81526020600482015260166024820152751d1bdad95b881a5908185b1c9958591e48195e1a5cdd60521b604482015290519081900360640190fd5b61089183836110c7565b61074782826110e5565b6000806108a9600284611148565b509392505050565b60006107d982604051806060016040528060298152602001611c476029913960029190611164565b60098054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156106055780601f106105da57610100808354040283529160200191610605565b60006001600160a01b0382166109815760405162461bcd60e51b815260040180806020018281038252602a815260200180611c1d602a913960400191505060405180910390fd5b6001600160a01b03821660009081526001602052604090206107d990610ec0565b60078054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156106055780601f106105da57610100808354040283529160200191610605565b610a0b610e4e565b6001600160a01b0316826001600160a01b03161415610a71576040805162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c657200000000000000604482015290519081900360640190fd5b8060056000610a7e610e4e565b6001600160a01b03908116825260208083019390935260409182016000908120918716808252919093529120805460ff191692151592909217909155610ac2610e4e565b6001600160a01b03167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c318360405180821515815260200191505060405180910390a35050565b610b19610b13610e4e565b83610ecb565b610b545760405162461bcd60e51b8152600401808060200182810382526031815260200180611d636031913960400191505060405180910390fd5b610b608484848461117b565b50505050565b6060610b7182610e41565b610bac5760405162461bcd60e51b815260040180806020018281038252602f815260200180611d13602f913960400191505060405180910390fd5b60008281526008602090815260409182902080548351601f6002600019610100600186161502019093169290920491820184900484028101840190945280845260609392830182828015610c415780601f10610c1657610100808354040283529160200191610c41565b820191906000526020600020905b815481529060010190602001808311610c2457829003601f168201915b505060095493945050505060026000196101006001841615020190911604610c6a579050610574565b805115610d3b576009816040516020018083805460018160011615610100020316600290048015610cd25780601f10610cb0576101008083540402835291820191610cd2565b820191906000526020600020905b815481529060010190602001808311610cbe575b5050825160208401908083835b60208310610cfe5780518252601f199092019160209182019101610cdf565b6001836020036101000a03801982511681845116808217855250505050505090500192505050604051602081830303815290604052915050610574565b6009610d46846111cd565b6040516020018083805460018160011615610100020316600290048015610da45780601f10610d82576101008083540402835291820191610da4565b820191906000526020600020905b815481529060010190602001808311610d90575b5050825160208401908083835b60208310610dd05780518252601f199092019160209182019101610db1565b6001836020036101000a03801982511681845116808217855250505050505090500192505050604051602081830303815290604052915050919050565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b3b151590565b60006107d96002836112a8565b3390565b600081815260046020526040902080546001600160a01b0319166001600160a01b0384169081179091558190610e87826108b1565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b60006107d9826112b4565b6000610ed682610e41565b610f115760405162461bcd60e51b815260040180806020018281038252602c815260200180611bb9602c913960400191505060405180910390fd5b6000610f1c836108b1565b9050806001600160a01b0316846001600160a01b03161480610f575750836001600160a01b0316610f4c8461060f565b6001600160a01b0316145b80610f675750610f678185610e0d565b949350505050565b826001600160a01b0316610f82826108b1565b6001600160a01b031614610fc75760405162461bcd60e51b8152600401808060200182810382526029815260200180611cea6029913960400191505060405180910390fd5b6001600160a01b03821661100c5760405162461bcd60e51b8152600401808060200182810382526024815260200180611b956024913960400191505060405180910390fd5b611017838383610747565b611022600082610e52565b6001600160a01b038316600090815260016020526040902061104490826112b8565b506001600160a01b038216600090815260016020526040902061106790826112c4565b50611074600282846112d0565b5080826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050565b60006107d683836112e6565b6110e182826040518060200160405280600081525061134a565b5050565b6110ee82610e41565b6111295760405162461bcd60e51b815260040180806020018281038252602c815260200180611cbe602c913960400191505060405180910390fd5b6000828152600860209081526040909120825161074792840190611aad565b6000808080611157868661139c565b9097909650945050505050565b6000611171848484611417565b90505b9392505050565b611186848484610f6f565b611192848484846114e1565b610b605760405162461bcd60e51b8152600401808060200182810382526032815260200180611b636032913960400191505060405180910390fd5b6060816111f257506040805180820190915260018152600360fc1b6020820152610574565b8160005b811561120a57600101600a820491506111f6565b60608167ffffffffffffffff8111801561122357600080fd5b506040519080825280601f01601f19166020018201604052801561124e576020820181803683370190505b50859350905060001982015b831561129f57600a840660300160f81b8282806001900393508151811061127d57fe5b60200101906001600160f81b031916908160001a905350600a8404935061125a565b50949350505050565b60006107d68383611649565b5490565b60006107d68383611661565b60006107d68383611727565b600061117184846001600160a01b038516611771565b815460009082106113285760405162461bcd60e51b8152600401808060200182810382526022815260200180611b416022913960400191505060405180910390fd5b82600001828154811061133757fe5b9060005260206000200154905092915050565b6113548383611808565b61136160008484846114e1565b6107475760405162461bcd60e51b8152600401808060200182810382526032815260200180611b636032913960400191505060405180910390fd5b8154600090819083106113e05760405162461bcd60e51b8152600401808060200182810382526022815260200180611c706022913960400191505060405180910390fd5b60008460000184815481106113f157fe5b906000526020600020906002020190508060000154816001015492509250509250929050565b600082815260018401602052604081205482816114b25760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561147757818101518382015260200161145f565b50505050905090810190601f1680156114a45780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b508460000160018203815481106114c557fe5b9060005260206000209060020201600101549150509392505050565b60006114f5846001600160a01b0316610e3b565b61150157506001610f67565b606061160f630a85bd0160e11b611516610e4e565b88878760405160240180856001600160a01b03168152602001846001600160a01b0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561157d578181015183820152602001611565565b50505050905090810190601f1680156115aa5780820380516001836020036101000a031916815260200191505b5095505050505050604051602081830303815290604052906001600160e01b0319166020820180516001600160e01b038381831617835250505050604051806060016040528060328152602001611b63603291396001600160a01b0388169190611936565b9050600081806020019051602081101561162857600080fd5b50516001600160e01b031916630a85bd0160e11b1492505050949350505050565b60009081526001919091016020526040902054151590565b6000818152600183016020526040812054801561171d578354600019808301919081019060009087908390811061169457fe5b90600052602060002001549050808760000184815481106116b157fe5b6000918252602080832090910192909255828152600189810190925260409020908401905586548790806116e157fe5b600190038181906000526020600020016000905590558660010160008781526020019081526020016000206000905560019450505050506107d9565b60009150506107d9565b60006117338383611649565b611769575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556107d9565b5060006107d9565b6000828152600184016020526040812054806117d6575050604080518082018252838152602080820184815286546001818101895560008981528481209551600290930290950191825591519082015586548684528188019092529290912055611174565b828560000160018303815481106117e957fe5b9060005260206000209060020201600101819055506000915050611174565b6001600160a01b038216611863576040805162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604482015290519081900360640190fd5b61186c81610e41565b156118be576040805162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604482015290519081900360640190fd5b6118ca60008383610747565b6001600160a01b03821660009081526001602052604090206118ec90826112c4565b506118f9600282846112d0565b5060405181906001600160a01b038416906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b60606111718484600085606061194b85610e3b565b61199c576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b602083106119db5780518252601f1990920191602091820191016119bc565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114611a3d576040519150601f19603f3d011682016040523d82523d6000602084013e611a42565b606091505b50915091508115611a56579150610f679050565b805115611a665780518082602001fd5b60405162461bcd60e51b815260206004820181815286516024840152865187939192839260440191908501908083836000831561147757818101518382015260200161145f565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10611aee57805160ff1916838001178555611b1b565b82800160010185558215611b1b579182015b82811115611b1b578251825591602001919060010190611b00565b50611b27929150611b2b565b5090565b5b80821115611b275760008155600101611b2c56fe456e756d657261626c655365743a20696e646578206f7574206f6620626f756e64734552433732313a207472616e7366657220746f206e6f6e20455243373231526563656976657220696d706c656d656e7465724552433732313a207472616e7366657220746f20746865207a65726f20616464726573734552433732313a206f70657261746f7220717565727920666f72206e6f6e6578697374656e7420746f6b656e4552433732313a20617070726f76652063616c6c6572206973206e6f74206f776e6572206e6f7220617070726f76656420666f7220616c6c4552433732313a2062616c616e636520717565727920666f7220746865207a65726f20616464726573734552433732313a206f776e657220717565727920666f72206e6f6e6578697374656e7420746f6b656e456e756d657261626c654d61703a20696e646578206f7574206f6620626f756e64734552433732313a20617070726f76656420717565727920666f72206e6f6e6578697374656e7420746f6b656e4552433732314d657461646174613a2055524920736574206f66206e6f6e6578697374656e7420746f6b656e4552433732313a207472616e73666572206f6620746f6b656e2074686174206973206e6f74206f776e4552433732314d657461646174613a2055524920717565727920666f72206e6f6e6578697374656e7420746f6b656e4552433732313a20617070726f76616c20746f2063757272656e74206f776e65724552433732313a207472616e736665722063616c6c6572206973206e6f74206f776e6572206e6f7220617070726f766564a2646970667358221220c6fe80cbf9c5178d701b6d7f5665fae58ae571a04476e6bfbdd0a7fb2cad407164736f6c634300060c00336c6f636b70726f78792061646472657373206d75737420626520636f6e74726163742e" + +// DeployCrossChainNFTMapping deploys a new Ethereum contract, binding an instance of CrossChainNFTMapping to it. +func DeployCrossChainNFTMapping(auth *bind.TransactOpts, backend bind.ContractBackend, _lpAddr common.Address, name string, symbol string) (common.Address, *types.Transaction, *CrossChainNFTMapping, error) { + parsed, err := abi.JSON(strings.NewReader(CrossChainNFTMappingABI)) + if err != nil { + return common.Address{}, nil, nil, err + } + + address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(CrossChainNFTMappingBin), backend, _lpAddr, name, symbol) + if err != nil { + return common.Address{}, nil, nil, err + } + return address, tx, &CrossChainNFTMapping{CrossChainNFTMappingCaller: CrossChainNFTMappingCaller{contract: contract}, CrossChainNFTMappingTransactor: CrossChainNFTMappingTransactor{contract: contract}, CrossChainNFTMappingFilterer: CrossChainNFTMappingFilterer{contract: contract}}, nil +} + +// CrossChainNFTMapping is an auto generated Go binding around an Ethereum contract. +type CrossChainNFTMapping struct { + CrossChainNFTMappingCaller // Read-only binding to the contract + CrossChainNFTMappingTransactor // Write-only binding to the contract + CrossChainNFTMappingFilterer // Log filterer for contract events +} + +// CrossChainNFTMappingCaller is an auto generated read-only Go binding around an Ethereum contract. +type CrossChainNFTMappingCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// CrossChainNFTMappingTransactor is an auto generated write-only Go binding around an Ethereum contract. +type CrossChainNFTMappingTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// CrossChainNFTMappingFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type CrossChainNFTMappingFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// CrossChainNFTMappingSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type CrossChainNFTMappingSession struct { + Contract *CrossChainNFTMapping // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// CrossChainNFTMappingCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type CrossChainNFTMappingCallerSession struct { + Contract *CrossChainNFTMappingCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// CrossChainNFTMappingTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type CrossChainNFTMappingTransactorSession struct { + Contract *CrossChainNFTMappingTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// CrossChainNFTMappingRaw is an auto generated low-level Go binding around an Ethereum contract. +type CrossChainNFTMappingRaw struct { + Contract *CrossChainNFTMapping // Generic contract binding to access the raw methods on +} + +// CrossChainNFTMappingCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type CrossChainNFTMappingCallerRaw struct { + Contract *CrossChainNFTMappingCaller // Generic read-only contract binding to access the raw methods on +} + +// CrossChainNFTMappingTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type CrossChainNFTMappingTransactorRaw struct { + Contract *CrossChainNFTMappingTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewCrossChainNFTMapping creates a new instance of CrossChainNFTMapping, bound to a specific deployed contract. +func NewCrossChainNFTMapping(address common.Address, backend bind.ContractBackend) (*CrossChainNFTMapping, error) { + contract, err := bindCrossChainNFTMapping(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &CrossChainNFTMapping{CrossChainNFTMappingCaller: CrossChainNFTMappingCaller{contract: contract}, CrossChainNFTMappingTransactor: CrossChainNFTMappingTransactor{contract: contract}, CrossChainNFTMappingFilterer: CrossChainNFTMappingFilterer{contract: contract}}, nil +} + +// NewCrossChainNFTMappingCaller creates a new read-only instance of CrossChainNFTMapping, bound to a specific deployed contract. +func NewCrossChainNFTMappingCaller(address common.Address, caller bind.ContractCaller) (*CrossChainNFTMappingCaller, error) { + contract, err := bindCrossChainNFTMapping(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &CrossChainNFTMappingCaller{contract: contract}, nil +} + +// NewCrossChainNFTMappingTransactor creates a new write-only instance of CrossChainNFTMapping, bound to a specific deployed contract. +func NewCrossChainNFTMappingTransactor(address common.Address, transactor bind.ContractTransactor) (*CrossChainNFTMappingTransactor, error) { + contract, err := bindCrossChainNFTMapping(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &CrossChainNFTMappingTransactor{contract: contract}, nil +} + +// NewCrossChainNFTMappingFilterer creates a new log filterer instance of CrossChainNFTMapping, bound to a specific deployed contract. +func NewCrossChainNFTMappingFilterer(address common.Address, filterer bind.ContractFilterer) (*CrossChainNFTMappingFilterer, error) { + contract, err := bindCrossChainNFTMapping(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &CrossChainNFTMappingFilterer{contract: contract}, nil +} + +// bindCrossChainNFTMapping binds a generic wrapper to an already deployed contract. +func bindCrossChainNFTMapping(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := abi.JSON(strings.NewReader(CrossChainNFTMappingABI)) + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_CrossChainNFTMapping *CrossChainNFTMappingRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { + return _CrossChainNFTMapping.Contract.CrossChainNFTMappingCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_CrossChainNFTMapping *CrossChainNFTMappingRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _CrossChainNFTMapping.Contract.CrossChainNFTMappingTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_CrossChainNFTMapping *CrossChainNFTMappingRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _CrossChainNFTMapping.Contract.CrossChainNFTMappingTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_CrossChainNFTMapping *CrossChainNFTMappingCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { + return _CrossChainNFTMapping.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_CrossChainNFTMapping *CrossChainNFTMappingTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _CrossChainNFTMapping.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_CrossChainNFTMapping *CrossChainNFTMappingTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _CrossChainNFTMapping.Contract.contract.Transact(opts, method, params...) +} + +// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. +// +// Solidity: function balanceOf(address owner) view returns(uint256) +func (_CrossChainNFTMapping *CrossChainNFTMappingCaller) BalanceOf(opts *bind.CallOpts, owner common.Address) (*big.Int, error) { + var ( + ret0 = new(*big.Int) + ) + out := ret0 + err := _CrossChainNFTMapping.contract.Call(opts, out, "balanceOf", owner) + return *ret0, err +} + +// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. +// +// Solidity: function balanceOf(address owner) view returns(uint256) +func (_CrossChainNFTMapping *CrossChainNFTMappingSession) BalanceOf(owner common.Address) (*big.Int, error) { + return _CrossChainNFTMapping.Contract.BalanceOf(&_CrossChainNFTMapping.CallOpts, owner) +} + +// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. +// +// Solidity: function balanceOf(address owner) view returns(uint256) +func (_CrossChainNFTMapping *CrossChainNFTMappingCallerSession) BalanceOf(owner common.Address) (*big.Int, error) { + return _CrossChainNFTMapping.Contract.BalanceOf(&_CrossChainNFTMapping.CallOpts, owner) +} + +// BaseURI is a free data retrieval call binding the contract method 0x6c0360eb. +// +// Solidity: function baseURI() view returns(string) +func (_CrossChainNFTMapping *CrossChainNFTMappingCaller) BaseURI(opts *bind.CallOpts) (string, error) { + var ( + ret0 = new(string) + ) + out := ret0 + err := _CrossChainNFTMapping.contract.Call(opts, out, "baseURI") + return *ret0, err +} + +// BaseURI is a free data retrieval call binding the contract method 0x6c0360eb. +// +// Solidity: function baseURI() view returns(string) +func (_CrossChainNFTMapping *CrossChainNFTMappingSession) BaseURI() (string, error) { + return _CrossChainNFTMapping.Contract.BaseURI(&_CrossChainNFTMapping.CallOpts) +} + +// BaseURI is a free data retrieval call binding the contract method 0x6c0360eb. +// +// Solidity: function baseURI() view returns(string) +func (_CrossChainNFTMapping *CrossChainNFTMappingCallerSession) BaseURI() (string, error) { + return _CrossChainNFTMapping.Contract.BaseURI(&_CrossChainNFTMapping.CallOpts) +} + +// GetApproved is a free data retrieval call binding the contract method 0x081812fc. +// +// Solidity: function getApproved(uint256 tokenId) view returns(address) +func (_CrossChainNFTMapping *CrossChainNFTMappingCaller) GetApproved(opts *bind.CallOpts, tokenId *big.Int) (common.Address, error) { + var ( + ret0 = new(common.Address) + ) + out := ret0 + err := _CrossChainNFTMapping.contract.Call(opts, out, "getApproved", tokenId) + return *ret0, err +} + +// GetApproved is a free data retrieval call binding the contract method 0x081812fc. +// +// Solidity: function getApproved(uint256 tokenId) view returns(address) +func (_CrossChainNFTMapping *CrossChainNFTMappingSession) GetApproved(tokenId *big.Int) (common.Address, error) { + return _CrossChainNFTMapping.Contract.GetApproved(&_CrossChainNFTMapping.CallOpts, tokenId) +} + +// GetApproved is a free data retrieval call binding the contract method 0x081812fc. +// +// Solidity: function getApproved(uint256 tokenId) view returns(address) +func (_CrossChainNFTMapping *CrossChainNFTMappingCallerSession) GetApproved(tokenId *big.Int) (common.Address, error) { + return _CrossChainNFTMapping.Contract.GetApproved(&_CrossChainNFTMapping.CallOpts, tokenId) +} + +// IsApprovedForAll is a free data retrieval call binding the contract method 0xe985e9c5. +// +// Solidity: function isApprovedForAll(address owner, address operator) view returns(bool) +func (_CrossChainNFTMapping *CrossChainNFTMappingCaller) IsApprovedForAll(opts *bind.CallOpts, owner common.Address, operator common.Address) (bool, error) { + var ( + ret0 = new(bool) + ) + out := ret0 + err := _CrossChainNFTMapping.contract.Call(opts, out, "isApprovedForAll", owner, operator) + return *ret0, err +} + +// IsApprovedForAll is a free data retrieval call binding the contract method 0xe985e9c5. +// +// Solidity: function isApprovedForAll(address owner, address operator) view returns(bool) +func (_CrossChainNFTMapping *CrossChainNFTMappingSession) IsApprovedForAll(owner common.Address, operator common.Address) (bool, error) { + return _CrossChainNFTMapping.Contract.IsApprovedForAll(&_CrossChainNFTMapping.CallOpts, owner, operator) +} + +// IsApprovedForAll is a free data retrieval call binding the contract method 0xe985e9c5. +// +// Solidity: function isApprovedForAll(address owner, address operator) view returns(bool) +func (_CrossChainNFTMapping *CrossChainNFTMappingCallerSession) IsApprovedForAll(owner common.Address, operator common.Address) (bool, error) { + return _CrossChainNFTMapping.Contract.IsApprovedForAll(&_CrossChainNFTMapping.CallOpts, owner, operator) +} + +// Name is a free data retrieval call binding the contract method 0x06fdde03. +// +// Solidity: function name() view returns(string) +func (_CrossChainNFTMapping *CrossChainNFTMappingCaller) Name(opts *bind.CallOpts) (string, error) { + var ( + ret0 = new(string) + ) + out := ret0 + err := _CrossChainNFTMapping.contract.Call(opts, out, "name") + return *ret0, err +} + +// Name is a free data retrieval call binding the contract method 0x06fdde03. +// +// Solidity: function name() view returns(string) +func (_CrossChainNFTMapping *CrossChainNFTMappingSession) Name() (string, error) { + return _CrossChainNFTMapping.Contract.Name(&_CrossChainNFTMapping.CallOpts) +} + +// Name is a free data retrieval call binding the contract method 0x06fdde03. +// +// Solidity: function name() view returns(string) +func (_CrossChainNFTMapping *CrossChainNFTMappingCallerSession) Name() (string, error) { + return _CrossChainNFTMapping.Contract.Name(&_CrossChainNFTMapping.CallOpts) +} + +// OwnerOf is a free data retrieval call binding the contract method 0x6352211e. +// +// Solidity: function ownerOf(uint256 tokenId) view returns(address) +func (_CrossChainNFTMapping *CrossChainNFTMappingCaller) OwnerOf(opts *bind.CallOpts, tokenId *big.Int) (common.Address, error) { + var ( + ret0 = new(common.Address) + ) + out := ret0 + err := _CrossChainNFTMapping.contract.Call(opts, out, "ownerOf", tokenId) + return *ret0, err +} + +// OwnerOf is a free data retrieval call binding the contract method 0x6352211e. +// +// Solidity: function ownerOf(uint256 tokenId) view returns(address) +func (_CrossChainNFTMapping *CrossChainNFTMappingSession) OwnerOf(tokenId *big.Int) (common.Address, error) { + return _CrossChainNFTMapping.Contract.OwnerOf(&_CrossChainNFTMapping.CallOpts, tokenId) +} + +// OwnerOf is a free data retrieval call binding the contract method 0x6352211e. +// +// Solidity: function ownerOf(uint256 tokenId) view returns(address) +func (_CrossChainNFTMapping *CrossChainNFTMappingCallerSession) OwnerOf(tokenId *big.Int) (common.Address, error) { + return _CrossChainNFTMapping.Contract.OwnerOf(&_CrossChainNFTMapping.CallOpts, tokenId) +} + +// SupportsInterface is a free data retrieval call binding the contract method 0x01ffc9a7. +// +// Solidity: function supportsInterface(bytes4 interfaceId) view returns(bool) +func (_CrossChainNFTMapping *CrossChainNFTMappingCaller) SupportsInterface(opts *bind.CallOpts, interfaceId [4]byte) (bool, error) { + var ( + ret0 = new(bool) + ) + out := ret0 + err := _CrossChainNFTMapping.contract.Call(opts, out, "supportsInterface", interfaceId) + return *ret0, err +} + +// SupportsInterface is a free data retrieval call binding the contract method 0x01ffc9a7. +// +// Solidity: function supportsInterface(bytes4 interfaceId) view returns(bool) +func (_CrossChainNFTMapping *CrossChainNFTMappingSession) SupportsInterface(interfaceId [4]byte) (bool, error) { + return _CrossChainNFTMapping.Contract.SupportsInterface(&_CrossChainNFTMapping.CallOpts, interfaceId) +} + +// SupportsInterface is a free data retrieval call binding the contract method 0x01ffc9a7. +// +// Solidity: function supportsInterface(bytes4 interfaceId) view returns(bool) +func (_CrossChainNFTMapping *CrossChainNFTMappingCallerSession) SupportsInterface(interfaceId [4]byte) (bool, error) { + return _CrossChainNFTMapping.Contract.SupportsInterface(&_CrossChainNFTMapping.CallOpts, interfaceId) +} + +// Symbol is a free data retrieval call binding the contract method 0x95d89b41. +// +// Solidity: function symbol() view returns(string) +func (_CrossChainNFTMapping *CrossChainNFTMappingCaller) Symbol(opts *bind.CallOpts) (string, error) { + var ( + ret0 = new(string) + ) + out := ret0 + err := _CrossChainNFTMapping.contract.Call(opts, out, "symbol") + return *ret0, err +} + +// Symbol is a free data retrieval call binding the contract method 0x95d89b41. +// +// Solidity: function symbol() view returns(string) +func (_CrossChainNFTMapping *CrossChainNFTMappingSession) Symbol() (string, error) { + return _CrossChainNFTMapping.Contract.Symbol(&_CrossChainNFTMapping.CallOpts) +} + +// Symbol is a free data retrieval call binding the contract method 0x95d89b41. +// +// Solidity: function symbol() view returns(string) +func (_CrossChainNFTMapping *CrossChainNFTMappingCallerSession) Symbol() (string, error) { + return _CrossChainNFTMapping.Contract.Symbol(&_CrossChainNFTMapping.CallOpts) +} + +// TokenByIndex is a free data retrieval call binding the contract method 0x4f6ccce7. +// +// Solidity: function tokenByIndex(uint256 index) view returns(uint256) +func (_CrossChainNFTMapping *CrossChainNFTMappingCaller) TokenByIndex(opts *bind.CallOpts, index *big.Int) (*big.Int, error) { + var ( + ret0 = new(*big.Int) + ) + out := ret0 + err := _CrossChainNFTMapping.contract.Call(opts, out, "tokenByIndex", index) + return *ret0, err +} + +// TokenByIndex is a free data retrieval call binding the contract method 0x4f6ccce7. +// +// Solidity: function tokenByIndex(uint256 index) view returns(uint256) +func (_CrossChainNFTMapping *CrossChainNFTMappingSession) TokenByIndex(index *big.Int) (*big.Int, error) { + return _CrossChainNFTMapping.Contract.TokenByIndex(&_CrossChainNFTMapping.CallOpts, index) +} + +// TokenByIndex is a free data retrieval call binding the contract method 0x4f6ccce7. +// +// Solidity: function tokenByIndex(uint256 index) view returns(uint256) +func (_CrossChainNFTMapping *CrossChainNFTMappingCallerSession) TokenByIndex(index *big.Int) (*big.Int, error) { + return _CrossChainNFTMapping.Contract.TokenByIndex(&_CrossChainNFTMapping.CallOpts, index) +} + +// TokenOfOwnerByIndex is a free data retrieval call binding the contract method 0x2f745c59. +// +// Solidity: function tokenOfOwnerByIndex(address owner, uint256 index) view returns(uint256) +func (_CrossChainNFTMapping *CrossChainNFTMappingCaller) TokenOfOwnerByIndex(opts *bind.CallOpts, owner common.Address, index *big.Int) (*big.Int, error) { + var ( + ret0 = new(*big.Int) + ) + out := ret0 + err := _CrossChainNFTMapping.contract.Call(opts, out, "tokenOfOwnerByIndex", owner, index) + return *ret0, err +} + +// TokenOfOwnerByIndex is a free data retrieval call binding the contract method 0x2f745c59. +// +// Solidity: function tokenOfOwnerByIndex(address owner, uint256 index) view returns(uint256) +func (_CrossChainNFTMapping *CrossChainNFTMappingSession) TokenOfOwnerByIndex(owner common.Address, index *big.Int) (*big.Int, error) { + return _CrossChainNFTMapping.Contract.TokenOfOwnerByIndex(&_CrossChainNFTMapping.CallOpts, owner, index) +} + +// TokenOfOwnerByIndex is a free data retrieval call binding the contract method 0x2f745c59. +// +// Solidity: function tokenOfOwnerByIndex(address owner, uint256 index) view returns(uint256) +func (_CrossChainNFTMapping *CrossChainNFTMappingCallerSession) TokenOfOwnerByIndex(owner common.Address, index *big.Int) (*big.Int, error) { + return _CrossChainNFTMapping.Contract.TokenOfOwnerByIndex(&_CrossChainNFTMapping.CallOpts, owner, index) +} + +// TokenURI is a free data retrieval call binding the contract method 0xc87b56dd. +// +// Solidity: function tokenURI(uint256 tokenId) view returns(string) +func (_CrossChainNFTMapping *CrossChainNFTMappingCaller) TokenURI(opts *bind.CallOpts, tokenId *big.Int) (string, error) { + var ( + ret0 = new(string) + ) + out := ret0 + err := _CrossChainNFTMapping.contract.Call(opts, out, "tokenURI", tokenId) + return *ret0, err +} + +// TokenURI is a free data retrieval call binding the contract method 0xc87b56dd. +// +// Solidity: function tokenURI(uint256 tokenId) view returns(string) +func (_CrossChainNFTMapping *CrossChainNFTMappingSession) TokenURI(tokenId *big.Int) (string, error) { + return _CrossChainNFTMapping.Contract.TokenURI(&_CrossChainNFTMapping.CallOpts, tokenId) +} + +// TokenURI is a free data retrieval call binding the contract method 0xc87b56dd. +// +// Solidity: function tokenURI(uint256 tokenId) view returns(string) +func (_CrossChainNFTMapping *CrossChainNFTMappingCallerSession) TokenURI(tokenId *big.Int) (string, error) { + return _CrossChainNFTMapping.Contract.TokenURI(&_CrossChainNFTMapping.CallOpts, tokenId) +} + +// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. +// +// Solidity: function totalSupply() view returns(uint256) +func (_CrossChainNFTMapping *CrossChainNFTMappingCaller) TotalSupply(opts *bind.CallOpts) (*big.Int, error) { + var ( + ret0 = new(*big.Int) + ) + out := ret0 + err := _CrossChainNFTMapping.contract.Call(opts, out, "totalSupply") + return *ret0, err +} + +// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. +// +// Solidity: function totalSupply() view returns(uint256) +func (_CrossChainNFTMapping *CrossChainNFTMappingSession) TotalSupply() (*big.Int, error) { + return _CrossChainNFTMapping.Contract.TotalSupply(&_CrossChainNFTMapping.CallOpts) +} + +// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. +// +// Solidity: function totalSupply() view returns(uint256) +func (_CrossChainNFTMapping *CrossChainNFTMappingCallerSession) TotalSupply() (*big.Int, error) { + return _CrossChainNFTMapping.Contract.TotalSupply(&_CrossChainNFTMapping.CallOpts) +} + +// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. +// +// Solidity: function approve(address to, uint256 tokenId) returns() +func (_CrossChainNFTMapping *CrossChainNFTMappingTransactor) Approve(opts *bind.TransactOpts, to common.Address, tokenId *big.Int) (*types.Transaction, error) { + return _CrossChainNFTMapping.contract.Transact(opts, "approve", to, tokenId) +} + +// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. +// +// Solidity: function approve(address to, uint256 tokenId) returns() +func (_CrossChainNFTMapping *CrossChainNFTMappingSession) Approve(to common.Address, tokenId *big.Int) (*types.Transaction, error) { + return _CrossChainNFTMapping.Contract.Approve(&_CrossChainNFTMapping.TransactOpts, to, tokenId) +} + +// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. +// +// Solidity: function approve(address to, uint256 tokenId) returns() +func (_CrossChainNFTMapping *CrossChainNFTMappingTransactorSession) Approve(to common.Address, tokenId *big.Int) (*types.Transaction, error) { + return _CrossChainNFTMapping.Contract.Approve(&_CrossChainNFTMapping.TransactOpts, to, tokenId) +} + +// MintWithURI is a paid mutator transaction binding the contract method 0x4a99950b. +// +// Solidity: function mintWithURI(address to, uint256 tokenId, string uri) returns() +func (_CrossChainNFTMapping *CrossChainNFTMappingTransactor) MintWithURI(opts *bind.TransactOpts, to common.Address, tokenId *big.Int, uri string) (*types.Transaction, error) { + return _CrossChainNFTMapping.contract.Transact(opts, "mintWithURI", to, tokenId, uri) +} + +// MintWithURI is a paid mutator transaction binding the contract method 0x4a99950b. +// +// Solidity: function mintWithURI(address to, uint256 tokenId, string uri) returns() +func (_CrossChainNFTMapping *CrossChainNFTMappingSession) MintWithURI(to common.Address, tokenId *big.Int, uri string) (*types.Transaction, error) { + return _CrossChainNFTMapping.Contract.MintWithURI(&_CrossChainNFTMapping.TransactOpts, to, tokenId, uri) +} + +// MintWithURI is a paid mutator transaction binding the contract method 0x4a99950b. +// +// Solidity: function mintWithURI(address to, uint256 tokenId, string uri) returns() +func (_CrossChainNFTMapping *CrossChainNFTMappingTransactorSession) MintWithURI(to common.Address, tokenId *big.Int, uri string) (*types.Transaction, error) { + return _CrossChainNFTMapping.Contract.MintWithURI(&_CrossChainNFTMapping.TransactOpts, to, tokenId, uri) +} + +// SafeTransferFrom is a paid mutator transaction binding the contract method 0x42842e0e. +// +// Solidity: function safeTransferFrom(address from, address to, uint256 tokenId) returns() +func (_CrossChainNFTMapping *CrossChainNFTMappingTransactor) SafeTransferFrom(opts *bind.TransactOpts, from common.Address, to common.Address, tokenId *big.Int) (*types.Transaction, error) { + return _CrossChainNFTMapping.contract.Transact(opts, "safeTransferFrom", from, to, tokenId) +} + +// SafeTransferFrom is a paid mutator transaction binding the contract method 0x42842e0e. +// +// Solidity: function safeTransferFrom(address from, address to, uint256 tokenId) returns() +func (_CrossChainNFTMapping *CrossChainNFTMappingSession) SafeTransferFrom(from common.Address, to common.Address, tokenId *big.Int) (*types.Transaction, error) { + return _CrossChainNFTMapping.Contract.SafeTransferFrom(&_CrossChainNFTMapping.TransactOpts, from, to, tokenId) +} + +// SafeTransferFrom is a paid mutator transaction binding the contract method 0x42842e0e. +// +// Solidity: function safeTransferFrom(address from, address to, uint256 tokenId) returns() +func (_CrossChainNFTMapping *CrossChainNFTMappingTransactorSession) SafeTransferFrom(from common.Address, to common.Address, tokenId *big.Int) (*types.Transaction, error) { + return _CrossChainNFTMapping.Contract.SafeTransferFrom(&_CrossChainNFTMapping.TransactOpts, from, to, tokenId) +} + +// SafeTransferFrom0 is a paid mutator transaction binding the contract method 0xb88d4fde. +// +// Solidity: function safeTransferFrom(address from, address to, uint256 tokenId, bytes _data) returns() +func (_CrossChainNFTMapping *CrossChainNFTMappingTransactor) SafeTransferFrom0(opts *bind.TransactOpts, from common.Address, to common.Address, tokenId *big.Int, _data []byte) (*types.Transaction, error) { + return _CrossChainNFTMapping.contract.Transact(opts, "safeTransferFrom0", from, to, tokenId, _data) +} + +// SafeTransferFrom0 is a paid mutator transaction binding the contract method 0xb88d4fde. +// +// Solidity: function safeTransferFrom(address from, address to, uint256 tokenId, bytes _data) returns() +func (_CrossChainNFTMapping *CrossChainNFTMappingSession) SafeTransferFrom0(from common.Address, to common.Address, tokenId *big.Int, _data []byte) (*types.Transaction, error) { + return _CrossChainNFTMapping.Contract.SafeTransferFrom0(&_CrossChainNFTMapping.TransactOpts, from, to, tokenId, _data) +} + +// SafeTransferFrom0 is a paid mutator transaction binding the contract method 0xb88d4fde. +// +// Solidity: function safeTransferFrom(address from, address to, uint256 tokenId, bytes _data) returns() +func (_CrossChainNFTMapping *CrossChainNFTMappingTransactorSession) SafeTransferFrom0(from common.Address, to common.Address, tokenId *big.Int, _data []byte) (*types.Transaction, error) { + return _CrossChainNFTMapping.Contract.SafeTransferFrom0(&_CrossChainNFTMapping.TransactOpts, from, to, tokenId, _data) +} + +// SetApprovalForAll is a paid mutator transaction binding the contract method 0xa22cb465. +// +// Solidity: function setApprovalForAll(address operator, bool approved) returns() +func (_CrossChainNFTMapping *CrossChainNFTMappingTransactor) SetApprovalForAll(opts *bind.TransactOpts, operator common.Address, approved bool) (*types.Transaction, error) { + return _CrossChainNFTMapping.contract.Transact(opts, "setApprovalForAll", operator, approved) +} + +// SetApprovalForAll is a paid mutator transaction binding the contract method 0xa22cb465. +// +// Solidity: function setApprovalForAll(address operator, bool approved) returns() +func (_CrossChainNFTMapping *CrossChainNFTMappingSession) SetApprovalForAll(operator common.Address, approved bool) (*types.Transaction, error) { + return _CrossChainNFTMapping.Contract.SetApprovalForAll(&_CrossChainNFTMapping.TransactOpts, operator, approved) +} + +// SetApprovalForAll is a paid mutator transaction binding the contract method 0xa22cb465. +// +// Solidity: function setApprovalForAll(address operator, bool approved) returns() +func (_CrossChainNFTMapping *CrossChainNFTMappingTransactorSession) SetApprovalForAll(operator common.Address, approved bool) (*types.Transaction, error) { + return _CrossChainNFTMapping.Contract.SetApprovalForAll(&_CrossChainNFTMapping.TransactOpts, operator, approved) +} + +// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. +// +// Solidity: function transferFrom(address from, address to, uint256 tokenId) returns() +func (_CrossChainNFTMapping *CrossChainNFTMappingTransactor) TransferFrom(opts *bind.TransactOpts, from common.Address, to common.Address, tokenId *big.Int) (*types.Transaction, error) { + return _CrossChainNFTMapping.contract.Transact(opts, "transferFrom", from, to, tokenId) +} + +// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. +// +// Solidity: function transferFrom(address from, address to, uint256 tokenId) returns() +func (_CrossChainNFTMapping *CrossChainNFTMappingSession) TransferFrom(from common.Address, to common.Address, tokenId *big.Int) (*types.Transaction, error) { + return _CrossChainNFTMapping.Contract.TransferFrom(&_CrossChainNFTMapping.TransactOpts, from, to, tokenId) +} + +// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. +// +// Solidity: function transferFrom(address from, address to, uint256 tokenId) returns() +func (_CrossChainNFTMapping *CrossChainNFTMappingTransactorSession) TransferFrom(from common.Address, to common.Address, tokenId *big.Int) (*types.Transaction, error) { + return _CrossChainNFTMapping.Contract.TransferFrom(&_CrossChainNFTMapping.TransactOpts, from, to, tokenId) +} + +// CrossChainNFTMappingApprovalIterator is returned from FilterApproval and is used to iterate over the raw logs and unpacked data for Approval events raised by the CrossChainNFTMapping contract. +type CrossChainNFTMappingApprovalIterator struct { + Event *CrossChainNFTMappingApproval // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *CrossChainNFTMappingApprovalIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(CrossChainNFTMappingApproval) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(CrossChainNFTMappingApproval) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *CrossChainNFTMappingApprovalIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *CrossChainNFTMappingApprovalIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// CrossChainNFTMappingApproval represents a Approval event raised by the CrossChainNFTMapping contract. +type CrossChainNFTMappingApproval struct { + Owner common.Address + Approved common.Address + TokenId *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterApproval is a free log retrieval operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. +// +// Solidity: event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId) +func (_CrossChainNFTMapping *CrossChainNFTMappingFilterer) FilterApproval(opts *bind.FilterOpts, owner []common.Address, approved []common.Address, tokenId []*big.Int) (*CrossChainNFTMappingApprovalIterator, error) { + + var ownerRule []interface{} + for _, ownerItem := range owner { + ownerRule = append(ownerRule, ownerItem) + } + var approvedRule []interface{} + for _, approvedItem := range approved { + approvedRule = append(approvedRule, approvedItem) + } + var tokenIdRule []interface{} + for _, tokenIdItem := range tokenId { + tokenIdRule = append(tokenIdRule, tokenIdItem) + } + + logs, sub, err := _CrossChainNFTMapping.contract.FilterLogs(opts, "Approval", ownerRule, approvedRule, tokenIdRule) + if err != nil { + return nil, err + } + return &CrossChainNFTMappingApprovalIterator{contract: _CrossChainNFTMapping.contract, event: "Approval", logs: logs, sub: sub}, nil +} + +// WatchApproval is a free log subscription operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. +// +// Solidity: event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId) +func (_CrossChainNFTMapping *CrossChainNFTMappingFilterer) WatchApproval(opts *bind.WatchOpts, sink chan<- *CrossChainNFTMappingApproval, owner []common.Address, approved []common.Address, tokenId []*big.Int) (event.Subscription, error) { + + var ownerRule []interface{} + for _, ownerItem := range owner { + ownerRule = append(ownerRule, ownerItem) + } + var approvedRule []interface{} + for _, approvedItem := range approved { + approvedRule = append(approvedRule, approvedItem) + } + var tokenIdRule []interface{} + for _, tokenIdItem := range tokenId { + tokenIdRule = append(tokenIdRule, tokenIdItem) + } + + logs, sub, err := _CrossChainNFTMapping.contract.WatchLogs(opts, "Approval", ownerRule, approvedRule, tokenIdRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(CrossChainNFTMappingApproval) + if err := _CrossChainNFTMapping.contract.UnpackLog(event, "Approval", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseApproval is a log parse operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. +// +// Solidity: event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId) +func (_CrossChainNFTMapping *CrossChainNFTMappingFilterer) ParseApproval(log types.Log) (*CrossChainNFTMappingApproval, error) { + event := new(CrossChainNFTMappingApproval) + if err := _CrossChainNFTMapping.contract.UnpackLog(event, "Approval", log); err != nil { + return nil, err + } + return event, nil +} + +// CrossChainNFTMappingApprovalForAllIterator is returned from FilterApprovalForAll and is used to iterate over the raw logs and unpacked data for ApprovalForAll events raised by the CrossChainNFTMapping contract. +type CrossChainNFTMappingApprovalForAllIterator struct { + Event *CrossChainNFTMappingApprovalForAll // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *CrossChainNFTMappingApprovalForAllIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(CrossChainNFTMappingApprovalForAll) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(CrossChainNFTMappingApprovalForAll) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *CrossChainNFTMappingApprovalForAllIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *CrossChainNFTMappingApprovalForAllIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// CrossChainNFTMappingApprovalForAll represents a ApprovalForAll event raised by the CrossChainNFTMapping contract. +type CrossChainNFTMappingApprovalForAll struct { + Owner common.Address + Operator common.Address + Approved bool + Raw types.Log // Blockchain specific contextual infos +} + +// FilterApprovalForAll is a free log retrieval operation binding the contract event 0x17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31. +// +// Solidity: event ApprovalForAll(address indexed owner, address indexed operator, bool approved) +func (_CrossChainNFTMapping *CrossChainNFTMappingFilterer) FilterApprovalForAll(opts *bind.FilterOpts, owner []common.Address, operator []common.Address) (*CrossChainNFTMappingApprovalForAllIterator, error) { + + var ownerRule []interface{} + for _, ownerItem := range owner { + ownerRule = append(ownerRule, ownerItem) + } + var operatorRule []interface{} + for _, operatorItem := range operator { + operatorRule = append(operatorRule, operatorItem) + } + + logs, sub, err := _CrossChainNFTMapping.contract.FilterLogs(opts, "ApprovalForAll", ownerRule, operatorRule) + if err != nil { + return nil, err + } + return &CrossChainNFTMappingApprovalForAllIterator{contract: _CrossChainNFTMapping.contract, event: "ApprovalForAll", logs: logs, sub: sub}, nil +} + +// WatchApprovalForAll is a free log subscription operation binding the contract event 0x17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31. +// +// Solidity: event ApprovalForAll(address indexed owner, address indexed operator, bool approved) +func (_CrossChainNFTMapping *CrossChainNFTMappingFilterer) WatchApprovalForAll(opts *bind.WatchOpts, sink chan<- *CrossChainNFTMappingApprovalForAll, owner []common.Address, operator []common.Address) (event.Subscription, error) { + + var ownerRule []interface{} + for _, ownerItem := range owner { + ownerRule = append(ownerRule, ownerItem) + } + var operatorRule []interface{} + for _, operatorItem := range operator { + operatorRule = append(operatorRule, operatorItem) + } + + logs, sub, err := _CrossChainNFTMapping.contract.WatchLogs(opts, "ApprovalForAll", ownerRule, operatorRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(CrossChainNFTMappingApprovalForAll) + if err := _CrossChainNFTMapping.contract.UnpackLog(event, "ApprovalForAll", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseApprovalForAll is a log parse operation binding the contract event 0x17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31. +// +// Solidity: event ApprovalForAll(address indexed owner, address indexed operator, bool approved) +func (_CrossChainNFTMapping *CrossChainNFTMappingFilterer) ParseApprovalForAll(log types.Log) (*CrossChainNFTMappingApprovalForAll, error) { + event := new(CrossChainNFTMappingApprovalForAll) + if err := _CrossChainNFTMapping.contract.UnpackLog(event, "ApprovalForAll", log); err != nil { + return nil, err + } + return event, nil +} + +// CrossChainNFTMappingTransferIterator is returned from FilterTransfer and is used to iterate over the raw logs and unpacked data for Transfer events raised by the CrossChainNFTMapping contract. +type CrossChainNFTMappingTransferIterator struct { + Event *CrossChainNFTMappingTransfer // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *CrossChainNFTMappingTransferIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(CrossChainNFTMappingTransfer) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(CrossChainNFTMappingTransfer) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *CrossChainNFTMappingTransferIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *CrossChainNFTMappingTransferIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// CrossChainNFTMappingTransfer represents a Transfer event raised by the CrossChainNFTMapping contract. +type CrossChainNFTMappingTransfer struct { + From common.Address + To common.Address + TokenId *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterTransfer is a free log retrieval operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. +// +// Solidity: event Transfer(address indexed from, address indexed to, uint256 indexed tokenId) +func (_CrossChainNFTMapping *CrossChainNFTMappingFilterer) FilterTransfer(opts *bind.FilterOpts, from []common.Address, to []common.Address, tokenId []*big.Int) (*CrossChainNFTMappingTransferIterator, error) { + + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + var tokenIdRule []interface{} + for _, tokenIdItem := range tokenId { + tokenIdRule = append(tokenIdRule, tokenIdItem) + } + + logs, sub, err := _CrossChainNFTMapping.contract.FilterLogs(opts, "Transfer", fromRule, toRule, tokenIdRule) + if err != nil { + return nil, err + } + return &CrossChainNFTMappingTransferIterator{contract: _CrossChainNFTMapping.contract, event: "Transfer", logs: logs, sub: sub}, nil +} + +// WatchTransfer is a free log subscription operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. +// +// Solidity: event Transfer(address indexed from, address indexed to, uint256 indexed tokenId) +func (_CrossChainNFTMapping *CrossChainNFTMappingFilterer) WatchTransfer(opts *bind.WatchOpts, sink chan<- *CrossChainNFTMappingTransfer, from []common.Address, to []common.Address, tokenId []*big.Int) (event.Subscription, error) { + + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + var tokenIdRule []interface{} + for _, tokenIdItem := range tokenId { + tokenIdRule = append(tokenIdRule, tokenIdItem) + } + + logs, sub, err := _CrossChainNFTMapping.contract.WatchLogs(opts, "Transfer", fromRule, toRule, tokenIdRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(CrossChainNFTMappingTransfer) + if err := _CrossChainNFTMapping.contract.UnpackLog(event, "Transfer", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseTransfer is a log parse operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. +// +// Solidity: event Transfer(address indexed from, address indexed to, uint256 indexed tokenId) +func (_CrossChainNFTMapping *CrossChainNFTMappingFilterer) ParseTransfer(log types.Log) (*CrossChainNFTMappingTransfer, error) { + event := new(CrossChainNFTMappingTransfer) + if err := _CrossChainNFTMapping.contract.UnpackLog(event, "Transfer", log); err != nil { + return nil, err + } + return event, nil +} + +// ERC165ABI is the input ABI used to generate the binding from. +const ERC165ABI = "[{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]" + +// ERC165FuncSigs maps the 4-byte function signature to its string representation. +var ERC165FuncSigs = map[string]string{ + "01ffc9a7": "supportsInterface(bytes4)", +} + +// ERC165 is an auto generated Go binding around an Ethereum contract. +type ERC165 struct { + ERC165Caller // Read-only binding to the contract + ERC165Transactor // Write-only binding to the contract + ERC165Filterer // Log filterer for contract events +} + +// ERC165Caller is an auto generated read-only Go binding around an Ethereum contract. +type ERC165Caller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// ERC165Transactor is an auto generated write-only Go binding around an Ethereum contract. +type ERC165Transactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// ERC165Filterer is an auto generated log filtering Go binding around an Ethereum contract events. +type ERC165Filterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// ERC165Session is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type ERC165Session struct { + Contract *ERC165 // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// ERC165CallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type ERC165CallerSession struct { + Contract *ERC165Caller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// ERC165TransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type ERC165TransactorSession struct { + Contract *ERC165Transactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// ERC165Raw is an auto generated low-level Go binding around an Ethereum contract. +type ERC165Raw struct { + Contract *ERC165 // Generic contract binding to access the raw methods on +} + +// ERC165CallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type ERC165CallerRaw struct { + Contract *ERC165Caller // Generic read-only contract binding to access the raw methods on +} + +// ERC165TransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type ERC165TransactorRaw struct { + Contract *ERC165Transactor // Generic write-only contract binding to access the raw methods on +} + +// NewERC165 creates a new instance of ERC165, bound to a specific deployed contract. +func NewERC165(address common.Address, backend bind.ContractBackend) (*ERC165, error) { + contract, err := bindERC165(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &ERC165{ERC165Caller: ERC165Caller{contract: contract}, ERC165Transactor: ERC165Transactor{contract: contract}, ERC165Filterer: ERC165Filterer{contract: contract}}, nil +} + +// NewERC165Caller creates a new read-only instance of ERC165, bound to a specific deployed contract. +func NewERC165Caller(address common.Address, caller bind.ContractCaller) (*ERC165Caller, error) { + contract, err := bindERC165(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &ERC165Caller{contract: contract}, nil +} + +// NewERC165Transactor creates a new write-only instance of ERC165, bound to a specific deployed contract. +func NewERC165Transactor(address common.Address, transactor bind.ContractTransactor) (*ERC165Transactor, error) { + contract, err := bindERC165(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &ERC165Transactor{contract: contract}, nil +} + +// NewERC165Filterer creates a new log filterer instance of ERC165, bound to a specific deployed contract. +func NewERC165Filterer(address common.Address, filterer bind.ContractFilterer) (*ERC165Filterer, error) { + contract, err := bindERC165(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &ERC165Filterer{contract: contract}, nil +} + +// bindERC165 binds a generic wrapper to an already deployed contract. +func bindERC165(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := abi.JSON(strings.NewReader(ERC165ABI)) + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_ERC165 *ERC165Raw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { + return _ERC165.Contract.ERC165Caller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_ERC165 *ERC165Raw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _ERC165.Contract.ERC165Transactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_ERC165 *ERC165Raw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _ERC165.Contract.ERC165Transactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_ERC165 *ERC165CallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { + return _ERC165.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_ERC165 *ERC165TransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _ERC165.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_ERC165 *ERC165TransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _ERC165.Contract.contract.Transact(opts, method, params...) +} + +// SupportsInterface is a free data retrieval call binding the contract method 0x01ffc9a7. +// +// Solidity: function supportsInterface(bytes4 interfaceId) view returns(bool) +func (_ERC165 *ERC165Caller) SupportsInterface(opts *bind.CallOpts, interfaceId [4]byte) (bool, error) { + var ( + ret0 = new(bool) + ) + out := ret0 + err := _ERC165.contract.Call(opts, out, "supportsInterface", interfaceId) + return *ret0, err +} + +// SupportsInterface is a free data retrieval call binding the contract method 0x01ffc9a7. +// +// Solidity: function supportsInterface(bytes4 interfaceId) view returns(bool) +func (_ERC165 *ERC165Session) SupportsInterface(interfaceId [4]byte) (bool, error) { + return _ERC165.Contract.SupportsInterface(&_ERC165.CallOpts, interfaceId) +} + +// SupportsInterface is a free data retrieval call binding the contract method 0x01ffc9a7. +// +// Solidity: function supportsInterface(bytes4 interfaceId) view returns(bool) +func (_ERC165 *ERC165CallerSession) SupportsInterface(interfaceId [4]byte) (bool, error) { + return _ERC165.Contract.SupportsInterface(&_ERC165.CallOpts, interfaceId) +} + +// ERC721ABI is the input ABI used to generate the binding from. +const ERC721ABI = "[{\"inputs\":[{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"symbol\",\"type\":\"string\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"approved\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"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\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"baseURI\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"getApproved\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"isApprovedForAll\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"ownerOf\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"safeTransferFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"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\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"tokenByIndex\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"tokenOfOwnerByIndex\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"tokenURI\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]" + +// ERC721FuncSigs maps the 4-byte function signature to its string representation. +var ERC721FuncSigs = map[string]string{ + "095ea7b3": "approve(address,uint256)", + "70a08231": "balanceOf(address)", + "6c0360eb": "baseURI()", + "081812fc": "getApproved(uint256)", + "e985e9c5": "isApprovedForAll(address,address)", + "06fdde03": "name()", + "6352211e": "ownerOf(uint256)", + "42842e0e": "safeTransferFrom(address,address,uint256)", + "b88d4fde": "safeTransferFrom(address,address,uint256,bytes)", + "a22cb465": "setApprovalForAll(address,bool)", + "01ffc9a7": "supportsInterface(bytes4)", + "95d89b41": "symbol()", + "4f6ccce7": "tokenByIndex(uint256)", + "2f745c59": "tokenOfOwnerByIndex(address,uint256)", + "c87b56dd": "tokenURI(uint256)", + "18160ddd": "totalSupply()", + "23b872dd": "transferFrom(address,address,uint256)", +} + +// ERC721Bin is the compiled bytecode used for deploying new contracts. +var ERC721Bin = "0x60806040523480156200001157600080fd5b5060405162001cf038038062001cf0833981810160405260408110156200003757600080fd5b81019080805160405193929190846401000000008211156200005857600080fd5b9083019060208201858111156200006e57600080fd5b82516401000000008111828201881017156200008957600080fd5b82525081516020918201929091019080838360005b83811015620000b85781810151838201526020016200009e565b50505050905090810190601f168015620000e65780820380516001836020036101000a031916815260200191505b50604052602001805160405193929190846401000000008211156200010a57600080fd5b9083019060208201858111156200012057600080fd5b82516401000000008111828201881017156200013b57600080fd5b82525081516020918201929091019080838360005b838110156200016a57818101518382015260200162000150565b50505050905090810190601f168015620001985780820380516001836020036101000a031916815260200191505b5060405250620001b391506301ffc9a760e01b90506200021d565b8151620001c8906006906020850190620002a2565b508051620001de906007906020840190620002a2565b50620001f16380ac58cd60e01b6200021d565b62000203635b5e139f60e01b6200021d565b6200021563780e9d6360e01b6200021d565b50506200033e565b6001600160e01b031980821614156200027d576040805162461bcd60e51b815260206004820152601c60248201527f4552433136353a20696e76616c696420696e7465726661636520696400000000604482015290519081900360640190fd5b6001600160e01b0319166000908152602081905260409020805460ff19166001179055565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10620002e557805160ff191683800117855562000315565b8280016001018555821562000315579182015b8281111562000315578251825591602001919060010190620002f8565b506200032392915062000327565b5090565b5b8082111562000323576000815560010162000328565b6119a2806200034e6000396000f3fe608060405234801561001057600080fd5b506004361061010b5760003560e01c80634f6ccce7116100a257806395d89b411161007157806395d89b4114610349578063a22cb46514610351578063b88d4fde1461037f578063c87b56dd14610445578063e985e9c5146104625761010b565b80634f6ccce7146102e15780636352211e146102fe5780636c0360eb1461031b57806370a08231146103235761010b565b806318160ddd116100de57806318160ddd1461022f57806323b872dd146102495780632f745c591461027f57806342842e0e146102ab5761010b565b806301ffc9a71461011057806306fdde031461014b578063081812fc146101c8578063095ea7b314610201575b600080fd5b6101376004803603602081101561012657600080fd5b50356001600160e01b031916610490565b604080519115158252519081900360200190f35b6101536104b3565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561018d578181015183820152602001610175565b50505050905090810190601f1680156101ba5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101e5600480360360208110156101de57600080fd5b5035610549565b604080516001600160a01b039092168252519081900360200190f35b61022d6004803603604081101561021757600080fd5b506001600160a01b0381351690602001356105ab565b005b610237610686565b60408051918252519081900360200190f35b61022d6004803603606081101561025f57600080fd5b506001600160a01b03813581169160208101359091169060400135610697565b6102376004803603604081101561029557600080fd5b506001600160a01b0381351690602001356106ee565b61022d600480360360608110156102c157600080fd5b506001600160a01b03813581169160208101359091169060400135610719565b610237600480360360208110156102f757600080fd5b5035610734565b6101e56004803603602081101561031457600080fd5b503561074a565b610153610772565b6102376004803603602081101561033957600080fd5b50356001600160a01b03166107d3565b61015361083b565b61022d6004803603604081101561036757600080fd5b506001600160a01b038135169060200135151561089c565b61022d6004803603608081101561039557600080fd5b6001600160a01b038235811692602081013590911691604082013591908101906080810160608201356401000000008111156103d057600080fd5b8201836020820111156103e257600080fd5b8035906020019184600183028401116401000000008311171561040457600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506109a1945050505050565b6101536004803603602081101561045b57600080fd5b50356109ff565b6101376004803603604081101561047857600080fd5b506001600160a01b0381358116916020013516610ca6565b6001600160e01b0319811660009081526020819052604090205460ff165b919050565b60068054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561053f5780601f106105145761010080835404028352916020019161053f565b820191906000526020600020905b81548152906001019060200180831161052257829003601f168201915b5050505050905090565b600061055482610cd4565b61058f5760405162461bcd60e51b815260040180806020018281038252602c815260200180611897602c913960400191505060405180910390fd5b506000908152600460205260409020546001600160a01b031690565b60006105b68261074a565b9050806001600160a01b0316836001600160a01b031614156106095760405162461bcd60e51b815260040180806020018281038252602181526020018061191b6021913960400191505060405180910390fd5b806001600160a01b031661061b610ce1565b6001600160a01b0316148061063c575061063c81610637610ce1565b610ca6565b6106775760405162461bcd60e51b81526004018080602001828103825260388152602001806117ea6038913960400191505060405180910390fd5b6106818383610ce5565b505050565b60006106926002610d53565b905090565b6106a86106a2610ce1565b82610d5e565b6106e35760405162461bcd60e51b815260040180806020018281038252603181526020018061193c6031913960400191505060405180910390fd5b610681838383610e02565b6001600160a01b03821660009081526001602052604081206107109083610f4e565b90505b92915050565b610681838383604051806020016040528060008152506109a1565b600080610742600284610f5a565b509392505050565b60006107138260405180606001604052806029815260200161184c6029913960029190610f76565b60098054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561053f5780601f106105145761010080835404028352916020019161053f565b60006001600160a01b03821661081a5760405162461bcd60e51b815260040180806020018281038252602a815260200180611822602a913960400191505060405180910390fd5b6001600160a01b038216600090815260016020526040902061071390610d53565b60078054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561053f5780601f106105145761010080835404028352916020019161053f565b6108a4610ce1565b6001600160a01b0316826001600160a01b0316141561090a576040805162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c657200000000000000604482015290519081900360640190fd5b8060056000610917610ce1565b6001600160a01b03908116825260208083019390935260409182016000908120918716808252919093529120805460ff19169215159290921790915561095b610ce1565b6001600160a01b03167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c318360405180821515815260200191505060405180910390a35050565b6109b26109ac610ce1565b83610d5e565b6109ed5760405162461bcd60e51b815260040180806020018281038252603181526020018061193c6031913960400191505060405180910390fd5b6109f984848484610f8d565b50505050565b6060610a0a82610cd4565b610a455760405162461bcd60e51b815260040180806020018281038252602f8152602001806118ec602f913960400191505060405180910390fd5b60008281526008602090815260409182902080548351601f6002600019610100600186161502019093169290920491820184900484028101840190945280845260609392830182828015610ada5780601f10610aaf57610100808354040283529160200191610ada565b820191906000526020600020905b815481529060010190602001808311610abd57829003601f168201915b505060095493945050505060026000196101006001841615020190911604610b035790506104ae565b805115610bd4576009816040516020018083805460018160011615610100020316600290048015610b6b5780601f10610b49576101008083540402835291820191610b6b565b820191906000526020600020905b815481529060010190602001808311610b57575b5050825160208401908083835b60208310610b975780518252601f199092019160209182019101610b78565b6001836020036101000a038019825116818451168082178552505050505050905001925050506040516020818303038152906040529150506104ae565b6009610bdf84610fdf565b6040516020018083805460018160011615610100020316600290048015610c3d5780601f10610c1b576101008083540402835291820191610c3d565b820191906000526020600020905b815481529060010190602001808311610c29575b5050825160208401908083835b60208310610c695780518252601f199092019160209182019101610c4a565b6001836020036101000a03801982511681845116808217855250505050505090500192505050604051602081830303815290604052915050919050565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b60006107136002836110ba565b3390565b600081815260046020526040902080546001600160a01b0319166001600160a01b0384169081179091558190610d1a8261074a565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000610713826110c6565b6000610d6982610cd4565b610da45760405162461bcd60e51b815260040180806020018281038252602c8152602001806117be602c913960400191505060405180910390fd5b6000610daf8361074a565b9050806001600160a01b0316846001600160a01b03161480610dea5750836001600160a01b0316610ddf84610549565b6001600160a01b0316145b80610dfa5750610dfa8185610ca6565b949350505050565b826001600160a01b0316610e158261074a565b6001600160a01b031614610e5a5760405162461bcd60e51b81526004018080602001828103825260298152602001806118c36029913960400191505060405180910390fd5b6001600160a01b038216610e9f5760405162461bcd60e51b815260040180806020018281038252602481526020018061179a6024913960400191505060405180910390fd5b610eaa838383610681565b610eb5600082610ce5565b6001600160a01b0383166000908152600160205260409020610ed790826110ca565b506001600160a01b0382166000908152600160205260409020610efa90826110d6565b50610f07600282846110e2565b5080826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050565b600061071083836110f8565b6000808080610f69868661115c565b9097909650945050505050565b6000610f838484846111d7565b90505b9392505050565b610f98848484610e02565b610fa4848484846112a1565b6109f95760405162461bcd60e51b81526004018080602001828103825260328152602001806117686032913960400191505060405180910390fd5b60608161100457506040805180820190915260018152600360fc1b60208201526104ae565b8160005b811561101c57600101600a82049150611008565b60608167ffffffffffffffff8111801561103557600080fd5b506040519080825280601f01601f191660200182016040528015611060576020820181803683370190505b50859350905060001982015b83156110b157600a840660300160f81b8282806001900393508151811061108f57fe5b60200101906001600160f81b031916908160001a905350600a8404935061106c565b50949350505050565b60006107108383611409565b5490565b60006107108383611421565b600061071083836114e7565b6000610f8384846001600160a01b038516611531565b8154600090821061113a5760405162461bcd60e51b81526004018080602001828103825260228152602001806117466022913960400191505060405180910390fd5b82600001828154811061114957fe5b9060005260206000200154905092915050565b8154600090819083106111a05760405162461bcd60e51b81526004018080602001828103825260228152602001806118756022913960400191505060405180910390fd5b60008460000184815481106111b157fe5b906000526020600020906002020190508060000154816001015492509250509250929050565b600082815260018401602052604081205482816112725760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561123757818101518382015260200161121f565b50505050905090810190601f1680156112645780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5084600001600182038154811061128557fe5b9060005260206000209060020201600101549150509392505050565b60006112b5846001600160a01b03166115c8565b6112c157506001610dfa565b60606113cf630a85bd0160e11b6112d6610ce1565b88878760405160240180856001600160a01b03168152602001846001600160a01b0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561133d578181015183820152602001611325565b50505050905090810190601f16801561136a5780820380516001836020036101000a031916815260200191505b5095505050505050604051602081830303815290604052906001600160e01b0319166020820180516001600160e01b038381831617835250505050604051806060016040528060328152602001611768603291396001600160a01b03881691906115ce565b905060008180602001905160208110156113e857600080fd5b50516001600160e01b031916630a85bd0160e11b1492505050949350505050565b60009081526001919091016020526040902054151590565b600081815260018301602052604081205480156114dd578354600019808301919081019060009087908390811061145457fe5b906000526020600020015490508087600001848154811061147157fe5b6000918252602080832090910192909255828152600189810190925260409020908401905586548790806114a157fe5b60019003818190600052602060002001600090559055866001016000878152602001908152602001600020600090556001945050505050610713565b6000915050610713565b60006114f38383611409565b61152957508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610713565b506000610713565b600082815260018401602052604081205480611596575050604080518082018252838152602080820184815286546001818101895560008981528481209551600290930290950191825591519082015586548684528188019092529290912055610f86565b828560000160018303815481106115a957fe5b9060005260206000209060020201600101819055506000915050610f86565b3b151590565b6060610f83848460008560606115e3856115c8565b611634576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b602083106116735780518252601f199092019160209182019101611654565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d80600081146116d5576040519150601f19603f3d011682016040523d82523d6000602084013e6116da565b606091505b509150915081156116ee579150610dfa9050565b8051156116fe5780518082602001fd5b60405162461bcd60e51b815260206004820181815286516024840152865187939192839260440191908501908083836000831561123757818101518382015260200161121f56fe456e756d657261626c655365743a20696e646578206f7574206f6620626f756e64734552433732313a207472616e7366657220746f206e6f6e20455243373231526563656976657220696d706c656d656e7465724552433732313a207472616e7366657220746f20746865207a65726f20616464726573734552433732313a206f70657261746f7220717565727920666f72206e6f6e6578697374656e7420746f6b656e4552433732313a20617070726f76652063616c6c6572206973206e6f74206f776e6572206e6f7220617070726f76656420666f7220616c6c4552433732313a2062616c616e636520717565727920666f7220746865207a65726f20616464726573734552433732313a206f776e657220717565727920666f72206e6f6e6578697374656e7420746f6b656e456e756d657261626c654d61703a20696e646578206f7574206f6620626f756e64734552433732313a20617070726f76656420717565727920666f72206e6f6e6578697374656e7420746f6b656e4552433732313a207472616e73666572206f6620746f6b656e2074686174206973206e6f74206f776e4552433732314d657461646174613a2055524920717565727920666f72206e6f6e6578697374656e7420746f6b656e4552433732313a20617070726f76616c20746f2063757272656e74206f776e65724552433732313a207472616e736665722063616c6c6572206973206e6f74206f776e6572206e6f7220617070726f766564a2646970667358221220a5dab7dd7f8a21469a8b9708fc52c0f2cb031776ddd0c8bfcdccc06264907f1164736f6c634300060c0033" + +// DeployERC721 deploys a new Ethereum contract, binding an instance of ERC721 to it. +func DeployERC721(auth *bind.TransactOpts, backend bind.ContractBackend, name string, symbol string) (common.Address, *types.Transaction, *ERC721, error) { + parsed, err := abi.JSON(strings.NewReader(ERC721ABI)) + if err != nil { + return common.Address{}, nil, nil, err + } + + address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(ERC721Bin), backend, name, symbol) + if err != nil { + return common.Address{}, nil, nil, err + } + return address, tx, &ERC721{ERC721Caller: ERC721Caller{contract: contract}, ERC721Transactor: ERC721Transactor{contract: contract}, ERC721Filterer: ERC721Filterer{contract: contract}}, nil +} + +// ERC721 is an auto generated Go binding around an Ethereum contract. +type ERC721 struct { + ERC721Caller // Read-only binding to the contract + ERC721Transactor // Write-only binding to the contract + ERC721Filterer // Log filterer for contract events +} + +// ERC721Caller is an auto generated read-only Go binding around an Ethereum contract. +type ERC721Caller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// ERC721Transactor is an auto generated write-only Go binding around an Ethereum contract. +type ERC721Transactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// ERC721Filterer is an auto generated log filtering Go binding around an Ethereum contract events. +type ERC721Filterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// ERC721Session is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type ERC721Session struct { + Contract *ERC721 // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// ERC721CallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type ERC721CallerSession struct { + Contract *ERC721Caller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// ERC721TransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type ERC721TransactorSession struct { + Contract *ERC721Transactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// ERC721Raw is an auto generated low-level Go binding around an Ethereum contract. +type ERC721Raw struct { + Contract *ERC721 // Generic contract binding to access the raw methods on +} + +// ERC721CallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type ERC721CallerRaw struct { + Contract *ERC721Caller // Generic read-only contract binding to access the raw methods on +} + +// ERC721TransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type ERC721TransactorRaw struct { + Contract *ERC721Transactor // Generic write-only contract binding to access the raw methods on +} + +// NewERC721 creates a new instance of ERC721, bound to a specific deployed contract. +func NewERC721(address common.Address, backend bind.ContractBackend) (*ERC721, error) { + contract, err := bindERC721(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &ERC721{ERC721Caller: ERC721Caller{contract: contract}, ERC721Transactor: ERC721Transactor{contract: contract}, ERC721Filterer: ERC721Filterer{contract: contract}}, nil +} + +// NewERC721Caller creates a new read-only instance of ERC721, bound to a specific deployed contract. +func NewERC721Caller(address common.Address, caller bind.ContractCaller) (*ERC721Caller, error) { + contract, err := bindERC721(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &ERC721Caller{contract: contract}, nil +} + +// NewERC721Transactor creates a new write-only instance of ERC721, bound to a specific deployed contract. +func NewERC721Transactor(address common.Address, transactor bind.ContractTransactor) (*ERC721Transactor, error) { + contract, err := bindERC721(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &ERC721Transactor{contract: contract}, nil +} + +// NewERC721Filterer creates a new log filterer instance of ERC721, bound to a specific deployed contract. +func NewERC721Filterer(address common.Address, filterer bind.ContractFilterer) (*ERC721Filterer, error) { + contract, err := bindERC721(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &ERC721Filterer{contract: contract}, nil +} + +// bindERC721 binds a generic wrapper to an already deployed contract. +func bindERC721(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := abi.JSON(strings.NewReader(ERC721ABI)) + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_ERC721 *ERC721Raw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { + return _ERC721.Contract.ERC721Caller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_ERC721 *ERC721Raw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _ERC721.Contract.ERC721Transactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_ERC721 *ERC721Raw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _ERC721.Contract.ERC721Transactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_ERC721 *ERC721CallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { + return _ERC721.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_ERC721 *ERC721TransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _ERC721.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_ERC721 *ERC721TransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _ERC721.Contract.contract.Transact(opts, method, params...) +} + +// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. +// +// Solidity: function balanceOf(address owner) view returns(uint256) +func (_ERC721 *ERC721Caller) BalanceOf(opts *bind.CallOpts, owner common.Address) (*big.Int, error) { + var ( + ret0 = new(*big.Int) + ) + out := ret0 + err := _ERC721.contract.Call(opts, out, "balanceOf", owner) + return *ret0, err +} + +// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. +// +// Solidity: function balanceOf(address owner) view returns(uint256) +func (_ERC721 *ERC721Session) BalanceOf(owner common.Address) (*big.Int, error) { + return _ERC721.Contract.BalanceOf(&_ERC721.CallOpts, owner) +} + +// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. +// +// Solidity: function balanceOf(address owner) view returns(uint256) +func (_ERC721 *ERC721CallerSession) BalanceOf(owner common.Address) (*big.Int, error) { + return _ERC721.Contract.BalanceOf(&_ERC721.CallOpts, owner) +} + +// BaseURI is a free data retrieval call binding the contract method 0x6c0360eb. +// +// Solidity: function baseURI() view returns(string) +func (_ERC721 *ERC721Caller) BaseURI(opts *bind.CallOpts) (string, error) { + var ( + ret0 = new(string) + ) + out := ret0 + err := _ERC721.contract.Call(opts, out, "baseURI") + return *ret0, err +} + +// BaseURI is a free data retrieval call binding the contract method 0x6c0360eb. +// +// Solidity: function baseURI() view returns(string) +func (_ERC721 *ERC721Session) BaseURI() (string, error) { + return _ERC721.Contract.BaseURI(&_ERC721.CallOpts) +} + +// BaseURI is a free data retrieval call binding the contract method 0x6c0360eb. +// +// Solidity: function baseURI() view returns(string) +func (_ERC721 *ERC721CallerSession) BaseURI() (string, error) { + return _ERC721.Contract.BaseURI(&_ERC721.CallOpts) +} + +// GetApproved is a free data retrieval call binding the contract method 0x081812fc. +// +// Solidity: function getApproved(uint256 tokenId) view returns(address) +func (_ERC721 *ERC721Caller) GetApproved(opts *bind.CallOpts, tokenId *big.Int) (common.Address, error) { + var ( + ret0 = new(common.Address) + ) + out := ret0 + err := _ERC721.contract.Call(opts, out, "getApproved", tokenId) + return *ret0, err +} + +// GetApproved is a free data retrieval call binding the contract method 0x081812fc. +// +// Solidity: function getApproved(uint256 tokenId) view returns(address) +func (_ERC721 *ERC721Session) GetApproved(tokenId *big.Int) (common.Address, error) { + return _ERC721.Contract.GetApproved(&_ERC721.CallOpts, tokenId) +} + +// GetApproved is a free data retrieval call binding the contract method 0x081812fc. +// +// Solidity: function getApproved(uint256 tokenId) view returns(address) +func (_ERC721 *ERC721CallerSession) GetApproved(tokenId *big.Int) (common.Address, error) { + return _ERC721.Contract.GetApproved(&_ERC721.CallOpts, tokenId) +} + +// IsApprovedForAll is a free data retrieval call binding the contract method 0xe985e9c5. +// +// Solidity: function isApprovedForAll(address owner, address operator) view returns(bool) +func (_ERC721 *ERC721Caller) IsApprovedForAll(opts *bind.CallOpts, owner common.Address, operator common.Address) (bool, error) { + var ( + ret0 = new(bool) + ) + out := ret0 + err := _ERC721.contract.Call(opts, out, "isApprovedForAll", owner, operator) + return *ret0, err +} + +// IsApprovedForAll is a free data retrieval call binding the contract method 0xe985e9c5. +// +// Solidity: function isApprovedForAll(address owner, address operator) view returns(bool) +func (_ERC721 *ERC721Session) IsApprovedForAll(owner common.Address, operator common.Address) (bool, error) { + return _ERC721.Contract.IsApprovedForAll(&_ERC721.CallOpts, owner, operator) +} + +// IsApprovedForAll is a free data retrieval call binding the contract method 0xe985e9c5. +// +// Solidity: function isApprovedForAll(address owner, address operator) view returns(bool) +func (_ERC721 *ERC721CallerSession) IsApprovedForAll(owner common.Address, operator common.Address) (bool, error) { + return _ERC721.Contract.IsApprovedForAll(&_ERC721.CallOpts, owner, operator) +} + +// Name is a free data retrieval call binding the contract method 0x06fdde03. +// +// Solidity: function name() view returns(string) +func (_ERC721 *ERC721Caller) Name(opts *bind.CallOpts) (string, error) { + var ( + ret0 = new(string) + ) + out := ret0 + err := _ERC721.contract.Call(opts, out, "name") + return *ret0, err +} + +// Name is a free data retrieval call binding the contract method 0x06fdde03. +// +// Solidity: function name() view returns(string) +func (_ERC721 *ERC721Session) Name() (string, error) { + return _ERC721.Contract.Name(&_ERC721.CallOpts) +} + +// Name is a free data retrieval call binding the contract method 0x06fdde03. +// +// Solidity: function name() view returns(string) +func (_ERC721 *ERC721CallerSession) Name() (string, error) { + return _ERC721.Contract.Name(&_ERC721.CallOpts) +} + +// OwnerOf is a free data retrieval call binding the contract method 0x6352211e. +// +// Solidity: function ownerOf(uint256 tokenId) view returns(address) +func (_ERC721 *ERC721Caller) OwnerOf(opts *bind.CallOpts, tokenId *big.Int) (common.Address, error) { + var ( + ret0 = new(common.Address) + ) + out := ret0 + err := _ERC721.contract.Call(opts, out, "ownerOf", tokenId) + return *ret0, err +} + +// OwnerOf is a free data retrieval call binding the contract method 0x6352211e. +// +// Solidity: function ownerOf(uint256 tokenId) view returns(address) +func (_ERC721 *ERC721Session) OwnerOf(tokenId *big.Int) (common.Address, error) { + return _ERC721.Contract.OwnerOf(&_ERC721.CallOpts, tokenId) +} + +// OwnerOf is a free data retrieval call binding the contract method 0x6352211e. +// +// Solidity: function ownerOf(uint256 tokenId) view returns(address) +func (_ERC721 *ERC721CallerSession) OwnerOf(tokenId *big.Int) (common.Address, error) { + return _ERC721.Contract.OwnerOf(&_ERC721.CallOpts, tokenId) +} + +// SupportsInterface is a free data retrieval call binding the contract method 0x01ffc9a7. +// +// Solidity: function supportsInterface(bytes4 interfaceId) view returns(bool) +func (_ERC721 *ERC721Caller) SupportsInterface(opts *bind.CallOpts, interfaceId [4]byte) (bool, error) { + var ( + ret0 = new(bool) + ) + out := ret0 + err := _ERC721.contract.Call(opts, out, "supportsInterface", interfaceId) + return *ret0, err +} + +// SupportsInterface is a free data retrieval call binding the contract method 0x01ffc9a7. +// +// Solidity: function supportsInterface(bytes4 interfaceId) view returns(bool) +func (_ERC721 *ERC721Session) SupportsInterface(interfaceId [4]byte) (bool, error) { + return _ERC721.Contract.SupportsInterface(&_ERC721.CallOpts, interfaceId) +} + +// SupportsInterface is a free data retrieval call binding the contract method 0x01ffc9a7. +// +// Solidity: function supportsInterface(bytes4 interfaceId) view returns(bool) +func (_ERC721 *ERC721CallerSession) SupportsInterface(interfaceId [4]byte) (bool, error) { + return _ERC721.Contract.SupportsInterface(&_ERC721.CallOpts, interfaceId) +} + +// Symbol is a free data retrieval call binding the contract method 0x95d89b41. +// +// Solidity: function symbol() view returns(string) +func (_ERC721 *ERC721Caller) Symbol(opts *bind.CallOpts) (string, error) { + var ( + ret0 = new(string) + ) + out := ret0 + err := _ERC721.contract.Call(opts, out, "symbol") + return *ret0, err +} + +// Symbol is a free data retrieval call binding the contract method 0x95d89b41. +// +// Solidity: function symbol() view returns(string) +func (_ERC721 *ERC721Session) Symbol() (string, error) { + return _ERC721.Contract.Symbol(&_ERC721.CallOpts) +} + +// Symbol is a free data retrieval call binding the contract method 0x95d89b41. +// +// Solidity: function symbol() view returns(string) +func (_ERC721 *ERC721CallerSession) Symbol() (string, error) { + return _ERC721.Contract.Symbol(&_ERC721.CallOpts) +} + +// TokenByIndex is a free data retrieval call binding the contract method 0x4f6ccce7. +// +// Solidity: function tokenByIndex(uint256 index) view returns(uint256) +func (_ERC721 *ERC721Caller) TokenByIndex(opts *bind.CallOpts, index *big.Int) (*big.Int, error) { + var ( + ret0 = new(*big.Int) + ) + out := ret0 + err := _ERC721.contract.Call(opts, out, "tokenByIndex", index) + return *ret0, err +} + +// TokenByIndex is a free data retrieval call binding the contract method 0x4f6ccce7. +// +// Solidity: function tokenByIndex(uint256 index) view returns(uint256) +func (_ERC721 *ERC721Session) TokenByIndex(index *big.Int) (*big.Int, error) { + return _ERC721.Contract.TokenByIndex(&_ERC721.CallOpts, index) +} + +// TokenByIndex is a free data retrieval call binding the contract method 0x4f6ccce7. +// +// Solidity: function tokenByIndex(uint256 index) view returns(uint256) +func (_ERC721 *ERC721CallerSession) TokenByIndex(index *big.Int) (*big.Int, error) { + return _ERC721.Contract.TokenByIndex(&_ERC721.CallOpts, index) +} + +// TokenOfOwnerByIndex is a free data retrieval call binding the contract method 0x2f745c59. +// +// Solidity: function tokenOfOwnerByIndex(address owner, uint256 index) view returns(uint256) +func (_ERC721 *ERC721Caller) TokenOfOwnerByIndex(opts *bind.CallOpts, owner common.Address, index *big.Int) (*big.Int, error) { + var ( + ret0 = new(*big.Int) + ) + out := ret0 + err := _ERC721.contract.Call(opts, out, "tokenOfOwnerByIndex", owner, index) + return *ret0, err +} + +// TokenOfOwnerByIndex is a free data retrieval call binding the contract method 0x2f745c59. +// +// Solidity: function tokenOfOwnerByIndex(address owner, uint256 index) view returns(uint256) +func (_ERC721 *ERC721Session) TokenOfOwnerByIndex(owner common.Address, index *big.Int) (*big.Int, error) { + return _ERC721.Contract.TokenOfOwnerByIndex(&_ERC721.CallOpts, owner, index) +} + +// TokenOfOwnerByIndex is a free data retrieval call binding the contract method 0x2f745c59. +// +// Solidity: function tokenOfOwnerByIndex(address owner, uint256 index) view returns(uint256) +func (_ERC721 *ERC721CallerSession) TokenOfOwnerByIndex(owner common.Address, index *big.Int) (*big.Int, error) { + return _ERC721.Contract.TokenOfOwnerByIndex(&_ERC721.CallOpts, owner, index) +} + +// TokenURI is a free data retrieval call binding the contract method 0xc87b56dd. +// +// Solidity: function tokenURI(uint256 tokenId) view returns(string) +func (_ERC721 *ERC721Caller) TokenURI(opts *bind.CallOpts, tokenId *big.Int) (string, error) { + var ( + ret0 = new(string) + ) + out := ret0 + err := _ERC721.contract.Call(opts, out, "tokenURI", tokenId) + return *ret0, err +} + +// TokenURI is a free data retrieval call binding the contract method 0xc87b56dd. +// +// Solidity: function tokenURI(uint256 tokenId) view returns(string) +func (_ERC721 *ERC721Session) TokenURI(tokenId *big.Int) (string, error) { + return _ERC721.Contract.TokenURI(&_ERC721.CallOpts, tokenId) +} + +// TokenURI is a free data retrieval call binding the contract method 0xc87b56dd. +// +// Solidity: function tokenURI(uint256 tokenId) view returns(string) +func (_ERC721 *ERC721CallerSession) TokenURI(tokenId *big.Int) (string, error) { + return _ERC721.Contract.TokenURI(&_ERC721.CallOpts, tokenId) +} + +// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. +// +// Solidity: function totalSupply() view returns(uint256) +func (_ERC721 *ERC721Caller) TotalSupply(opts *bind.CallOpts) (*big.Int, error) { + var ( + ret0 = new(*big.Int) + ) + out := ret0 + err := _ERC721.contract.Call(opts, out, "totalSupply") + return *ret0, err +} + +// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. +// +// Solidity: function totalSupply() view returns(uint256) +func (_ERC721 *ERC721Session) TotalSupply() (*big.Int, error) { + return _ERC721.Contract.TotalSupply(&_ERC721.CallOpts) +} + +// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. +// +// Solidity: function totalSupply() view returns(uint256) +func (_ERC721 *ERC721CallerSession) TotalSupply() (*big.Int, error) { + return _ERC721.Contract.TotalSupply(&_ERC721.CallOpts) +} + +// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. +// +// Solidity: function approve(address to, uint256 tokenId) returns() +func (_ERC721 *ERC721Transactor) Approve(opts *bind.TransactOpts, to common.Address, tokenId *big.Int) (*types.Transaction, error) { + return _ERC721.contract.Transact(opts, "approve", to, tokenId) +} + +// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. +// +// Solidity: function approve(address to, uint256 tokenId) returns() +func (_ERC721 *ERC721Session) Approve(to common.Address, tokenId *big.Int) (*types.Transaction, error) { + return _ERC721.Contract.Approve(&_ERC721.TransactOpts, to, tokenId) +} + +// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. +// +// Solidity: function approve(address to, uint256 tokenId) returns() +func (_ERC721 *ERC721TransactorSession) Approve(to common.Address, tokenId *big.Int) (*types.Transaction, error) { + return _ERC721.Contract.Approve(&_ERC721.TransactOpts, to, tokenId) +} + +// SafeTransferFrom is a paid mutator transaction binding the contract method 0x42842e0e. +// +// Solidity: function safeTransferFrom(address from, address to, uint256 tokenId) returns() +func (_ERC721 *ERC721Transactor) SafeTransferFrom(opts *bind.TransactOpts, from common.Address, to common.Address, tokenId *big.Int) (*types.Transaction, error) { + return _ERC721.contract.Transact(opts, "safeTransferFrom", from, to, tokenId) +} + +// SafeTransferFrom is a paid mutator transaction binding the contract method 0x42842e0e. +// +// Solidity: function safeTransferFrom(address from, address to, uint256 tokenId) returns() +func (_ERC721 *ERC721Session) SafeTransferFrom(from common.Address, to common.Address, tokenId *big.Int) (*types.Transaction, error) { + return _ERC721.Contract.SafeTransferFrom(&_ERC721.TransactOpts, from, to, tokenId) +} + +// SafeTransferFrom is a paid mutator transaction binding the contract method 0x42842e0e. +// +// Solidity: function safeTransferFrom(address from, address to, uint256 tokenId) returns() +func (_ERC721 *ERC721TransactorSession) SafeTransferFrom(from common.Address, to common.Address, tokenId *big.Int) (*types.Transaction, error) { + return _ERC721.Contract.SafeTransferFrom(&_ERC721.TransactOpts, from, to, tokenId) +} + +// SafeTransferFrom0 is a paid mutator transaction binding the contract method 0xb88d4fde. +// +// Solidity: function safeTransferFrom(address from, address to, uint256 tokenId, bytes _data) returns() +func (_ERC721 *ERC721Transactor) SafeTransferFrom0(opts *bind.TransactOpts, from common.Address, to common.Address, tokenId *big.Int, _data []byte) (*types.Transaction, error) { + return _ERC721.contract.Transact(opts, "safeTransferFrom0", from, to, tokenId, _data) +} + +// SafeTransferFrom0 is a paid mutator transaction binding the contract method 0xb88d4fde. +// +// Solidity: function safeTransferFrom(address from, address to, uint256 tokenId, bytes _data) returns() +func (_ERC721 *ERC721Session) SafeTransferFrom0(from common.Address, to common.Address, tokenId *big.Int, _data []byte) (*types.Transaction, error) { + return _ERC721.Contract.SafeTransferFrom0(&_ERC721.TransactOpts, from, to, tokenId, _data) +} + +// SafeTransferFrom0 is a paid mutator transaction binding the contract method 0xb88d4fde. +// +// Solidity: function safeTransferFrom(address from, address to, uint256 tokenId, bytes _data) returns() +func (_ERC721 *ERC721TransactorSession) SafeTransferFrom0(from common.Address, to common.Address, tokenId *big.Int, _data []byte) (*types.Transaction, error) { + return _ERC721.Contract.SafeTransferFrom0(&_ERC721.TransactOpts, from, to, tokenId, _data) +} + +// SetApprovalForAll is a paid mutator transaction binding the contract method 0xa22cb465. +// +// Solidity: function setApprovalForAll(address operator, bool approved) returns() +func (_ERC721 *ERC721Transactor) SetApprovalForAll(opts *bind.TransactOpts, operator common.Address, approved bool) (*types.Transaction, error) { + return _ERC721.contract.Transact(opts, "setApprovalForAll", operator, approved) +} + +// SetApprovalForAll is a paid mutator transaction binding the contract method 0xa22cb465. +// +// Solidity: function setApprovalForAll(address operator, bool approved) returns() +func (_ERC721 *ERC721Session) SetApprovalForAll(operator common.Address, approved bool) (*types.Transaction, error) { + return _ERC721.Contract.SetApprovalForAll(&_ERC721.TransactOpts, operator, approved) +} + +// SetApprovalForAll is a paid mutator transaction binding the contract method 0xa22cb465. +// +// Solidity: function setApprovalForAll(address operator, bool approved) returns() +func (_ERC721 *ERC721TransactorSession) SetApprovalForAll(operator common.Address, approved bool) (*types.Transaction, error) { + return _ERC721.Contract.SetApprovalForAll(&_ERC721.TransactOpts, operator, approved) +} + +// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. +// +// Solidity: function transferFrom(address from, address to, uint256 tokenId) returns() +func (_ERC721 *ERC721Transactor) TransferFrom(opts *bind.TransactOpts, from common.Address, to common.Address, tokenId *big.Int) (*types.Transaction, error) { + return _ERC721.contract.Transact(opts, "transferFrom", from, to, tokenId) +} + +// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. +// +// Solidity: function transferFrom(address from, address to, uint256 tokenId) returns() +func (_ERC721 *ERC721Session) TransferFrom(from common.Address, to common.Address, tokenId *big.Int) (*types.Transaction, error) { + return _ERC721.Contract.TransferFrom(&_ERC721.TransactOpts, from, to, tokenId) +} + +// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. +// +// Solidity: function transferFrom(address from, address to, uint256 tokenId) returns() +func (_ERC721 *ERC721TransactorSession) TransferFrom(from common.Address, to common.Address, tokenId *big.Int) (*types.Transaction, error) { + return _ERC721.Contract.TransferFrom(&_ERC721.TransactOpts, from, to, tokenId) +} + +// ERC721ApprovalIterator is returned from FilterApproval and is used to iterate over the raw logs and unpacked data for Approval events raised by the ERC721 contract. +type ERC721ApprovalIterator struct { + Event *ERC721Approval // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *ERC721ApprovalIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(ERC721Approval) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(ERC721Approval) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *ERC721ApprovalIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ERC721ApprovalIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ERC721Approval represents a Approval event raised by the ERC721 contract. +type ERC721Approval struct { + Owner common.Address + Approved common.Address + TokenId *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterApproval is a free log retrieval operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. +// +// Solidity: event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId) +func (_ERC721 *ERC721Filterer) FilterApproval(opts *bind.FilterOpts, owner []common.Address, approved []common.Address, tokenId []*big.Int) (*ERC721ApprovalIterator, error) { + + var ownerRule []interface{} + for _, ownerItem := range owner { + ownerRule = append(ownerRule, ownerItem) + } + var approvedRule []interface{} + for _, approvedItem := range approved { + approvedRule = append(approvedRule, approvedItem) + } + var tokenIdRule []interface{} + for _, tokenIdItem := range tokenId { + tokenIdRule = append(tokenIdRule, tokenIdItem) + } + + logs, sub, err := _ERC721.contract.FilterLogs(opts, "Approval", ownerRule, approvedRule, tokenIdRule) + if err != nil { + return nil, err + } + return &ERC721ApprovalIterator{contract: _ERC721.contract, event: "Approval", logs: logs, sub: sub}, nil +} + +// WatchApproval is a free log subscription operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. +// +// Solidity: event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId) +func (_ERC721 *ERC721Filterer) WatchApproval(opts *bind.WatchOpts, sink chan<- *ERC721Approval, owner []common.Address, approved []common.Address, tokenId []*big.Int) (event.Subscription, error) { + + var ownerRule []interface{} + for _, ownerItem := range owner { + ownerRule = append(ownerRule, ownerItem) + } + var approvedRule []interface{} + for _, approvedItem := range approved { + approvedRule = append(approvedRule, approvedItem) + } + var tokenIdRule []interface{} + for _, tokenIdItem := range tokenId { + tokenIdRule = append(tokenIdRule, tokenIdItem) + } + + logs, sub, err := _ERC721.contract.WatchLogs(opts, "Approval", ownerRule, approvedRule, tokenIdRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(ERC721Approval) + if err := _ERC721.contract.UnpackLog(event, "Approval", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseApproval is a log parse operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. +// +// Solidity: event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId) +func (_ERC721 *ERC721Filterer) ParseApproval(log types.Log) (*ERC721Approval, error) { + event := new(ERC721Approval) + if err := _ERC721.contract.UnpackLog(event, "Approval", log); err != nil { + return nil, err + } + return event, nil +} + +// ERC721ApprovalForAllIterator is returned from FilterApprovalForAll and is used to iterate over the raw logs and unpacked data for ApprovalForAll events raised by the ERC721 contract. +type ERC721ApprovalForAllIterator struct { + Event *ERC721ApprovalForAll // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *ERC721ApprovalForAllIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(ERC721ApprovalForAll) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(ERC721ApprovalForAll) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *ERC721ApprovalForAllIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ERC721ApprovalForAllIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ERC721ApprovalForAll represents a ApprovalForAll event raised by the ERC721 contract. +type ERC721ApprovalForAll struct { + Owner common.Address + Operator common.Address + Approved bool + Raw types.Log // Blockchain specific contextual infos +} + +// FilterApprovalForAll is a free log retrieval operation binding the contract event 0x17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31. +// +// Solidity: event ApprovalForAll(address indexed owner, address indexed operator, bool approved) +func (_ERC721 *ERC721Filterer) FilterApprovalForAll(opts *bind.FilterOpts, owner []common.Address, operator []common.Address) (*ERC721ApprovalForAllIterator, error) { + + var ownerRule []interface{} + for _, ownerItem := range owner { + ownerRule = append(ownerRule, ownerItem) + } + var operatorRule []interface{} + for _, operatorItem := range operator { + operatorRule = append(operatorRule, operatorItem) + } + + logs, sub, err := _ERC721.contract.FilterLogs(opts, "ApprovalForAll", ownerRule, operatorRule) + if err != nil { + return nil, err + } + return &ERC721ApprovalForAllIterator{contract: _ERC721.contract, event: "ApprovalForAll", logs: logs, sub: sub}, nil +} + +// WatchApprovalForAll is a free log subscription operation binding the contract event 0x17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31. +// +// Solidity: event ApprovalForAll(address indexed owner, address indexed operator, bool approved) +func (_ERC721 *ERC721Filterer) WatchApprovalForAll(opts *bind.WatchOpts, sink chan<- *ERC721ApprovalForAll, owner []common.Address, operator []common.Address) (event.Subscription, error) { + + var ownerRule []interface{} + for _, ownerItem := range owner { + ownerRule = append(ownerRule, ownerItem) + } + var operatorRule []interface{} + for _, operatorItem := range operator { + operatorRule = append(operatorRule, operatorItem) + } + + logs, sub, err := _ERC721.contract.WatchLogs(opts, "ApprovalForAll", ownerRule, operatorRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(ERC721ApprovalForAll) + if err := _ERC721.contract.UnpackLog(event, "ApprovalForAll", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseApprovalForAll is a log parse operation binding the contract event 0x17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31. +// +// Solidity: event ApprovalForAll(address indexed owner, address indexed operator, bool approved) +func (_ERC721 *ERC721Filterer) ParseApprovalForAll(log types.Log) (*ERC721ApprovalForAll, error) { + event := new(ERC721ApprovalForAll) + if err := _ERC721.contract.UnpackLog(event, "ApprovalForAll", log); err != nil { + return nil, err + } + return event, nil +} + +// ERC721TransferIterator is returned from FilterTransfer and is used to iterate over the raw logs and unpacked data for Transfer events raised by the ERC721 contract. +type ERC721TransferIterator struct { + Event *ERC721Transfer // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *ERC721TransferIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(ERC721Transfer) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(ERC721Transfer) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *ERC721TransferIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ERC721TransferIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ERC721Transfer represents a Transfer event raised by the ERC721 contract. +type ERC721Transfer struct { + From common.Address + To common.Address + TokenId *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterTransfer is a free log retrieval operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. +// +// Solidity: event Transfer(address indexed from, address indexed to, uint256 indexed tokenId) +func (_ERC721 *ERC721Filterer) FilterTransfer(opts *bind.FilterOpts, from []common.Address, to []common.Address, tokenId []*big.Int) (*ERC721TransferIterator, error) { + + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + var tokenIdRule []interface{} + for _, tokenIdItem := range tokenId { + tokenIdRule = append(tokenIdRule, tokenIdItem) + } + + logs, sub, err := _ERC721.contract.FilterLogs(opts, "Transfer", fromRule, toRule, tokenIdRule) + if err != nil { + return nil, err + } + return &ERC721TransferIterator{contract: _ERC721.contract, event: "Transfer", logs: logs, sub: sub}, nil +} + +// WatchTransfer is a free log subscription operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. +// +// Solidity: event Transfer(address indexed from, address indexed to, uint256 indexed tokenId) +func (_ERC721 *ERC721Filterer) WatchTransfer(opts *bind.WatchOpts, sink chan<- *ERC721Transfer, from []common.Address, to []common.Address, tokenId []*big.Int) (event.Subscription, error) { + + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + var tokenIdRule []interface{} + for _, tokenIdItem := range tokenId { + tokenIdRule = append(tokenIdRule, tokenIdItem) + } + + logs, sub, err := _ERC721.contract.WatchLogs(opts, "Transfer", fromRule, toRule, tokenIdRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(ERC721Transfer) + if err := _ERC721.contract.UnpackLog(event, "Transfer", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseTransfer is a log parse operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. +// +// Solidity: event Transfer(address indexed from, address indexed to, uint256 indexed tokenId) +func (_ERC721 *ERC721Filterer) ParseTransfer(log types.Log) (*ERC721Transfer, error) { + event := new(ERC721Transfer) + if err := _ERC721.contract.UnpackLog(event, "Transfer", log); err != nil { + return nil, err + } + return event, nil +} + +// EnumerableMapABI is the input ABI used to generate the binding from. +const EnumerableMapABI = "[]" + +// EnumerableMapBin is the compiled bytecode used for deploying new contracts. +var EnumerableMapBin = "0x60566023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea264697066735822122093a35f3cda4d8c8717a4072ffd8185a1708f8387967113db15dd61e1f7f5d77164736f6c634300060c0033" + +// DeployEnumerableMap deploys a new Ethereum contract, binding an instance of EnumerableMap to it. +func DeployEnumerableMap(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *EnumerableMap, error) { + parsed, err := abi.JSON(strings.NewReader(EnumerableMapABI)) + if err != nil { + return common.Address{}, nil, nil, err + } + + address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(EnumerableMapBin), backend) + if err != nil { + return common.Address{}, nil, nil, err + } + return address, tx, &EnumerableMap{EnumerableMapCaller: EnumerableMapCaller{contract: contract}, EnumerableMapTransactor: EnumerableMapTransactor{contract: contract}, EnumerableMapFilterer: EnumerableMapFilterer{contract: contract}}, nil +} + +// EnumerableMap is an auto generated Go binding around an Ethereum contract. +type EnumerableMap struct { + EnumerableMapCaller // Read-only binding to the contract + EnumerableMapTransactor // Write-only binding to the contract + EnumerableMapFilterer // Log filterer for contract events +} + +// EnumerableMapCaller is an auto generated read-only Go binding around an Ethereum contract. +type EnumerableMapCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// EnumerableMapTransactor is an auto generated write-only Go binding around an Ethereum contract. +type EnumerableMapTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// EnumerableMapFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type EnumerableMapFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// EnumerableMapSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type EnumerableMapSession struct { + Contract *EnumerableMap // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// EnumerableMapCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type EnumerableMapCallerSession struct { + Contract *EnumerableMapCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// EnumerableMapTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type EnumerableMapTransactorSession struct { + Contract *EnumerableMapTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// EnumerableMapRaw is an auto generated low-level Go binding around an Ethereum contract. +type EnumerableMapRaw struct { + Contract *EnumerableMap // Generic contract binding to access the raw methods on +} + +// EnumerableMapCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type EnumerableMapCallerRaw struct { + Contract *EnumerableMapCaller // Generic read-only contract binding to access the raw methods on +} + +// EnumerableMapTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type EnumerableMapTransactorRaw struct { + Contract *EnumerableMapTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewEnumerableMap creates a new instance of EnumerableMap, bound to a specific deployed contract. +func NewEnumerableMap(address common.Address, backend bind.ContractBackend) (*EnumerableMap, error) { + contract, err := bindEnumerableMap(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &EnumerableMap{EnumerableMapCaller: EnumerableMapCaller{contract: contract}, EnumerableMapTransactor: EnumerableMapTransactor{contract: contract}, EnumerableMapFilterer: EnumerableMapFilterer{contract: contract}}, nil +} + +// NewEnumerableMapCaller creates a new read-only instance of EnumerableMap, bound to a specific deployed contract. +func NewEnumerableMapCaller(address common.Address, caller bind.ContractCaller) (*EnumerableMapCaller, error) { + contract, err := bindEnumerableMap(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &EnumerableMapCaller{contract: contract}, nil +} + +// NewEnumerableMapTransactor creates a new write-only instance of EnumerableMap, bound to a specific deployed contract. +func NewEnumerableMapTransactor(address common.Address, transactor bind.ContractTransactor) (*EnumerableMapTransactor, error) { + contract, err := bindEnumerableMap(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &EnumerableMapTransactor{contract: contract}, nil +} + +// NewEnumerableMapFilterer creates a new log filterer instance of EnumerableMap, bound to a specific deployed contract. +func NewEnumerableMapFilterer(address common.Address, filterer bind.ContractFilterer) (*EnumerableMapFilterer, error) { + contract, err := bindEnumerableMap(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &EnumerableMapFilterer{contract: contract}, nil +} + +// bindEnumerableMap binds a generic wrapper to an already deployed contract. +func bindEnumerableMap(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := abi.JSON(strings.NewReader(EnumerableMapABI)) + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_EnumerableMap *EnumerableMapRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { + return _EnumerableMap.Contract.EnumerableMapCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_EnumerableMap *EnumerableMapRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _EnumerableMap.Contract.EnumerableMapTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_EnumerableMap *EnumerableMapRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _EnumerableMap.Contract.EnumerableMapTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_EnumerableMap *EnumerableMapCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { + return _EnumerableMap.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_EnumerableMap *EnumerableMapTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _EnumerableMap.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_EnumerableMap *EnumerableMapTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _EnumerableMap.Contract.contract.Transact(opts, method, params...) +} + +// EnumerableSetABI is the input ABI used to generate the binding from. +const EnumerableSetABI = "[]" + +// EnumerableSetBin is the compiled bytecode used for deploying new contracts. +var EnumerableSetBin = "0x60566023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220c973e2991e6077d16b8cffc347852ee835cd1ab0c4f40f66491f210e72f05c2a64736f6c634300060c0033" + +// DeployEnumerableSet deploys a new Ethereum contract, binding an instance of EnumerableSet to it. +func DeployEnumerableSet(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *EnumerableSet, error) { + parsed, err := abi.JSON(strings.NewReader(EnumerableSetABI)) + if err != nil { + return common.Address{}, nil, nil, err + } + + address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(EnumerableSetBin), backend) + if err != nil { + return common.Address{}, nil, nil, err + } + return address, tx, &EnumerableSet{EnumerableSetCaller: EnumerableSetCaller{contract: contract}, EnumerableSetTransactor: EnumerableSetTransactor{contract: contract}, EnumerableSetFilterer: EnumerableSetFilterer{contract: contract}}, nil +} + +// EnumerableSet is an auto generated Go binding around an Ethereum contract. +type EnumerableSet struct { + EnumerableSetCaller // Read-only binding to the contract + EnumerableSetTransactor // Write-only binding to the contract + EnumerableSetFilterer // Log filterer for contract events +} + +// EnumerableSetCaller is an auto generated read-only Go binding around an Ethereum contract. +type EnumerableSetCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// EnumerableSetTransactor is an auto generated write-only Go binding around an Ethereum contract. +type EnumerableSetTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// EnumerableSetFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type EnumerableSetFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// EnumerableSetSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type EnumerableSetSession struct { + Contract *EnumerableSet // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// EnumerableSetCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type EnumerableSetCallerSession struct { + Contract *EnumerableSetCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// EnumerableSetTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type EnumerableSetTransactorSession struct { + Contract *EnumerableSetTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// EnumerableSetRaw is an auto generated low-level Go binding around an Ethereum contract. +type EnumerableSetRaw struct { + Contract *EnumerableSet // Generic contract binding to access the raw methods on +} + +// EnumerableSetCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type EnumerableSetCallerRaw struct { + Contract *EnumerableSetCaller // Generic read-only contract binding to access the raw methods on +} + +// EnumerableSetTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type EnumerableSetTransactorRaw struct { + Contract *EnumerableSetTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewEnumerableSet creates a new instance of EnumerableSet, bound to a specific deployed contract. +func NewEnumerableSet(address common.Address, backend bind.ContractBackend) (*EnumerableSet, error) { + contract, err := bindEnumerableSet(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &EnumerableSet{EnumerableSetCaller: EnumerableSetCaller{contract: contract}, EnumerableSetTransactor: EnumerableSetTransactor{contract: contract}, EnumerableSetFilterer: EnumerableSetFilterer{contract: contract}}, nil +} + +// NewEnumerableSetCaller creates a new read-only instance of EnumerableSet, bound to a specific deployed contract. +func NewEnumerableSetCaller(address common.Address, caller bind.ContractCaller) (*EnumerableSetCaller, error) { + contract, err := bindEnumerableSet(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &EnumerableSetCaller{contract: contract}, nil +} + +// NewEnumerableSetTransactor creates a new write-only instance of EnumerableSet, bound to a specific deployed contract. +func NewEnumerableSetTransactor(address common.Address, transactor bind.ContractTransactor) (*EnumerableSetTransactor, error) { + contract, err := bindEnumerableSet(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &EnumerableSetTransactor{contract: contract}, nil +} + +// NewEnumerableSetFilterer creates a new log filterer instance of EnumerableSet, bound to a specific deployed contract. +func NewEnumerableSetFilterer(address common.Address, filterer bind.ContractFilterer) (*EnumerableSetFilterer, error) { + contract, err := bindEnumerableSet(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &EnumerableSetFilterer{contract: contract}, nil +} + +// bindEnumerableSet binds a generic wrapper to an already deployed contract. +func bindEnumerableSet(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := abi.JSON(strings.NewReader(EnumerableSetABI)) + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_EnumerableSet *EnumerableSetRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { + return _EnumerableSet.Contract.EnumerableSetCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_EnumerableSet *EnumerableSetRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _EnumerableSet.Contract.EnumerableSetTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_EnumerableSet *EnumerableSetRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _EnumerableSet.Contract.EnumerableSetTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_EnumerableSet *EnumerableSetCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { + return _EnumerableSet.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_EnumerableSet *EnumerableSetTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _EnumerableSet.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_EnumerableSet *EnumerableSetTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _EnumerableSet.Contract.contract.Transact(opts, method, params...) +} + +// IERC165ABI is the input ABI used to generate the binding from. +const IERC165ABI = "[{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]" + +// IERC165FuncSigs maps the 4-byte function signature to its string representation. +var IERC165FuncSigs = map[string]string{ + "01ffc9a7": "supportsInterface(bytes4)", +} + +// IERC165 is an auto generated Go binding around an Ethereum contract. +type IERC165 struct { + IERC165Caller // Read-only binding to the contract + IERC165Transactor // Write-only binding to the contract + IERC165Filterer // Log filterer for contract events +} + +// IERC165Caller is an auto generated read-only Go binding around an Ethereum contract. +type IERC165Caller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// IERC165Transactor is an auto generated write-only Go binding around an Ethereum contract. +type IERC165Transactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// IERC165Filterer is an auto generated log filtering Go binding around an Ethereum contract events. +type IERC165Filterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// IERC165Session is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type IERC165Session struct { + Contract *IERC165 // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// IERC165CallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type IERC165CallerSession struct { + Contract *IERC165Caller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// IERC165TransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type IERC165TransactorSession struct { + Contract *IERC165Transactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// IERC165Raw is an auto generated low-level Go binding around an Ethereum contract. +type IERC165Raw struct { + Contract *IERC165 // Generic contract binding to access the raw methods on +} + +// IERC165CallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type IERC165CallerRaw struct { + Contract *IERC165Caller // Generic read-only contract binding to access the raw methods on +} + +// IERC165TransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type IERC165TransactorRaw struct { + Contract *IERC165Transactor // Generic write-only contract binding to access the raw methods on +} + +// NewIERC165 creates a new instance of IERC165, bound to a specific deployed contract. +func NewIERC165(address common.Address, backend bind.ContractBackend) (*IERC165, error) { + contract, err := bindIERC165(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &IERC165{IERC165Caller: IERC165Caller{contract: contract}, IERC165Transactor: IERC165Transactor{contract: contract}, IERC165Filterer: IERC165Filterer{contract: contract}}, nil +} + +// NewIERC165Caller creates a new read-only instance of IERC165, bound to a specific deployed contract. +func NewIERC165Caller(address common.Address, caller bind.ContractCaller) (*IERC165Caller, error) { + contract, err := bindIERC165(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &IERC165Caller{contract: contract}, nil +} + +// NewIERC165Transactor creates a new write-only instance of IERC165, bound to a specific deployed contract. +func NewIERC165Transactor(address common.Address, transactor bind.ContractTransactor) (*IERC165Transactor, error) { + contract, err := bindIERC165(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &IERC165Transactor{contract: contract}, nil +} + +// NewIERC165Filterer creates a new log filterer instance of IERC165, bound to a specific deployed contract. +func NewIERC165Filterer(address common.Address, filterer bind.ContractFilterer) (*IERC165Filterer, error) { + contract, err := bindIERC165(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &IERC165Filterer{contract: contract}, nil +} + +// bindIERC165 binds a generic wrapper to an already deployed contract. +func bindIERC165(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := abi.JSON(strings.NewReader(IERC165ABI)) + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_IERC165 *IERC165Raw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { + return _IERC165.Contract.IERC165Caller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_IERC165 *IERC165Raw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _IERC165.Contract.IERC165Transactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_IERC165 *IERC165Raw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _IERC165.Contract.IERC165Transactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_IERC165 *IERC165CallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { + return _IERC165.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_IERC165 *IERC165TransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _IERC165.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_IERC165 *IERC165TransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _IERC165.Contract.contract.Transact(opts, method, params...) +} + +// SupportsInterface is a free data retrieval call binding the contract method 0x01ffc9a7. +// +// Solidity: function supportsInterface(bytes4 interfaceId) view returns(bool) +func (_IERC165 *IERC165Caller) SupportsInterface(opts *bind.CallOpts, interfaceId [4]byte) (bool, error) { + var ( + ret0 = new(bool) + ) + out := ret0 + err := _IERC165.contract.Call(opts, out, "supportsInterface", interfaceId) + return *ret0, err +} + +// SupportsInterface is a free data retrieval call binding the contract method 0x01ffc9a7. +// +// Solidity: function supportsInterface(bytes4 interfaceId) view returns(bool) +func (_IERC165 *IERC165Session) SupportsInterface(interfaceId [4]byte) (bool, error) { + return _IERC165.Contract.SupportsInterface(&_IERC165.CallOpts, interfaceId) +} + +// SupportsInterface is a free data retrieval call binding the contract method 0x01ffc9a7. +// +// Solidity: function supportsInterface(bytes4 interfaceId) view returns(bool) +func (_IERC165 *IERC165CallerSession) SupportsInterface(interfaceId [4]byte) (bool, error) { + return _IERC165.Contract.SupportsInterface(&_IERC165.CallOpts, interfaceId) +} + +// IERC721ABI is the input ABI used to generate the binding from. +const IERC721ABI = "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"approved\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"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\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"balance\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"getApproved\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"isApprovedForAll\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"ownerOf\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"safeTransferFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"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\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]" + +// IERC721FuncSigs maps the 4-byte function signature to its string representation. +var IERC721FuncSigs = map[string]string{ + "095ea7b3": "approve(address,uint256)", + "70a08231": "balanceOf(address)", + "081812fc": "getApproved(uint256)", + "e985e9c5": "isApprovedForAll(address,address)", + "6352211e": "ownerOf(uint256)", + "42842e0e": "safeTransferFrom(address,address,uint256)", + "b88d4fde": "safeTransferFrom(address,address,uint256,bytes)", + "a22cb465": "setApprovalForAll(address,bool)", + "01ffc9a7": "supportsInterface(bytes4)", + "23b872dd": "transferFrom(address,address,uint256)", +} + +// IERC721 is an auto generated Go binding around an Ethereum contract. +type IERC721 struct { + IERC721Caller // Read-only binding to the contract + IERC721Transactor // Write-only binding to the contract + IERC721Filterer // Log filterer for contract events +} + +// IERC721Caller is an auto generated read-only Go binding around an Ethereum contract. +type IERC721Caller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// IERC721Transactor is an auto generated write-only Go binding around an Ethereum contract. +type IERC721Transactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// IERC721Filterer is an auto generated log filtering Go binding around an Ethereum contract events. +type IERC721Filterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// IERC721Session is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type IERC721Session struct { + Contract *IERC721 // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// IERC721CallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type IERC721CallerSession struct { + Contract *IERC721Caller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// IERC721TransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type IERC721TransactorSession struct { + Contract *IERC721Transactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// IERC721Raw is an auto generated low-level Go binding around an Ethereum contract. +type IERC721Raw struct { + Contract *IERC721 // Generic contract binding to access the raw methods on +} + +// IERC721CallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type IERC721CallerRaw struct { + Contract *IERC721Caller // Generic read-only contract binding to access the raw methods on +} + +// IERC721TransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type IERC721TransactorRaw struct { + Contract *IERC721Transactor // Generic write-only contract binding to access the raw methods on +} + +// NewIERC721 creates a new instance of IERC721, bound to a specific deployed contract. +func NewIERC721(address common.Address, backend bind.ContractBackend) (*IERC721, error) { + contract, err := bindIERC721(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &IERC721{IERC721Caller: IERC721Caller{contract: contract}, IERC721Transactor: IERC721Transactor{contract: contract}, IERC721Filterer: IERC721Filterer{contract: contract}}, nil +} + +// NewIERC721Caller creates a new read-only instance of IERC721, bound to a specific deployed contract. +func NewIERC721Caller(address common.Address, caller bind.ContractCaller) (*IERC721Caller, error) { + contract, err := bindIERC721(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &IERC721Caller{contract: contract}, nil +} + +// NewIERC721Transactor creates a new write-only instance of IERC721, bound to a specific deployed contract. +func NewIERC721Transactor(address common.Address, transactor bind.ContractTransactor) (*IERC721Transactor, error) { + contract, err := bindIERC721(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &IERC721Transactor{contract: contract}, nil +} + +// NewIERC721Filterer creates a new log filterer instance of IERC721, bound to a specific deployed contract. +func NewIERC721Filterer(address common.Address, filterer bind.ContractFilterer) (*IERC721Filterer, error) { + contract, err := bindIERC721(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &IERC721Filterer{contract: contract}, nil +} + +// bindIERC721 binds a generic wrapper to an already deployed contract. +func bindIERC721(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := abi.JSON(strings.NewReader(IERC721ABI)) + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_IERC721 *IERC721Raw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { + return _IERC721.Contract.IERC721Caller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_IERC721 *IERC721Raw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _IERC721.Contract.IERC721Transactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_IERC721 *IERC721Raw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _IERC721.Contract.IERC721Transactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_IERC721 *IERC721CallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { + return _IERC721.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_IERC721 *IERC721TransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _IERC721.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_IERC721 *IERC721TransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _IERC721.Contract.contract.Transact(opts, method, params...) +} + +// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. +// +// Solidity: function balanceOf(address owner) view returns(uint256 balance) +func (_IERC721 *IERC721Caller) BalanceOf(opts *bind.CallOpts, owner common.Address) (*big.Int, error) { + var ( + ret0 = new(*big.Int) + ) + out := ret0 + err := _IERC721.contract.Call(opts, out, "balanceOf", owner) + return *ret0, err +} + +// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. +// +// Solidity: function balanceOf(address owner) view returns(uint256 balance) +func (_IERC721 *IERC721Session) BalanceOf(owner common.Address) (*big.Int, error) { + return _IERC721.Contract.BalanceOf(&_IERC721.CallOpts, owner) +} + +// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. +// +// Solidity: function balanceOf(address owner) view returns(uint256 balance) +func (_IERC721 *IERC721CallerSession) BalanceOf(owner common.Address) (*big.Int, error) { + return _IERC721.Contract.BalanceOf(&_IERC721.CallOpts, owner) +} + +// GetApproved is a free data retrieval call binding the contract method 0x081812fc. +// +// Solidity: function getApproved(uint256 tokenId) view returns(address operator) +func (_IERC721 *IERC721Caller) GetApproved(opts *bind.CallOpts, tokenId *big.Int) (common.Address, error) { + var ( + ret0 = new(common.Address) + ) + out := ret0 + err := _IERC721.contract.Call(opts, out, "getApproved", tokenId) + return *ret0, err +} + +// GetApproved is a free data retrieval call binding the contract method 0x081812fc. +// +// Solidity: function getApproved(uint256 tokenId) view returns(address operator) +func (_IERC721 *IERC721Session) GetApproved(tokenId *big.Int) (common.Address, error) { + return _IERC721.Contract.GetApproved(&_IERC721.CallOpts, tokenId) +} + +// GetApproved is a free data retrieval call binding the contract method 0x081812fc. +// +// Solidity: function getApproved(uint256 tokenId) view returns(address operator) +func (_IERC721 *IERC721CallerSession) GetApproved(tokenId *big.Int) (common.Address, error) { + return _IERC721.Contract.GetApproved(&_IERC721.CallOpts, tokenId) +} + +// IsApprovedForAll is a free data retrieval call binding the contract method 0xe985e9c5. +// +// Solidity: function isApprovedForAll(address owner, address operator) view returns(bool) +func (_IERC721 *IERC721Caller) IsApprovedForAll(opts *bind.CallOpts, owner common.Address, operator common.Address) (bool, error) { + var ( + ret0 = new(bool) + ) + out := ret0 + err := _IERC721.contract.Call(opts, out, "isApprovedForAll", owner, operator) + return *ret0, err +} + +// IsApprovedForAll is a free data retrieval call binding the contract method 0xe985e9c5. +// +// Solidity: function isApprovedForAll(address owner, address operator) view returns(bool) +func (_IERC721 *IERC721Session) IsApprovedForAll(owner common.Address, operator common.Address) (bool, error) { + return _IERC721.Contract.IsApprovedForAll(&_IERC721.CallOpts, owner, operator) +} + +// IsApprovedForAll is a free data retrieval call binding the contract method 0xe985e9c5. +// +// Solidity: function isApprovedForAll(address owner, address operator) view returns(bool) +func (_IERC721 *IERC721CallerSession) IsApprovedForAll(owner common.Address, operator common.Address) (bool, error) { + return _IERC721.Contract.IsApprovedForAll(&_IERC721.CallOpts, owner, operator) +} + +// OwnerOf is a free data retrieval call binding the contract method 0x6352211e. +// +// Solidity: function ownerOf(uint256 tokenId) view returns(address owner) +func (_IERC721 *IERC721Caller) OwnerOf(opts *bind.CallOpts, tokenId *big.Int) (common.Address, error) { + var ( + ret0 = new(common.Address) + ) + out := ret0 + err := _IERC721.contract.Call(opts, out, "ownerOf", tokenId) + return *ret0, err +} + +// OwnerOf is a free data retrieval call binding the contract method 0x6352211e. +// +// Solidity: function ownerOf(uint256 tokenId) view returns(address owner) +func (_IERC721 *IERC721Session) OwnerOf(tokenId *big.Int) (common.Address, error) { + return _IERC721.Contract.OwnerOf(&_IERC721.CallOpts, tokenId) +} + +// OwnerOf is a free data retrieval call binding the contract method 0x6352211e. +// +// Solidity: function ownerOf(uint256 tokenId) view returns(address owner) +func (_IERC721 *IERC721CallerSession) OwnerOf(tokenId *big.Int) (common.Address, error) { + return _IERC721.Contract.OwnerOf(&_IERC721.CallOpts, tokenId) +} + +// SupportsInterface is a free data retrieval call binding the contract method 0x01ffc9a7. +// +// Solidity: function supportsInterface(bytes4 interfaceId) view returns(bool) +func (_IERC721 *IERC721Caller) SupportsInterface(opts *bind.CallOpts, interfaceId [4]byte) (bool, error) { + var ( + ret0 = new(bool) + ) + out := ret0 + err := _IERC721.contract.Call(opts, out, "supportsInterface", interfaceId) + return *ret0, err +} + +// SupportsInterface is a free data retrieval call binding the contract method 0x01ffc9a7. +// +// Solidity: function supportsInterface(bytes4 interfaceId) view returns(bool) +func (_IERC721 *IERC721Session) SupportsInterface(interfaceId [4]byte) (bool, error) { + return _IERC721.Contract.SupportsInterface(&_IERC721.CallOpts, interfaceId) +} + +// SupportsInterface is a free data retrieval call binding the contract method 0x01ffc9a7. +// +// Solidity: function supportsInterface(bytes4 interfaceId) view returns(bool) +func (_IERC721 *IERC721CallerSession) SupportsInterface(interfaceId [4]byte) (bool, error) { + return _IERC721.Contract.SupportsInterface(&_IERC721.CallOpts, interfaceId) +} + +// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. +// +// Solidity: function approve(address to, uint256 tokenId) returns() +func (_IERC721 *IERC721Transactor) Approve(opts *bind.TransactOpts, to common.Address, tokenId *big.Int) (*types.Transaction, error) { + return _IERC721.contract.Transact(opts, "approve", to, tokenId) +} + +// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. +// +// Solidity: function approve(address to, uint256 tokenId) returns() +func (_IERC721 *IERC721Session) Approve(to common.Address, tokenId *big.Int) (*types.Transaction, error) { + return _IERC721.Contract.Approve(&_IERC721.TransactOpts, to, tokenId) +} + +// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. +// +// Solidity: function approve(address to, uint256 tokenId) returns() +func (_IERC721 *IERC721TransactorSession) Approve(to common.Address, tokenId *big.Int) (*types.Transaction, error) { + return _IERC721.Contract.Approve(&_IERC721.TransactOpts, to, tokenId) +} + +// SafeTransferFrom is a paid mutator transaction binding the contract method 0x42842e0e. +// +// Solidity: function safeTransferFrom(address from, address to, uint256 tokenId) returns() +func (_IERC721 *IERC721Transactor) SafeTransferFrom(opts *bind.TransactOpts, from common.Address, to common.Address, tokenId *big.Int) (*types.Transaction, error) { + return _IERC721.contract.Transact(opts, "safeTransferFrom", from, to, tokenId) +} + +// SafeTransferFrom is a paid mutator transaction binding the contract method 0x42842e0e. +// +// Solidity: function safeTransferFrom(address from, address to, uint256 tokenId) returns() +func (_IERC721 *IERC721Session) SafeTransferFrom(from common.Address, to common.Address, tokenId *big.Int) (*types.Transaction, error) { + return _IERC721.Contract.SafeTransferFrom(&_IERC721.TransactOpts, from, to, tokenId) +} + +// SafeTransferFrom is a paid mutator transaction binding the contract method 0x42842e0e. +// +// Solidity: function safeTransferFrom(address from, address to, uint256 tokenId) returns() +func (_IERC721 *IERC721TransactorSession) SafeTransferFrom(from common.Address, to common.Address, tokenId *big.Int) (*types.Transaction, error) { + return _IERC721.Contract.SafeTransferFrom(&_IERC721.TransactOpts, from, to, tokenId) +} + +// SafeTransferFrom0 is a paid mutator transaction binding the contract method 0xb88d4fde. +// +// Solidity: function safeTransferFrom(address from, address to, uint256 tokenId, bytes data) returns() +func (_IERC721 *IERC721Transactor) SafeTransferFrom0(opts *bind.TransactOpts, from common.Address, to common.Address, tokenId *big.Int, data []byte) (*types.Transaction, error) { + return _IERC721.contract.Transact(opts, "safeTransferFrom0", from, to, tokenId, data) +} + +// SafeTransferFrom0 is a paid mutator transaction binding the contract method 0xb88d4fde. +// +// Solidity: function safeTransferFrom(address from, address to, uint256 tokenId, bytes data) returns() +func (_IERC721 *IERC721Session) SafeTransferFrom0(from common.Address, to common.Address, tokenId *big.Int, data []byte) (*types.Transaction, error) { + return _IERC721.Contract.SafeTransferFrom0(&_IERC721.TransactOpts, from, to, tokenId, data) +} + +// SafeTransferFrom0 is a paid mutator transaction binding the contract method 0xb88d4fde. +// +// Solidity: function safeTransferFrom(address from, address to, uint256 tokenId, bytes data) returns() +func (_IERC721 *IERC721TransactorSession) SafeTransferFrom0(from common.Address, to common.Address, tokenId *big.Int, data []byte) (*types.Transaction, error) { + return _IERC721.Contract.SafeTransferFrom0(&_IERC721.TransactOpts, from, to, tokenId, data) +} + +// SetApprovalForAll is a paid mutator transaction binding the contract method 0xa22cb465. +// +// Solidity: function setApprovalForAll(address operator, bool _approved) returns() +func (_IERC721 *IERC721Transactor) SetApprovalForAll(opts *bind.TransactOpts, operator common.Address, _approved bool) (*types.Transaction, error) { + return _IERC721.contract.Transact(opts, "setApprovalForAll", operator, _approved) +} + +// SetApprovalForAll is a paid mutator transaction binding the contract method 0xa22cb465. +// +// Solidity: function setApprovalForAll(address operator, bool _approved) returns() +func (_IERC721 *IERC721Session) SetApprovalForAll(operator common.Address, _approved bool) (*types.Transaction, error) { + return _IERC721.Contract.SetApprovalForAll(&_IERC721.TransactOpts, operator, _approved) +} + +// SetApprovalForAll is a paid mutator transaction binding the contract method 0xa22cb465. +// +// Solidity: function setApprovalForAll(address operator, bool _approved) returns() +func (_IERC721 *IERC721TransactorSession) SetApprovalForAll(operator common.Address, _approved bool) (*types.Transaction, error) { + return _IERC721.Contract.SetApprovalForAll(&_IERC721.TransactOpts, operator, _approved) +} + +// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. +// +// Solidity: function transferFrom(address from, address to, uint256 tokenId) returns() +func (_IERC721 *IERC721Transactor) TransferFrom(opts *bind.TransactOpts, from common.Address, to common.Address, tokenId *big.Int) (*types.Transaction, error) { + return _IERC721.contract.Transact(opts, "transferFrom", from, to, tokenId) +} + +// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. +// +// Solidity: function transferFrom(address from, address to, uint256 tokenId) returns() +func (_IERC721 *IERC721Session) TransferFrom(from common.Address, to common.Address, tokenId *big.Int) (*types.Transaction, error) { + return _IERC721.Contract.TransferFrom(&_IERC721.TransactOpts, from, to, tokenId) +} + +// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. +// +// Solidity: function transferFrom(address from, address to, uint256 tokenId) returns() +func (_IERC721 *IERC721TransactorSession) TransferFrom(from common.Address, to common.Address, tokenId *big.Int) (*types.Transaction, error) { + return _IERC721.Contract.TransferFrom(&_IERC721.TransactOpts, from, to, tokenId) +} + +// IERC721ApprovalIterator is returned from FilterApproval and is used to iterate over the raw logs and unpacked data for Approval events raised by the IERC721 contract. +type IERC721ApprovalIterator struct { + Event *IERC721Approval // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *IERC721ApprovalIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(IERC721Approval) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(IERC721Approval) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *IERC721ApprovalIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *IERC721ApprovalIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// IERC721Approval represents a Approval event raised by the IERC721 contract. +type IERC721Approval struct { + Owner common.Address + Approved common.Address + TokenId *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterApproval is a free log retrieval operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. +// +// Solidity: event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId) +func (_IERC721 *IERC721Filterer) FilterApproval(opts *bind.FilterOpts, owner []common.Address, approved []common.Address, tokenId []*big.Int) (*IERC721ApprovalIterator, error) { + + var ownerRule []interface{} + for _, ownerItem := range owner { + ownerRule = append(ownerRule, ownerItem) + } + var approvedRule []interface{} + for _, approvedItem := range approved { + approvedRule = append(approvedRule, approvedItem) + } + var tokenIdRule []interface{} + for _, tokenIdItem := range tokenId { + tokenIdRule = append(tokenIdRule, tokenIdItem) + } + + logs, sub, err := _IERC721.contract.FilterLogs(opts, "Approval", ownerRule, approvedRule, tokenIdRule) + if err != nil { + return nil, err + } + return &IERC721ApprovalIterator{contract: _IERC721.contract, event: "Approval", logs: logs, sub: sub}, nil +} + +// WatchApproval is a free log subscription operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. +// +// Solidity: event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId) +func (_IERC721 *IERC721Filterer) WatchApproval(opts *bind.WatchOpts, sink chan<- *IERC721Approval, owner []common.Address, approved []common.Address, tokenId []*big.Int) (event.Subscription, error) { + + var ownerRule []interface{} + for _, ownerItem := range owner { + ownerRule = append(ownerRule, ownerItem) + } + var approvedRule []interface{} + for _, approvedItem := range approved { + approvedRule = append(approvedRule, approvedItem) + } + var tokenIdRule []interface{} + for _, tokenIdItem := range tokenId { + tokenIdRule = append(tokenIdRule, tokenIdItem) + } + + logs, sub, err := _IERC721.contract.WatchLogs(opts, "Approval", ownerRule, approvedRule, tokenIdRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(IERC721Approval) + if err := _IERC721.contract.UnpackLog(event, "Approval", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseApproval is a log parse operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. +// +// Solidity: event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId) +func (_IERC721 *IERC721Filterer) ParseApproval(log types.Log) (*IERC721Approval, error) { + event := new(IERC721Approval) + if err := _IERC721.contract.UnpackLog(event, "Approval", log); err != nil { + return nil, err + } + return event, nil +} + +// IERC721ApprovalForAllIterator is returned from FilterApprovalForAll and is used to iterate over the raw logs and unpacked data for ApprovalForAll events raised by the IERC721 contract. +type IERC721ApprovalForAllIterator struct { + Event *IERC721ApprovalForAll // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *IERC721ApprovalForAllIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(IERC721ApprovalForAll) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(IERC721ApprovalForAll) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *IERC721ApprovalForAllIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *IERC721ApprovalForAllIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// IERC721ApprovalForAll represents a ApprovalForAll event raised by the IERC721 contract. +type IERC721ApprovalForAll struct { + Owner common.Address + Operator common.Address + Approved bool + Raw types.Log // Blockchain specific contextual infos +} + +// FilterApprovalForAll is a free log retrieval operation binding the contract event 0x17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31. +// +// Solidity: event ApprovalForAll(address indexed owner, address indexed operator, bool approved) +func (_IERC721 *IERC721Filterer) FilterApprovalForAll(opts *bind.FilterOpts, owner []common.Address, operator []common.Address) (*IERC721ApprovalForAllIterator, error) { + + var ownerRule []interface{} + for _, ownerItem := range owner { + ownerRule = append(ownerRule, ownerItem) + } + var operatorRule []interface{} + for _, operatorItem := range operator { + operatorRule = append(operatorRule, operatorItem) + } + + logs, sub, err := _IERC721.contract.FilterLogs(opts, "ApprovalForAll", ownerRule, operatorRule) + if err != nil { + return nil, err + } + return &IERC721ApprovalForAllIterator{contract: _IERC721.contract, event: "ApprovalForAll", logs: logs, sub: sub}, nil +} + +// WatchApprovalForAll is a free log subscription operation binding the contract event 0x17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31. +// +// Solidity: event ApprovalForAll(address indexed owner, address indexed operator, bool approved) +func (_IERC721 *IERC721Filterer) WatchApprovalForAll(opts *bind.WatchOpts, sink chan<- *IERC721ApprovalForAll, owner []common.Address, operator []common.Address) (event.Subscription, error) { + + var ownerRule []interface{} + for _, ownerItem := range owner { + ownerRule = append(ownerRule, ownerItem) + } + var operatorRule []interface{} + for _, operatorItem := range operator { + operatorRule = append(operatorRule, operatorItem) + } + + logs, sub, err := _IERC721.contract.WatchLogs(opts, "ApprovalForAll", ownerRule, operatorRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(IERC721ApprovalForAll) + if err := _IERC721.contract.UnpackLog(event, "ApprovalForAll", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseApprovalForAll is a log parse operation binding the contract event 0x17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31. +// +// Solidity: event ApprovalForAll(address indexed owner, address indexed operator, bool approved) +func (_IERC721 *IERC721Filterer) ParseApprovalForAll(log types.Log) (*IERC721ApprovalForAll, error) { + event := new(IERC721ApprovalForAll) + if err := _IERC721.contract.UnpackLog(event, "ApprovalForAll", log); err != nil { + return nil, err + } + return event, nil +} + +// IERC721TransferIterator is returned from FilterTransfer and is used to iterate over the raw logs and unpacked data for Transfer events raised by the IERC721 contract. +type IERC721TransferIterator struct { + Event *IERC721Transfer // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *IERC721TransferIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(IERC721Transfer) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(IERC721Transfer) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *IERC721TransferIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *IERC721TransferIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// IERC721Transfer represents a Transfer event raised by the IERC721 contract. +type IERC721Transfer struct { + From common.Address + To common.Address + TokenId *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterTransfer is a free log retrieval operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. +// +// Solidity: event Transfer(address indexed from, address indexed to, uint256 indexed tokenId) +func (_IERC721 *IERC721Filterer) FilterTransfer(opts *bind.FilterOpts, from []common.Address, to []common.Address, tokenId []*big.Int) (*IERC721TransferIterator, error) { + + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + var tokenIdRule []interface{} + for _, tokenIdItem := range tokenId { + tokenIdRule = append(tokenIdRule, tokenIdItem) + } + + logs, sub, err := _IERC721.contract.FilterLogs(opts, "Transfer", fromRule, toRule, tokenIdRule) + if err != nil { + return nil, err + } + return &IERC721TransferIterator{contract: _IERC721.contract, event: "Transfer", logs: logs, sub: sub}, nil +} + +// WatchTransfer is a free log subscription operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. +// +// Solidity: event Transfer(address indexed from, address indexed to, uint256 indexed tokenId) +func (_IERC721 *IERC721Filterer) WatchTransfer(opts *bind.WatchOpts, sink chan<- *IERC721Transfer, from []common.Address, to []common.Address, tokenId []*big.Int) (event.Subscription, error) { + + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + var tokenIdRule []interface{} + for _, tokenIdItem := range tokenId { + tokenIdRule = append(tokenIdRule, tokenIdItem) + } + + logs, sub, err := _IERC721.contract.WatchLogs(opts, "Transfer", fromRule, toRule, tokenIdRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(IERC721Transfer) + if err := _IERC721.contract.UnpackLog(event, "Transfer", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseTransfer is a log parse operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. +// +// Solidity: event Transfer(address indexed from, address indexed to, uint256 indexed tokenId) +func (_IERC721 *IERC721Filterer) ParseTransfer(log types.Log) (*IERC721Transfer, error) { + event := new(IERC721Transfer) + if err := _IERC721.contract.UnpackLog(event, "Transfer", log); err != nil { + return nil, err + } + return event, nil +} + +// IERC721EnumerableABI is the input ABI used to generate the binding from. +const IERC721EnumerableABI = "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"approved\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"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\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"balance\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"getApproved\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"isApprovedForAll\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"ownerOf\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"safeTransferFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"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\":\"index\",\"type\":\"uint256\"}],\"name\":\"tokenByIndex\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"tokenOfOwnerByIndex\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]" + +// IERC721EnumerableFuncSigs maps the 4-byte function signature to its string representation. +var IERC721EnumerableFuncSigs = map[string]string{ + "095ea7b3": "approve(address,uint256)", + "70a08231": "balanceOf(address)", + "081812fc": "getApproved(uint256)", + "e985e9c5": "isApprovedForAll(address,address)", + "6352211e": "ownerOf(uint256)", + "42842e0e": "safeTransferFrom(address,address,uint256)", + "b88d4fde": "safeTransferFrom(address,address,uint256,bytes)", + "a22cb465": "setApprovalForAll(address,bool)", + "01ffc9a7": "supportsInterface(bytes4)", + "4f6ccce7": "tokenByIndex(uint256)", + "2f745c59": "tokenOfOwnerByIndex(address,uint256)", + "18160ddd": "totalSupply()", + "23b872dd": "transferFrom(address,address,uint256)", +} + +// IERC721Enumerable is an auto generated Go binding around an Ethereum contract. +type IERC721Enumerable struct { + IERC721EnumerableCaller // Read-only binding to the contract + IERC721EnumerableTransactor // Write-only binding to the contract + IERC721EnumerableFilterer // Log filterer for contract events +} + +// IERC721EnumerableCaller is an auto generated read-only Go binding around an Ethereum contract. +type IERC721EnumerableCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// IERC721EnumerableTransactor is an auto generated write-only Go binding around an Ethereum contract. +type IERC721EnumerableTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// IERC721EnumerableFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type IERC721EnumerableFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// IERC721EnumerableSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type IERC721EnumerableSession struct { + Contract *IERC721Enumerable // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// IERC721EnumerableCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type IERC721EnumerableCallerSession struct { + Contract *IERC721EnumerableCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// IERC721EnumerableTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type IERC721EnumerableTransactorSession struct { + Contract *IERC721EnumerableTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// IERC721EnumerableRaw is an auto generated low-level Go binding around an Ethereum contract. +type IERC721EnumerableRaw struct { + Contract *IERC721Enumerable // Generic contract binding to access the raw methods on +} + +// IERC721EnumerableCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type IERC721EnumerableCallerRaw struct { + Contract *IERC721EnumerableCaller // Generic read-only contract binding to access the raw methods on +} + +// IERC721EnumerableTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type IERC721EnumerableTransactorRaw struct { + Contract *IERC721EnumerableTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewIERC721Enumerable creates a new instance of IERC721Enumerable, bound to a specific deployed contract. +func NewIERC721Enumerable(address common.Address, backend bind.ContractBackend) (*IERC721Enumerable, error) { + contract, err := bindIERC721Enumerable(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &IERC721Enumerable{IERC721EnumerableCaller: IERC721EnumerableCaller{contract: contract}, IERC721EnumerableTransactor: IERC721EnumerableTransactor{contract: contract}, IERC721EnumerableFilterer: IERC721EnumerableFilterer{contract: contract}}, nil +} + +// NewIERC721EnumerableCaller creates a new read-only instance of IERC721Enumerable, bound to a specific deployed contract. +func NewIERC721EnumerableCaller(address common.Address, caller bind.ContractCaller) (*IERC721EnumerableCaller, error) { + contract, err := bindIERC721Enumerable(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &IERC721EnumerableCaller{contract: contract}, nil +} + +// NewIERC721EnumerableTransactor creates a new write-only instance of IERC721Enumerable, bound to a specific deployed contract. +func NewIERC721EnumerableTransactor(address common.Address, transactor bind.ContractTransactor) (*IERC721EnumerableTransactor, error) { + contract, err := bindIERC721Enumerable(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &IERC721EnumerableTransactor{contract: contract}, nil +} + +// NewIERC721EnumerableFilterer creates a new log filterer instance of IERC721Enumerable, bound to a specific deployed contract. +func NewIERC721EnumerableFilterer(address common.Address, filterer bind.ContractFilterer) (*IERC721EnumerableFilterer, error) { + contract, err := bindIERC721Enumerable(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &IERC721EnumerableFilterer{contract: contract}, nil +} + +// bindIERC721Enumerable binds a generic wrapper to an already deployed contract. +func bindIERC721Enumerable(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := abi.JSON(strings.NewReader(IERC721EnumerableABI)) + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_IERC721Enumerable *IERC721EnumerableRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { + return _IERC721Enumerable.Contract.IERC721EnumerableCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_IERC721Enumerable *IERC721EnumerableRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _IERC721Enumerable.Contract.IERC721EnumerableTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_IERC721Enumerable *IERC721EnumerableRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _IERC721Enumerable.Contract.IERC721EnumerableTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_IERC721Enumerable *IERC721EnumerableCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { + return _IERC721Enumerable.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_IERC721Enumerable *IERC721EnumerableTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _IERC721Enumerable.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_IERC721Enumerable *IERC721EnumerableTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _IERC721Enumerable.Contract.contract.Transact(opts, method, params...) +} + +// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. +// +// Solidity: function balanceOf(address owner) view returns(uint256 balance) +func (_IERC721Enumerable *IERC721EnumerableCaller) BalanceOf(opts *bind.CallOpts, owner common.Address) (*big.Int, error) { + var ( + ret0 = new(*big.Int) + ) + out := ret0 + err := _IERC721Enumerable.contract.Call(opts, out, "balanceOf", owner) + return *ret0, err +} + +// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. +// +// Solidity: function balanceOf(address owner) view returns(uint256 balance) +func (_IERC721Enumerable *IERC721EnumerableSession) BalanceOf(owner common.Address) (*big.Int, error) { + return _IERC721Enumerable.Contract.BalanceOf(&_IERC721Enumerable.CallOpts, owner) +} + +// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. +// +// Solidity: function balanceOf(address owner) view returns(uint256 balance) +func (_IERC721Enumerable *IERC721EnumerableCallerSession) BalanceOf(owner common.Address) (*big.Int, error) { + return _IERC721Enumerable.Contract.BalanceOf(&_IERC721Enumerable.CallOpts, owner) +} + +// GetApproved is a free data retrieval call binding the contract method 0x081812fc. +// +// Solidity: function getApproved(uint256 tokenId) view returns(address operator) +func (_IERC721Enumerable *IERC721EnumerableCaller) GetApproved(opts *bind.CallOpts, tokenId *big.Int) (common.Address, error) { + var ( + ret0 = new(common.Address) + ) + out := ret0 + err := _IERC721Enumerable.contract.Call(opts, out, "getApproved", tokenId) + return *ret0, err +} + +// GetApproved is a free data retrieval call binding the contract method 0x081812fc. +// +// Solidity: function getApproved(uint256 tokenId) view returns(address operator) +func (_IERC721Enumerable *IERC721EnumerableSession) GetApproved(tokenId *big.Int) (common.Address, error) { + return _IERC721Enumerable.Contract.GetApproved(&_IERC721Enumerable.CallOpts, tokenId) +} + +// GetApproved is a free data retrieval call binding the contract method 0x081812fc. +// +// Solidity: function getApproved(uint256 tokenId) view returns(address operator) +func (_IERC721Enumerable *IERC721EnumerableCallerSession) GetApproved(tokenId *big.Int) (common.Address, error) { + return _IERC721Enumerable.Contract.GetApproved(&_IERC721Enumerable.CallOpts, tokenId) +} + +// IsApprovedForAll is a free data retrieval call binding the contract method 0xe985e9c5. +// +// Solidity: function isApprovedForAll(address owner, address operator) view returns(bool) +func (_IERC721Enumerable *IERC721EnumerableCaller) IsApprovedForAll(opts *bind.CallOpts, owner common.Address, operator common.Address) (bool, error) { + var ( + ret0 = new(bool) + ) + out := ret0 + err := _IERC721Enumerable.contract.Call(opts, out, "isApprovedForAll", owner, operator) + return *ret0, err +} + +// IsApprovedForAll is a free data retrieval call binding the contract method 0xe985e9c5. +// +// Solidity: function isApprovedForAll(address owner, address operator) view returns(bool) +func (_IERC721Enumerable *IERC721EnumerableSession) IsApprovedForAll(owner common.Address, operator common.Address) (bool, error) { + return _IERC721Enumerable.Contract.IsApprovedForAll(&_IERC721Enumerable.CallOpts, owner, operator) +} + +// IsApprovedForAll is a free data retrieval call binding the contract method 0xe985e9c5. +// +// Solidity: function isApprovedForAll(address owner, address operator) view returns(bool) +func (_IERC721Enumerable *IERC721EnumerableCallerSession) IsApprovedForAll(owner common.Address, operator common.Address) (bool, error) { + return _IERC721Enumerable.Contract.IsApprovedForAll(&_IERC721Enumerable.CallOpts, owner, operator) +} + +// OwnerOf is a free data retrieval call binding the contract method 0x6352211e. +// +// Solidity: function ownerOf(uint256 tokenId) view returns(address owner) +func (_IERC721Enumerable *IERC721EnumerableCaller) OwnerOf(opts *bind.CallOpts, tokenId *big.Int) (common.Address, error) { + var ( + ret0 = new(common.Address) + ) + out := ret0 + err := _IERC721Enumerable.contract.Call(opts, out, "ownerOf", tokenId) + return *ret0, err +} + +// OwnerOf is a free data retrieval call binding the contract method 0x6352211e. +// +// Solidity: function ownerOf(uint256 tokenId) view returns(address owner) +func (_IERC721Enumerable *IERC721EnumerableSession) OwnerOf(tokenId *big.Int) (common.Address, error) { + return _IERC721Enumerable.Contract.OwnerOf(&_IERC721Enumerable.CallOpts, tokenId) +} + +// OwnerOf is a free data retrieval call binding the contract method 0x6352211e. +// +// Solidity: function ownerOf(uint256 tokenId) view returns(address owner) +func (_IERC721Enumerable *IERC721EnumerableCallerSession) OwnerOf(tokenId *big.Int) (common.Address, error) { + return _IERC721Enumerable.Contract.OwnerOf(&_IERC721Enumerable.CallOpts, tokenId) +} + +// SupportsInterface is a free data retrieval call binding the contract method 0x01ffc9a7. +// +// Solidity: function supportsInterface(bytes4 interfaceId) view returns(bool) +func (_IERC721Enumerable *IERC721EnumerableCaller) SupportsInterface(opts *bind.CallOpts, interfaceId [4]byte) (bool, error) { + var ( + ret0 = new(bool) + ) + out := ret0 + err := _IERC721Enumerable.contract.Call(opts, out, "supportsInterface", interfaceId) + return *ret0, err +} + +// SupportsInterface is a free data retrieval call binding the contract method 0x01ffc9a7. +// +// Solidity: function supportsInterface(bytes4 interfaceId) view returns(bool) +func (_IERC721Enumerable *IERC721EnumerableSession) SupportsInterface(interfaceId [4]byte) (bool, error) { + return _IERC721Enumerable.Contract.SupportsInterface(&_IERC721Enumerable.CallOpts, interfaceId) +} + +// SupportsInterface is a free data retrieval call binding the contract method 0x01ffc9a7. +// +// Solidity: function supportsInterface(bytes4 interfaceId) view returns(bool) +func (_IERC721Enumerable *IERC721EnumerableCallerSession) SupportsInterface(interfaceId [4]byte) (bool, error) { + return _IERC721Enumerable.Contract.SupportsInterface(&_IERC721Enumerable.CallOpts, interfaceId) +} + +// TokenByIndex is a free data retrieval call binding the contract method 0x4f6ccce7. +// +// Solidity: function tokenByIndex(uint256 index) view returns(uint256) +func (_IERC721Enumerable *IERC721EnumerableCaller) TokenByIndex(opts *bind.CallOpts, index *big.Int) (*big.Int, error) { + var ( + ret0 = new(*big.Int) + ) + out := ret0 + err := _IERC721Enumerable.contract.Call(opts, out, "tokenByIndex", index) + return *ret0, err +} + +// TokenByIndex is a free data retrieval call binding the contract method 0x4f6ccce7. +// +// Solidity: function tokenByIndex(uint256 index) view returns(uint256) +func (_IERC721Enumerable *IERC721EnumerableSession) TokenByIndex(index *big.Int) (*big.Int, error) { + return _IERC721Enumerable.Contract.TokenByIndex(&_IERC721Enumerable.CallOpts, index) +} + +// TokenByIndex is a free data retrieval call binding the contract method 0x4f6ccce7. +// +// Solidity: function tokenByIndex(uint256 index) view returns(uint256) +func (_IERC721Enumerable *IERC721EnumerableCallerSession) TokenByIndex(index *big.Int) (*big.Int, error) { + return _IERC721Enumerable.Contract.TokenByIndex(&_IERC721Enumerable.CallOpts, index) +} + +// TokenOfOwnerByIndex is a free data retrieval call binding the contract method 0x2f745c59. +// +// Solidity: function tokenOfOwnerByIndex(address owner, uint256 index) view returns(uint256 tokenId) +func (_IERC721Enumerable *IERC721EnumerableCaller) TokenOfOwnerByIndex(opts *bind.CallOpts, owner common.Address, index *big.Int) (*big.Int, error) { + var ( + ret0 = new(*big.Int) + ) + out := ret0 + err := _IERC721Enumerable.contract.Call(opts, out, "tokenOfOwnerByIndex", owner, index) + return *ret0, err +} + +// TokenOfOwnerByIndex is a free data retrieval call binding the contract method 0x2f745c59. +// +// Solidity: function tokenOfOwnerByIndex(address owner, uint256 index) view returns(uint256 tokenId) +func (_IERC721Enumerable *IERC721EnumerableSession) TokenOfOwnerByIndex(owner common.Address, index *big.Int) (*big.Int, error) { + return _IERC721Enumerable.Contract.TokenOfOwnerByIndex(&_IERC721Enumerable.CallOpts, owner, index) +} + +// TokenOfOwnerByIndex is a free data retrieval call binding the contract method 0x2f745c59. +// +// Solidity: function tokenOfOwnerByIndex(address owner, uint256 index) view returns(uint256 tokenId) +func (_IERC721Enumerable *IERC721EnumerableCallerSession) TokenOfOwnerByIndex(owner common.Address, index *big.Int) (*big.Int, error) { + return _IERC721Enumerable.Contract.TokenOfOwnerByIndex(&_IERC721Enumerable.CallOpts, owner, index) +} + +// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. +// +// Solidity: function totalSupply() view returns(uint256) +func (_IERC721Enumerable *IERC721EnumerableCaller) TotalSupply(opts *bind.CallOpts) (*big.Int, error) { + var ( + ret0 = new(*big.Int) + ) + out := ret0 + err := _IERC721Enumerable.contract.Call(opts, out, "totalSupply") + return *ret0, err +} + +// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. +// +// Solidity: function totalSupply() view returns(uint256) +func (_IERC721Enumerable *IERC721EnumerableSession) TotalSupply() (*big.Int, error) { + return _IERC721Enumerable.Contract.TotalSupply(&_IERC721Enumerable.CallOpts) +} + +// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. +// +// Solidity: function totalSupply() view returns(uint256) +func (_IERC721Enumerable *IERC721EnumerableCallerSession) TotalSupply() (*big.Int, error) { + return _IERC721Enumerable.Contract.TotalSupply(&_IERC721Enumerable.CallOpts) +} + +// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. +// +// Solidity: function approve(address to, uint256 tokenId) returns() +func (_IERC721Enumerable *IERC721EnumerableTransactor) Approve(opts *bind.TransactOpts, to common.Address, tokenId *big.Int) (*types.Transaction, error) { + return _IERC721Enumerable.contract.Transact(opts, "approve", to, tokenId) +} + +// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. +// +// Solidity: function approve(address to, uint256 tokenId) returns() +func (_IERC721Enumerable *IERC721EnumerableSession) Approve(to common.Address, tokenId *big.Int) (*types.Transaction, error) { + return _IERC721Enumerable.Contract.Approve(&_IERC721Enumerable.TransactOpts, to, tokenId) +} + +// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. +// +// Solidity: function approve(address to, uint256 tokenId) returns() +func (_IERC721Enumerable *IERC721EnumerableTransactorSession) Approve(to common.Address, tokenId *big.Int) (*types.Transaction, error) { + return _IERC721Enumerable.Contract.Approve(&_IERC721Enumerable.TransactOpts, to, tokenId) +} + +// SafeTransferFrom is a paid mutator transaction binding the contract method 0x42842e0e. +// +// Solidity: function safeTransferFrom(address from, address to, uint256 tokenId) returns() +func (_IERC721Enumerable *IERC721EnumerableTransactor) SafeTransferFrom(opts *bind.TransactOpts, from common.Address, to common.Address, tokenId *big.Int) (*types.Transaction, error) { + return _IERC721Enumerable.contract.Transact(opts, "safeTransferFrom", from, to, tokenId) +} + +// SafeTransferFrom is a paid mutator transaction binding the contract method 0x42842e0e. +// +// Solidity: function safeTransferFrom(address from, address to, uint256 tokenId) returns() +func (_IERC721Enumerable *IERC721EnumerableSession) SafeTransferFrom(from common.Address, to common.Address, tokenId *big.Int) (*types.Transaction, error) { + return _IERC721Enumerable.Contract.SafeTransferFrom(&_IERC721Enumerable.TransactOpts, from, to, tokenId) +} + +// SafeTransferFrom is a paid mutator transaction binding the contract method 0x42842e0e. +// +// Solidity: function safeTransferFrom(address from, address to, uint256 tokenId) returns() +func (_IERC721Enumerable *IERC721EnumerableTransactorSession) SafeTransferFrom(from common.Address, to common.Address, tokenId *big.Int) (*types.Transaction, error) { + return _IERC721Enumerable.Contract.SafeTransferFrom(&_IERC721Enumerable.TransactOpts, from, to, tokenId) +} + +// SafeTransferFrom0 is a paid mutator transaction binding the contract method 0xb88d4fde. +// +// Solidity: function safeTransferFrom(address from, address to, uint256 tokenId, bytes data) returns() +func (_IERC721Enumerable *IERC721EnumerableTransactor) SafeTransferFrom0(opts *bind.TransactOpts, from common.Address, to common.Address, tokenId *big.Int, data []byte) (*types.Transaction, error) { + return _IERC721Enumerable.contract.Transact(opts, "safeTransferFrom0", from, to, tokenId, data) +} + +// SafeTransferFrom0 is a paid mutator transaction binding the contract method 0xb88d4fde. +// +// Solidity: function safeTransferFrom(address from, address to, uint256 tokenId, bytes data) returns() +func (_IERC721Enumerable *IERC721EnumerableSession) SafeTransferFrom0(from common.Address, to common.Address, tokenId *big.Int, data []byte) (*types.Transaction, error) { + return _IERC721Enumerable.Contract.SafeTransferFrom0(&_IERC721Enumerable.TransactOpts, from, to, tokenId, data) +} + +// SafeTransferFrom0 is a paid mutator transaction binding the contract method 0xb88d4fde. +// +// Solidity: function safeTransferFrom(address from, address to, uint256 tokenId, bytes data) returns() +func (_IERC721Enumerable *IERC721EnumerableTransactorSession) SafeTransferFrom0(from common.Address, to common.Address, tokenId *big.Int, data []byte) (*types.Transaction, error) { + return _IERC721Enumerable.Contract.SafeTransferFrom0(&_IERC721Enumerable.TransactOpts, from, to, tokenId, data) +} + +// SetApprovalForAll is a paid mutator transaction binding the contract method 0xa22cb465. +// +// Solidity: function setApprovalForAll(address operator, bool _approved) returns() +func (_IERC721Enumerable *IERC721EnumerableTransactor) SetApprovalForAll(opts *bind.TransactOpts, operator common.Address, _approved bool) (*types.Transaction, error) { + return _IERC721Enumerable.contract.Transact(opts, "setApprovalForAll", operator, _approved) +} + +// SetApprovalForAll is a paid mutator transaction binding the contract method 0xa22cb465. +// +// Solidity: function setApprovalForAll(address operator, bool _approved) returns() +func (_IERC721Enumerable *IERC721EnumerableSession) SetApprovalForAll(operator common.Address, _approved bool) (*types.Transaction, error) { + return _IERC721Enumerable.Contract.SetApprovalForAll(&_IERC721Enumerable.TransactOpts, operator, _approved) +} + +// SetApprovalForAll is a paid mutator transaction binding the contract method 0xa22cb465. +// +// Solidity: function setApprovalForAll(address operator, bool _approved) returns() +func (_IERC721Enumerable *IERC721EnumerableTransactorSession) SetApprovalForAll(operator common.Address, _approved bool) (*types.Transaction, error) { + return _IERC721Enumerable.Contract.SetApprovalForAll(&_IERC721Enumerable.TransactOpts, operator, _approved) +} + +// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. +// +// Solidity: function transferFrom(address from, address to, uint256 tokenId) returns() +func (_IERC721Enumerable *IERC721EnumerableTransactor) TransferFrom(opts *bind.TransactOpts, from common.Address, to common.Address, tokenId *big.Int) (*types.Transaction, error) { + return _IERC721Enumerable.contract.Transact(opts, "transferFrom", from, to, tokenId) +} + +// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. +// +// Solidity: function transferFrom(address from, address to, uint256 tokenId) returns() +func (_IERC721Enumerable *IERC721EnumerableSession) TransferFrom(from common.Address, to common.Address, tokenId *big.Int) (*types.Transaction, error) { + return _IERC721Enumerable.Contract.TransferFrom(&_IERC721Enumerable.TransactOpts, from, to, tokenId) +} + +// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. +// +// Solidity: function transferFrom(address from, address to, uint256 tokenId) returns() +func (_IERC721Enumerable *IERC721EnumerableTransactorSession) TransferFrom(from common.Address, to common.Address, tokenId *big.Int) (*types.Transaction, error) { + return _IERC721Enumerable.Contract.TransferFrom(&_IERC721Enumerable.TransactOpts, from, to, tokenId) +} + +// IERC721EnumerableApprovalIterator is returned from FilterApproval and is used to iterate over the raw logs and unpacked data for Approval events raised by the IERC721Enumerable contract. +type IERC721EnumerableApprovalIterator struct { + Event *IERC721EnumerableApproval // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *IERC721EnumerableApprovalIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(IERC721EnumerableApproval) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(IERC721EnumerableApproval) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *IERC721EnumerableApprovalIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *IERC721EnumerableApprovalIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// IERC721EnumerableApproval represents a Approval event raised by the IERC721Enumerable contract. +type IERC721EnumerableApproval struct { + Owner common.Address + Approved common.Address + TokenId *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterApproval is a free log retrieval operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. +// +// Solidity: event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId) +func (_IERC721Enumerable *IERC721EnumerableFilterer) FilterApproval(opts *bind.FilterOpts, owner []common.Address, approved []common.Address, tokenId []*big.Int) (*IERC721EnumerableApprovalIterator, error) { + + var ownerRule []interface{} + for _, ownerItem := range owner { + ownerRule = append(ownerRule, ownerItem) + } + var approvedRule []interface{} + for _, approvedItem := range approved { + approvedRule = append(approvedRule, approvedItem) + } + var tokenIdRule []interface{} + for _, tokenIdItem := range tokenId { + tokenIdRule = append(tokenIdRule, tokenIdItem) + } + + logs, sub, err := _IERC721Enumerable.contract.FilterLogs(opts, "Approval", ownerRule, approvedRule, tokenIdRule) + if err != nil { + return nil, err + } + return &IERC721EnumerableApprovalIterator{contract: _IERC721Enumerable.contract, event: "Approval", logs: logs, sub: sub}, nil +} + +// WatchApproval is a free log subscription operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. +// +// Solidity: event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId) +func (_IERC721Enumerable *IERC721EnumerableFilterer) WatchApproval(opts *bind.WatchOpts, sink chan<- *IERC721EnumerableApproval, owner []common.Address, approved []common.Address, tokenId []*big.Int) (event.Subscription, error) { + + var ownerRule []interface{} + for _, ownerItem := range owner { + ownerRule = append(ownerRule, ownerItem) + } + var approvedRule []interface{} + for _, approvedItem := range approved { + approvedRule = append(approvedRule, approvedItem) + } + var tokenIdRule []interface{} + for _, tokenIdItem := range tokenId { + tokenIdRule = append(tokenIdRule, tokenIdItem) + } + + logs, sub, err := _IERC721Enumerable.contract.WatchLogs(opts, "Approval", ownerRule, approvedRule, tokenIdRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(IERC721EnumerableApproval) + if err := _IERC721Enumerable.contract.UnpackLog(event, "Approval", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseApproval is a log parse operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. +// +// Solidity: event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId) +func (_IERC721Enumerable *IERC721EnumerableFilterer) ParseApproval(log types.Log) (*IERC721EnumerableApproval, error) { + event := new(IERC721EnumerableApproval) + if err := _IERC721Enumerable.contract.UnpackLog(event, "Approval", log); err != nil { + return nil, err + } + return event, nil +} + +// IERC721EnumerableApprovalForAllIterator is returned from FilterApprovalForAll and is used to iterate over the raw logs and unpacked data for ApprovalForAll events raised by the IERC721Enumerable contract. +type IERC721EnumerableApprovalForAllIterator struct { + Event *IERC721EnumerableApprovalForAll // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *IERC721EnumerableApprovalForAllIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(IERC721EnumerableApprovalForAll) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(IERC721EnumerableApprovalForAll) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *IERC721EnumerableApprovalForAllIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *IERC721EnumerableApprovalForAllIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// IERC721EnumerableApprovalForAll represents a ApprovalForAll event raised by the IERC721Enumerable contract. +type IERC721EnumerableApprovalForAll struct { + Owner common.Address + Operator common.Address + Approved bool + Raw types.Log // Blockchain specific contextual infos +} + +// FilterApprovalForAll is a free log retrieval operation binding the contract event 0x17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31. +// +// Solidity: event ApprovalForAll(address indexed owner, address indexed operator, bool approved) +func (_IERC721Enumerable *IERC721EnumerableFilterer) FilterApprovalForAll(opts *bind.FilterOpts, owner []common.Address, operator []common.Address) (*IERC721EnumerableApprovalForAllIterator, error) { + + var ownerRule []interface{} + for _, ownerItem := range owner { + ownerRule = append(ownerRule, ownerItem) + } + var operatorRule []interface{} + for _, operatorItem := range operator { + operatorRule = append(operatorRule, operatorItem) + } + + logs, sub, err := _IERC721Enumerable.contract.FilterLogs(opts, "ApprovalForAll", ownerRule, operatorRule) + if err != nil { + return nil, err + } + return &IERC721EnumerableApprovalForAllIterator{contract: _IERC721Enumerable.contract, event: "ApprovalForAll", logs: logs, sub: sub}, nil +} + +// WatchApprovalForAll is a free log subscription operation binding the contract event 0x17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31. +// +// Solidity: event ApprovalForAll(address indexed owner, address indexed operator, bool approved) +func (_IERC721Enumerable *IERC721EnumerableFilterer) WatchApprovalForAll(opts *bind.WatchOpts, sink chan<- *IERC721EnumerableApprovalForAll, owner []common.Address, operator []common.Address) (event.Subscription, error) { + + var ownerRule []interface{} + for _, ownerItem := range owner { + ownerRule = append(ownerRule, ownerItem) + } + var operatorRule []interface{} + for _, operatorItem := range operator { + operatorRule = append(operatorRule, operatorItem) + } + + logs, sub, err := _IERC721Enumerable.contract.WatchLogs(opts, "ApprovalForAll", ownerRule, operatorRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(IERC721EnumerableApprovalForAll) + if err := _IERC721Enumerable.contract.UnpackLog(event, "ApprovalForAll", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseApprovalForAll is a log parse operation binding the contract event 0x17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31. +// +// Solidity: event ApprovalForAll(address indexed owner, address indexed operator, bool approved) +func (_IERC721Enumerable *IERC721EnumerableFilterer) ParseApprovalForAll(log types.Log) (*IERC721EnumerableApprovalForAll, error) { + event := new(IERC721EnumerableApprovalForAll) + if err := _IERC721Enumerable.contract.UnpackLog(event, "ApprovalForAll", log); err != nil { + return nil, err + } + return event, nil +} + +// IERC721EnumerableTransferIterator is returned from FilterTransfer and is used to iterate over the raw logs and unpacked data for Transfer events raised by the IERC721Enumerable contract. +type IERC721EnumerableTransferIterator struct { + Event *IERC721EnumerableTransfer // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *IERC721EnumerableTransferIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(IERC721EnumerableTransfer) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(IERC721EnumerableTransfer) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *IERC721EnumerableTransferIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *IERC721EnumerableTransferIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// IERC721EnumerableTransfer represents a Transfer event raised by the IERC721Enumerable contract. +type IERC721EnumerableTransfer struct { + From common.Address + To common.Address + TokenId *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterTransfer is a free log retrieval operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. +// +// Solidity: event Transfer(address indexed from, address indexed to, uint256 indexed tokenId) +func (_IERC721Enumerable *IERC721EnumerableFilterer) FilterTransfer(opts *bind.FilterOpts, from []common.Address, to []common.Address, tokenId []*big.Int) (*IERC721EnumerableTransferIterator, error) { + + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + var tokenIdRule []interface{} + for _, tokenIdItem := range tokenId { + tokenIdRule = append(tokenIdRule, tokenIdItem) + } + + logs, sub, err := _IERC721Enumerable.contract.FilterLogs(opts, "Transfer", fromRule, toRule, tokenIdRule) + if err != nil { + return nil, err + } + return &IERC721EnumerableTransferIterator{contract: _IERC721Enumerable.contract, event: "Transfer", logs: logs, sub: sub}, nil +} + +// WatchTransfer is a free log subscription operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. +// +// Solidity: event Transfer(address indexed from, address indexed to, uint256 indexed tokenId) +func (_IERC721Enumerable *IERC721EnumerableFilterer) WatchTransfer(opts *bind.WatchOpts, sink chan<- *IERC721EnumerableTransfer, from []common.Address, to []common.Address, tokenId []*big.Int) (event.Subscription, error) { + + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + var tokenIdRule []interface{} + for _, tokenIdItem := range tokenId { + tokenIdRule = append(tokenIdRule, tokenIdItem) + } + + logs, sub, err := _IERC721Enumerable.contract.WatchLogs(opts, "Transfer", fromRule, toRule, tokenIdRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(IERC721EnumerableTransfer) + if err := _IERC721Enumerable.contract.UnpackLog(event, "Transfer", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseTransfer is a log parse operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. +// +// Solidity: event Transfer(address indexed from, address indexed to, uint256 indexed tokenId) +func (_IERC721Enumerable *IERC721EnumerableFilterer) ParseTransfer(log types.Log) (*IERC721EnumerableTransfer, error) { + event := new(IERC721EnumerableTransfer) + if err := _IERC721Enumerable.contract.UnpackLog(event, "Transfer", log); err != nil { + return nil, err + } + return event, nil +} + +// IERC721MetadataABI is the input ABI used to generate the binding from. +const IERC721MetadataABI = "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"approved\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"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\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"balance\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"getApproved\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"isApprovedForAll\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"ownerOf\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"safeTransferFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"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\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"tokenURI\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]" + +// IERC721MetadataFuncSigs maps the 4-byte function signature to its string representation. +var IERC721MetadataFuncSigs = map[string]string{ + "095ea7b3": "approve(address,uint256)", + "70a08231": "balanceOf(address)", + "081812fc": "getApproved(uint256)", + "e985e9c5": "isApprovedForAll(address,address)", + "06fdde03": "name()", + "6352211e": "ownerOf(uint256)", + "42842e0e": "safeTransferFrom(address,address,uint256)", + "b88d4fde": "safeTransferFrom(address,address,uint256,bytes)", + "a22cb465": "setApprovalForAll(address,bool)", + "01ffc9a7": "supportsInterface(bytes4)", + "95d89b41": "symbol()", + "c87b56dd": "tokenURI(uint256)", + "23b872dd": "transferFrom(address,address,uint256)", +} + +// IERC721Metadata is an auto generated Go binding around an Ethereum contract. +type IERC721Metadata struct { + IERC721MetadataCaller // Read-only binding to the contract + IERC721MetadataTransactor // Write-only binding to the contract + IERC721MetadataFilterer // Log filterer for contract events +} + +// IERC721MetadataCaller is an auto generated read-only Go binding around an Ethereum contract. +type IERC721MetadataCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// IERC721MetadataTransactor is an auto generated write-only Go binding around an Ethereum contract. +type IERC721MetadataTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// IERC721MetadataFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type IERC721MetadataFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// IERC721MetadataSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type IERC721MetadataSession struct { + Contract *IERC721Metadata // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// IERC721MetadataCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type IERC721MetadataCallerSession struct { + Contract *IERC721MetadataCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// IERC721MetadataTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type IERC721MetadataTransactorSession struct { + Contract *IERC721MetadataTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// IERC721MetadataRaw is an auto generated low-level Go binding around an Ethereum contract. +type IERC721MetadataRaw struct { + Contract *IERC721Metadata // Generic contract binding to access the raw methods on +} + +// IERC721MetadataCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type IERC721MetadataCallerRaw struct { + Contract *IERC721MetadataCaller // Generic read-only contract binding to access the raw methods on +} + +// IERC721MetadataTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type IERC721MetadataTransactorRaw struct { + Contract *IERC721MetadataTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewIERC721Metadata creates a new instance of IERC721Metadata, bound to a specific deployed contract. +func NewIERC721Metadata(address common.Address, backend bind.ContractBackend) (*IERC721Metadata, error) { + contract, err := bindIERC721Metadata(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &IERC721Metadata{IERC721MetadataCaller: IERC721MetadataCaller{contract: contract}, IERC721MetadataTransactor: IERC721MetadataTransactor{contract: contract}, IERC721MetadataFilterer: IERC721MetadataFilterer{contract: contract}}, nil +} + +// NewIERC721MetadataCaller creates a new read-only instance of IERC721Metadata, bound to a specific deployed contract. +func NewIERC721MetadataCaller(address common.Address, caller bind.ContractCaller) (*IERC721MetadataCaller, error) { + contract, err := bindIERC721Metadata(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &IERC721MetadataCaller{contract: contract}, nil +} + +// NewIERC721MetadataTransactor creates a new write-only instance of IERC721Metadata, bound to a specific deployed contract. +func NewIERC721MetadataTransactor(address common.Address, transactor bind.ContractTransactor) (*IERC721MetadataTransactor, error) { + contract, err := bindIERC721Metadata(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &IERC721MetadataTransactor{contract: contract}, nil +} + +// NewIERC721MetadataFilterer creates a new log filterer instance of IERC721Metadata, bound to a specific deployed contract. +func NewIERC721MetadataFilterer(address common.Address, filterer bind.ContractFilterer) (*IERC721MetadataFilterer, error) { + contract, err := bindIERC721Metadata(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &IERC721MetadataFilterer{contract: contract}, nil +} + +// bindIERC721Metadata binds a generic wrapper to an already deployed contract. +func bindIERC721Metadata(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := abi.JSON(strings.NewReader(IERC721MetadataABI)) + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_IERC721Metadata *IERC721MetadataRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { + return _IERC721Metadata.Contract.IERC721MetadataCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_IERC721Metadata *IERC721MetadataRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _IERC721Metadata.Contract.IERC721MetadataTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_IERC721Metadata *IERC721MetadataRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _IERC721Metadata.Contract.IERC721MetadataTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_IERC721Metadata *IERC721MetadataCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { + return _IERC721Metadata.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_IERC721Metadata *IERC721MetadataTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _IERC721Metadata.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_IERC721Metadata *IERC721MetadataTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _IERC721Metadata.Contract.contract.Transact(opts, method, params...) +} + +// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. +// +// Solidity: function balanceOf(address owner) view returns(uint256 balance) +func (_IERC721Metadata *IERC721MetadataCaller) BalanceOf(opts *bind.CallOpts, owner common.Address) (*big.Int, error) { + var ( + ret0 = new(*big.Int) + ) + out := ret0 + err := _IERC721Metadata.contract.Call(opts, out, "balanceOf", owner) + return *ret0, err +} + +// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. +// +// Solidity: function balanceOf(address owner) view returns(uint256 balance) +func (_IERC721Metadata *IERC721MetadataSession) BalanceOf(owner common.Address) (*big.Int, error) { + return _IERC721Metadata.Contract.BalanceOf(&_IERC721Metadata.CallOpts, owner) +} + +// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. +// +// Solidity: function balanceOf(address owner) view returns(uint256 balance) +func (_IERC721Metadata *IERC721MetadataCallerSession) BalanceOf(owner common.Address) (*big.Int, error) { + return _IERC721Metadata.Contract.BalanceOf(&_IERC721Metadata.CallOpts, owner) +} + +// GetApproved is a free data retrieval call binding the contract method 0x081812fc. +// +// Solidity: function getApproved(uint256 tokenId) view returns(address operator) +func (_IERC721Metadata *IERC721MetadataCaller) GetApproved(opts *bind.CallOpts, tokenId *big.Int) (common.Address, error) { + var ( + ret0 = new(common.Address) + ) + out := ret0 + err := _IERC721Metadata.contract.Call(opts, out, "getApproved", tokenId) + return *ret0, err +} + +// GetApproved is a free data retrieval call binding the contract method 0x081812fc. +// +// Solidity: function getApproved(uint256 tokenId) view returns(address operator) +func (_IERC721Metadata *IERC721MetadataSession) GetApproved(tokenId *big.Int) (common.Address, error) { + return _IERC721Metadata.Contract.GetApproved(&_IERC721Metadata.CallOpts, tokenId) +} + +// GetApproved is a free data retrieval call binding the contract method 0x081812fc. +// +// Solidity: function getApproved(uint256 tokenId) view returns(address operator) +func (_IERC721Metadata *IERC721MetadataCallerSession) GetApproved(tokenId *big.Int) (common.Address, error) { + return _IERC721Metadata.Contract.GetApproved(&_IERC721Metadata.CallOpts, tokenId) +} + +// IsApprovedForAll is a free data retrieval call binding the contract method 0xe985e9c5. +// +// Solidity: function isApprovedForAll(address owner, address operator) view returns(bool) +func (_IERC721Metadata *IERC721MetadataCaller) IsApprovedForAll(opts *bind.CallOpts, owner common.Address, operator common.Address) (bool, error) { + var ( + ret0 = new(bool) + ) + out := ret0 + err := _IERC721Metadata.contract.Call(opts, out, "isApprovedForAll", owner, operator) + return *ret0, err +} + +// IsApprovedForAll is a free data retrieval call binding the contract method 0xe985e9c5. +// +// Solidity: function isApprovedForAll(address owner, address operator) view returns(bool) +func (_IERC721Metadata *IERC721MetadataSession) IsApprovedForAll(owner common.Address, operator common.Address) (bool, error) { + return _IERC721Metadata.Contract.IsApprovedForAll(&_IERC721Metadata.CallOpts, owner, operator) +} + +// IsApprovedForAll is a free data retrieval call binding the contract method 0xe985e9c5. +// +// Solidity: function isApprovedForAll(address owner, address operator) view returns(bool) +func (_IERC721Metadata *IERC721MetadataCallerSession) IsApprovedForAll(owner common.Address, operator common.Address) (bool, error) { + return _IERC721Metadata.Contract.IsApprovedForAll(&_IERC721Metadata.CallOpts, owner, operator) +} + +// Name is a free data retrieval call binding the contract method 0x06fdde03. +// +// Solidity: function name() view returns(string) +func (_IERC721Metadata *IERC721MetadataCaller) Name(opts *bind.CallOpts) (string, error) { + var ( + ret0 = new(string) + ) + out := ret0 + err := _IERC721Metadata.contract.Call(opts, out, "name") + return *ret0, err +} + +// Name is a free data retrieval call binding the contract method 0x06fdde03. +// +// Solidity: function name() view returns(string) +func (_IERC721Metadata *IERC721MetadataSession) Name() (string, error) { + return _IERC721Metadata.Contract.Name(&_IERC721Metadata.CallOpts) +} + +// Name is a free data retrieval call binding the contract method 0x06fdde03. +// +// Solidity: function name() view returns(string) +func (_IERC721Metadata *IERC721MetadataCallerSession) Name() (string, error) { + return _IERC721Metadata.Contract.Name(&_IERC721Metadata.CallOpts) +} + +// OwnerOf is a free data retrieval call binding the contract method 0x6352211e. +// +// Solidity: function ownerOf(uint256 tokenId) view returns(address owner) +func (_IERC721Metadata *IERC721MetadataCaller) OwnerOf(opts *bind.CallOpts, tokenId *big.Int) (common.Address, error) { + var ( + ret0 = new(common.Address) + ) + out := ret0 + err := _IERC721Metadata.contract.Call(opts, out, "ownerOf", tokenId) + return *ret0, err +} + +// OwnerOf is a free data retrieval call binding the contract method 0x6352211e. +// +// Solidity: function ownerOf(uint256 tokenId) view returns(address owner) +func (_IERC721Metadata *IERC721MetadataSession) OwnerOf(tokenId *big.Int) (common.Address, error) { + return _IERC721Metadata.Contract.OwnerOf(&_IERC721Metadata.CallOpts, tokenId) +} + +// OwnerOf is a free data retrieval call binding the contract method 0x6352211e. +// +// Solidity: function ownerOf(uint256 tokenId) view returns(address owner) +func (_IERC721Metadata *IERC721MetadataCallerSession) OwnerOf(tokenId *big.Int) (common.Address, error) { + return _IERC721Metadata.Contract.OwnerOf(&_IERC721Metadata.CallOpts, tokenId) +} + +// SupportsInterface is a free data retrieval call binding the contract method 0x01ffc9a7. +// +// Solidity: function supportsInterface(bytes4 interfaceId) view returns(bool) +func (_IERC721Metadata *IERC721MetadataCaller) SupportsInterface(opts *bind.CallOpts, interfaceId [4]byte) (bool, error) { + var ( + ret0 = new(bool) + ) + out := ret0 + err := _IERC721Metadata.contract.Call(opts, out, "supportsInterface", interfaceId) + return *ret0, err +} + +// SupportsInterface is a free data retrieval call binding the contract method 0x01ffc9a7. +// +// Solidity: function supportsInterface(bytes4 interfaceId) view returns(bool) +func (_IERC721Metadata *IERC721MetadataSession) SupportsInterface(interfaceId [4]byte) (bool, error) { + return _IERC721Metadata.Contract.SupportsInterface(&_IERC721Metadata.CallOpts, interfaceId) +} + +// SupportsInterface is a free data retrieval call binding the contract method 0x01ffc9a7. +// +// Solidity: function supportsInterface(bytes4 interfaceId) view returns(bool) +func (_IERC721Metadata *IERC721MetadataCallerSession) SupportsInterface(interfaceId [4]byte) (bool, error) { + return _IERC721Metadata.Contract.SupportsInterface(&_IERC721Metadata.CallOpts, interfaceId) +} + +// Symbol is a free data retrieval call binding the contract method 0x95d89b41. +// +// Solidity: function symbol() view returns(string) +func (_IERC721Metadata *IERC721MetadataCaller) Symbol(opts *bind.CallOpts) (string, error) { + var ( + ret0 = new(string) + ) + out := ret0 + err := _IERC721Metadata.contract.Call(opts, out, "symbol") + return *ret0, err +} + +// Symbol is a free data retrieval call binding the contract method 0x95d89b41. +// +// Solidity: function symbol() view returns(string) +func (_IERC721Metadata *IERC721MetadataSession) Symbol() (string, error) { + return _IERC721Metadata.Contract.Symbol(&_IERC721Metadata.CallOpts) +} + +// Symbol is a free data retrieval call binding the contract method 0x95d89b41. +// +// Solidity: function symbol() view returns(string) +func (_IERC721Metadata *IERC721MetadataCallerSession) Symbol() (string, error) { + return _IERC721Metadata.Contract.Symbol(&_IERC721Metadata.CallOpts) +} + +// TokenURI is a free data retrieval call binding the contract method 0xc87b56dd. +// +// Solidity: function tokenURI(uint256 tokenId) view returns(string) +func (_IERC721Metadata *IERC721MetadataCaller) TokenURI(opts *bind.CallOpts, tokenId *big.Int) (string, error) { + var ( + ret0 = new(string) + ) + out := ret0 + err := _IERC721Metadata.contract.Call(opts, out, "tokenURI", tokenId) + return *ret0, err +} + +// TokenURI is a free data retrieval call binding the contract method 0xc87b56dd. +// +// Solidity: function tokenURI(uint256 tokenId) view returns(string) +func (_IERC721Metadata *IERC721MetadataSession) TokenURI(tokenId *big.Int) (string, error) { + return _IERC721Metadata.Contract.TokenURI(&_IERC721Metadata.CallOpts, tokenId) +} + +// TokenURI is a free data retrieval call binding the contract method 0xc87b56dd. +// +// Solidity: function tokenURI(uint256 tokenId) view returns(string) +func (_IERC721Metadata *IERC721MetadataCallerSession) TokenURI(tokenId *big.Int) (string, error) { + return _IERC721Metadata.Contract.TokenURI(&_IERC721Metadata.CallOpts, tokenId) +} + +// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. +// +// Solidity: function approve(address to, uint256 tokenId) returns() +func (_IERC721Metadata *IERC721MetadataTransactor) Approve(opts *bind.TransactOpts, to common.Address, tokenId *big.Int) (*types.Transaction, error) { + return _IERC721Metadata.contract.Transact(opts, "approve", to, tokenId) +} + +// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. +// +// Solidity: function approve(address to, uint256 tokenId) returns() +func (_IERC721Metadata *IERC721MetadataSession) Approve(to common.Address, tokenId *big.Int) (*types.Transaction, error) { + return _IERC721Metadata.Contract.Approve(&_IERC721Metadata.TransactOpts, to, tokenId) +} + +// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. +// +// Solidity: function approve(address to, uint256 tokenId) returns() +func (_IERC721Metadata *IERC721MetadataTransactorSession) Approve(to common.Address, tokenId *big.Int) (*types.Transaction, error) { + return _IERC721Metadata.Contract.Approve(&_IERC721Metadata.TransactOpts, to, tokenId) +} + +// SafeTransferFrom is a paid mutator transaction binding the contract method 0x42842e0e. +// +// Solidity: function safeTransferFrom(address from, address to, uint256 tokenId) returns() +func (_IERC721Metadata *IERC721MetadataTransactor) SafeTransferFrom(opts *bind.TransactOpts, from common.Address, to common.Address, tokenId *big.Int) (*types.Transaction, error) { + return _IERC721Metadata.contract.Transact(opts, "safeTransferFrom", from, to, tokenId) +} + +// SafeTransferFrom is a paid mutator transaction binding the contract method 0x42842e0e. +// +// Solidity: function safeTransferFrom(address from, address to, uint256 tokenId) returns() +func (_IERC721Metadata *IERC721MetadataSession) SafeTransferFrom(from common.Address, to common.Address, tokenId *big.Int) (*types.Transaction, error) { + return _IERC721Metadata.Contract.SafeTransferFrom(&_IERC721Metadata.TransactOpts, from, to, tokenId) +} + +// SafeTransferFrom is a paid mutator transaction binding the contract method 0x42842e0e. +// +// Solidity: function safeTransferFrom(address from, address to, uint256 tokenId) returns() +func (_IERC721Metadata *IERC721MetadataTransactorSession) SafeTransferFrom(from common.Address, to common.Address, tokenId *big.Int) (*types.Transaction, error) { + return _IERC721Metadata.Contract.SafeTransferFrom(&_IERC721Metadata.TransactOpts, from, to, tokenId) +} + +// SafeTransferFrom0 is a paid mutator transaction binding the contract method 0xb88d4fde. +// +// Solidity: function safeTransferFrom(address from, address to, uint256 tokenId, bytes data) returns() +func (_IERC721Metadata *IERC721MetadataTransactor) SafeTransferFrom0(opts *bind.TransactOpts, from common.Address, to common.Address, tokenId *big.Int, data []byte) (*types.Transaction, error) { + return _IERC721Metadata.contract.Transact(opts, "safeTransferFrom0", from, to, tokenId, data) +} + +// SafeTransferFrom0 is a paid mutator transaction binding the contract method 0xb88d4fde. +// +// Solidity: function safeTransferFrom(address from, address to, uint256 tokenId, bytes data) returns() +func (_IERC721Metadata *IERC721MetadataSession) SafeTransferFrom0(from common.Address, to common.Address, tokenId *big.Int, data []byte) (*types.Transaction, error) { + return _IERC721Metadata.Contract.SafeTransferFrom0(&_IERC721Metadata.TransactOpts, from, to, tokenId, data) +} + +// SafeTransferFrom0 is a paid mutator transaction binding the contract method 0xb88d4fde. +// +// Solidity: function safeTransferFrom(address from, address to, uint256 tokenId, bytes data) returns() +func (_IERC721Metadata *IERC721MetadataTransactorSession) SafeTransferFrom0(from common.Address, to common.Address, tokenId *big.Int, data []byte) (*types.Transaction, error) { + return _IERC721Metadata.Contract.SafeTransferFrom0(&_IERC721Metadata.TransactOpts, from, to, tokenId, data) +} + +// SetApprovalForAll is a paid mutator transaction binding the contract method 0xa22cb465. +// +// Solidity: function setApprovalForAll(address operator, bool _approved) returns() +func (_IERC721Metadata *IERC721MetadataTransactor) SetApprovalForAll(opts *bind.TransactOpts, operator common.Address, _approved bool) (*types.Transaction, error) { + return _IERC721Metadata.contract.Transact(opts, "setApprovalForAll", operator, _approved) +} + +// SetApprovalForAll is a paid mutator transaction binding the contract method 0xa22cb465. +// +// Solidity: function setApprovalForAll(address operator, bool _approved) returns() +func (_IERC721Metadata *IERC721MetadataSession) SetApprovalForAll(operator common.Address, _approved bool) (*types.Transaction, error) { + return _IERC721Metadata.Contract.SetApprovalForAll(&_IERC721Metadata.TransactOpts, operator, _approved) +} + +// SetApprovalForAll is a paid mutator transaction binding the contract method 0xa22cb465. +// +// Solidity: function setApprovalForAll(address operator, bool _approved) returns() +func (_IERC721Metadata *IERC721MetadataTransactorSession) SetApprovalForAll(operator common.Address, _approved bool) (*types.Transaction, error) { + return _IERC721Metadata.Contract.SetApprovalForAll(&_IERC721Metadata.TransactOpts, operator, _approved) +} + +// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. +// +// Solidity: function transferFrom(address from, address to, uint256 tokenId) returns() +func (_IERC721Metadata *IERC721MetadataTransactor) TransferFrom(opts *bind.TransactOpts, from common.Address, to common.Address, tokenId *big.Int) (*types.Transaction, error) { + return _IERC721Metadata.contract.Transact(opts, "transferFrom", from, to, tokenId) +} + +// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. +// +// Solidity: function transferFrom(address from, address to, uint256 tokenId) returns() +func (_IERC721Metadata *IERC721MetadataSession) TransferFrom(from common.Address, to common.Address, tokenId *big.Int) (*types.Transaction, error) { + return _IERC721Metadata.Contract.TransferFrom(&_IERC721Metadata.TransactOpts, from, to, tokenId) +} + +// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. +// +// Solidity: function transferFrom(address from, address to, uint256 tokenId) returns() +func (_IERC721Metadata *IERC721MetadataTransactorSession) TransferFrom(from common.Address, to common.Address, tokenId *big.Int) (*types.Transaction, error) { + return _IERC721Metadata.Contract.TransferFrom(&_IERC721Metadata.TransactOpts, from, to, tokenId) +} + +// IERC721MetadataApprovalIterator is returned from FilterApproval and is used to iterate over the raw logs and unpacked data for Approval events raised by the IERC721Metadata contract. +type IERC721MetadataApprovalIterator struct { + Event *IERC721MetadataApproval // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *IERC721MetadataApprovalIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(IERC721MetadataApproval) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(IERC721MetadataApproval) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *IERC721MetadataApprovalIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *IERC721MetadataApprovalIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// IERC721MetadataApproval represents a Approval event raised by the IERC721Metadata contract. +type IERC721MetadataApproval struct { + Owner common.Address + Approved common.Address + TokenId *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterApproval is a free log retrieval operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. +// +// Solidity: event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId) +func (_IERC721Metadata *IERC721MetadataFilterer) FilterApproval(opts *bind.FilterOpts, owner []common.Address, approved []common.Address, tokenId []*big.Int) (*IERC721MetadataApprovalIterator, error) { + + var ownerRule []interface{} + for _, ownerItem := range owner { + ownerRule = append(ownerRule, ownerItem) + } + var approvedRule []interface{} + for _, approvedItem := range approved { + approvedRule = append(approvedRule, approvedItem) + } + var tokenIdRule []interface{} + for _, tokenIdItem := range tokenId { + tokenIdRule = append(tokenIdRule, tokenIdItem) + } + + logs, sub, err := _IERC721Metadata.contract.FilterLogs(opts, "Approval", ownerRule, approvedRule, tokenIdRule) + if err != nil { + return nil, err + } + return &IERC721MetadataApprovalIterator{contract: _IERC721Metadata.contract, event: "Approval", logs: logs, sub: sub}, nil +} + +// WatchApproval is a free log subscription operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. +// +// Solidity: event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId) +func (_IERC721Metadata *IERC721MetadataFilterer) WatchApproval(opts *bind.WatchOpts, sink chan<- *IERC721MetadataApproval, owner []common.Address, approved []common.Address, tokenId []*big.Int) (event.Subscription, error) { + + var ownerRule []interface{} + for _, ownerItem := range owner { + ownerRule = append(ownerRule, ownerItem) + } + var approvedRule []interface{} + for _, approvedItem := range approved { + approvedRule = append(approvedRule, approvedItem) + } + var tokenIdRule []interface{} + for _, tokenIdItem := range tokenId { + tokenIdRule = append(tokenIdRule, tokenIdItem) + } + + logs, sub, err := _IERC721Metadata.contract.WatchLogs(opts, "Approval", ownerRule, approvedRule, tokenIdRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(IERC721MetadataApproval) + if err := _IERC721Metadata.contract.UnpackLog(event, "Approval", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseApproval is a log parse operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. +// +// Solidity: event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId) +func (_IERC721Metadata *IERC721MetadataFilterer) ParseApproval(log types.Log) (*IERC721MetadataApproval, error) { + event := new(IERC721MetadataApproval) + if err := _IERC721Metadata.contract.UnpackLog(event, "Approval", log); err != nil { + return nil, err + } + return event, nil +} + +// IERC721MetadataApprovalForAllIterator is returned from FilterApprovalForAll and is used to iterate over the raw logs and unpacked data for ApprovalForAll events raised by the IERC721Metadata contract. +type IERC721MetadataApprovalForAllIterator struct { + Event *IERC721MetadataApprovalForAll // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *IERC721MetadataApprovalForAllIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(IERC721MetadataApprovalForAll) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(IERC721MetadataApprovalForAll) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *IERC721MetadataApprovalForAllIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *IERC721MetadataApprovalForAllIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// IERC721MetadataApprovalForAll represents a ApprovalForAll event raised by the IERC721Metadata contract. +type IERC721MetadataApprovalForAll struct { + Owner common.Address + Operator common.Address + Approved bool + Raw types.Log // Blockchain specific contextual infos +} + +// FilterApprovalForAll is a free log retrieval operation binding the contract event 0x17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31. +// +// Solidity: event ApprovalForAll(address indexed owner, address indexed operator, bool approved) +func (_IERC721Metadata *IERC721MetadataFilterer) FilterApprovalForAll(opts *bind.FilterOpts, owner []common.Address, operator []common.Address) (*IERC721MetadataApprovalForAllIterator, error) { + + var ownerRule []interface{} + for _, ownerItem := range owner { + ownerRule = append(ownerRule, ownerItem) + } + var operatorRule []interface{} + for _, operatorItem := range operator { + operatorRule = append(operatorRule, operatorItem) + } + + logs, sub, err := _IERC721Metadata.contract.FilterLogs(opts, "ApprovalForAll", ownerRule, operatorRule) + if err != nil { + return nil, err + } + return &IERC721MetadataApprovalForAllIterator{contract: _IERC721Metadata.contract, event: "ApprovalForAll", logs: logs, sub: sub}, nil +} + +// WatchApprovalForAll is a free log subscription operation binding the contract event 0x17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31. +// +// Solidity: event ApprovalForAll(address indexed owner, address indexed operator, bool approved) +func (_IERC721Metadata *IERC721MetadataFilterer) WatchApprovalForAll(opts *bind.WatchOpts, sink chan<- *IERC721MetadataApprovalForAll, owner []common.Address, operator []common.Address) (event.Subscription, error) { + + var ownerRule []interface{} + for _, ownerItem := range owner { + ownerRule = append(ownerRule, ownerItem) + } + var operatorRule []interface{} + for _, operatorItem := range operator { + operatorRule = append(operatorRule, operatorItem) + } + + logs, sub, err := _IERC721Metadata.contract.WatchLogs(opts, "ApprovalForAll", ownerRule, operatorRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(IERC721MetadataApprovalForAll) + if err := _IERC721Metadata.contract.UnpackLog(event, "ApprovalForAll", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseApprovalForAll is a log parse operation binding the contract event 0x17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31. +// +// Solidity: event ApprovalForAll(address indexed owner, address indexed operator, bool approved) +func (_IERC721Metadata *IERC721MetadataFilterer) ParseApprovalForAll(log types.Log) (*IERC721MetadataApprovalForAll, error) { + event := new(IERC721MetadataApprovalForAll) + if err := _IERC721Metadata.contract.UnpackLog(event, "ApprovalForAll", log); err != nil { + return nil, err + } + return event, nil +} + +// IERC721MetadataTransferIterator is returned from FilterTransfer and is used to iterate over the raw logs and unpacked data for Transfer events raised by the IERC721Metadata contract. +type IERC721MetadataTransferIterator struct { + Event *IERC721MetadataTransfer // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *IERC721MetadataTransferIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(IERC721MetadataTransfer) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(IERC721MetadataTransfer) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *IERC721MetadataTransferIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *IERC721MetadataTransferIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// IERC721MetadataTransfer represents a Transfer event raised by the IERC721Metadata contract. +type IERC721MetadataTransfer struct { + From common.Address + To common.Address + TokenId *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterTransfer is a free log retrieval operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. +// +// Solidity: event Transfer(address indexed from, address indexed to, uint256 indexed tokenId) +func (_IERC721Metadata *IERC721MetadataFilterer) FilterTransfer(opts *bind.FilterOpts, from []common.Address, to []common.Address, tokenId []*big.Int) (*IERC721MetadataTransferIterator, error) { + + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + var tokenIdRule []interface{} + for _, tokenIdItem := range tokenId { + tokenIdRule = append(tokenIdRule, tokenIdItem) + } + + logs, sub, err := _IERC721Metadata.contract.FilterLogs(opts, "Transfer", fromRule, toRule, tokenIdRule) + if err != nil { + return nil, err + } + return &IERC721MetadataTransferIterator{contract: _IERC721Metadata.contract, event: "Transfer", logs: logs, sub: sub}, nil +} + +// WatchTransfer is a free log subscription operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. +// +// Solidity: event Transfer(address indexed from, address indexed to, uint256 indexed tokenId) +func (_IERC721Metadata *IERC721MetadataFilterer) WatchTransfer(opts *bind.WatchOpts, sink chan<- *IERC721MetadataTransfer, from []common.Address, to []common.Address, tokenId []*big.Int) (event.Subscription, error) { + + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + var tokenIdRule []interface{} + for _, tokenIdItem := range tokenId { + tokenIdRule = append(tokenIdRule, tokenIdItem) + } + + logs, sub, err := _IERC721Metadata.contract.WatchLogs(opts, "Transfer", fromRule, toRule, tokenIdRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(IERC721MetadataTransfer) + if err := _IERC721Metadata.contract.UnpackLog(event, "Transfer", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseTransfer is a log parse operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. +// +// Solidity: event Transfer(address indexed from, address indexed to, uint256 indexed tokenId) +func (_IERC721Metadata *IERC721MetadataFilterer) ParseTransfer(log types.Log) (*IERC721MetadataTransfer, error) { + event := new(IERC721MetadataTransfer) + if err := _IERC721Metadata.contract.UnpackLog(event, "Transfer", log); err != nil { + return nil, err + } + return event, nil +} + +// IERC721ReceiverABI is the input ABI used to generate the binding from. +const IERC721ReceiverABI = "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"onERC721Received\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]" + +// IERC721ReceiverFuncSigs maps the 4-byte function signature to its string representation. +var IERC721ReceiverFuncSigs = map[string]string{ + "150b7a02": "onERC721Received(address,address,uint256,bytes)", +} + +// IERC721Receiver is an auto generated Go binding around an Ethereum contract. +type IERC721Receiver struct { + IERC721ReceiverCaller // Read-only binding to the contract + IERC721ReceiverTransactor // Write-only binding to the contract + IERC721ReceiverFilterer // Log filterer for contract events +} + +// IERC721ReceiverCaller is an auto generated read-only Go binding around an Ethereum contract. +type IERC721ReceiverCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// IERC721ReceiverTransactor is an auto generated write-only Go binding around an Ethereum contract. +type IERC721ReceiverTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// IERC721ReceiverFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type IERC721ReceiverFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// IERC721ReceiverSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type IERC721ReceiverSession struct { + Contract *IERC721Receiver // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// IERC721ReceiverCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type IERC721ReceiverCallerSession struct { + Contract *IERC721ReceiverCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// IERC721ReceiverTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type IERC721ReceiverTransactorSession struct { + Contract *IERC721ReceiverTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// IERC721ReceiverRaw is an auto generated low-level Go binding around an Ethereum contract. +type IERC721ReceiverRaw struct { + Contract *IERC721Receiver // Generic contract binding to access the raw methods on +} + +// IERC721ReceiverCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type IERC721ReceiverCallerRaw struct { + Contract *IERC721ReceiverCaller // Generic read-only contract binding to access the raw methods on +} + +// IERC721ReceiverTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type IERC721ReceiverTransactorRaw struct { + Contract *IERC721ReceiverTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewIERC721Receiver creates a new instance of IERC721Receiver, bound to a specific deployed contract. +func NewIERC721Receiver(address common.Address, backend bind.ContractBackend) (*IERC721Receiver, error) { + contract, err := bindIERC721Receiver(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &IERC721Receiver{IERC721ReceiverCaller: IERC721ReceiverCaller{contract: contract}, IERC721ReceiverTransactor: IERC721ReceiverTransactor{contract: contract}, IERC721ReceiverFilterer: IERC721ReceiverFilterer{contract: contract}}, nil +} + +// NewIERC721ReceiverCaller creates a new read-only instance of IERC721Receiver, bound to a specific deployed contract. +func NewIERC721ReceiverCaller(address common.Address, caller bind.ContractCaller) (*IERC721ReceiverCaller, error) { + contract, err := bindIERC721Receiver(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &IERC721ReceiverCaller{contract: contract}, nil +} + +// NewIERC721ReceiverTransactor creates a new write-only instance of IERC721Receiver, bound to a specific deployed contract. +func NewIERC721ReceiverTransactor(address common.Address, transactor bind.ContractTransactor) (*IERC721ReceiverTransactor, error) { + contract, err := bindIERC721Receiver(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &IERC721ReceiverTransactor{contract: contract}, nil +} + +// NewIERC721ReceiverFilterer creates a new log filterer instance of IERC721Receiver, bound to a specific deployed contract. +func NewIERC721ReceiverFilterer(address common.Address, filterer bind.ContractFilterer) (*IERC721ReceiverFilterer, error) { + contract, err := bindIERC721Receiver(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &IERC721ReceiverFilterer{contract: contract}, nil +} + +// bindIERC721Receiver binds a generic wrapper to an already deployed contract. +func bindIERC721Receiver(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := abi.JSON(strings.NewReader(IERC721ReceiverABI)) + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_IERC721Receiver *IERC721ReceiverRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { + return _IERC721Receiver.Contract.IERC721ReceiverCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_IERC721Receiver *IERC721ReceiverRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _IERC721Receiver.Contract.IERC721ReceiverTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_IERC721Receiver *IERC721ReceiverRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _IERC721Receiver.Contract.IERC721ReceiverTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_IERC721Receiver *IERC721ReceiverCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { + return _IERC721Receiver.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_IERC721Receiver *IERC721ReceiverTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _IERC721Receiver.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_IERC721Receiver *IERC721ReceiverTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _IERC721Receiver.Contract.contract.Transact(opts, method, params...) +} + +// OnERC721Received is a paid mutator transaction binding the contract method 0x150b7a02. +// +// Solidity: function onERC721Received(address operator, address from, uint256 tokenId, bytes data) returns(bytes4) +func (_IERC721Receiver *IERC721ReceiverTransactor) OnERC721Received(opts *bind.TransactOpts, operator common.Address, from common.Address, tokenId *big.Int, data []byte) (*types.Transaction, error) { + return _IERC721Receiver.contract.Transact(opts, "onERC721Received", operator, from, tokenId, data) +} + +// OnERC721Received is a paid mutator transaction binding the contract method 0x150b7a02. +// +// Solidity: function onERC721Received(address operator, address from, uint256 tokenId, bytes data) returns(bytes4) +func (_IERC721Receiver *IERC721ReceiverSession) OnERC721Received(operator common.Address, from common.Address, tokenId *big.Int, data []byte) (*types.Transaction, error) { + return _IERC721Receiver.Contract.OnERC721Received(&_IERC721Receiver.TransactOpts, operator, from, tokenId, data) +} + +// OnERC721Received is a paid mutator transaction binding the contract method 0x150b7a02. +// +// Solidity: function onERC721Received(address operator, address from, uint256 tokenId, bytes data) returns(bytes4) +func (_IERC721Receiver *IERC721ReceiverTransactorSession) OnERC721Received(operator common.Address, from common.Address, tokenId *big.Int, data []byte) (*types.Transaction, error) { + return _IERC721Receiver.Contract.OnERC721Received(&_IERC721Receiver.TransactOpts, operator, from, tokenId, data) +} + +// SafeMathABI is the input ABI used to generate the binding from. +const SafeMathABI = "[]" + +// SafeMathBin is the compiled bytecode used for deploying new contracts. +var SafeMathBin = "0x60566023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea264697066735822122078dc014d2d339b07d3f6259f70196bf0be1b873dd80a5ef8b74af1273abdab7464736f6c634300060c0033" + +// DeploySafeMath deploys a new Ethereum contract, binding an instance of SafeMath to it. +func DeploySafeMath(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *SafeMath, error) { + parsed, err := abi.JSON(strings.NewReader(SafeMathABI)) + if err != nil { + return common.Address{}, nil, nil, err + } + + address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(SafeMathBin), backend) + if err != nil { + return common.Address{}, nil, nil, err + } + return address, tx, &SafeMath{SafeMathCaller: SafeMathCaller{contract: contract}, SafeMathTransactor: SafeMathTransactor{contract: contract}, SafeMathFilterer: SafeMathFilterer{contract: contract}}, nil +} + +// SafeMath is an auto generated Go binding around an Ethereum contract. +type SafeMath struct { + SafeMathCaller // Read-only binding to the contract + SafeMathTransactor // Write-only binding to the contract + SafeMathFilterer // Log filterer for contract events +} + +// SafeMathCaller is an auto generated read-only Go binding around an Ethereum contract. +type SafeMathCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// SafeMathTransactor is an auto generated write-only Go binding around an Ethereum contract. +type SafeMathTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// SafeMathFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type SafeMathFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// SafeMathSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type SafeMathSession struct { + Contract *SafeMath // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// SafeMathCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type SafeMathCallerSession struct { + Contract *SafeMathCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// SafeMathTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type SafeMathTransactorSession struct { + Contract *SafeMathTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// SafeMathRaw is an auto generated low-level Go binding around an Ethereum contract. +type SafeMathRaw struct { + Contract *SafeMath // Generic contract binding to access the raw methods on +} + +// SafeMathCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type SafeMathCallerRaw struct { + Contract *SafeMathCaller // Generic read-only contract binding to access the raw methods on +} + +// SafeMathTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type SafeMathTransactorRaw struct { + Contract *SafeMathTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewSafeMath creates a new instance of SafeMath, bound to a specific deployed contract. +func NewSafeMath(address common.Address, backend bind.ContractBackend) (*SafeMath, error) { + contract, err := bindSafeMath(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &SafeMath{SafeMathCaller: SafeMathCaller{contract: contract}, SafeMathTransactor: SafeMathTransactor{contract: contract}, SafeMathFilterer: SafeMathFilterer{contract: contract}}, nil +} + +// NewSafeMathCaller creates a new read-only instance of SafeMath, bound to a specific deployed contract. +func NewSafeMathCaller(address common.Address, caller bind.ContractCaller) (*SafeMathCaller, error) { + contract, err := bindSafeMath(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &SafeMathCaller{contract: contract}, nil +} + +// NewSafeMathTransactor creates a new write-only instance of SafeMath, bound to a specific deployed contract. +func NewSafeMathTransactor(address common.Address, transactor bind.ContractTransactor) (*SafeMathTransactor, error) { + contract, err := bindSafeMath(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &SafeMathTransactor{contract: contract}, nil +} + +// NewSafeMathFilterer creates a new log filterer instance of SafeMath, bound to a specific deployed contract. +func NewSafeMathFilterer(address common.Address, filterer bind.ContractFilterer) (*SafeMathFilterer, error) { + contract, err := bindSafeMath(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &SafeMathFilterer{contract: contract}, nil +} + +// bindSafeMath binds a generic wrapper to an already deployed contract. +func bindSafeMath(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := abi.JSON(strings.NewReader(SafeMathABI)) + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_SafeMath *SafeMathRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { + return _SafeMath.Contract.SafeMathCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_SafeMath *SafeMathRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _SafeMath.Contract.SafeMathTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_SafeMath *SafeMathRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _SafeMath.Contract.SafeMathTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_SafeMath *SafeMathCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { + return _SafeMath.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_SafeMath *SafeMathTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _SafeMath.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_SafeMath *SafeMathTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _SafeMath.Contract.contract.Transact(opts, method, params...) +} + +// StringsABI is the input ABI used to generate the binding from. +const StringsABI = "[]" + +// StringsBin is the compiled bytecode used for deploying new contracts. +var StringsBin = "0x60566023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220fa44481d9d16b57a635c43da10eca83e94c6c97684101a5db517d64642308e1664736f6c634300060c0033" + +// DeployStrings deploys a new Ethereum contract, binding an instance of Strings to it. +func DeployStrings(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *Strings, error) { + parsed, err := abi.JSON(strings.NewReader(StringsABI)) + if err != nil { + return common.Address{}, nil, nil, err + } + + address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(StringsBin), backend) + if err != nil { + return common.Address{}, nil, nil, err + } + return address, tx, &Strings{StringsCaller: StringsCaller{contract: contract}, StringsTransactor: StringsTransactor{contract: contract}, StringsFilterer: StringsFilterer{contract: contract}}, nil +} + +// Strings is an auto generated Go binding around an Ethereum contract. +type Strings struct { + StringsCaller // Read-only binding to the contract + StringsTransactor // Write-only binding to the contract + StringsFilterer // Log filterer for contract events +} + +// StringsCaller is an auto generated read-only Go binding around an Ethereum contract. +type StringsCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// StringsTransactor is an auto generated write-only Go binding around an Ethereum contract. +type StringsTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// StringsFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type StringsFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// StringsSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type StringsSession struct { + Contract *Strings // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// StringsCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type StringsCallerSession struct { + Contract *StringsCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// StringsTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type StringsTransactorSession struct { + Contract *StringsTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// StringsRaw is an auto generated low-level Go binding around an Ethereum contract. +type StringsRaw struct { + Contract *Strings // Generic contract binding to access the raw methods on +} + +// StringsCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type StringsCallerRaw struct { + Contract *StringsCaller // Generic read-only contract binding to access the raw methods on +} + +// StringsTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type StringsTransactorRaw struct { + Contract *StringsTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewStrings creates a new instance of Strings, bound to a specific deployed contract. +func NewStrings(address common.Address, backend bind.ContractBackend) (*Strings, error) { + contract, err := bindStrings(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &Strings{StringsCaller: StringsCaller{contract: contract}, StringsTransactor: StringsTransactor{contract: contract}, StringsFilterer: StringsFilterer{contract: contract}}, nil +} + +// NewStringsCaller creates a new read-only instance of Strings, bound to a specific deployed contract. +func NewStringsCaller(address common.Address, caller bind.ContractCaller) (*StringsCaller, error) { + contract, err := bindStrings(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &StringsCaller{contract: contract}, nil +} + +// NewStringsTransactor creates a new write-only instance of Strings, bound to a specific deployed contract. +func NewStringsTransactor(address common.Address, transactor bind.ContractTransactor) (*StringsTransactor, error) { + contract, err := bindStrings(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &StringsTransactor{contract: contract}, nil +} + +// NewStringsFilterer creates a new log filterer instance of Strings, bound to a specific deployed contract. +func NewStringsFilterer(address common.Address, filterer bind.ContractFilterer) (*StringsFilterer, error) { + contract, err := bindStrings(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &StringsFilterer{contract: contract}, nil +} + +// bindStrings binds a generic wrapper to an already deployed contract. +func bindStrings(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := abi.JSON(strings.NewReader(StringsABI)) + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_Strings *StringsRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { + return _Strings.Contract.StringsCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_Strings *StringsRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Strings.Contract.StringsTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_Strings *StringsRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _Strings.Contract.StringsTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_Strings *StringsCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { + return _Strings.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_Strings *StringsTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Strings.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_Strings *StringsTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _Strings.Contract.contract.Transact(opts, method, params...) +} diff --git a/go_abi/v0.4.25/eccd/eccd_abi.go b/go_abi/v0.4.25/eccd/eccd_abi.go new file mode 100644 index 0000000..fa14a48 --- /dev/null +++ b/go_abi/v0.4.25/eccd/eccd_abi.go @@ -0,0 +1,2687 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package eccd + +import ( + "math/big" + "strings" + + ethereum "github.com/ethereum/go-ethereum" + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/event" +) + +// Reference imports to suppress errors if they are not otherwise used. +var ( + _ = big.NewInt + _ = strings.NewReader + _ = ethereum.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription +) + +// ContextABI is the input ABI used to generate the binding from. +const ContextABI = "[{\"inputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"}]" + +// Context is an auto generated Go binding around an Ethereum contract. +type Context struct { + ContextCaller // Read-only binding to the contract + ContextTransactor // Write-only binding to the contract + ContextFilterer // Log filterer for contract events +} + +// ContextCaller is an auto generated read-only Go binding around an Ethereum contract. +type ContextCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// ContextTransactor is an auto generated write-only Go binding around an Ethereum contract. +type ContextTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// ContextFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type ContextFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// ContextSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type ContextSession struct { + Contract *Context // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// ContextCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type ContextCallerSession struct { + Contract *ContextCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// ContextTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type ContextTransactorSession struct { + Contract *ContextTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// ContextRaw is an auto generated low-level Go binding around an Ethereum contract. +type ContextRaw struct { + Contract *Context // Generic contract binding to access the raw methods on +} + +// ContextCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type ContextCallerRaw struct { + Contract *ContextCaller // Generic read-only contract binding to access the raw methods on +} + +// ContextTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type ContextTransactorRaw struct { + Contract *ContextTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewContext creates a new instance of Context, bound to a specific deployed contract. +func NewContext(address common.Address, backend bind.ContractBackend) (*Context, error) { + contract, err := bindContext(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &Context{ContextCaller: ContextCaller{contract: contract}, ContextTransactor: ContextTransactor{contract: contract}, ContextFilterer: ContextFilterer{contract: contract}}, nil +} + +// NewContextCaller creates a new read-only instance of Context, bound to a specific deployed contract. +func NewContextCaller(address common.Address, caller bind.ContractCaller) (*ContextCaller, error) { + contract, err := bindContext(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &ContextCaller{contract: contract}, nil +} + +// NewContextTransactor creates a new write-only instance of Context, bound to a specific deployed contract. +func NewContextTransactor(address common.Address, transactor bind.ContractTransactor) (*ContextTransactor, error) { + contract, err := bindContext(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &ContextTransactor{contract: contract}, nil +} + +// NewContextFilterer creates a new log filterer instance of Context, bound to a specific deployed contract. +func NewContextFilterer(address common.Address, filterer bind.ContractFilterer) (*ContextFilterer, error) { + contract, err := bindContext(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &ContextFilterer{contract: contract}, nil +} + +// bindContext binds a generic wrapper to an already deployed contract. +func bindContext(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := abi.JSON(strings.NewReader(ContextABI)) + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_Context *ContextRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { + return _Context.Contract.ContextCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_Context *ContextRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Context.Contract.ContextTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_Context *ContextRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _Context.Contract.ContextTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_Context *ContextCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { + return _Context.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_Context *ContextTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Context.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_Context *ContextTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _Context.Contract.contract.Transact(opts, method, params...) +} + +// EthCrossChainDataABI is the input ABI used to generate the binding from. +const EthCrossChainDataABI = "[{\"constant\":true,\"inputs\":[],\"name\":\"EthToPolyTxHashIndex\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"fromChainId\",\"type\":\"uint64\"},{\"name\":\"fromChainTx\",\"type\":\"bytes32\"}],\"name\":\"checkIfFromChainTxExist\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"key1\",\"type\":\"bytes32\"},{\"name\":\"key2\",\"type\":\"bytes32\"},{\"name\":\"value\",\"type\":\"bytes\"}],\"name\":\"putExtraData\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"bytes32\"},{\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"ExtraData\",\"outputs\":[{\"name\":\"\",\"type\":\"bytes\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"ethTxHashIndex\",\"type\":\"uint256\"}],\"name\":\"getEthTxHash\",\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"unpause\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"key1\",\"type\":\"bytes32\"},{\"name\":\"key2\",\"type\":\"bytes32\"}],\"name\":\"getExtraData\",\"outputs\":[{\"name\":\"\",\"type\":\"bytes\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"curEpochPkBytes\",\"type\":\"bytes\"}],\"name\":\"putCurEpochConPubKeyBytes\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"ethTxHash\",\"type\":\"bytes32\"}],\"name\":\"putEthTxHash\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"EthToPolyTxHashMap\",\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"getCurEpochStartHeight\",\"outputs\":[{\"name\":\"\",\"type\":\"uint32\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"CurEpochStartHeight\",\"outputs\":[{\"name\":\"\",\"type\":\"uint32\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"getCurEpochConPubKeyBytes\",\"outputs\":[{\"name\":\"\",\"type\":\"bytes\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"pause\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"curEpochStartHeight\",\"type\":\"uint32\"}],\"name\":\"putCurEpochStartHeight\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"isOwner\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"fromChainId\",\"type\":\"uint64\"},{\"name\":\"fromChainTx\",\"type\":\"bytes32\"}],\"name\":\"markFromChainTxExist\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"ConKeepersPkBytes\",\"outputs\":[{\"name\":\"\",\"type\":\"bytes\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"getEthTxHashIndex\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"}]" + +// EthCrossChainDataFuncSigs maps the 4-byte function signature to its string representation. +var EthCrossChainDataFuncSigs = map[string]string{ + "fcbdc1e0": "ConKeepersPkBytes()", + "67e31a74": "CurEpochStartHeight()", + "00c5fff8": "EthToPolyTxHashIndex()", + "529caad8": "EthToPolyTxHashMap(uint256)", + "20bbde38": "ExtraData(bytes32,bytes32)", + "0586763c": "checkIfFromChainTxExist(uint64,bytes32)", + "69d48074": "getCurEpochConPubKeyBytes()", + "5ac40790": "getCurEpochStartHeight()", + "29927875": "getEthTxHash(uint256)", + "ff3d24a1": "getEthTxHashIndex()", + "40602bb5": "getExtraData(bytes32,bytes32)", + "8f32d59b": "isOwner()", + "e90bfdcf": "markFromChainTxExist(uint64,bytes32)", + "8da5cb5b": "owner()", + "8456cb59": "pause()", + "5c975abb": "paused()", + "41973cd9": "putCurEpochConPubKeyBytes(bytes)", + "8a8bd17f": "putCurEpochStartHeight(uint32)", + "4c3ccf64": "putEthTxHash(bytes32)", + "1afe374e": "putExtraData(bytes32,bytes32,bytes)", + "715018a6": "renounceOwnership()", + "f2fde38b": "transferOwnership(address)", + "3f4ba83a": "unpause()", +} + +// EthCrossChainDataBin is the compiled bytecode used for deploying new contracts. +var EthCrossChainDataBin = "0x60806040526000610017640100000000610076810204565b60008054600160a060020a031916600160a060020a0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3506000805460a060020a60ff021916905561007a565b3390565b6110d0806100896000396000f3006080604052600436106101315763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041662c5fff881146101365780630586763c1461015d5780631afe374e1461019657806320bbde38146101be578063299278751461024e5780633f4ba83a1461026657806340602bb51461027b57806341973cd9146102965780634c3ccf64146102b6578063529caad8146102ce5780635ac40790146102e65780635c975abb1461031457806367e31a741461032957806369d480741461033e578063715018a6146103535780638456cb591461036a5780638a8bd17f1461037f5780638da5cb5b1461039d5780638f32d59b146103ce578063e90bfdcf146103e3578063f2fde38b14610408578063fcbdc1e014610429578063ff3d24a11461043e575b600080fd5b34801561014257600080fd5b5061014b610453565b60408051918252519081900360200190f35b34801561016957600080fd5b5061018267ffffffffffffffff60043516602435610459565b604080519115158252519081900360200190f35b3480156101a257600080fd5b5061018260048035906024803591604435918201910135610485565b3480156101ca57600080fd5b506101d9600435602435610552565b6040805160208082528351818301528351919283929083019185019080838360005b838110156102135781810151838201526020016101fb565b50505050905090810190601f1680156102405780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561025a57600080fd5b5061014b6004356105f6565b34801561027257600080fd5b50610182610608565b34801561028757600080fd5b506101d96004356024356106c8565b3480156102a257600080fd5b506101826004803560248101910135610772565b3480156102c257600080fd5b50610182600435610825565b3480156102da57600080fd5b5061014b6004356108e5565b3480156102f257600080fd5b506102fb6108f7565b6040805163ffffffff9092168252519081900360200190f35b34801561032057600080fd5b50610182610903565b34801561033557600080fd5b506102fb610913565b34801561034a57600080fd5b506101d961091f565b34801561035f57600080fd5b506103686109b5565b005b34801561037657600080fd5b50610182610a58565b34801561038b57600080fd5b5061018263ffffffff60043516610afe565b3480156103a957600080fd5b506103b2610bba565b60408051600160a060020a039092168252519081900360200190f35b3480156103da57600080fd5b50610182610bc9565b3480156103ef57600080fd5b5061018267ffffffffffffffff60043516602435610bed565b34801561041457600080fd5b50610368600160a060020a0360043516610cc1565b34801561043557600080fd5b506101d9610d19565b34801561044a57600080fd5b5061014b610d74565b60025481565b67ffffffffffffffff919091166000908152600560209081526040808320938352929052205460ff1690565b6000805460a060020a900460ff16156104d6576040805160e560020a62461bcd0281526020600482015260106024820152600080516020611085833981519152604482015290519081900360640190fd5b6104de610bc9565b1515610522576040805160e560020a62461bcd0281526020600482018190526024820152600080516020611065833981519152604482015290519081900360640190fd5b60008581526006602090815260408083208784529091529020610546908484610fcc565b50600195945050505050565b60066020908152600092835260408084208252918352918190208054825160026001831615610100026000190190921691909104601f8101859004850282018501909352828152929091908301828280156105ee5780601f106105c3576101008083540402835291602001916105ee565b820191906000526020600020905b8154815290600101906020018083116105d157829003601f168201915b505050505081565b60009081526001602052604090205490565b6000610612610bc9565b1515610656576040805160e560020a62461bcd0281526020600482018190526024820152600080516020611065833981519152604482015290519081900360640190fd5b60005460a060020a900460ff1615156106b9576040805160e560020a62461bcd02815260206004820152601460248201527f5061757361626c653a206e6f7420706175736564000000000000000000000000604482015290519081900360640190fd5b6106c1610d7a565b5060015b90565b600082815260066020908152604080832084845282529182902080548351601f60026101006001851615026000190190931692909204918201849004840281018401909452808452606093928301828280156107655780601f1061073a57610100808354040283529160200191610765565b820191906000526020600020905b81548152906001019060200180831161074857829003601f168201915b5050505050905092915050565b6000805460a060020a900460ff16156107c3576040805160e560020a62461bcd0281526020600482015260106024820152600080516020611085833981519152604482015290519081900360640190fd5b6107cb610bc9565b151561080f576040805160e560020a62461bcd0281526020600482018190526024820152600080516020611065833981519152604482015290519081900360640190fd5b61081b60038484610fcc565b5060019392505050565b6000805460a060020a900460ff1615610876576040805160e560020a62461bcd0281526020600482015260106024820152600080516020611085833981519152604482015290519081900360640190fd5b61087e610bc9565b15156108c2576040805160e560020a62461bcd0281526020600482018190526024820152600080516020611065833981519152604482015290519081900360640190fd5b506002805460009081526001602081905260409091209290925580548201905590565b60016020526000908152604090205481565b60045463ffffffff1690565b60005460a060020a900460ff1690565b60045463ffffffff1681565b60038054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156109ab5780601f10610980576101008083540402835291602001916109ab565b820191906000526020600020905b81548152906001019060200180831161098e57829003601f168201915b5050505050905090565b6109bd610bc9565b1515610a01576040805160e560020a62461bcd0281526020600482018190526024820152600080516020611065833981519152604482015290519081900360640190fd5b60008054604051600160a060020a03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a36000805473ffffffffffffffffffffffffffffffffffffffff19169055565b6000610a62610bc9565b1515610aa6576040805160e560020a62461bcd0281526020600482018190526024820152600080516020611065833981519152604482015290519081900360640190fd5b60005460a060020a900460ff1615610af6576040805160e560020a62461bcd0281526020600482015260106024820152600080516020611085833981519152604482015290519081900360640190fd5b6106c1610e41565b6000805460a060020a900460ff1615610b4f576040805160e560020a62461bcd0281526020600482015260106024820152600080516020611085833981519152604482015290519081900360640190fd5b610b57610bc9565b1515610b9b576040805160e560020a62461bcd0281526020600482018190526024820152600080516020611065833981519152604482015290519081900360640190fd5b506004805463ffffffff831663ffffffff199091161790556001919050565b600054600160a060020a031690565b60008054600160a060020a0316610bde610eda565b600160a060020a031614905090565b6000805460a060020a900460ff1615610c3e576040805160e560020a62461bcd0281526020600482015260106024820152600080516020611085833981519152604482015290519081900360640190fd5b610c46610bc9565b1515610c8a576040805160e560020a62461bcd0281526020600482018190526024820152600080516020611065833981519152604482015290519081900360640190fd5b5067ffffffffffffffff91909116600090815260056020908152604080832093835292905220805460ff1916600190811790915590565b610cc9610bc9565b1515610d0d576040805160e560020a62461bcd0281526020600482018190526024820152600080516020611065833981519152604482015290519081900360640190fd5b610d1681610ede565b50565b6003805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156105ee5780601f106105c3576101008083540402835291602001916105ee565b60025490565b60005460a060020a900460ff161515610ddd576040805160e560020a62461bcd02815260206004820152601460248201527f5061757361626c653a206e6f7420706175736564000000000000000000000000604482015290519081900360640190fd5b6000805474ff0000000000000000000000000000000000000000191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa610e24610eda565b60408051600160a060020a039092168252519081900360200190a1565b60005460a060020a900460ff1615610e91576040805160e560020a62461bcd0281526020600482015260106024820152600080516020611085833981519152604482015290519081900360640190fd5b6000805474ff0000000000000000000000000000000000000000191660a060020a1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258610e245b3390565b600160a060020a0381161515610f64576040805160e560020a62461bcd02815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f6464726573730000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b60008054604051600160a060020a03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061100d5782800160ff1982351617855561103a565b8280016001018555821561103a579182015b8281111561103a57823582559160200191906001019061101f565b5061104692915061104a565b5090565b6106c591905b80821115611046576000815560010161105056004f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65725061757361626c653a2070617573656400000000000000000000000000000000a165627a7a723058209aad2591f6a75eac5e63d2f2d6feff1f41a72841feeb7e5b77177e15f907c30c0029" + +// DeployEthCrossChainData deploys a new Ethereum contract, binding an instance of EthCrossChainData to it. +func DeployEthCrossChainData(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *EthCrossChainData, error) { + parsed, err := abi.JSON(strings.NewReader(EthCrossChainDataABI)) + if err != nil { + return common.Address{}, nil, nil, err + } + + address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(EthCrossChainDataBin), backend) + if err != nil { + return common.Address{}, nil, nil, err + } + return address, tx, &EthCrossChainData{EthCrossChainDataCaller: EthCrossChainDataCaller{contract: contract}, EthCrossChainDataTransactor: EthCrossChainDataTransactor{contract: contract}, EthCrossChainDataFilterer: EthCrossChainDataFilterer{contract: contract}}, nil +} + +// EthCrossChainData is an auto generated Go binding around an Ethereum contract. +type EthCrossChainData struct { + EthCrossChainDataCaller // Read-only binding to the contract + EthCrossChainDataTransactor // Write-only binding to the contract + EthCrossChainDataFilterer // Log filterer for contract events +} + +// EthCrossChainDataCaller is an auto generated read-only Go binding around an Ethereum contract. +type EthCrossChainDataCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// EthCrossChainDataTransactor is an auto generated write-only Go binding around an Ethereum contract. +type EthCrossChainDataTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// EthCrossChainDataFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type EthCrossChainDataFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// EthCrossChainDataSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type EthCrossChainDataSession struct { + Contract *EthCrossChainData // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// EthCrossChainDataCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type EthCrossChainDataCallerSession struct { + Contract *EthCrossChainDataCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// EthCrossChainDataTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type EthCrossChainDataTransactorSession struct { + Contract *EthCrossChainDataTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// EthCrossChainDataRaw is an auto generated low-level Go binding around an Ethereum contract. +type EthCrossChainDataRaw struct { + Contract *EthCrossChainData // Generic contract binding to access the raw methods on +} + +// EthCrossChainDataCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type EthCrossChainDataCallerRaw struct { + Contract *EthCrossChainDataCaller // Generic read-only contract binding to access the raw methods on +} + +// EthCrossChainDataTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type EthCrossChainDataTransactorRaw struct { + Contract *EthCrossChainDataTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewEthCrossChainData creates a new instance of EthCrossChainData, bound to a specific deployed contract. +func NewEthCrossChainData(address common.Address, backend bind.ContractBackend) (*EthCrossChainData, error) { + contract, err := bindEthCrossChainData(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &EthCrossChainData{EthCrossChainDataCaller: EthCrossChainDataCaller{contract: contract}, EthCrossChainDataTransactor: EthCrossChainDataTransactor{contract: contract}, EthCrossChainDataFilterer: EthCrossChainDataFilterer{contract: contract}}, nil +} + +// NewEthCrossChainDataCaller creates a new read-only instance of EthCrossChainData, bound to a specific deployed contract. +func NewEthCrossChainDataCaller(address common.Address, caller bind.ContractCaller) (*EthCrossChainDataCaller, error) { + contract, err := bindEthCrossChainData(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &EthCrossChainDataCaller{contract: contract}, nil +} + +// NewEthCrossChainDataTransactor creates a new write-only instance of EthCrossChainData, bound to a specific deployed contract. +func NewEthCrossChainDataTransactor(address common.Address, transactor bind.ContractTransactor) (*EthCrossChainDataTransactor, error) { + contract, err := bindEthCrossChainData(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &EthCrossChainDataTransactor{contract: contract}, nil +} + +// NewEthCrossChainDataFilterer creates a new log filterer instance of EthCrossChainData, bound to a specific deployed contract. +func NewEthCrossChainDataFilterer(address common.Address, filterer bind.ContractFilterer) (*EthCrossChainDataFilterer, error) { + contract, err := bindEthCrossChainData(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &EthCrossChainDataFilterer{contract: contract}, nil +} + +// bindEthCrossChainData binds a generic wrapper to an already deployed contract. +func bindEthCrossChainData(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := abi.JSON(strings.NewReader(EthCrossChainDataABI)) + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_EthCrossChainData *EthCrossChainDataRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { + return _EthCrossChainData.Contract.EthCrossChainDataCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_EthCrossChainData *EthCrossChainDataRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _EthCrossChainData.Contract.EthCrossChainDataTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_EthCrossChainData *EthCrossChainDataRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _EthCrossChainData.Contract.EthCrossChainDataTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_EthCrossChainData *EthCrossChainDataCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { + return _EthCrossChainData.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_EthCrossChainData *EthCrossChainDataTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _EthCrossChainData.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_EthCrossChainData *EthCrossChainDataTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _EthCrossChainData.Contract.contract.Transact(opts, method, params...) +} + +// ConKeepersPkBytes is a free data retrieval call binding the contract method 0xfcbdc1e0. +// +// Solidity: function ConKeepersPkBytes() view returns(bytes) +func (_EthCrossChainData *EthCrossChainDataCaller) ConKeepersPkBytes(opts *bind.CallOpts) ([]byte, error) { + var ( + ret0 = new([]byte) + ) + out := ret0 + err := _EthCrossChainData.contract.Call(opts, out, "ConKeepersPkBytes") + return *ret0, err +} + +// ConKeepersPkBytes is a free data retrieval call binding the contract method 0xfcbdc1e0. +// +// Solidity: function ConKeepersPkBytes() view returns(bytes) +func (_EthCrossChainData *EthCrossChainDataSession) ConKeepersPkBytes() ([]byte, error) { + return _EthCrossChainData.Contract.ConKeepersPkBytes(&_EthCrossChainData.CallOpts) +} + +// ConKeepersPkBytes is a free data retrieval call binding the contract method 0xfcbdc1e0. +// +// Solidity: function ConKeepersPkBytes() view returns(bytes) +func (_EthCrossChainData *EthCrossChainDataCallerSession) ConKeepersPkBytes() ([]byte, error) { + return _EthCrossChainData.Contract.ConKeepersPkBytes(&_EthCrossChainData.CallOpts) +} + +// CurEpochStartHeight is a free data retrieval call binding the contract method 0x67e31a74. +// +// Solidity: function CurEpochStartHeight() view returns(uint32) +func (_EthCrossChainData *EthCrossChainDataCaller) CurEpochStartHeight(opts *bind.CallOpts) (uint32, error) { + var ( + ret0 = new(uint32) + ) + out := ret0 + err := _EthCrossChainData.contract.Call(opts, out, "CurEpochStartHeight") + return *ret0, err +} + +// CurEpochStartHeight is a free data retrieval call binding the contract method 0x67e31a74. +// +// Solidity: function CurEpochStartHeight() view returns(uint32) +func (_EthCrossChainData *EthCrossChainDataSession) CurEpochStartHeight() (uint32, error) { + return _EthCrossChainData.Contract.CurEpochStartHeight(&_EthCrossChainData.CallOpts) +} + +// CurEpochStartHeight is a free data retrieval call binding the contract method 0x67e31a74. +// +// Solidity: function CurEpochStartHeight() view returns(uint32) +func (_EthCrossChainData *EthCrossChainDataCallerSession) CurEpochStartHeight() (uint32, error) { + return _EthCrossChainData.Contract.CurEpochStartHeight(&_EthCrossChainData.CallOpts) +} + +// EthToPolyTxHashIndex is a free data retrieval call binding the contract method 0x00c5fff8. +// +// Solidity: function EthToPolyTxHashIndex() view returns(uint256) +func (_EthCrossChainData *EthCrossChainDataCaller) EthToPolyTxHashIndex(opts *bind.CallOpts) (*big.Int, error) { + var ( + ret0 = new(*big.Int) + ) + out := ret0 + err := _EthCrossChainData.contract.Call(opts, out, "EthToPolyTxHashIndex") + return *ret0, err +} + +// EthToPolyTxHashIndex is a free data retrieval call binding the contract method 0x00c5fff8. +// +// Solidity: function EthToPolyTxHashIndex() view returns(uint256) +func (_EthCrossChainData *EthCrossChainDataSession) EthToPolyTxHashIndex() (*big.Int, error) { + return _EthCrossChainData.Contract.EthToPolyTxHashIndex(&_EthCrossChainData.CallOpts) +} + +// EthToPolyTxHashIndex is a free data retrieval call binding the contract method 0x00c5fff8. +// +// Solidity: function EthToPolyTxHashIndex() view returns(uint256) +func (_EthCrossChainData *EthCrossChainDataCallerSession) EthToPolyTxHashIndex() (*big.Int, error) { + return _EthCrossChainData.Contract.EthToPolyTxHashIndex(&_EthCrossChainData.CallOpts) +} + +// EthToPolyTxHashMap is a free data retrieval call binding the contract method 0x529caad8. +// +// Solidity: function EthToPolyTxHashMap(uint256 ) view returns(bytes32) +func (_EthCrossChainData *EthCrossChainDataCaller) EthToPolyTxHashMap(opts *bind.CallOpts, arg0 *big.Int) ([32]byte, error) { + var ( + ret0 = new([32]byte) + ) + out := ret0 + err := _EthCrossChainData.contract.Call(opts, out, "EthToPolyTxHashMap", arg0) + return *ret0, err +} + +// EthToPolyTxHashMap is a free data retrieval call binding the contract method 0x529caad8. +// +// Solidity: function EthToPolyTxHashMap(uint256 ) view returns(bytes32) +func (_EthCrossChainData *EthCrossChainDataSession) EthToPolyTxHashMap(arg0 *big.Int) ([32]byte, error) { + return _EthCrossChainData.Contract.EthToPolyTxHashMap(&_EthCrossChainData.CallOpts, arg0) +} + +// EthToPolyTxHashMap is a free data retrieval call binding the contract method 0x529caad8. +// +// Solidity: function EthToPolyTxHashMap(uint256 ) view returns(bytes32) +func (_EthCrossChainData *EthCrossChainDataCallerSession) EthToPolyTxHashMap(arg0 *big.Int) ([32]byte, error) { + return _EthCrossChainData.Contract.EthToPolyTxHashMap(&_EthCrossChainData.CallOpts, arg0) +} + +// ExtraData is a free data retrieval call binding the contract method 0x20bbde38. +// +// Solidity: function ExtraData(bytes32 , bytes32 ) view returns(bytes) +func (_EthCrossChainData *EthCrossChainDataCaller) ExtraData(opts *bind.CallOpts, arg0 [32]byte, arg1 [32]byte) ([]byte, error) { + var ( + ret0 = new([]byte) + ) + out := ret0 + err := _EthCrossChainData.contract.Call(opts, out, "ExtraData", arg0, arg1) + return *ret0, err +} + +// ExtraData is a free data retrieval call binding the contract method 0x20bbde38. +// +// Solidity: function ExtraData(bytes32 , bytes32 ) view returns(bytes) +func (_EthCrossChainData *EthCrossChainDataSession) ExtraData(arg0 [32]byte, arg1 [32]byte) ([]byte, error) { + return _EthCrossChainData.Contract.ExtraData(&_EthCrossChainData.CallOpts, arg0, arg1) +} + +// ExtraData is a free data retrieval call binding the contract method 0x20bbde38. +// +// Solidity: function ExtraData(bytes32 , bytes32 ) view returns(bytes) +func (_EthCrossChainData *EthCrossChainDataCallerSession) ExtraData(arg0 [32]byte, arg1 [32]byte) ([]byte, error) { + return _EthCrossChainData.Contract.ExtraData(&_EthCrossChainData.CallOpts, arg0, arg1) +} + +// CheckIfFromChainTxExist is a free data retrieval call binding the contract method 0x0586763c. +// +// Solidity: function checkIfFromChainTxExist(uint64 fromChainId, bytes32 fromChainTx) view returns(bool) +func (_EthCrossChainData *EthCrossChainDataCaller) CheckIfFromChainTxExist(opts *bind.CallOpts, fromChainId uint64, fromChainTx [32]byte) (bool, error) { + var ( + ret0 = new(bool) + ) + out := ret0 + err := _EthCrossChainData.contract.Call(opts, out, "checkIfFromChainTxExist", fromChainId, fromChainTx) + return *ret0, err +} + +// CheckIfFromChainTxExist is a free data retrieval call binding the contract method 0x0586763c. +// +// Solidity: function checkIfFromChainTxExist(uint64 fromChainId, bytes32 fromChainTx) view returns(bool) +func (_EthCrossChainData *EthCrossChainDataSession) CheckIfFromChainTxExist(fromChainId uint64, fromChainTx [32]byte) (bool, error) { + return _EthCrossChainData.Contract.CheckIfFromChainTxExist(&_EthCrossChainData.CallOpts, fromChainId, fromChainTx) +} + +// CheckIfFromChainTxExist is a free data retrieval call binding the contract method 0x0586763c. +// +// Solidity: function checkIfFromChainTxExist(uint64 fromChainId, bytes32 fromChainTx) view returns(bool) +func (_EthCrossChainData *EthCrossChainDataCallerSession) CheckIfFromChainTxExist(fromChainId uint64, fromChainTx [32]byte) (bool, error) { + return _EthCrossChainData.Contract.CheckIfFromChainTxExist(&_EthCrossChainData.CallOpts, fromChainId, fromChainTx) +} + +// GetCurEpochConPubKeyBytes is a free data retrieval call binding the contract method 0x69d48074. +// +// Solidity: function getCurEpochConPubKeyBytes() view returns(bytes) +func (_EthCrossChainData *EthCrossChainDataCaller) GetCurEpochConPubKeyBytes(opts *bind.CallOpts) ([]byte, error) { + var ( + ret0 = new([]byte) + ) + out := ret0 + err := _EthCrossChainData.contract.Call(opts, out, "getCurEpochConPubKeyBytes") + return *ret0, err +} + +// GetCurEpochConPubKeyBytes is a free data retrieval call binding the contract method 0x69d48074. +// +// Solidity: function getCurEpochConPubKeyBytes() view returns(bytes) +func (_EthCrossChainData *EthCrossChainDataSession) GetCurEpochConPubKeyBytes() ([]byte, error) { + return _EthCrossChainData.Contract.GetCurEpochConPubKeyBytes(&_EthCrossChainData.CallOpts) +} + +// GetCurEpochConPubKeyBytes is a free data retrieval call binding the contract method 0x69d48074. +// +// Solidity: function getCurEpochConPubKeyBytes() view returns(bytes) +func (_EthCrossChainData *EthCrossChainDataCallerSession) GetCurEpochConPubKeyBytes() ([]byte, error) { + return _EthCrossChainData.Contract.GetCurEpochConPubKeyBytes(&_EthCrossChainData.CallOpts) +} + +// GetCurEpochStartHeight is a free data retrieval call binding the contract method 0x5ac40790. +// +// Solidity: function getCurEpochStartHeight() view returns(uint32) +func (_EthCrossChainData *EthCrossChainDataCaller) GetCurEpochStartHeight(opts *bind.CallOpts) (uint32, error) { + var ( + ret0 = new(uint32) + ) + out := ret0 + err := _EthCrossChainData.contract.Call(opts, out, "getCurEpochStartHeight") + return *ret0, err +} + +// GetCurEpochStartHeight is a free data retrieval call binding the contract method 0x5ac40790. +// +// Solidity: function getCurEpochStartHeight() view returns(uint32) +func (_EthCrossChainData *EthCrossChainDataSession) GetCurEpochStartHeight() (uint32, error) { + return _EthCrossChainData.Contract.GetCurEpochStartHeight(&_EthCrossChainData.CallOpts) +} + +// GetCurEpochStartHeight is a free data retrieval call binding the contract method 0x5ac40790. +// +// Solidity: function getCurEpochStartHeight() view returns(uint32) +func (_EthCrossChainData *EthCrossChainDataCallerSession) GetCurEpochStartHeight() (uint32, error) { + return _EthCrossChainData.Contract.GetCurEpochStartHeight(&_EthCrossChainData.CallOpts) +} + +// GetEthTxHash is a free data retrieval call binding the contract method 0x29927875. +// +// Solidity: function getEthTxHash(uint256 ethTxHashIndex) view returns(bytes32) +func (_EthCrossChainData *EthCrossChainDataCaller) GetEthTxHash(opts *bind.CallOpts, ethTxHashIndex *big.Int) ([32]byte, error) { + var ( + ret0 = new([32]byte) + ) + out := ret0 + err := _EthCrossChainData.contract.Call(opts, out, "getEthTxHash", ethTxHashIndex) + return *ret0, err +} + +// GetEthTxHash is a free data retrieval call binding the contract method 0x29927875. +// +// Solidity: function getEthTxHash(uint256 ethTxHashIndex) view returns(bytes32) +func (_EthCrossChainData *EthCrossChainDataSession) GetEthTxHash(ethTxHashIndex *big.Int) ([32]byte, error) { + return _EthCrossChainData.Contract.GetEthTxHash(&_EthCrossChainData.CallOpts, ethTxHashIndex) +} + +// GetEthTxHash is a free data retrieval call binding the contract method 0x29927875. +// +// Solidity: function getEthTxHash(uint256 ethTxHashIndex) view returns(bytes32) +func (_EthCrossChainData *EthCrossChainDataCallerSession) GetEthTxHash(ethTxHashIndex *big.Int) ([32]byte, error) { + return _EthCrossChainData.Contract.GetEthTxHash(&_EthCrossChainData.CallOpts, ethTxHashIndex) +} + +// GetEthTxHashIndex is a free data retrieval call binding the contract method 0xff3d24a1. +// +// Solidity: function getEthTxHashIndex() view returns(uint256) +func (_EthCrossChainData *EthCrossChainDataCaller) GetEthTxHashIndex(opts *bind.CallOpts) (*big.Int, error) { + var ( + ret0 = new(*big.Int) + ) + out := ret0 + err := _EthCrossChainData.contract.Call(opts, out, "getEthTxHashIndex") + return *ret0, err +} + +// GetEthTxHashIndex is a free data retrieval call binding the contract method 0xff3d24a1. +// +// Solidity: function getEthTxHashIndex() view returns(uint256) +func (_EthCrossChainData *EthCrossChainDataSession) GetEthTxHashIndex() (*big.Int, error) { + return _EthCrossChainData.Contract.GetEthTxHashIndex(&_EthCrossChainData.CallOpts) +} + +// GetEthTxHashIndex is a free data retrieval call binding the contract method 0xff3d24a1. +// +// Solidity: function getEthTxHashIndex() view returns(uint256) +func (_EthCrossChainData *EthCrossChainDataCallerSession) GetEthTxHashIndex() (*big.Int, error) { + return _EthCrossChainData.Contract.GetEthTxHashIndex(&_EthCrossChainData.CallOpts) +} + +// GetExtraData is a free data retrieval call binding the contract method 0x40602bb5. +// +// Solidity: function getExtraData(bytes32 key1, bytes32 key2) view returns(bytes) +func (_EthCrossChainData *EthCrossChainDataCaller) GetExtraData(opts *bind.CallOpts, key1 [32]byte, key2 [32]byte) ([]byte, error) { + var ( + ret0 = new([]byte) + ) + out := ret0 + err := _EthCrossChainData.contract.Call(opts, out, "getExtraData", key1, key2) + return *ret0, err +} + +// GetExtraData is a free data retrieval call binding the contract method 0x40602bb5. +// +// Solidity: function getExtraData(bytes32 key1, bytes32 key2) view returns(bytes) +func (_EthCrossChainData *EthCrossChainDataSession) GetExtraData(key1 [32]byte, key2 [32]byte) ([]byte, error) { + return _EthCrossChainData.Contract.GetExtraData(&_EthCrossChainData.CallOpts, key1, key2) +} + +// GetExtraData is a free data retrieval call binding the contract method 0x40602bb5. +// +// Solidity: function getExtraData(bytes32 key1, bytes32 key2) view returns(bytes) +func (_EthCrossChainData *EthCrossChainDataCallerSession) GetExtraData(key1 [32]byte, key2 [32]byte) ([]byte, error) { + return _EthCrossChainData.Contract.GetExtraData(&_EthCrossChainData.CallOpts, key1, key2) +} + +// IsOwner is a free data retrieval call binding the contract method 0x8f32d59b. +// +// Solidity: function isOwner() view returns(bool) +func (_EthCrossChainData *EthCrossChainDataCaller) IsOwner(opts *bind.CallOpts) (bool, error) { + var ( + ret0 = new(bool) + ) + out := ret0 + err := _EthCrossChainData.contract.Call(opts, out, "isOwner") + return *ret0, err +} + +// IsOwner is a free data retrieval call binding the contract method 0x8f32d59b. +// +// Solidity: function isOwner() view returns(bool) +func (_EthCrossChainData *EthCrossChainDataSession) IsOwner() (bool, error) { + return _EthCrossChainData.Contract.IsOwner(&_EthCrossChainData.CallOpts) +} + +// IsOwner is a free data retrieval call binding the contract method 0x8f32d59b. +// +// Solidity: function isOwner() view returns(bool) +func (_EthCrossChainData *EthCrossChainDataCallerSession) IsOwner() (bool, error) { + return _EthCrossChainData.Contract.IsOwner(&_EthCrossChainData.CallOpts) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_EthCrossChainData *EthCrossChainDataCaller) Owner(opts *bind.CallOpts) (common.Address, error) { + var ( + ret0 = new(common.Address) + ) + out := ret0 + err := _EthCrossChainData.contract.Call(opts, out, "owner") + return *ret0, err +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_EthCrossChainData *EthCrossChainDataSession) Owner() (common.Address, error) { + return _EthCrossChainData.Contract.Owner(&_EthCrossChainData.CallOpts) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_EthCrossChainData *EthCrossChainDataCallerSession) Owner() (common.Address, error) { + return _EthCrossChainData.Contract.Owner(&_EthCrossChainData.CallOpts) +} + +// Paused is a free data retrieval call binding the contract method 0x5c975abb. +// +// Solidity: function paused() view returns(bool) +func (_EthCrossChainData *EthCrossChainDataCaller) Paused(opts *bind.CallOpts) (bool, error) { + var ( + ret0 = new(bool) + ) + out := ret0 + err := _EthCrossChainData.contract.Call(opts, out, "paused") + return *ret0, err +} + +// Paused is a free data retrieval call binding the contract method 0x5c975abb. +// +// Solidity: function paused() view returns(bool) +func (_EthCrossChainData *EthCrossChainDataSession) Paused() (bool, error) { + return _EthCrossChainData.Contract.Paused(&_EthCrossChainData.CallOpts) +} + +// Paused is a free data retrieval call binding the contract method 0x5c975abb. +// +// Solidity: function paused() view returns(bool) +func (_EthCrossChainData *EthCrossChainDataCallerSession) Paused() (bool, error) { + return _EthCrossChainData.Contract.Paused(&_EthCrossChainData.CallOpts) +} + +// MarkFromChainTxExist is a paid mutator transaction binding the contract method 0xe90bfdcf. +// +// Solidity: function markFromChainTxExist(uint64 fromChainId, bytes32 fromChainTx) returns(bool) +func (_EthCrossChainData *EthCrossChainDataTransactor) MarkFromChainTxExist(opts *bind.TransactOpts, fromChainId uint64, fromChainTx [32]byte) (*types.Transaction, error) { + return _EthCrossChainData.contract.Transact(opts, "markFromChainTxExist", fromChainId, fromChainTx) +} + +// MarkFromChainTxExist is a paid mutator transaction binding the contract method 0xe90bfdcf. +// +// Solidity: function markFromChainTxExist(uint64 fromChainId, bytes32 fromChainTx) returns(bool) +func (_EthCrossChainData *EthCrossChainDataSession) MarkFromChainTxExist(fromChainId uint64, fromChainTx [32]byte) (*types.Transaction, error) { + return _EthCrossChainData.Contract.MarkFromChainTxExist(&_EthCrossChainData.TransactOpts, fromChainId, fromChainTx) +} + +// MarkFromChainTxExist is a paid mutator transaction binding the contract method 0xe90bfdcf. +// +// Solidity: function markFromChainTxExist(uint64 fromChainId, bytes32 fromChainTx) returns(bool) +func (_EthCrossChainData *EthCrossChainDataTransactorSession) MarkFromChainTxExist(fromChainId uint64, fromChainTx [32]byte) (*types.Transaction, error) { + return _EthCrossChainData.Contract.MarkFromChainTxExist(&_EthCrossChainData.TransactOpts, fromChainId, fromChainTx) +} + +// Pause is a paid mutator transaction binding the contract method 0x8456cb59. +// +// Solidity: function pause() returns(bool) +func (_EthCrossChainData *EthCrossChainDataTransactor) Pause(opts *bind.TransactOpts) (*types.Transaction, error) { + return _EthCrossChainData.contract.Transact(opts, "pause") +} + +// Pause is a paid mutator transaction binding the contract method 0x8456cb59. +// +// Solidity: function pause() returns(bool) +func (_EthCrossChainData *EthCrossChainDataSession) Pause() (*types.Transaction, error) { + return _EthCrossChainData.Contract.Pause(&_EthCrossChainData.TransactOpts) +} + +// Pause is a paid mutator transaction binding the contract method 0x8456cb59. +// +// Solidity: function pause() returns(bool) +func (_EthCrossChainData *EthCrossChainDataTransactorSession) Pause() (*types.Transaction, error) { + return _EthCrossChainData.Contract.Pause(&_EthCrossChainData.TransactOpts) +} + +// PutCurEpochConPubKeyBytes is a paid mutator transaction binding the contract method 0x41973cd9. +// +// Solidity: function putCurEpochConPubKeyBytes(bytes curEpochPkBytes) returns(bool) +func (_EthCrossChainData *EthCrossChainDataTransactor) PutCurEpochConPubKeyBytes(opts *bind.TransactOpts, curEpochPkBytes []byte) (*types.Transaction, error) { + return _EthCrossChainData.contract.Transact(opts, "putCurEpochConPubKeyBytes", curEpochPkBytes) +} + +// PutCurEpochConPubKeyBytes is a paid mutator transaction binding the contract method 0x41973cd9. +// +// Solidity: function putCurEpochConPubKeyBytes(bytes curEpochPkBytes) returns(bool) +func (_EthCrossChainData *EthCrossChainDataSession) PutCurEpochConPubKeyBytes(curEpochPkBytes []byte) (*types.Transaction, error) { + return _EthCrossChainData.Contract.PutCurEpochConPubKeyBytes(&_EthCrossChainData.TransactOpts, curEpochPkBytes) +} + +// PutCurEpochConPubKeyBytes is a paid mutator transaction binding the contract method 0x41973cd9. +// +// Solidity: function putCurEpochConPubKeyBytes(bytes curEpochPkBytes) returns(bool) +func (_EthCrossChainData *EthCrossChainDataTransactorSession) PutCurEpochConPubKeyBytes(curEpochPkBytes []byte) (*types.Transaction, error) { + return _EthCrossChainData.Contract.PutCurEpochConPubKeyBytes(&_EthCrossChainData.TransactOpts, curEpochPkBytes) +} + +// PutCurEpochStartHeight is a paid mutator transaction binding the contract method 0x8a8bd17f. +// +// Solidity: function putCurEpochStartHeight(uint32 curEpochStartHeight) returns(bool) +func (_EthCrossChainData *EthCrossChainDataTransactor) PutCurEpochStartHeight(opts *bind.TransactOpts, curEpochStartHeight uint32) (*types.Transaction, error) { + return _EthCrossChainData.contract.Transact(opts, "putCurEpochStartHeight", curEpochStartHeight) +} + +// PutCurEpochStartHeight is a paid mutator transaction binding the contract method 0x8a8bd17f. +// +// Solidity: function putCurEpochStartHeight(uint32 curEpochStartHeight) returns(bool) +func (_EthCrossChainData *EthCrossChainDataSession) PutCurEpochStartHeight(curEpochStartHeight uint32) (*types.Transaction, error) { + return _EthCrossChainData.Contract.PutCurEpochStartHeight(&_EthCrossChainData.TransactOpts, curEpochStartHeight) +} + +// PutCurEpochStartHeight is a paid mutator transaction binding the contract method 0x8a8bd17f. +// +// Solidity: function putCurEpochStartHeight(uint32 curEpochStartHeight) returns(bool) +func (_EthCrossChainData *EthCrossChainDataTransactorSession) PutCurEpochStartHeight(curEpochStartHeight uint32) (*types.Transaction, error) { + return _EthCrossChainData.Contract.PutCurEpochStartHeight(&_EthCrossChainData.TransactOpts, curEpochStartHeight) +} + +// PutEthTxHash is a paid mutator transaction binding the contract method 0x4c3ccf64. +// +// Solidity: function putEthTxHash(bytes32 ethTxHash) returns(bool) +func (_EthCrossChainData *EthCrossChainDataTransactor) PutEthTxHash(opts *bind.TransactOpts, ethTxHash [32]byte) (*types.Transaction, error) { + return _EthCrossChainData.contract.Transact(opts, "putEthTxHash", ethTxHash) +} + +// PutEthTxHash is a paid mutator transaction binding the contract method 0x4c3ccf64. +// +// Solidity: function putEthTxHash(bytes32 ethTxHash) returns(bool) +func (_EthCrossChainData *EthCrossChainDataSession) PutEthTxHash(ethTxHash [32]byte) (*types.Transaction, error) { + return _EthCrossChainData.Contract.PutEthTxHash(&_EthCrossChainData.TransactOpts, ethTxHash) +} + +// PutEthTxHash is a paid mutator transaction binding the contract method 0x4c3ccf64. +// +// Solidity: function putEthTxHash(bytes32 ethTxHash) returns(bool) +func (_EthCrossChainData *EthCrossChainDataTransactorSession) PutEthTxHash(ethTxHash [32]byte) (*types.Transaction, error) { + return _EthCrossChainData.Contract.PutEthTxHash(&_EthCrossChainData.TransactOpts, ethTxHash) +} + +// PutExtraData is a paid mutator transaction binding the contract method 0x1afe374e. +// +// Solidity: function putExtraData(bytes32 key1, bytes32 key2, bytes value) returns(bool) +func (_EthCrossChainData *EthCrossChainDataTransactor) PutExtraData(opts *bind.TransactOpts, key1 [32]byte, key2 [32]byte, value []byte) (*types.Transaction, error) { + return _EthCrossChainData.contract.Transact(opts, "putExtraData", key1, key2, value) +} + +// PutExtraData is a paid mutator transaction binding the contract method 0x1afe374e. +// +// Solidity: function putExtraData(bytes32 key1, bytes32 key2, bytes value) returns(bool) +func (_EthCrossChainData *EthCrossChainDataSession) PutExtraData(key1 [32]byte, key2 [32]byte, value []byte) (*types.Transaction, error) { + return _EthCrossChainData.Contract.PutExtraData(&_EthCrossChainData.TransactOpts, key1, key2, value) +} + +// PutExtraData is a paid mutator transaction binding the contract method 0x1afe374e. +// +// Solidity: function putExtraData(bytes32 key1, bytes32 key2, bytes value) returns(bool) +func (_EthCrossChainData *EthCrossChainDataTransactorSession) PutExtraData(key1 [32]byte, key2 [32]byte, value []byte) (*types.Transaction, error) { + return _EthCrossChainData.Contract.PutExtraData(&_EthCrossChainData.TransactOpts, key1, key2, value) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_EthCrossChainData *EthCrossChainDataTransactor) RenounceOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { + return _EthCrossChainData.contract.Transact(opts, "renounceOwnership") +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_EthCrossChainData *EthCrossChainDataSession) RenounceOwnership() (*types.Transaction, error) { + return _EthCrossChainData.Contract.RenounceOwnership(&_EthCrossChainData.TransactOpts) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_EthCrossChainData *EthCrossChainDataTransactorSession) RenounceOwnership() (*types.Transaction, error) { + return _EthCrossChainData.Contract.RenounceOwnership(&_EthCrossChainData.TransactOpts) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_EthCrossChainData *EthCrossChainDataTransactor) TransferOwnership(opts *bind.TransactOpts, newOwner common.Address) (*types.Transaction, error) { + return _EthCrossChainData.contract.Transact(opts, "transferOwnership", newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_EthCrossChainData *EthCrossChainDataSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _EthCrossChainData.Contract.TransferOwnership(&_EthCrossChainData.TransactOpts, newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_EthCrossChainData *EthCrossChainDataTransactorSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _EthCrossChainData.Contract.TransferOwnership(&_EthCrossChainData.TransactOpts, newOwner) +} + +// Unpause is a paid mutator transaction binding the contract method 0x3f4ba83a. +// +// Solidity: function unpause() returns(bool) +func (_EthCrossChainData *EthCrossChainDataTransactor) Unpause(opts *bind.TransactOpts) (*types.Transaction, error) { + return _EthCrossChainData.contract.Transact(opts, "unpause") +} + +// Unpause is a paid mutator transaction binding the contract method 0x3f4ba83a. +// +// Solidity: function unpause() returns(bool) +func (_EthCrossChainData *EthCrossChainDataSession) Unpause() (*types.Transaction, error) { + return _EthCrossChainData.Contract.Unpause(&_EthCrossChainData.TransactOpts) +} + +// Unpause is a paid mutator transaction binding the contract method 0x3f4ba83a. +// +// Solidity: function unpause() returns(bool) +func (_EthCrossChainData *EthCrossChainDataTransactorSession) Unpause() (*types.Transaction, error) { + return _EthCrossChainData.Contract.Unpause(&_EthCrossChainData.TransactOpts) +} + +// EthCrossChainDataOwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the EthCrossChainData contract. +type EthCrossChainDataOwnershipTransferredIterator struct { + Event *EthCrossChainDataOwnershipTransferred // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *EthCrossChainDataOwnershipTransferredIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(EthCrossChainDataOwnershipTransferred) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(EthCrossChainDataOwnershipTransferred) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *EthCrossChainDataOwnershipTransferredIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *EthCrossChainDataOwnershipTransferredIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// EthCrossChainDataOwnershipTransferred represents a OwnershipTransferred event raised by the EthCrossChainData contract. +type EthCrossChainDataOwnershipTransferred struct { + PreviousOwner common.Address + NewOwner common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterOwnershipTransferred is a free log retrieval operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_EthCrossChainData *EthCrossChainDataFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*EthCrossChainDataOwnershipTransferredIterator, error) { + + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + } + var newOwnerRule []interface{} + for _, newOwnerItem := range newOwner { + newOwnerRule = append(newOwnerRule, newOwnerItem) + } + + logs, sub, err := _EthCrossChainData.contract.FilterLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return &EthCrossChainDataOwnershipTransferredIterator{contract: _EthCrossChainData.contract, event: "OwnershipTransferred", logs: logs, sub: sub}, nil +} + +// WatchOwnershipTransferred is a free log subscription operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_EthCrossChainData *EthCrossChainDataFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *EthCrossChainDataOwnershipTransferred, previousOwner []common.Address, newOwner []common.Address) (event.Subscription, error) { + + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + } + var newOwnerRule []interface{} + for _, newOwnerItem := range newOwner { + newOwnerRule = append(newOwnerRule, newOwnerItem) + } + + logs, sub, err := _EthCrossChainData.contract.WatchLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(EthCrossChainDataOwnershipTransferred) + if err := _EthCrossChainData.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseOwnershipTransferred is a log parse operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_EthCrossChainData *EthCrossChainDataFilterer) ParseOwnershipTransferred(log types.Log) (*EthCrossChainDataOwnershipTransferred, error) { + event := new(EthCrossChainDataOwnershipTransferred) + if err := _EthCrossChainData.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return nil, err + } + return event, nil +} + +// EthCrossChainDataPausedIterator is returned from FilterPaused and is used to iterate over the raw logs and unpacked data for Paused events raised by the EthCrossChainData contract. +type EthCrossChainDataPausedIterator struct { + Event *EthCrossChainDataPaused // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *EthCrossChainDataPausedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(EthCrossChainDataPaused) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(EthCrossChainDataPaused) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *EthCrossChainDataPausedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *EthCrossChainDataPausedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// EthCrossChainDataPaused represents a Paused event raised by the EthCrossChainData contract. +type EthCrossChainDataPaused struct { + Account common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterPaused is a free log retrieval operation binding the contract event 0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258. +// +// Solidity: event Paused(address account) +func (_EthCrossChainData *EthCrossChainDataFilterer) FilterPaused(opts *bind.FilterOpts) (*EthCrossChainDataPausedIterator, error) { + + logs, sub, err := _EthCrossChainData.contract.FilterLogs(opts, "Paused") + if err != nil { + return nil, err + } + return &EthCrossChainDataPausedIterator{contract: _EthCrossChainData.contract, event: "Paused", logs: logs, sub: sub}, nil +} + +// WatchPaused is a free log subscription operation binding the contract event 0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258. +// +// Solidity: event Paused(address account) +func (_EthCrossChainData *EthCrossChainDataFilterer) WatchPaused(opts *bind.WatchOpts, sink chan<- *EthCrossChainDataPaused) (event.Subscription, error) { + + logs, sub, err := _EthCrossChainData.contract.WatchLogs(opts, "Paused") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(EthCrossChainDataPaused) + if err := _EthCrossChainData.contract.UnpackLog(event, "Paused", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParsePaused is a log parse operation binding the contract event 0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258. +// +// Solidity: event Paused(address account) +func (_EthCrossChainData *EthCrossChainDataFilterer) ParsePaused(log types.Log) (*EthCrossChainDataPaused, error) { + event := new(EthCrossChainDataPaused) + if err := _EthCrossChainData.contract.UnpackLog(event, "Paused", log); err != nil { + return nil, err + } + return event, nil +} + +// EthCrossChainDataUnpausedIterator is returned from FilterUnpaused and is used to iterate over the raw logs and unpacked data for Unpaused events raised by the EthCrossChainData contract. +type EthCrossChainDataUnpausedIterator struct { + Event *EthCrossChainDataUnpaused // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *EthCrossChainDataUnpausedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(EthCrossChainDataUnpaused) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(EthCrossChainDataUnpaused) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *EthCrossChainDataUnpausedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *EthCrossChainDataUnpausedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// EthCrossChainDataUnpaused represents a Unpaused event raised by the EthCrossChainData contract. +type EthCrossChainDataUnpaused struct { + Account common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterUnpaused is a free log retrieval operation binding the contract event 0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa. +// +// Solidity: event Unpaused(address account) +func (_EthCrossChainData *EthCrossChainDataFilterer) FilterUnpaused(opts *bind.FilterOpts) (*EthCrossChainDataUnpausedIterator, error) { + + logs, sub, err := _EthCrossChainData.contract.FilterLogs(opts, "Unpaused") + if err != nil { + return nil, err + } + return &EthCrossChainDataUnpausedIterator{contract: _EthCrossChainData.contract, event: "Unpaused", logs: logs, sub: sub}, nil +} + +// WatchUnpaused is a free log subscription operation binding the contract event 0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa. +// +// Solidity: event Unpaused(address account) +func (_EthCrossChainData *EthCrossChainDataFilterer) WatchUnpaused(opts *bind.WatchOpts, sink chan<- *EthCrossChainDataUnpaused) (event.Subscription, error) { + + logs, sub, err := _EthCrossChainData.contract.WatchLogs(opts, "Unpaused") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(EthCrossChainDataUnpaused) + if err := _EthCrossChainData.contract.UnpackLog(event, "Unpaused", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseUnpaused is a log parse operation binding the contract event 0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa. +// +// Solidity: event Unpaused(address account) +func (_EthCrossChainData *EthCrossChainDataFilterer) ParseUnpaused(log types.Log) (*EthCrossChainDataUnpaused, error) { + event := new(EthCrossChainDataUnpaused) + if err := _EthCrossChainData.contract.UnpackLog(event, "Unpaused", log); err != nil { + return nil, err + } + return event, nil +} + +// IEthCrossChainDataABI is the input ABI used to generate the binding from. +const IEthCrossChainDataABI = "[{\"constant\":true,\"inputs\":[{\"name\":\"fromChainId\",\"type\":\"uint64\"},{\"name\":\"fromChainTx\",\"type\":\"bytes32\"}],\"name\":\"checkIfFromChainTxExist\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"key1\",\"type\":\"bytes32\"},{\"name\":\"key2\",\"type\":\"bytes32\"},{\"name\":\"value\",\"type\":\"bytes\"}],\"name\":\"putExtraData\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"ethTxHashIndex\",\"type\":\"uint256\"}],\"name\":\"getEthTxHash\",\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"unpause\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"key1\",\"type\":\"bytes32\"},{\"name\":\"key2\",\"type\":\"bytes32\"}],\"name\":\"getExtraData\",\"outputs\":[{\"name\":\"\",\"type\":\"bytes\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"curEpochPkBytes\",\"type\":\"bytes\"}],\"name\":\"putCurEpochConPubKeyBytes\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"ethTxHash\",\"type\":\"bytes32\"}],\"name\":\"putEthTxHash\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"getCurEpochStartHeight\",\"outputs\":[{\"name\":\"\",\"type\":\"uint32\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"getCurEpochConPubKeyBytes\",\"outputs\":[{\"name\":\"\",\"type\":\"bytes\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"pause\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"curEpochStartHeight\",\"type\":\"uint32\"}],\"name\":\"putCurEpochStartHeight\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"fromChainId\",\"type\":\"uint64\"},{\"name\":\"fromChainTx\",\"type\":\"bytes32\"}],\"name\":\"markFromChainTxExist\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"getEthTxHashIndex\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"}]" + +// IEthCrossChainDataFuncSigs maps the 4-byte function signature to its string representation. +var IEthCrossChainDataFuncSigs = map[string]string{ + "0586763c": "checkIfFromChainTxExist(uint64,bytes32)", + "69d48074": "getCurEpochConPubKeyBytes()", + "5ac40790": "getCurEpochStartHeight()", + "29927875": "getEthTxHash(uint256)", + "ff3d24a1": "getEthTxHashIndex()", + "40602bb5": "getExtraData(bytes32,bytes32)", + "e90bfdcf": "markFromChainTxExist(uint64,bytes32)", + "8456cb59": "pause()", + "5c975abb": "paused()", + "41973cd9": "putCurEpochConPubKeyBytes(bytes)", + "8a8bd17f": "putCurEpochStartHeight(uint32)", + "4c3ccf64": "putEthTxHash(bytes32)", + "1afe374e": "putExtraData(bytes32,bytes32,bytes)", + "f2fde38b": "transferOwnership(address)", + "3f4ba83a": "unpause()", +} + +// IEthCrossChainData is an auto generated Go binding around an Ethereum contract. +type IEthCrossChainData struct { + IEthCrossChainDataCaller // Read-only binding to the contract + IEthCrossChainDataTransactor // Write-only binding to the contract + IEthCrossChainDataFilterer // Log filterer for contract events +} + +// IEthCrossChainDataCaller is an auto generated read-only Go binding around an Ethereum contract. +type IEthCrossChainDataCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// IEthCrossChainDataTransactor is an auto generated write-only Go binding around an Ethereum contract. +type IEthCrossChainDataTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// IEthCrossChainDataFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type IEthCrossChainDataFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// IEthCrossChainDataSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type IEthCrossChainDataSession struct { + Contract *IEthCrossChainData // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// IEthCrossChainDataCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type IEthCrossChainDataCallerSession struct { + Contract *IEthCrossChainDataCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// IEthCrossChainDataTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type IEthCrossChainDataTransactorSession struct { + Contract *IEthCrossChainDataTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// IEthCrossChainDataRaw is an auto generated low-level Go binding around an Ethereum contract. +type IEthCrossChainDataRaw struct { + Contract *IEthCrossChainData // Generic contract binding to access the raw methods on +} + +// IEthCrossChainDataCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type IEthCrossChainDataCallerRaw struct { + Contract *IEthCrossChainDataCaller // Generic read-only contract binding to access the raw methods on +} + +// IEthCrossChainDataTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type IEthCrossChainDataTransactorRaw struct { + Contract *IEthCrossChainDataTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewIEthCrossChainData creates a new instance of IEthCrossChainData, bound to a specific deployed contract. +func NewIEthCrossChainData(address common.Address, backend bind.ContractBackend) (*IEthCrossChainData, error) { + contract, err := bindIEthCrossChainData(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &IEthCrossChainData{IEthCrossChainDataCaller: IEthCrossChainDataCaller{contract: contract}, IEthCrossChainDataTransactor: IEthCrossChainDataTransactor{contract: contract}, IEthCrossChainDataFilterer: IEthCrossChainDataFilterer{contract: contract}}, nil +} + +// NewIEthCrossChainDataCaller creates a new read-only instance of IEthCrossChainData, bound to a specific deployed contract. +func NewIEthCrossChainDataCaller(address common.Address, caller bind.ContractCaller) (*IEthCrossChainDataCaller, error) { + contract, err := bindIEthCrossChainData(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &IEthCrossChainDataCaller{contract: contract}, nil +} + +// NewIEthCrossChainDataTransactor creates a new write-only instance of IEthCrossChainData, bound to a specific deployed contract. +func NewIEthCrossChainDataTransactor(address common.Address, transactor bind.ContractTransactor) (*IEthCrossChainDataTransactor, error) { + contract, err := bindIEthCrossChainData(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &IEthCrossChainDataTransactor{contract: contract}, nil +} + +// NewIEthCrossChainDataFilterer creates a new log filterer instance of IEthCrossChainData, bound to a specific deployed contract. +func NewIEthCrossChainDataFilterer(address common.Address, filterer bind.ContractFilterer) (*IEthCrossChainDataFilterer, error) { + contract, err := bindIEthCrossChainData(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &IEthCrossChainDataFilterer{contract: contract}, nil +} + +// bindIEthCrossChainData binds a generic wrapper to an already deployed contract. +func bindIEthCrossChainData(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := abi.JSON(strings.NewReader(IEthCrossChainDataABI)) + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_IEthCrossChainData *IEthCrossChainDataRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { + return _IEthCrossChainData.Contract.IEthCrossChainDataCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_IEthCrossChainData *IEthCrossChainDataRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _IEthCrossChainData.Contract.IEthCrossChainDataTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_IEthCrossChainData *IEthCrossChainDataRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _IEthCrossChainData.Contract.IEthCrossChainDataTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_IEthCrossChainData *IEthCrossChainDataCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { + return _IEthCrossChainData.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_IEthCrossChainData *IEthCrossChainDataTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _IEthCrossChainData.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_IEthCrossChainData *IEthCrossChainDataTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _IEthCrossChainData.Contract.contract.Transact(opts, method, params...) +} + +// CheckIfFromChainTxExist is a free data retrieval call binding the contract method 0x0586763c. +// +// Solidity: function checkIfFromChainTxExist(uint64 fromChainId, bytes32 fromChainTx) view returns(bool) +func (_IEthCrossChainData *IEthCrossChainDataCaller) CheckIfFromChainTxExist(opts *bind.CallOpts, fromChainId uint64, fromChainTx [32]byte) (bool, error) { + var ( + ret0 = new(bool) + ) + out := ret0 + err := _IEthCrossChainData.contract.Call(opts, out, "checkIfFromChainTxExist", fromChainId, fromChainTx) + return *ret0, err +} + +// CheckIfFromChainTxExist is a free data retrieval call binding the contract method 0x0586763c. +// +// Solidity: function checkIfFromChainTxExist(uint64 fromChainId, bytes32 fromChainTx) view returns(bool) +func (_IEthCrossChainData *IEthCrossChainDataSession) CheckIfFromChainTxExist(fromChainId uint64, fromChainTx [32]byte) (bool, error) { + return _IEthCrossChainData.Contract.CheckIfFromChainTxExist(&_IEthCrossChainData.CallOpts, fromChainId, fromChainTx) +} + +// CheckIfFromChainTxExist is a free data retrieval call binding the contract method 0x0586763c. +// +// Solidity: function checkIfFromChainTxExist(uint64 fromChainId, bytes32 fromChainTx) view returns(bool) +func (_IEthCrossChainData *IEthCrossChainDataCallerSession) CheckIfFromChainTxExist(fromChainId uint64, fromChainTx [32]byte) (bool, error) { + return _IEthCrossChainData.Contract.CheckIfFromChainTxExist(&_IEthCrossChainData.CallOpts, fromChainId, fromChainTx) +} + +// GetCurEpochConPubKeyBytes is a free data retrieval call binding the contract method 0x69d48074. +// +// Solidity: function getCurEpochConPubKeyBytes() view returns(bytes) +func (_IEthCrossChainData *IEthCrossChainDataCaller) GetCurEpochConPubKeyBytes(opts *bind.CallOpts) ([]byte, error) { + var ( + ret0 = new([]byte) + ) + out := ret0 + err := _IEthCrossChainData.contract.Call(opts, out, "getCurEpochConPubKeyBytes") + return *ret0, err +} + +// GetCurEpochConPubKeyBytes is a free data retrieval call binding the contract method 0x69d48074. +// +// Solidity: function getCurEpochConPubKeyBytes() view returns(bytes) +func (_IEthCrossChainData *IEthCrossChainDataSession) GetCurEpochConPubKeyBytes() ([]byte, error) { + return _IEthCrossChainData.Contract.GetCurEpochConPubKeyBytes(&_IEthCrossChainData.CallOpts) +} + +// GetCurEpochConPubKeyBytes is a free data retrieval call binding the contract method 0x69d48074. +// +// Solidity: function getCurEpochConPubKeyBytes() view returns(bytes) +func (_IEthCrossChainData *IEthCrossChainDataCallerSession) GetCurEpochConPubKeyBytes() ([]byte, error) { + return _IEthCrossChainData.Contract.GetCurEpochConPubKeyBytes(&_IEthCrossChainData.CallOpts) +} + +// GetCurEpochStartHeight is a free data retrieval call binding the contract method 0x5ac40790. +// +// Solidity: function getCurEpochStartHeight() view returns(uint32) +func (_IEthCrossChainData *IEthCrossChainDataCaller) GetCurEpochStartHeight(opts *bind.CallOpts) (uint32, error) { + var ( + ret0 = new(uint32) + ) + out := ret0 + err := _IEthCrossChainData.contract.Call(opts, out, "getCurEpochStartHeight") + return *ret0, err +} + +// GetCurEpochStartHeight is a free data retrieval call binding the contract method 0x5ac40790. +// +// Solidity: function getCurEpochStartHeight() view returns(uint32) +func (_IEthCrossChainData *IEthCrossChainDataSession) GetCurEpochStartHeight() (uint32, error) { + return _IEthCrossChainData.Contract.GetCurEpochStartHeight(&_IEthCrossChainData.CallOpts) +} + +// GetCurEpochStartHeight is a free data retrieval call binding the contract method 0x5ac40790. +// +// Solidity: function getCurEpochStartHeight() view returns(uint32) +func (_IEthCrossChainData *IEthCrossChainDataCallerSession) GetCurEpochStartHeight() (uint32, error) { + return _IEthCrossChainData.Contract.GetCurEpochStartHeight(&_IEthCrossChainData.CallOpts) +} + +// GetEthTxHash is a free data retrieval call binding the contract method 0x29927875. +// +// Solidity: function getEthTxHash(uint256 ethTxHashIndex) view returns(bytes32) +func (_IEthCrossChainData *IEthCrossChainDataCaller) GetEthTxHash(opts *bind.CallOpts, ethTxHashIndex *big.Int) ([32]byte, error) { + var ( + ret0 = new([32]byte) + ) + out := ret0 + err := _IEthCrossChainData.contract.Call(opts, out, "getEthTxHash", ethTxHashIndex) + return *ret0, err +} + +// GetEthTxHash is a free data retrieval call binding the contract method 0x29927875. +// +// Solidity: function getEthTxHash(uint256 ethTxHashIndex) view returns(bytes32) +func (_IEthCrossChainData *IEthCrossChainDataSession) GetEthTxHash(ethTxHashIndex *big.Int) ([32]byte, error) { + return _IEthCrossChainData.Contract.GetEthTxHash(&_IEthCrossChainData.CallOpts, ethTxHashIndex) +} + +// GetEthTxHash is a free data retrieval call binding the contract method 0x29927875. +// +// Solidity: function getEthTxHash(uint256 ethTxHashIndex) view returns(bytes32) +func (_IEthCrossChainData *IEthCrossChainDataCallerSession) GetEthTxHash(ethTxHashIndex *big.Int) ([32]byte, error) { + return _IEthCrossChainData.Contract.GetEthTxHash(&_IEthCrossChainData.CallOpts, ethTxHashIndex) +} + +// GetEthTxHashIndex is a free data retrieval call binding the contract method 0xff3d24a1. +// +// Solidity: function getEthTxHashIndex() view returns(uint256) +func (_IEthCrossChainData *IEthCrossChainDataCaller) GetEthTxHashIndex(opts *bind.CallOpts) (*big.Int, error) { + var ( + ret0 = new(*big.Int) + ) + out := ret0 + err := _IEthCrossChainData.contract.Call(opts, out, "getEthTxHashIndex") + return *ret0, err +} + +// GetEthTxHashIndex is a free data retrieval call binding the contract method 0xff3d24a1. +// +// Solidity: function getEthTxHashIndex() view returns(uint256) +func (_IEthCrossChainData *IEthCrossChainDataSession) GetEthTxHashIndex() (*big.Int, error) { + return _IEthCrossChainData.Contract.GetEthTxHashIndex(&_IEthCrossChainData.CallOpts) +} + +// GetEthTxHashIndex is a free data retrieval call binding the contract method 0xff3d24a1. +// +// Solidity: function getEthTxHashIndex() view returns(uint256) +func (_IEthCrossChainData *IEthCrossChainDataCallerSession) GetEthTxHashIndex() (*big.Int, error) { + return _IEthCrossChainData.Contract.GetEthTxHashIndex(&_IEthCrossChainData.CallOpts) +} + +// GetExtraData is a free data retrieval call binding the contract method 0x40602bb5. +// +// Solidity: function getExtraData(bytes32 key1, bytes32 key2) view returns(bytes) +func (_IEthCrossChainData *IEthCrossChainDataCaller) GetExtraData(opts *bind.CallOpts, key1 [32]byte, key2 [32]byte) ([]byte, error) { + var ( + ret0 = new([]byte) + ) + out := ret0 + err := _IEthCrossChainData.contract.Call(opts, out, "getExtraData", key1, key2) + return *ret0, err +} + +// GetExtraData is a free data retrieval call binding the contract method 0x40602bb5. +// +// Solidity: function getExtraData(bytes32 key1, bytes32 key2) view returns(bytes) +func (_IEthCrossChainData *IEthCrossChainDataSession) GetExtraData(key1 [32]byte, key2 [32]byte) ([]byte, error) { + return _IEthCrossChainData.Contract.GetExtraData(&_IEthCrossChainData.CallOpts, key1, key2) +} + +// GetExtraData is a free data retrieval call binding the contract method 0x40602bb5. +// +// Solidity: function getExtraData(bytes32 key1, bytes32 key2) view returns(bytes) +func (_IEthCrossChainData *IEthCrossChainDataCallerSession) GetExtraData(key1 [32]byte, key2 [32]byte) ([]byte, error) { + return _IEthCrossChainData.Contract.GetExtraData(&_IEthCrossChainData.CallOpts, key1, key2) +} + +// Paused is a free data retrieval call binding the contract method 0x5c975abb. +// +// Solidity: function paused() view returns(bool) +func (_IEthCrossChainData *IEthCrossChainDataCaller) Paused(opts *bind.CallOpts) (bool, error) { + var ( + ret0 = new(bool) + ) + out := ret0 + err := _IEthCrossChainData.contract.Call(opts, out, "paused") + return *ret0, err +} + +// Paused is a free data retrieval call binding the contract method 0x5c975abb. +// +// Solidity: function paused() view returns(bool) +func (_IEthCrossChainData *IEthCrossChainDataSession) Paused() (bool, error) { + return _IEthCrossChainData.Contract.Paused(&_IEthCrossChainData.CallOpts) +} + +// Paused is a free data retrieval call binding the contract method 0x5c975abb. +// +// Solidity: function paused() view returns(bool) +func (_IEthCrossChainData *IEthCrossChainDataCallerSession) Paused() (bool, error) { + return _IEthCrossChainData.Contract.Paused(&_IEthCrossChainData.CallOpts) +} + +// MarkFromChainTxExist is a paid mutator transaction binding the contract method 0xe90bfdcf. +// +// Solidity: function markFromChainTxExist(uint64 fromChainId, bytes32 fromChainTx) returns(bool) +func (_IEthCrossChainData *IEthCrossChainDataTransactor) MarkFromChainTxExist(opts *bind.TransactOpts, fromChainId uint64, fromChainTx [32]byte) (*types.Transaction, error) { + return _IEthCrossChainData.contract.Transact(opts, "markFromChainTxExist", fromChainId, fromChainTx) +} + +// MarkFromChainTxExist is a paid mutator transaction binding the contract method 0xe90bfdcf. +// +// Solidity: function markFromChainTxExist(uint64 fromChainId, bytes32 fromChainTx) returns(bool) +func (_IEthCrossChainData *IEthCrossChainDataSession) MarkFromChainTxExist(fromChainId uint64, fromChainTx [32]byte) (*types.Transaction, error) { + return _IEthCrossChainData.Contract.MarkFromChainTxExist(&_IEthCrossChainData.TransactOpts, fromChainId, fromChainTx) +} + +// MarkFromChainTxExist is a paid mutator transaction binding the contract method 0xe90bfdcf. +// +// Solidity: function markFromChainTxExist(uint64 fromChainId, bytes32 fromChainTx) returns(bool) +func (_IEthCrossChainData *IEthCrossChainDataTransactorSession) MarkFromChainTxExist(fromChainId uint64, fromChainTx [32]byte) (*types.Transaction, error) { + return _IEthCrossChainData.Contract.MarkFromChainTxExist(&_IEthCrossChainData.TransactOpts, fromChainId, fromChainTx) +} + +// Pause is a paid mutator transaction binding the contract method 0x8456cb59. +// +// Solidity: function pause() returns(bool) +func (_IEthCrossChainData *IEthCrossChainDataTransactor) Pause(opts *bind.TransactOpts) (*types.Transaction, error) { + return _IEthCrossChainData.contract.Transact(opts, "pause") +} + +// Pause is a paid mutator transaction binding the contract method 0x8456cb59. +// +// Solidity: function pause() returns(bool) +func (_IEthCrossChainData *IEthCrossChainDataSession) Pause() (*types.Transaction, error) { + return _IEthCrossChainData.Contract.Pause(&_IEthCrossChainData.TransactOpts) +} + +// Pause is a paid mutator transaction binding the contract method 0x8456cb59. +// +// Solidity: function pause() returns(bool) +func (_IEthCrossChainData *IEthCrossChainDataTransactorSession) Pause() (*types.Transaction, error) { + return _IEthCrossChainData.Contract.Pause(&_IEthCrossChainData.TransactOpts) +} + +// PutCurEpochConPubKeyBytes is a paid mutator transaction binding the contract method 0x41973cd9. +// +// Solidity: function putCurEpochConPubKeyBytes(bytes curEpochPkBytes) returns(bool) +func (_IEthCrossChainData *IEthCrossChainDataTransactor) PutCurEpochConPubKeyBytes(opts *bind.TransactOpts, curEpochPkBytes []byte) (*types.Transaction, error) { + return _IEthCrossChainData.contract.Transact(opts, "putCurEpochConPubKeyBytes", curEpochPkBytes) +} + +// PutCurEpochConPubKeyBytes is a paid mutator transaction binding the contract method 0x41973cd9. +// +// Solidity: function putCurEpochConPubKeyBytes(bytes curEpochPkBytes) returns(bool) +func (_IEthCrossChainData *IEthCrossChainDataSession) PutCurEpochConPubKeyBytes(curEpochPkBytes []byte) (*types.Transaction, error) { + return _IEthCrossChainData.Contract.PutCurEpochConPubKeyBytes(&_IEthCrossChainData.TransactOpts, curEpochPkBytes) +} + +// PutCurEpochConPubKeyBytes is a paid mutator transaction binding the contract method 0x41973cd9. +// +// Solidity: function putCurEpochConPubKeyBytes(bytes curEpochPkBytes) returns(bool) +func (_IEthCrossChainData *IEthCrossChainDataTransactorSession) PutCurEpochConPubKeyBytes(curEpochPkBytes []byte) (*types.Transaction, error) { + return _IEthCrossChainData.Contract.PutCurEpochConPubKeyBytes(&_IEthCrossChainData.TransactOpts, curEpochPkBytes) +} + +// PutCurEpochStartHeight is a paid mutator transaction binding the contract method 0x8a8bd17f. +// +// Solidity: function putCurEpochStartHeight(uint32 curEpochStartHeight) returns(bool) +func (_IEthCrossChainData *IEthCrossChainDataTransactor) PutCurEpochStartHeight(opts *bind.TransactOpts, curEpochStartHeight uint32) (*types.Transaction, error) { + return _IEthCrossChainData.contract.Transact(opts, "putCurEpochStartHeight", curEpochStartHeight) +} + +// PutCurEpochStartHeight is a paid mutator transaction binding the contract method 0x8a8bd17f. +// +// Solidity: function putCurEpochStartHeight(uint32 curEpochStartHeight) returns(bool) +func (_IEthCrossChainData *IEthCrossChainDataSession) PutCurEpochStartHeight(curEpochStartHeight uint32) (*types.Transaction, error) { + return _IEthCrossChainData.Contract.PutCurEpochStartHeight(&_IEthCrossChainData.TransactOpts, curEpochStartHeight) +} + +// PutCurEpochStartHeight is a paid mutator transaction binding the contract method 0x8a8bd17f. +// +// Solidity: function putCurEpochStartHeight(uint32 curEpochStartHeight) returns(bool) +func (_IEthCrossChainData *IEthCrossChainDataTransactorSession) PutCurEpochStartHeight(curEpochStartHeight uint32) (*types.Transaction, error) { + return _IEthCrossChainData.Contract.PutCurEpochStartHeight(&_IEthCrossChainData.TransactOpts, curEpochStartHeight) +} + +// PutEthTxHash is a paid mutator transaction binding the contract method 0x4c3ccf64. +// +// Solidity: function putEthTxHash(bytes32 ethTxHash) returns(bool) +func (_IEthCrossChainData *IEthCrossChainDataTransactor) PutEthTxHash(opts *bind.TransactOpts, ethTxHash [32]byte) (*types.Transaction, error) { + return _IEthCrossChainData.contract.Transact(opts, "putEthTxHash", ethTxHash) +} + +// PutEthTxHash is a paid mutator transaction binding the contract method 0x4c3ccf64. +// +// Solidity: function putEthTxHash(bytes32 ethTxHash) returns(bool) +func (_IEthCrossChainData *IEthCrossChainDataSession) PutEthTxHash(ethTxHash [32]byte) (*types.Transaction, error) { + return _IEthCrossChainData.Contract.PutEthTxHash(&_IEthCrossChainData.TransactOpts, ethTxHash) +} + +// PutEthTxHash is a paid mutator transaction binding the contract method 0x4c3ccf64. +// +// Solidity: function putEthTxHash(bytes32 ethTxHash) returns(bool) +func (_IEthCrossChainData *IEthCrossChainDataTransactorSession) PutEthTxHash(ethTxHash [32]byte) (*types.Transaction, error) { + return _IEthCrossChainData.Contract.PutEthTxHash(&_IEthCrossChainData.TransactOpts, ethTxHash) +} + +// PutExtraData is a paid mutator transaction binding the contract method 0x1afe374e. +// +// Solidity: function putExtraData(bytes32 key1, bytes32 key2, bytes value) returns(bool) +func (_IEthCrossChainData *IEthCrossChainDataTransactor) PutExtraData(opts *bind.TransactOpts, key1 [32]byte, key2 [32]byte, value []byte) (*types.Transaction, error) { + return _IEthCrossChainData.contract.Transact(opts, "putExtraData", key1, key2, value) +} + +// PutExtraData is a paid mutator transaction binding the contract method 0x1afe374e. +// +// Solidity: function putExtraData(bytes32 key1, bytes32 key2, bytes value) returns(bool) +func (_IEthCrossChainData *IEthCrossChainDataSession) PutExtraData(key1 [32]byte, key2 [32]byte, value []byte) (*types.Transaction, error) { + return _IEthCrossChainData.Contract.PutExtraData(&_IEthCrossChainData.TransactOpts, key1, key2, value) +} + +// PutExtraData is a paid mutator transaction binding the contract method 0x1afe374e. +// +// Solidity: function putExtraData(bytes32 key1, bytes32 key2, bytes value) returns(bool) +func (_IEthCrossChainData *IEthCrossChainDataTransactorSession) PutExtraData(key1 [32]byte, key2 [32]byte, value []byte) (*types.Transaction, error) { + return _IEthCrossChainData.Contract.PutExtraData(&_IEthCrossChainData.TransactOpts, key1, key2, value) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_IEthCrossChainData *IEthCrossChainDataTransactor) TransferOwnership(opts *bind.TransactOpts, newOwner common.Address) (*types.Transaction, error) { + return _IEthCrossChainData.contract.Transact(opts, "transferOwnership", newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_IEthCrossChainData *IEthCrossChainDataSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _IEthCrossChainData.Contract.TransferOwnership(&_IEthCrossChainData.TransactOpts, newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_IEthCrossChainData *IEthCrossChainDataTransactorSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _IEthCrossChainData.Contract.TransferOwnership(&_IEthCrossChainData.TransactOpts, newOwner) +} + +// Unpause is a paid mutator transaction binding the contract method 0x3f4ba83a. +// +// Solidity: function unpause() returns(bool) +func (_IEthCrossChainData *IEthCrossChainDataTransactor) Unpause(opts *bind.TransactOpts) (*types.Transaction, error) { + return _IEthCrossChainData.contract.Transact(opts, "unpause") +} + +// Unpause is a paid mutator transaction binding the contract method 0x3f4ba83a. +// +// Solidity: function unpause() returns(bool) +func (_IEthCrossChainData *IEthCrossChainDataSession) Unpause() (*types.Transaction, error) { + return _IEthCrossChainData.Contract.Unpause(&_IEthCrossChainData.TransactOpts) +} + +// Unpause is a paid mutator transaction binding the contract method 0x3f4ba83a. +// +// Solidity: function unpause() returns(bool) +func (_IEthCrossChainData *IEthCrossChainDataTransactorSession) Unpause() (*types.Transaction, error) { + return _IEthCrossChainData.Contract.Unpause(&_IEthCrossChainData.TransactOpts) +} + +// OwnableABI is the input ABI used to generate the binding from. +const OwnableABI = "[{\"constant\":false,\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"isOwner\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"}]" + +// OwnableFuncSigs maps the 4-byte function signature to its string representation. +var OwnableFuncSigs = map[string]string{ + "8f32d59b": "isOwner()", + "8da5cb5b": "owner()", + "715018a6": "renounceOwnership()", + "f2fde38b": "transferOwnership(address)", +} + +// Ownable is an auto generated Go binding around an Ethereum contract. +type Ownable struct { + OwnableCaller // Read-only binding to the contract + OwnableTransactor // Write-only binding to the contract + OwnableFilterer // Log filterer for contract events +} + +// OwnableCaller is an auto generated read-only Go binding around an Ethereum contract. +type OwnableCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// OwnableTransactor is an auto generated write-only Go binding around an Ethereum contract. +type OwnableTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// OwnableFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type OwnableFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// OwnableSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type OwnableSession struct { + Contract *Ownable // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// OwnableCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type OwnableCallerSession struct { + Contract *OwnableCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// OwnableTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type OwnableTransactorSession struct { + Contract *OwnableTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// OwnableRaw is an auto generated low-level Go binding around an Ethereum contract. +type OwnableRaw struct { + Contract *Ownable // Generic contract binding to access the raw methods on +} + +// OwnableCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type OwnableCallerRaw struct { + Contract *OwnableCaller // Generic read-only contract binding to access the raw methods on +} + +// OwnableTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type OwnableTransactorRaw struct { + Contract *OwnableTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewOwnable creates a new instance of Ownable, bound to a specific deployed contract. +func NewOwnable(address common.Address, backend bind.ContractBackend) (*Ownable, error) { + contract, err := bindOwnable(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &Ownable{OwnableCaller: OwnableCaller{contract: contract}, OwnableTransactor: OwnableTransactor{contract: contract}, OwnableFilterer: OwnableFilterer{contract: contract}}, nil +} + +// NewOwnableCaller creates a new read-only instance of Ownable, bound to a specific deployed contract. +func NewOwnableCaller(address common.Address, caller bind.ContractCaller) (*OwnableCaller, error) { + contract, err := bindOwnable(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &OwnableCaller{contract: contract}, nil +} + +// NewOwnableTransactor creates a new write-only instance of Ownable, bound to a specific deployed contract. +func NewOwnableTransactor(address common.Address, transactor bind.ContractTransactor) (*OwnableTransactor, error) { + contract, err := bindOwnable(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &OwnableTransactor{contract: contract}, nil +} + +// NewOwnableFilterer creates a new log filterer instance of Ownable, bound to a specific deployed contract. +func NewOwnableFilterer(address common.Address, filterer bind.ContractFilterer) (*OwnableFilterer, error) { + contract, err := bindOwnable(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &OwnableFilterer{contract: contract}, nil +} + +// bindOwnable binds a generic wrapper to an already deployed contract. +func bindOwnable(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := abi.JSON(strings.NewReader(OwnableABI)) + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_Ownable *OwnableRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { + return _Ownable.Contract.OwnableCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_Ownable *OwnableRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Ownable.Contract.OwnableTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_Ownable *OwnableRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _Ownable.Contract.OwnableTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_Ownable *OwnableCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { + return _Ownable.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_Ownable *OwnableTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Ownable.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_Ownable *OwnableTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _Ownable.Contract.contract.Transact(opts, method, params...) +} + +// IsOwner is a free data retrieval call binding the contract method 0x8f32d59b. +// +// Solidity: function isOwner() view returns(bool) +func (_Ownable *OwnableCaller) IsOwner(opts *bind.CallOpts) (bool, error) { + var ( + ret0 = new(bool) + ) + out := ret0 + err := _Ownable.contract.Call(opts, out, "isOwner") + return *ret0, err +} + +// IsOwner is a free data retrieval call binding the contract method 0x8f32d59b. +// +// Solidity: function isOwner() view returns(bool) +func (_Ownable *OwnableSession) IsOwner() (bool, error) { + return _Ownable.Contract.IsOwner(&_Ownable.CallOpts) +} + +// IsOwner is a free data retrieval call binding the contract method 0x8f32d59b. +// +// Solidity: function isOwner() view returns(bool) +func (_Ownable *OwnableCallerSession) IsOwner() (bool, error) { + return _Ownable.Contract.IsOwner(&_Ownable.CallOpts) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_Ownable *OwnableCaller) Owner(opts *bind.CallOpts) (common.Address, error) { + var ( + ret0 = new(common.Address) + ) + out := ret0 + err := _Ownable.contract.Call(opts, out, "owner") + return *ret0, err +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_Ownable *OwnableSession) Owner() (common.Address, error) { + return _Ownable.Contract.Owner(&_Ownable.CallOpts) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_Ownable *OwnableCallerSession) Owner() (common.Address, error) { + return _Ownable.Contract.Owner(&_Ownable.CallOpts) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_Ownable *OwnableTransactor) RenounceOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Ownable.contract.Transact(opts, "renounceOwnership") +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_Ownable *OwnableSession) RenounceOwnership() (*types.Transaction, error) { + return _Ownable.Contract.RenounceOwnership(&_Ownable.TransactOpts) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_Ownable *OwnableTransactorSession) RenounceOwnership() (*types.Transaction, error) { + return _Ownable.Contract.RenounceOwnership(&_Ownable.TransactOpts) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_Ownable *OwnableTransactor) TransferOwnership(opts *bind.TransactOpts, newOwner common.Address) (*types.Transaction, error) { + return _Ownable.contract.Transact(opts, "transferOwnership", newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_Ownable *OwnableSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _Ownable.Contract.TransferOwnership(&_Ownable.TransactOpts, newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_Ownable *OwnableTransactorSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _Ownable.Contract.TransferOwnership(&_Ownable.TransactOpts, newOwner) +} + +// OwnableOwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the Ownable contract. +type OwnableOwnershipTransferredIterator struct { + Event *OwnableOwnershipTransferred // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *OwnableOwnershipTransferredIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(OwnableOwnershipTransferred) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(OwnableOwnershipTransferred) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *OwnableOwnershipTransferredIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *OwnableOwnershipTransferredIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// OwnableOwnershipTransferred represents a OwnershipTransferred event raised by the Ownable contract. +type OwnableOwnershipTransferred struct { + PreviousOwner common.Address + NewOwner common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterOwnershipTransferred is a free log retrieval operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_Ownable *OwnableFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*OwnableOwnershipTransferredIterator, error) { + + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + } + var newOwnerRule []interface{} + for _, newOwnerItem := range newOwner { + newOwnerRule = append(newOwnerRule, newOwnerItem) + } + + logs, sub, err := _Ownable.contract.FilterLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return &OwnableOwnershipTransferredIterator{contract: _Ownable.contract, event: "OwnershipTransferred", logs: logs, sub: sub}, nil +} + +// WatchOwnershipTransferred is a free log subscription operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_Ownable *OwnableFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *OwnableOwnershipTransferred, previousOwner []common.Address, newOwner []common.Address) (event.Subscription, error) { + + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + } + var newOwnerRule []interface{} + for _, newOwnerItem := range newOwner { + newOwnerRule = append(newOwnerRule, newOwnerItem) + } + + logs, sub, err := _Ownable.contract.WatchLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(OwnableOwnershipTransferred) + if err := _Ownable.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseOwnershipTransferred is a log parse operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_Ownable *OwnableFilterer) ParseOwnershipTransferred(log types.Log) (*OwnableOwnershipTransferred, error) { + event := new(OwnableOwnershipTransferred) + if err := _Ownable.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return nil, err + } + return event, nil +} + +// PausableABI is the input ABI used to generate the binding from. +const PausableABI = "[{\"constant\":true,\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"}]" + +// PausableFuncSigs maps the 4-byte function signature to its string representation. +var PausableFuncSigs = map[string]string{ + "5c975abb": "paused()", +} + +// Pausable is an auto generated Go binding around an Ethereum contract. +type Pausable struct { + PausableCaller // Read-only binding to the contract + PausableTransactor // Write-only binding to the contract + PausableFilterer // Log filterer for contract events +} + +// PausableCaller is an auto generated read-only Go binding around an Ethereum contract. +type PausableCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// PausableTransactor is an auto generated write-only Go binding around an Ethereum contract. +type PausableTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// PausableFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type PausableFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// PausableSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type PausableSession struct { + Contract *Pausable // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// PausableCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type PausableCallerSession struct { + Contract *PausableCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// PausableTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type PausableTransactorSession struct { + Contract *PausableTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// PausableRaw is an auto generated low-level Go binding around an Ethereum contract. +type PausableRaw struct { + Contract *Pausable // Generic contract binding to access the raw methods on +} + +// PausableCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type PausableCallerRaw struct { + Contract *PausableCaller // Generic read-only contract binding to access the raw methods on +} + +// PausableTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type PausableTransactorRaw struct { + Contract *PausableTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewPausable creates a new instance of Pausable, bound to a specific deployed contract. +func NewPausable(address common.Address, backend bind.ContractBackend) (*Pausable, error) { + contract, err := bindPausable(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &Pausable{PausableCaller: PausableCaller{contract: contract}, PausableTransactor: PausableTransactor{contract: contract}, PausableFilterer: PausableFilterer{contract: contract}}, nil +} + +// NewPausableCaller creates a new read-only instance of Pausable, bound to a specific deployed contract. +func NewPausableCaller(address common.Address, caller bind.ContractCaller) (*PausableCaller, error) { + contract, err := bindPausable(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &PausableCaller{contract: contract}, nil +} + +// NewPausableTransactor creates a new write-only instance of Pausable, bound to a specific deployed contract. +func NewPausableTransactor(address common.Address, transactor bind.ContractTransactor) (*PausableTransactor, error) { + contract, err := bindPausable(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &PausableTransactor{contract: contract}, nil +} + +// NewPausableFilterer creates a new log filterer instance of Pausable, bound to a specific deployed contract. +func NewPausableFilterer(address common.Address, filterer bind.ContractFilterer) (*PausableFilterer, error) { + contract, err := bindPausable(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &PausableFilterer{contract: contract}, nil +} + +// bindPausable binds a generic wrapper to an already deployed contract. +func bindPausable(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := abi.JSON(strings.NewReader(PausableABI)) + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_Pausable *PausableRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { + return _Pausable.Contract.PausableCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_Pausable *PausableRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Pausable.Contract.PausableTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_Pausable *PausableRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _Pausable.Contract.PausableTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_Pausable *PausableCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { + return _Pausable.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_Pausable *PausableTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Pausable.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_Pausable *PausableTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _Pausable.Contract.contract.Transact(opts, method, params...) +} + +// Paused is a free data retrieval call binding the contract method 0x5c975abb. +// +// Solidity: function paused() view returns(bool) +func (_Pausable *PausableCaller) Paused(opts *bind.CallOpts) (bool, error) { + var ( + ret0 = new(bool) + ) + out := ret0 + err := _Pausable.contract.Call(opts, out, "paused") + return *ret0, err +} + +// Paused is a free data retrieval call binding the contract method 0x5c975abb. +// +// Solidity: function paused() view returns(bool) +func (_Pausable *PausableSession) Paused() (bool, error) { + return _Pausable.Contract.Paused(&_Pausable.CallOpts) +} + +// Paused is a free data retrieval call binding the contract method 0x5c975abb. +// +// Solidity: function paused() view returns(bool) +func (_Pausable *PausableCallerSession) Paused() (bool, error) { + return _Pausable.Contract.Paused(&_Pausable.CallOpts) +} + +// PausablePausedIterator is returned from FilterPaused and is used to iterate over the raw logs and unpacked data for Paused events raised by the Pausable contract. +type PausablePausedIterator struct { + Event *PausablePaused // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *PausablePausedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(PausablePaused) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(PausablePaused) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *PausablePausedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *PausablePausedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// PausablePaused represents a Paused event raised by the Pausable contract. +type PausablePaused struct { + Account common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterPaused is a free log retrieval operation binding the contract event 0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258. +// +// Solidity: event Paused(address account) +func (_Pausable *PausableFilterer) FilterPaused(opts *bind.FilterOpts) (*PausablePausedIterator, error) { + + logs, sub, err := _Pausable.contract.FilterLogs(opts, "Paused") + if err != nil { + return nil, err + } + return &PausablePausedIterator{contract: _Pausable.contract, event: "Paused", logs: logs, sub: sub}, nil +} + +// WatchPaused is a free log subscription operation binding the contract event 0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258. +// +// Solidity: event Paused(address account) +func (_Pausable *PausableFilterer) WatchPaused(opts *bind.WatchOpts, sink chan<- *PausablePaused) (event.Subscription, error) { + + logs, sub, err := _Pausable.contract.WatchLogs(opts, "Paused") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(PausablePaused) + if err := _Pausable.contract.UnpackLog(event, "Paused", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParsePaused is a log parse operation binding the contract event 0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258. +// +// Solidity: event Paused(address account) +func (_Pausable *PausableFilterer) ParsePaused(log types.Log) (*PausablePaused, error) { + event := new(PausablePaused) + if err := _Pausable.contract.UnpackLog(event, "Paused", log); err != nil { + return nil, err + } + return event, nil +} + +// PausableUnpausedIterator is returned from FilterUnpaused and is used to iterate over the raw logs and unpacked data for Unpaused events raised by the Pausable contract. +type PausableUnpausedIterator struct { + Event *PausableUnpaused // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *PausableUnpausedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(PausableUnpaused) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(PausableUnpaused) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *PausableUnpausedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *PausableUnpausedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// PausableUnpaused represents a Unpaused event raised by the Pausable contract. +type PausableUnpaused struct { + Account common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterUnpaused is a free log retrieval operation binding the contract event 0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa. +// +// Solidity: event Unpaused(address account) +func (_Pausable *PausableFilterer) FilterUnpaused(opts *bind.FilterOpts) (*PausableUnpausedIterator, error) { + + logs, sub, err := _Pausable.contract.FilterLogs(opts, "Unpaused") + if err != nil { + return nil, err + } + return &PausableUnpausedIterator{contract: _Pausable.contract, event: "Unpaused", logs: logs, sub: sub}, nil +} + +// WatchUnpaused is a free log subscription operation binding the contract event 0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa. +// +// Solidity: event Unpaused(address account) +func (_Pausable *PausableFilterer) WatchUnpaused(opts *bind.WatchOpts, sink chan<- *PausableUnpaused) (event.Subscription, error) { + + logs, sub, err := _Pausable.contract.WatchLogs(opts, "Unpaused") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(PausableUnpaused) + if err := _Pausable.contract.UnpackLog(event, "Unpaused", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseUnpaused is a log parse operation binding the contract event 0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa. +// +// Solidity: event Unpaused(address account) +func (_Pausable *PausableFilterer) ParseUnpaused(log types.Log) (*PausableUnpaused, error) { + event := new(PausableUnpaused) + if err := _Pausable.contract.UnpackLog(event, "Unpaused", log); err != nil { + return nil, err + } + return event, nil +} diff --git a/go_abi/v0.4.25/eccm/eccm_abi.go b/go_abi/v0.4.25/eccm/eccm_abi.go new file mode 100644 index 0000000..aa1b297 --- /dev/null +++ b/go_abi/v0.4.25/eccm/eccm_abi.go @@ -0,0 +1,5141 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package eccm + +import ( + "math/big" + "strings" + + ethereum "github.com/ethereum/go-ethereum" + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/event" +) + +// Reference imports to suppress errors if they are not otherwise used. +var ( + _ = big.NewInt + _ = strings.NewReader + _ = ethereum.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription +) + +// ContextABI is the input ABI used to generate the binding from. +const ContextABI = "[{\"inputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"}]" + +// Context is an auto generated Go binding around an Ethereum contract. +type Context struct { + ContextCaller // Read-only binding to the contract + ContextTransactor // Write-only binding to the contract + ContextFilterer // Log filterer for contract events +} + +// ContextCaller is an auto generated read-only Go binding around an Ethereum contract. +type ContextCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// ContextTransactor is an auto generated write-only Go binding around an Ethereum contract. +type ContextTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// ContextFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type ContextFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// ContextSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type ContextSession struct { + Contract *Context // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// ContextCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type ContextCallerSession struct { + Contract *ContextCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// ContextTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type ContextTransactorSession struct { + Contract *ContextTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// ContextRaw is an auto generated low-level Go binding around an Ethereum contract. +type ContextRaw struct { + Contract *Context // Generic contract binding to access the raw methods on +} + +// ContextCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type ContextCallerRaw struct { + Contract *ContextCaller // Generic read-only contract binding to access the raw methods on +} + +// ContextTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type ContextTransactorRaw struct { + Contract *ContextTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewContext creates a new instance of Context, bound to a specific deployed contract. +func NewContext(address common.Address, backend bind.ContractBackend) (*Context, error) { + contract, err := bindContext(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &Context{ContextCaller: ContextCaller{contract: contract}, ContextTransactor: ContextTransactor{contract: contract}, ContextFilterer: ContextFilterer{contract: contract}}, nil +} + +// NewContextCaller creates a new read-only instance of Context, bound to a specific deployed contract. +func NewContextCaller(address common.Address, caller bind.ContractCaller) (*ContextCaller, error) { + contract, err := bindContext(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &ContextCaller{contract: contract}, nil +} + +// NewContextTransactor creates a new write-only instance of Context, bound to a specific deployed contract. +func NewContextTransactor(address common.Address, transactor bind.ContractTransactor) (*ContextTransactor, error) { + contract, err := bindContext(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &ContextTransactor{contract: contract}, nil +} + +// NewContextFilterer creates a new log filterer instance of Context, bound to a specific deployed contract. +func NewContextFilterer(address common.Address, filterer bind.ContractFilterer) (*ContextFilterer, error) { + contract, err := bindContext(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &ContextFilterer{contract: contract}, nil +} + +// bindContext binds a generic wrapper to an already deployed contract. +func bindContext(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := abi.JSON(strings.NewReader(ContextABI)) + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_Context *ContextRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { + return _Context.Contract.ContextCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_Context *ContextRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Context.Contract.ContextTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_Context *ContextRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _Context.Contract.ContextTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_Context *ContextCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { + return _Context.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_Context *ContextTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Context.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_Context *ContextTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _Context.Contract.contract.Transact(opts, method, params...) +} + +// ECCUtilsABI is the input ABI used to generate the binding from. +const ECCUtilsABI = "[]" + +// ECCUtilsBin is the compiled bytecode used for deploying new contracts. +var ECCUtilsBin = "0x604c602c600b82828239805160001a60731460008114601c57601e565bfe5b5030600052607381538281f30073000000000000000000000000000000000000000030146080604052600080fd00a165627a7a72305820404b4f57225b76de1a83c08c7d67c258fff530cb6f3dd373f7e6f4a6e696f05b0029" + +// DeployECCUtils deploys a new Ethereum contract, binding an instance of ECCUtils to it. +func DeployECCUtils(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *ECCUtils, error) { + parsed, err := abi.JSON(strings.NewReader(ECCUtilsABI)) + if err != nil { + return common.Address{}, nil, nil, err + } + + address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(ECCUtilsBin), backend) + if err != nil { + return common.Address{}, nil, nil, err + } + return address, tx, &ECCUtils{ECCUtilsCaller: ECCUtilsCaller{contract: contract}, ECCUtilsTransactor: ECCUtilsTransactor{contract: contract}, ECCUtilsFilterer: ECCUtilsFilterer{contract: contract}}, nil +} + +// ECCUtils is an auto generated Go binding around an Ethereum contract. +type ECCUtils struct { + ECCUtilsCaller // Read-only binding to the contract + ECCUtilsTransactor // Write-only binding to the contract + ECCUtilsFilterer // Log filterer for contract events +} + +// ECCUtilsCaller is an auto generated read-only Go binding around an Ethereum contract. +type ECCUtilsCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// ECCUtilsTransactor is an auto generated write-only Go binding around an Ethereum contract. +type ECCUtilsTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// ECCUtilsFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type ECCUtilsFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// ECCUtilsSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type ECCUtilsSession struct { + Contract *ECCUtils // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// ECCUtilsCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type ECCUtilsCallerSession struct { + Contract *ECCUtilsCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// ECCUtilsTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type ECCUtilsTransactorSession struct { + Contract *ECCUtilsTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// ECCUtilsRaw is an auto generated low-level Go binding around an Ethereum contract. +type ECCUtilsRaw struct { + Contract *ECCUtils // Generic contract binding to access the raw methods on +} + +// ECCUtilsCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type ECCUtilsCallerRaw struct { + Contract *ECCUtilsCaller // Generic read-only contract binding to access the raw methods on +} + +// ECCUtilsTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type ECCUtilsTransactorRaw struct { + Contract *ECCUtilsTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewECCUtils creates a new instance of ECCUtils, bound to a specific deployed contract. +func NewECCUtils(address common.Address, backend bind.ContractBackend) (*ECCUtils, error) { + contract, err := bindECCUtils(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &ECCUtils{ECCUtilsCaller: ECCUtilsCaller{contract: contract}, ECCUtilsTransactor: ECCUtilsTransactor{contract: contract}, ECCUtilsFilterer: ECCUtilsFilterer{contract: contract}}, nil +} + +// NewECCUtilsCaller creates a new read-only instance of ECCUtils, bound to a specific deployed contract. +func NewECCUtilsCaller(address common.Address, caller bind.ContractCaller) (*ECCUtilsCaller, error) { + contract, err := bindECCUtils(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &ECCUtilsCaller{contract: contract}, nil +} + +// NewECCUtilsTransactor creates a new write-only instance of ECCUtils, bound to a specific deployed contract. +func NewECCUtilsTransactor(address common.Address, transactor bind.ContractTransactor) (*ECCUtilsTransactor, error) { + contract, err := bindECCUtils(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &ECCUtilsTransactor{contract: contract}, nil +} + +// NewECCUtilsFilterer creates a new log filterer instance of ECCUtils, bound to a specific deployed contract. +func NewECCUtilsFilterer(address common.Address, filterer bind.ContractFilterer) (*ECCUtilsFilterer, error) { + contract, err := bindECCUtils(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &ECCUtilsFilterer{contract: contract}, nil +} + +// bindECCUtils binds a generic wrapper to an already deployed contract. +func bindECCUtils(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := abi.JSON(strings.NewReader(ECCUtilsABI)) + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_ECCUtils *ECCUtilsRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { + return _ECCUtils.Contract.ECCUtilsCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_ECCUtils *ECCUtilsRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _ECCUtils.Contract.ECCUtilsTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_ECCUtils *ECCUtilsRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _ECCUtils.Contract.ECCUtilsTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_ECCUtils *ECCUtilsCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { + return _ECCUtils.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_ECCUtils *ECCUtilsTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _ECCUtils.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_ECCUtils *ECCUtilsTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _ECCUtils.Contract.contract.Transact(opts, method, params...) +} + +// EthCrossChainManagerABI is the input ABI used to generate the binding from. +const EthCrossChainManagerABI = "[{\"constant\":true,\"inputs\":[],\"name\":\"EthCrossChainDataAddress\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"rawHeader\",\"type\":\"bytes\"},{\"name\":\"pubKeyList\",\"type\":\"bytes\"},{\"name\":\"sigList\",\"type\":\"bytes\"}],\"name\":\"changeBookKeeper\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"rawHeader\",\"type\":\"bytes\"},{\"name\":\"pubKeyList\",\"type\":\"bytes\"}],\"name\":\"initGenesisBlock\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"unpause\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_newChainId\",\"type\":\"uint64\"}],\"name\":\"setChainId\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"newEthCrossChainManagerAddress\",\"type\":\"address\"}],\"name\":\"upgradeToNew\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"pause\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"isOwner\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"chainId\",\"outputs\":[{\"name\":\"\",\"type\":\"uint64\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"toChainId\",\"type\":\"uint64\"},{\"name\":\"toContract\",\"type\":\"bytes\"},{\"name\":\"method\",\"type\":\"bytes\"},{\"name\":\"txData\",\"type\":\"bytes\"}],\"name\":\"crossChain\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"proof\",\"type\":\"bytes\"},{\"name\":\"rawHeader\",\"type\":\"bytes\"},{\"name\":\"headerProof\",\"type\":\"bytes\"},{\"name\":\"curRawHeader\",\"type\":\"bytes\"},{\"name\":\"headerSig\",\"type\":\"bytes\"}],\"name\":\"verifyHeaderAndExecuteTx\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"name\":\"_eccd\",\"type\":\"address\"},{\"name\":\"_chainId\",\"type\":\"uint64\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"height\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"rawHeader\",\"type\":\"bytes\"}],\"name\":\"InitGenesisBlockEvent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"height\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"rawHeader\",\"type\":\"bytes\"}],\"name\":\"ChangeBookKeeperEvent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"txId\",\"type\":\"bytes\"},{\"indexed\":false,\"name\":\"proxyOrAssetContract\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"toChainId\",\"type\":\"uint64\"},{\"indexed\":false,\"name\":\"toContract\",\"type\":\"bytes\"},{\"indexed\":false,\"name\":\"rawdata\",\"type\":\"bytes\"}],\"name\":\"CrossChainEvent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"fromChainID\",\"type\":\"uint64\"},{\"indexed\":false,\"name\":\"toContract\",\"type\":\"bytes\"},{\"indexed\":false,\"name\":\"crossChainTxHash\",\"type\":\"bytes\"},{\"indexed\":false,\"name\":\"fromChainTxHash\",\"type\":\"bytes\"}],\"name\":\"VerifyHeaderAndExecuteTxEvent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"}]" + +// EthCrossChainManagerFuncSigs maps the 4-byte function signature to its string representation. +var EthCrossChainManagerFuncSigs = map[string]string{ + "00ba1694": "EthCrossChainDataAddress()", + "9a8a0592": "chainId()", + "29dcf4ab": "changeBookKeeper(bytes,bytes,bytes)", + "bd5cf625": "crossChain(uint64,bytes,bytes,bytes)", + "34a773eb": "initGenesisBlock(bytes,bytes)", + "8f32d59b": "isOwner()", + "8da5cb5b": "owner()", + "8456cb59": "pause()", + "5c975abb": "paused()", + "715018a6": "renounceOwnership()", + "6f31031d": "setChainId(uint64)", + "f2fde38b": "transferOwnership(address)", + "3f4ba83a": "unpause()", + "7e724ff3": "upgradeToNew(address)", + "d450e04c": "verifyHeaderAndExecuteTx(bytes,bytes,bytes,bytes,bytes)", +} + +// EthCrossChainManagerBin is the compiled bytecode used for deploying new contracts. +var EthCrossChainManagerBin = "0x60806040523480156200001157600080fd5b5060405160408062004fa28339810160405280516020909101518181600062000042640100000000620000fa810204565b60008054600160a060020a031916600160a060020a0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3506000805460a060020a60ff02191690556001805467ffffffffffffffff909216740100000000000000000000000000000000000000000260a060020a60e060020a0319600160a060020a03909416600160a060020a0319909316929092179290921617905550620000fe9050565b3390565b614e94806200010e6000396000f3006080604052600436106100c05763ffffffff60e060020a600035041662ba169481146100c557806329dcf4ab146100f657806334a773eb146101df5780633f4ba83a146102765780635c975abb1461028b5780636f31031d146102a0578063715018a6146102c25780637e724ff3146102d95780638456cb59146102fa5780638da5cb5b1461030f5780638f32d59b146103245780639a8a059214610339578063bd5cf6251461036b578063d450e04c146103b1578063f2fde38b14610502575b600080fd5b3480156100d157600080fd5b506100da610523565b60408051600160a060020a039092168252519081900360200190f35b34801561010257600080fd5b506040805160206004803580820135601f81018490048402850184019095528484526101cb94369492936024939284019190819084018382808284375050604080516020601f89358b018035918201839004830284018301909452808352979a99988101979196509182019450925082915084018382808284375050604080516020601f89358b018035918201839004830284018301909452808352979a9998810197919650918201945092508291508401838280828437509497506105329650505050505050565b604080519115158252519081900360200190f35b3480156101eb57600080fd5b506040805160206004803580820135601f81018490048402850184019095528484526101cb94369492936024939284019190819084018382808284375050604080516020601f89358b018035918201839004830284018301909452808352979a999881019791965091820194509250829150840183828082843750949750610c1b9650505050505050565b34801561028257600080fd5b506101cb6111bc565b34801561029757600080fd5b506101cb6113a1565b3480156102ac57600080fd5b506101cb67ffffffffffffffff600435166113b1565b3480156102ce57600080fd5b506102d76114a2565b005b3480156102e557600080fd5b506101cb600160a060020a0360043516611545565b34801561030657600080fd5b506101cb611683565b34801561031b57600080fd5b506100da611862565b34801561033057600080fd5b506101cb611871565b34801561034557600080fd5b5061034e611895565b6040805167ffffffffffffffff9092168252519081900360200190f35b34801561037757600080fd5b506101cb6004803567ffffffffffffffff1690602480358082019290810135916044358082019290810135916064359081019101356118ac565b3480156103bd57600080fd5b506040805160206004803580820135601f81018490048402850184019095528484526101cb94369492936024939284019190819084018382808284375050604080516020601f89358b018035918201839004830284018301909452808352979a99988101979196509182019450925082915084018382808284375050604080516020601f89358b018035918201839004830284018301909452808352979a99988101979196509182019450925082915084018382808284375050604080516020601f89358b018035918201839004830284018301909452808352979a99988101979196509182019450925082915084018382808284375050604080516020601f89358b018035918201839004830284018301909452808352979a9998810197919650918201945092508291508401838280828437509497506120769650505050505050565b34801561050e57600080fd5b506102d7600160a060020a036004351661287a565b600154600160a060020a031681565b600061053c614d5f565b60008060606000806060600060149054906101000a900460ff1615151561059b576040805160e560020a62461bcd0281526020600482015260106024820152600080516020614e49833981519152604482015290519081900360640190fd5b6105a48b6128d2565b9650600160009054906101000a9004600160a060020a0316955085600160a060020a0316635ac407906040518163ffffffff1660e060020a028152600401602060405180830381600087803b1580156105fc57600080fd5b505af1158015610610573d6000803e3d6000fd5b505050506040513d602081101561062657600080fd5b5051606088015163ffffffff91821696501685106106b4576040805160e560020a62461bcd02815260206004820152603e60248201527f54686520686569676874206f6620686561646572206973206c6f77657220746860448201527f616e2063757272656e742065706f636820737461727420686569676874210000606482015290519081900360840190fd5b6101408701516bffffffffffffffffffffffff19161515610745576040805160e560020a62461bcd02815260206004820152602560248201527f546865206e657874426f6f6b4b6565706572206f66206865616465722069732060448201527f656d707479000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b61081586600160a060020a03166369d480746040518163ffffffff1660e060020a028152600401600060405180830381600087803b15801561078657600080fd5b505af115801561079a573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405260208110156107c357600080fd5b8101908080516401000000008111156107db57600080fd5b820160208101848111156107ee57600080fd5b815164010000000081118282018710171561080857600080fd5b50509291905050506129f3565b805190945092506108318b8a8660036000198801048703612aaa565b1515610887576040805160e560020a62461bcd02815260206004820152601860248201527f566572696679207369676e6174757265206661696c6564210000000000000000604482015290519081900360640190fd5b6108908a612cbe565b61014089015191935091506bffffffffffffffffffffffff19808416911614610903576040805160e560020a62461bcd02815260206004820152601360248201527f4e657874426f6f6b65727320696c6c6567616c00000000000000000000000000604482015290519081900360640190fd5b85600160a060020a0316638a8bd17f88606001516040518263ffffffff1660e060020a028152600401808263ffffffff1663ffffffff168152602001915050602060405180830381600087803b15801561095c57600080fd5b505af1158015610970573d6000803e3d6000fd5b505050506040513d602081101561098657600080fd5b50511515610a04576040805160e560020a62461bcd02815260206004820152602d60248201527f53617665204d43204c617465737448656967687420746f204461746120636f6e60448201527f7472616374206661696c65642100000000000000000000000000000000000000606482015290519081900360840190fd5b85600160a060020a03166341973cd9610a1c83612da5565b6040518263ffffffff1660e060020a0281526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610a6b578181015183820152602001610a53565b50505050905090810190601f168015610a985780820380516001836020036101000a031916815260200191505b5092505050602060405180830381600087803b158015610ab757600080fd5b505af1158015610acb573d6000803e3d6000fd5b505050506040513d6020811015610ae157600080fd5b50511515610b5f576040805160e560020a62461bcd02815260206004820152603b60248201527f5361766520506f6c7920636861696e20626f6f6b206b6565706572732062797460448201527f657320746f204461746120636f6e7472616374206661696c6564210000000000606482015290519081900360840190fd5b7fe60d33488cba3977bf65766cd2f8ac9617f64bf3b3198aff6240ce5c7d43b69087606001518c604051808363ffffffff16815260200180602001828103825283818151815260200191508051906020019080838360005b83811015610bcf578181015183820152602001610bb7565b50505050905090810190601f168015610bfc5780820380516001836020036101000a031916815260200191505b50935050505060405180910390a15060019a9950505050505050505050565b600080610c26614d5f565b6000805460609060a060020a900460ff1615610c7a576040805160e560020a62461bcd0281526020600482015260106024820152600080516020614e49833981519152604482015290519081900360640190fd5b600160009054906101000a9004600160a060020a0316935083600160a060020a03166369d480746040518163ffffffff1660e060020a028152600401600060405180830381600087803b158015610cd057600080fd5b505af1158015610ce4573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526020811015610d0d57600080fd5b810190808051640100000000811115610d2557600080fd5b82016020810184811115610d3857600080fd5b8151640100000000811182820187101715610d5257600080fd5b505051159250610dd5915050576040805160e560020a62461bcd02815260206004820152603860248201527f45746843726f7373436861696e4461746120636f6e747261637420686173206160448201527f6c7265616479206265656e20696e697469616c697a6564210000000000000000606482015290519081900360840190fd5b610dde876128d2565b9250610de986612cbe565b61014085015191935091506bffffffffffffffffffffffff19808416911614610e5c576040805160e560020a62461bcd02815260206004820152601360248201527f4e657874426f6f6b65727320696c6c6567616c00000000000000000000000000604482015290519081900360640190fd5b83600160a060020a0316638a8bd17f84606001516040518263ffffffff1660e060020a028152600401808263ffffffff1663ffffffff168152602001915050602060405180830381600087803b158015610eb557600080fd5b505af1158015610ec9573d6000803e3d6000fd5b505050506040513d6020811015610edf57600080fd5b50511515610f83576040805160e560020a62461bcd02815260206004820152604360248201527f5361766520506f6c7920636861696e2063757272656e742065706f636820737460448201527f6172742068656967687420746f204461746120636f6e7472616374206661696c60648201527f6564210000000000000000000000000000000000000000000000000000000000608482015290519081900360a40190fd5b83600160a060020a03166341973cd9610f9b83612da5565b6040518263ffffffff1660e060020a0281526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610fea578181015183820152602001610fd2565b50505050905090810190601f1680156110175780820380516001836020036101000a031916815260200191505b5092505050602060405180830381600087803b15801561103657600080fd5b505af115801561104a573d6000803e3d6000fd5b505050506040513d602081101561106057600080fd5b50511515611104576040805160e560020a62461bcd02815260206004820152604360248201527f5361766520506f6c7920636861696e2063757272656e742065706f636820626f60448201527f6f6b206b65657065727320746f204461746120636f6e7472616374206661696c60648201527f6564210000000000000000000000000000000000000000000000000000000000608482015290519081900360a40190fd5b7ff01968fc3a2655cf1b5144cb32de6dc898f91b9239c103744e8457152ab2fbde836060015188604051808363ffffffff16815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561117457818101518382015260200161115c565b50505050905090810190601f1680156111a15780820380516001836020036101000a031916815260200191505b50935050505060405180910390a15060019695505050505050565b6000806111c7611871565b151561120b576040805160e560020a62461bcd0281526020600482018190526024820152600080516020614e29833981519152604482015290519081900360640190fd5b6112136113a1565b1561122057611220612eaf565b50600154604080517f5c975abb0000000000000000000000000000000000000000000000000000000081529051600160a060020a03909216918291635c975abb9160048083019260209291908290030181600087803b15801561128257600080fd5b505af1158015611296573d6000803e3d6000fd5b505050506040513d60208110156112ac57600080fd5b5051156113995780600160a060020a0316633f4ba83a6040518163ffffffff1660e060020a028152600401602060405180830381600087803b1580156112f157600080fd5b505af1158015611305573d6000803e3d6000fd5b505050506040513d602081101561131b57600080fd5b50511515611399576040805160e560020a62461bcd02815260206004820152602960248201527f756e70617573652045746843726f7373436861696e4461746120636f6e74726160448201527f6374206661696c65640000000000000000000000000000000000000000000000606482015290519081900360840190fd5b600191505090565b60005460a060020a900460ff1690565b6000805460a060020a900460ff161515611415576040805160e560020a62461bcd02815260206004820152601460248201527f5061757361626c653a206e6f7420706175736564000000000000000000000000604482015290519081900360640190fd5b61141d611871565b1515611461576040805160e560020a62461bcd0281526020600482018190526024820152600080516020614e29833981519152604482015290519081900360640190fd5b50600180547fffffffff0000000000000000ffffffffffffffffffffffffffffffffffffffff1660a060020a67ffffffffffffffff8416021781555b919050565b6114aa611871565b15156114ee576040805160e560020a62461bcd0281526020600482018190526024820152600080516020614e29833981519152604482015290519081900360640190fd5b60008054604051600160a060020a03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a36000805473ffffffffffffffffffffffffffffffffffffffff19169055565b60008054819060a060020a900460ff1615156115ab576040805160e560020a62461bcd02815260206004820152601460248201527f5061757361626c653a206e6f7420706175736564000000000000000000000000604482015290519081900360640190fd5b6115b3611871565b15156115f7576040805160e560020a62461bcd0281526020600482018190526024820152600080516020614e29833981519152604482015290519081900360640190fd5b50600154604080517ff2fde38b000000000000000000000000000000000000000000000000000000008152600160a060020a03858116600483015291519190921691829163f2fde38b9160248082019260009290919082900301818387803b15801561166257600080fd5b505af1158015611676573d6000803e3d6000fd5b5060019695505050505050565b60008061168e611871565b15156116d2576040805160e560020a62461bcd0281526020600482018190526024820152600080516020614e29833981519152604482015290519081900360640190fd5b6116da6113a1565b15156116e8576116e8612f76565b50600154604080517f5c975abb0000000000000000000000000000000000000000000000000000000081529051600160a060020a03909216918291635c975abb9160048083019260209291908290030181600087803b15801561174a57600080fd5b505af115801561175e573d6000803e3d6000fd5b505050506040513d602081101561177457600080fd5b505115156113995780600160a060020a0316638456cb596040518163ffffffff1660e060020a028152600401602060405180830381600087803b1580156117ba57600080fd5b505af11580156117ce573d6000803e3d6000fd5b505050506040513d60208110156117e457600080fd5b50511515611399576040805160e560020a62461bcd02815260206004820152602760248201527f70617573652045746843726f7373436861696e4461746120636f6e747261637460448201527f206661696c656400000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b600054600160a060020a031690565b60008054600160a060020a031661188661300f565b600160a060020a031614905090565b60015460a060020a900467ffffffffffffffff1681565b6000805481908190606090819060a060020a900460ff1615611906576040805160e560020a62461bcd0281526020600482015260106024820152600080516020614e49833981519152604482015290519081900360640190fd5b600160009054906101000a9004600160a060020a0316935083600160a060020a031663ff3d24a16040518163ffffffff1660e060020a028152600401602060405180830381600087803b15801561195c57600080fd5b505af1158015611970573d6000803e3d6000fd5b505050506040513d602081101561198657600080fd5b5051925061199383613013565b915061199e826130a8565b611ada600230856040516020018083600160a060020a0316600160a060020a03166c0100000000000000000000000002815260140182805190602001908083835b602083106119fe5780518252601f1990920191602091820191016119df565b6001836020036101000a038019825116818451168082178552505050505050905001925050506040516020818303038152906040526040518082805190602001908083835b60208310611a625780518252601f199092019160209182019101611a43565b51815160209384036101000a600019018019909216911617905260405191909301945091925050808303816000865af1158015611aa3573d6000803e3d6000fd5b5050506040513d6020811015611ab857600080fd5b50516040805160208181019390935281518082039093018352810190526130a8565b611aeb611ae63361316e565b6130a8565b611af48f613189565b611b2d8f8f8080601f016020809104026020016040519081016040528093929190818152602001838380828437506130a8945050505050565b611b668e8e8080601f016020809104026020016040519081016040528093929190818152602001838380828437506130a8945050505050565b611b9f8d8d8080601f016020809104026020016040519081016040528093929190818152602001838380828437506130a8945050505050565b6040516020018088805190602001908083835b60208310611bd15780518252601f199092019160209182019101611bb2565b51815160209384036101000a60001901801990921691161790528a5191909301928a0191508083835b60208310611c195780518252601f199092019160209182019101611bfa565b51815160209384036101000a600019018019909216911617905289519190930192890191508083835b60208310611c615780518252601f199092019160209182019101611c42565b51815160209384036101000a600019018019909216911617905288519190930192880191508083835b60208310611ca95780518252601f199092019160209182019101611c8a565b51815160209384036101000a600019018019909216911617905287519190930192870191508083835b60208310611cf15780518252601f199092019160209182019101611cd2565b51815160209384036101000a600019018019909216911617905286519190930192860191508083835b60208310611d395780518252601f199092019160209182019101611d1a565b51815160209384036101000a600019018019909216911617905285519190930192850191508083835b60208310611d815780518252601f199092019160209182019101611d62565b6001836020036101000a038019825116818451168082178552505050505050905001975050505050505050604051602081830303815290604052905083600160a060020a0316634c3ccf64826040518082805190602001908083835b60208310611dfc5780518252601f199092019160209182019101611ddd565b51815160209384036101000a60001901801990921691161790526040805192909401829003822063ffffffff881660e060020a0283526004830152925160248083019650939450929083900301905081600087803b158015611e5d57600080fd5b505af1158015611e71573d6000803e3d6000fd5b505050506040513d6020811015611e8757600080fd5b50511515611f05576040805160e560020a62461bcd02815260206004820152603060248201527f536176652065746854784861736820627920696e64657820746f20446174612060448201527f636f6e7472616374206661696c65642100000000000000000000000000000000606482015290519081900360840190fd5b32600160a060020a03167f6ad3bf15c1988bc04bc153490cab16db8efb9a3990215bf1c64ea6e28be8848383338f8f8f87604051808060200187600160a060020a0316600160a060020a031681526020018667ffffffffffffffff1667ffffffffffffffff168152602001806020018060200184810384528a818151815260200191508051906020019080838360005b83811015611fad578181015183820152602001611f95565b50505050905090810190601f168015611fda5780820380516001836020036101000a031916815260200191505b5084810383528681526020018787808284379091018581038352865181528651602091820192509087019080838360005b8381101561202357818101518382015260200161200b565b50505050905090810190601f1680156120505780820380516001836020036101000a031916815260200191505b50995050505050505050505060405180910390a25060019b9a5050505050505050505050565b6000612080614d5f565b6000606060008061208f614d5f565b6060612099614dba565b6000805460a060020a900460ff16156120ea576040805160e560020a62461bcd0281526020600482015260106024820152600080516020614e49833981519152604482015290519081900360640190fd5b6120f38e6128d2565b9850600160009054906101000a9004600160a060020a0316975061214e88600160a060020a03166369d480746040518163ffffffff1660e060020a028152600401600060405180830381600087803b15801561078657600080fd5b965087600160a060020a0316635ac407906040518163ffffffff1660e060020a028152600401602060405180830381600087803b15801561218e57600080fd5b505af11580156121a2573d6000803e3d6000fd5b505050506040513d60208110156121b857600080fd5b5051875160608b015163ffffffff928316985090965016861161226c576121eb8e8c8960036000198a015b048903612aaa565b1515612267576040805160e560020a62461bcd02815260206004820152602a60248201527f56657269667920706f6c7920636861696e20686561646572207369676e61747560448201527f7265206661696c65642100000000000000000000000000000000000000000000606482015290519081900360840190fd5b61237a565b61227e8c8c8960036000198a016121e3565b15156122fa576040805160e560020a62461bcd02815260206004820152603860248201527f56657269667920706f6c7920636861696e2063757272656e742065706f63682060448201527f686561646572207369676e6174757265206661696c6564210000000000000000606482015290519081900360840190fd5b6123038c6128d2565b935061231c6123178e8661010001516131cc565b613375565b6123258f6133d9565b1461237a576040805160e560020a62461bcd02815260206004820152601b60248201527f766572696679206865616465722070726f6f66206661696c6564210000000000604482015290519081900360640190fd5b6123888f8a60e001516131cc565b92506123938361350e565b915087600160a060020a0316630586763c83602001516123b68560000151613375565b6040805160e060020a63ffffffff861602815267ffffffffffffffff909316600484015260248301919091525160448083019260209291908290030181600087803b15801561240457600080fd5b505af1158015612418573d6000803e3d6000fd5b505050506040513d602081101561242e57600080fd5b5051156124ab576040805160e560020a62461bcd02815260206004820152602260248201527f746865207472616e73616374696f6e20686173206265656e206578656375746560448201527f6421000000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b87600160a060020a031663e90bfdcf83602001516124cc8560000151613375565b6040805160e060020a63ffffffff861602815267ffffffffffffffff909316600484015260248301919091525160448083019260209291908290030181600087803b15801561251a57600080fd5b505af115801561252e573d6000803e3d6000fd5b505050506040513d602081101561254457600080fd5b5051151561259c576040805160e560020a62461bcd02815260206004820181905260248201527f536176652063726f7373636861696e207478206578697374206661696c656421604482015290519081900360640190fd5b60015460408301516060015167ffffffffffffffff90811660a060020a9092041614612638576040805160e560020a62461bcd02815260206004820152602a60248201527f54686973205478206973206e6f742061696d696e67206174204574686572657560448201527f6d206e6574776f726b2100000000000000000000000000000000000000000000606482015290519081900360840190fd5b6126498260400151608001516135f0565b905061267481836040015160a00151846040015160c00151856040015160400151866020015161367a565b15156126ca576040805160e560020a62461bcd02815260206004820152601d60248201527f457865637574652043726f7373436861696e205478206661696c656421000000604482015290519081900360640190fd5b7f8a4a2663ce60ce4955c595da2894de0415240f1ace024cfbff85f513b656bdae82602001518360400151608001518460000151856040015160000151604051808567ffffffffffffffff1667ffffffffffffffff168152602001806020018060200180602001848103845287818151815260200191508051906020019080838360005b8381101561276657818101518382015260200161274e565b50505050905090810190601f1680156127935780820380516001836020036101000a031916815260200191505b50848103835286518152865160209182019188019080838360005b838110156127c65781810151838201526020016127ae565b50505050905090810190601f1680156127f35780820380516001836020036101000a031916815260200191505b50848103825285518152855160209182019187019080838360005b8381101561282657818101518382015260200161280e565b50505050905090810190601f1680156128535780820380516001836020036101000a031916815260200191505b5097505050505050505060405180910390a15060019e9d5050505050505050505050505050565b612882611871565b15156128c6576040805160e560020a62461bcd0281526020600482018190526024820152600080516020614e29833981519152604482015290519081900360640190fd5b6128cf81613a9a565b50565b6128da614d5f565b6128e2614d5f565b60006128ee8482613b88565b63ffffffff909116835290506129048482613c6f565b67ffffffffffffffff909116602084015290506129218482613d56565b60a084019190915290506129358482613d56565b60c084019190915290506129498482613d56565b60e0840191909152905061295d8482613d56565b61010084019190915290506129728482613b88565b63ffffffff9091166040840152905061298b8482613b88565b63ffffffff909116606084015290506129a48482613c6f565b67ffffffffffffffff909116608084015290506129c18482613dd8565b61012084019190915290506129d68482613ef4565b506bffffffffffffffffffffffff19166101408301525092915050565b6060600080828082612a058782613c6f565b80965081955050508367ffffffffffffffff16604051908082528060200260200182016040528015612a41578160200160208202803883390190505b509250600090505b8367ffffffffffffffff16811015612a9f57612a658786613dd8565b95509150612a72826135f0565b8382815181101515612a8057fe5b600160a060020a03909216602092830290910190910152600101612a49565b509095945050505050565b60008060006060600080600080612ac08c6133d9565b8b5190975060419004955085604051908082528060200260200182016040528015612af5578160200160208202803883390190505b509450600090505b85811015612ca357612b176123178c604184026020613fa0565b9350612b2e6123178c604184026020016020613fa0565b92508a60418202604001815181101515612b4457fe5b90602001015160f860020a900460f860020a0260f860020a9004601b01915060016002886040516020018082600019166000191681526020019150506040516020818303038152906040526040518082805190602001908083835b60208310612bbe5780518252601f199092019160209182019101612b9f565b51815160209384036101000a600019018019909216911617905260405191909301945091925050808303816000865af1158015612bff573d6000803e3d6000fd5b5050506040513d6020811015612c1457600080fd5b505160408051600080825260208281018085529490945260ff8716828401526060820189905260808201889052915160a08083019493601f198301938390039091019190865af1158015612c6c573d6000803e3d6000fd5b505050602060405103518582815181101515612c8457fe5b600160a060020a03909216602092830290910190910152600101612afd565b612cae8a868b614021565b9c9b505050505050505050505050565b60006060600060438451811515612cd157fe5b0615612d27576040805160e560020a62461bcd02815260206004820152601b60248201527f5f7075624b65794c697374206c656e67746820696c6c6567616c210000000000604482015290519081900360640190fd5b508251604390046001811015612d87576040805160e560020a62461bcd02815260206004820152601660248201527f746f6f2073686f7274205f7075624b65794c6973742100000000000000000000604482015290519081900360640190fd5b612d9b8160036000198201048303866140c7565b9250925050915091565b8051606090816000612db683613189565b9150600090505b82811015612ea75781612de9611ae68784815181101515612dda57fe5b9060200190602002015161316e565b6040516020018083805190602001908083835b60208310612e1b5780518252601f199092019160209182019101612dfc565b51815160209384036101000a600019018019909216911617905285519190930192850191508083835b60208310612e635780518252601f199092019160209182019101612e44565b6001836020036101000a0380198251168184511680821785525050505050509050019250505060405160208183030381529060405291508080600101915050612dbd565b509392505050565b60005460a060020a900460ff161515612f12576040805160e560020a62461bcd02815260206004820152601460248201527f5061757361626c653a206e6f7420706175736564000000000000000000000000604482015290519081900360640190fd5b6000805474ff0000000000000000000000000000000000000000191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa612f5961300f565b60408051600160a060020a039092168252519081900360200190a1565b60005460a060020a900460ff1615612fc6576040805160e560020a62461bcd0281526020600482015260106024820152600080516020614e49833981519152604482015290519081900360640190fd5b6000805474ff0000000000000000000000000000000000000000191660a060020a1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258612f595b3390565b60607f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82111561308d576040805160e560020a62461bcd02815260206004820152601760248201527f56616c75652065786365656473207468652072616e6765000000000000000000604482015290519081900360640190fd5b60405190506020815281602082015260408101604052919050565b80516060906130b68161447f565b836040516020018083805190602001908083835b602083106130e95780518252601f1990920191602091820191016130ca565b51815160209384036101000a600019018019909216911617905285519190930192850191508083835b602083106131315780518252601f199092019160209182019101613112565b6001836020036101000a03801982511681845116808217855250505050505090500192505050604051602081830303815290604052915050919050565b604080516014815260609290921b6020830152818101905290565b6040516008808252606091906000601f5b828210156131bc5785811a82602086010153600191909101906000190161319a565b5050506028810160405292915050565b606060008181808080806131e08a82613dd8565b975095506131ed86614600565b94506021878b51038115156131fe57fe5b049350600090505b838110156132ea576132188a886146a7565b975091506132268a88613d56565b97509250600160f860020a03198216151561324c57613245838661472d565b94506132e2565b60f860020a600160f860020a03198316141561326c57613245858461472d565b6040805160e560020a62461bcd02815260206004820152602e60248201527f6d65726b6c6550726f76652c204e6578744279746520666f7220706f7369746960448201527f6f6e20696e666f206661696c6564000000000000000000000000000000000000606482015290519081900360840190fd5b600101613206565b848914613367576040805160e560020a62461bcd02815260206004820152603160248201527f6d65726b6c6550726f76652c2065787065637420726f6f74206973206e6f742060448201527f657175616c2061637475616c20726f6f74000000000000000000000000000000606482015290519081900360840190fd5b509398975050505050505050565b80516000906020146133d1576040805160e560020a62461bcd02815260206004820152601760248201527f6279746573206c656e677468206973206e6f742033322e000000000000000000604482015290519081900360640190fd5b506020015190565b6000600280836040518082805190602001908083835b6020831061340e5780518252601f1990920191602091820191016133ef565b51815160209384036101000a600019018019909216911617905260405191909301945091925050808303816000865af115801561344f573d6000803e3d6000fd5b5050506040513d602081101561346457600080fd5b50516040805160208181019390935281518082038401815290820191829052805190928291908401908083835b602083106134b05780518252601f199092019160209182019101613491565b51815160209384036101000a600019018019909216911617905260405191909301945091925050808303816000865af11580156134f1573d6000803e3d6000fd5b5050506040513d602081101561350657600080fd5b505192915050565b613516614dba565b61351e614dba565b6000613528614de0565b600091506135368583613dd8565b90845291506135458583613c6f565b67ffffffffffffffff909116602085015291506135628583613dd8565b90825291506135718583613dd8565b602083019190915291506135858583613dd8565b604083019190915291506135998583613c6f565b67ffffffffffffffff909116606083015291506135b68583613dd8565b608083019190915291506135ca8583613dd8565b60a083019190915291506135de8583613dd8565b5060c082015260408301525092915050565b8051600090601414613672576040805160e560020a62461bcd02815260206004820152602360248201527f6279746573206c656e67746820646f6573206e6f74206d61746368206164647260448201527f6573730000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b506014015190565b6000613685866147f3565b1515613701576040805160e560020a62461bcd02815260206004820152602860248201527f5468652070617373656420696e2061646472657373206973206e6f742061206360448201527f6f6e747261637421000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b85600160a060020a0316856040516020018082805190602001908083835b6020831061373e5780518252601f19909201916020918201910161371f565b6001836020036101000a038019825116818451168082178552505050505050905001807f2862797465732c62797465732c75696e743634290000000000000000000000008152506014019150506040516020818303038152906040526040518082805190602001908083835b602083106137c95780518252601f1990920191602091820191016137aa565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405180910390208585856040516020018080602001806020018467ffffffffffffffff1667ffffffffffffffff168152602001838103835286818151815260200191508051906020019080838360005b8381101561385757818101518382015260200161383f565b50505050905090810190601f1680156138845780820380516001836020036101000a031916815260200191505b50838103825285518152855160209182019187019080838360005b838110156138b757818101518382015260200161389f565b50505050905090810190601f1680156138e45780820380516001836020036101000a031916815260200191505b509550505050505060405160208183030381529060405260405160200180837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260040182805190602001908083835b602083106139715780518252601f199092019160209182019101613952565b6001836020036101000a0380198251168184511680821785525050505050509050019250505060405160208183030381529060405260405180828051906020019080838360005b838110156139d05781810151838201526020016139b8565b50505050905090810190601f1680156139fd5780820380516001836020036101000a031916815260200191505b509150506000604051808303816000865af19150501515613a8e576040805160e560020a62461bcd02815260206004820152602b60248201527f45746843726f7373436861696e2063616c6c20627573696e65737320636f6e7460448201527f72616374206661696c6564000000000000000000000000000000000000000000606482015290519081900360840190fd5b50600195945050505050565b600160a060020a0381161515613b20576040805160e560020a62461bcd02815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f6464726573730000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b60008054604051600160a060020a03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600080600084518460040111158015613ba357508360040184105b1515613c1f576040805160e560020a62461bcd02815260206004820152602260248201527f4e65787455696e7433322c206f66667365742065786365656473206d6178696d60448201527f756d000000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b60405160046000600182038760208a0101515b83831015613c525780821a83860153600183019250600182039150613c32565b505050808201604052602003900351956004949094019450505050565b600080600084518460080111158015613c8a57508360080184105b1515613d06576040805160e560020a62461bcd02815260206004820152602260248201527f4e65787455696e7436342c206f66667365742065786365656473206d6178696d60448201527f756d000000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b60405160086000600182038760208a0101515b83831015613d395780821a83860153600183019250600182039150613d19565b505050808201604052602003900351956008949094019450505050565b600080600084518460200111158015613d7157508360200184105b1515613dc7576040805160e560020a62461bcd02815260206004820181905260248201527f4e657874486173682c206f66667365742065786365656473206d6178696d756d604482015290519081900360640190fd5b505050602091810182015192910190565b60606000806060613de986866147fb565b875190965090925082860111801590613e03575081850185105b1515613e7e576040805160e560020a62461bcd028152602060048201526024808201527f4e65787456617242797465732c206f66667365742065786365656473206d617860448201527f696d756d00000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b81158015613e9757604051915060208201604052613ee1565b6040519150601f8316801560200281840101848101888315602002848c0101015b81831015613ed0578051835260209283019201613eb8565b5050848452601f01601f1916604052505b5080828601935093505b50509250929050565b600080600084518460140111158015613f0f57508360140184105b1515613f8b576040805160e560020a62461bcd02815260206004820152602360248201527f4e657874427974657332302c206f66667365742065786365656473206d61786960448201527f6d756d0000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b50505081810160200151601482019250929050565b606080828401855110151515613fb557600080fd5b82158015613fce57604051915060208201604052614018565b6040519150601f8416801560200281840101858101878315602002848b0101015b81831015614007578051835260209283019201613fef565b5050858452601f01601f1916604052505b50949350505050565b60008080805b85518210156140b9575060005b86518110156140ae57868181518110151561404b57fe5b90602001906020020151600160a060020a0316868381518110151561406c57fe5b90602001906020020151600160a060020a031614156140a657865160019093019287908290811061409957fe5b6000602091820290920101525b600101614034565b600190910190614027565b505091909110159392505050565b60006060806060600060606000806140de8b614a60565b95508a60405190808252806020026020018201604052801561410a578160200160208202803883390190505b509450600091505b8a8210156142865761412989604384026043613fa0565b925085614138611ae685614aa3565b6040516020018083805190602001908083835b6020831061416a5780518252601f19909201916020918201910161414b565b51815160209384036101000a600019018019909216911617905285519190930192850191508083835b602083106141b25780518252601f199092019160209182019101614193565b6001836020036101000a0380198251168184511680821785525050505050509050019250505060405160208183030381529060405295506141f68360036040613fa0565b6040518082805190602001908083835b602083106142255780518252601f199092019160209182019101614206565b5181516020939093036101000a600019018019909116921691909117905260405192018290039091208851909750879350889250859150811061426457fe5b600160a060020a03909216602092830290910190910152600190910190614112565b856142908b614a60565b6040516020018083805190602001908083835b602083106142c25780518252601f1990920191602091820191016142a3565b51815160209384036101000a600019018019909216911617905285519190930192850191508083835b6020831061430a5780518252601f1990920191602091820191016142eb565b6001836020036101000a03801982511681845116808217855250505050505090500192505050604051602081830303815290604052955060036002876040518082805190602001908083835b602083106143755780518252601f199092019160209182019101614356565b51815160209384036101000a600019018019909216911617905260405191909301945091925050808303816000865af11580156143b6573d6000803e3d6000fd5b5050506040513d60208110156143cb57600080fd5b50516040805160208181019390935281518082038401815290820191829052805190928291908401908083835b602083106144175780518252601f1990920191602091820191016143f8565b51815160209384036101000a600019018019909216911617905260405191909301945091925050808303816000865af1158015614458573d6000803e3d6000fd5b5050604051516c01000000000000000000000000029c959b50949950505050505050505050565b606060fd8267ffffffffffffffff1610156144a45761449d82614c1f565b905061149d565b61ffff67ffffffffffffffff83161161459f576144e07ffd00000000000000000000000000000000000000000000000000000000000000614c3b565b6144e983614a60565b6040516020018083805190602001908083835b6020831061451b5780518252601f1990920191602091820191016144fc565b51815160209384036101000a600019018019909216911617905285519190930192850191508083835b602083106145635780518252601f199092019160209182019101614544565b6001836020036101000a03801982511681845116808217855250505050505090500192505050604051602081830303815290604052905061149d565b63ffffffff67ffffffffffffffff8316116145e6576145dd7ffe00000000000000000000000000000000000000000000000000000000000000614c3b565b6144e983614c52565b6145f7600160f860020a0319614c3b565b6144e983613189565b6040516000602080830182815284519293600293859387939260210191908401908083835b602083106146445780518252601f199092019160209182019101614625565b6001836020036101000a03801982511681845116808217855250505050505090500192505050604051602081830303815290604052604051808280519060200190808383602083106134b05780518252601f199092019160209182019101613491565b6000806000845184600101111580156146c257508360010184105b1515614718576040805160e560020a62461bcd02815260206004820181905260248201527f4e657874427974652c204f66667365742065786365656473206d6178696d756d604482015290519081900360640190fd5b50505081810160200151600182019250929050565b6040805160f860020a60208083019190915260218201859052604180830185905283518084039091018152606190920192839052815160009360029392909182918401908083835b602083106147945780518252601f199092019160209182019101614775565b51815160209384036101000a600019018019909216911617905260405191909301945091925050808303816000865af11580156147d5573d6000803e3d6000fd5b5050506040513d60208110156147ea57600080fd5b50519392505050565b6000903b1190565b60008060008061480b86866146a7565b955091507ffd00000000000000000000000000000000000000000000000000000000000000600160f860020a0319831614156148c75761484b8686614c95565b955061ffff16905060fd8110801590614866575061ffff8111155b15156148bc576040805160e560020a62461bcd02815260206004820152601f60248201527f4e65787455696e7431362c2076616c7565206f7574736964652072616e676500604482015290519081900360640190fd5b808593509350613eeb565b7ffe00000000000000000000000000000000000000000000000000000000000000600160f860020a031983161415614978576149038686613b88565b955063ffffffff16905061ffff81118015614922575063ffffffff8111155b15156148bc576040805160e560020a62461bcd02815260206004820181905260248201527f4e65787456617255696e742c2076616c7565206f7574736964652072616e6765604482015290519081900360640190fd5b600160f860020a031980831614156149fd576149948686613c6f565b955067ffffffffffffffff16905063ffffffff81116148bc576040805160e560020a62461bcd02815260206004820181905260248201527f4e65787456617255696e742c2076616c7565206f7574736964652072616e6765604482015290519081900360640190fd5b5060ff60f860020a82041660fd81106148bc576040805160e560020a62461bcd02815260206004820181905260248201527f4e65787456617255696e742c2076616c7565206f7574736964652072616e6765604482015290519081900360640190fd5b6040516002808252606091906000601f5b82821015614a935785811a826020860101536001919091019060001901614a71565b5050506022810160405292915050565b60606043825110151515614b01576040805160e560020a62461bcd02815260206004820152601760248201527f6b6579206c656e67676820697320746f6f2073686f7274000000000000000000604482015290519081900360640190fd5b614b0e8260006023613fa0565b90506002826042815181101515614b2157fe5b90602001015160f860020a900460f860020a0260f860020a900460ff16811515614b4757fe5b0660ff1660001415614bb95780517f02000000000000000000000000000000000000000000000000000000000000009082906002908110614b8457fe5b9060200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535061149d565b80517f03000000000000000000000000000000000000000000000000000000000000009082906002908110614bea57fe5b9060200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350919050565b604080516001815260f89290921b602083015260218201905290565b6060614c4c60f860020a8304614c1f565b92915050565b6040516004808252606091906000601f5b82821015614c855785811a826020860101536001919091019060001901614c63565b5050506024810160405292915050565b600080600084518460020111158015614cb057508360020184105b1515614d2c576040805160e560020a62461bcd02815260206004820152602260248201527f4e65787455696e7431362c206f66667365742065786365656473206d6178696d60448201527f756d000000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b604051846020870101518060011a82538060001a6001830153506002818101604052601d19909101519694019450505050565b604080516101608101825260008082526020820181905291810182905260608082018390526080820183905260a0820183905260c0820183905260e08201839052610100820183905261012082015261014081019190915290565b60408051610120810182526060815260006020820152908101614ddb614de0565b905290565b60e060405190810160405280606081526020016060815260200160608152602001600067ffffffffffffffff168152602001606081526020016060815260200160608152509056004f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65725061757361626c653a2070617573656400000000000000000000000000000000a165627a7a72305820e0a46f1f1f27ebeeed8773f12928740a4886b104ceba26be57433ed710e1d3e10029" + +// DeployEthCrossChainManager deploys a new Ethereum contract, binding an instance of EthCrossChainManager to it. +func DeployEthCrossChainManager(auth *bind.TransactOpts, backend bind.ContractBackend, _eccd common.Address, _chainId uint64) (common.Address, *types.Transaction, *EthCrossChainManager, error) { + parsed, err := abi.JSON(strings.NewReader(EthCrossChainManagerABI)) + if err != nil { + return common.Address{}, nil, nil, err + } + + address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(EthCrossChainManagerBin), backend, _eccd, _chainId) + if err != nil { + return common.Address{}, nil, nil, err + } + return address, tx, &EthCrossChainManager{EthCrossChainManagerCaller: EthCrossChainManagerCaller{contract: contract}, EthCrossChainManagerTransactor: EthCrossChainManagerTransactor{contract: contract}, EthCrossChainManagerFilterer: EthCrossChainManagerFilterer{contract: contract}}, nil +} + +// EthCrossChainManager is an auto generated Go binding around an Ethereum contract. +type EthCrossChainManager struct { + EthCrossChainManagerCaller // Read-only binding to the contract + EthCrossChainManagerTransactor // Write-only binding to the contract + EthCrossChainManagerFilterer // Log filterer for contract events +} + +// EthCrossChainManagerCaller is an auto generated read-only Go binding around an Ethereum contract. +type EthCrossChainManagerCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// EthCrossChainManagerTransactor is an auto generated write-only Go binding around an Ethereum contract. +type EthCrossChainManagerTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// EthCrossChainManagerFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type EthCrossChainManagerFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// EthCrossChainManagerSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type EthCrossChainManagerSession struct { + Contract *EthCrossChainManager // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// EthCrossChainManagerCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type EthCrossChainManagerCallerSession struct { + Contract *EthCrossChainManagerCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// EthCrossChainManagerTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type EthCrossChainManagerTransactorSession struct { + Contract *EthCrossChainManagerTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// EthCrossChainManagerRaw is an auto generated low-level Go binding around an Ethereum contract. +type EthCrossChainManagerRaw struct { + Contract *EthCrossChainManager // Generic contract binding to access the raw methods on +} + +// EthCrossChainManagerCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type EthCrossChainManagerCallerRaw struct { + Contract *EthCrossChainManagerCaller // Generic read-only contract binding to access the raw methods on +} + +// EthCrossChainManagerTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type EthCrossChainManagerTransactorRaw struct { + Contract *EthCrossChainManagerTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewEthCrossChainManager creates a new instance of EthCrossChainManager, bound to a specific deployed contract. +func NewEthCrossChainManager(address common.Address, backend bind.ContractBackend) (*EthCrossChainManager, error) { + contract, err := bindEthCrossChainManager(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &EthCrossChainManager{EthCrossChainManagerCaller: EthCrossChainManagerCaller{contract: contract}, EthCrossChainManagerTransactor: EthCrossChainManagerTransactor{contract: contract}, EthCrossChainManagerFilterer: EthCrossChainManagerFilterer{contract: contract}}, nil +} + +// NewEthCrossChainManagerCaller creates a new read-only instance of EthCrossChainManager, bound to a specific deployed contract. +func NewEthCrossChainManagerCaller(address common.Address, caller bind.ContractCaller) (*EthCrossChainManagerCaller, error) { + contract, err := bindEthCrossChainManager(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &EthCrossChainManagerCaller{contract: contract}, nil +} + +// NewEthCrossChainManagerTransactor creates a new write-only instance of EthCrossChainManager, bound to a specific deployed contract. +func NewEthCrossChainManagerTransactor(address common.Address, transactor bind.ContractTransactor) (*EthCrossChainManagerTransactor, error) { + contract, err := bindEthCrossChainManager(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &EthCrossChainManagerTransactor{contract: contract}, nil +} + +// NewEthCrossChainManagerFilterer creates a new log filterer instance of EthCrossChainManager, bound to a specific deployed contract. +func NewEthCrossChainManagerFilterer(address common.Address, filterer bind.ContractFilterer) (*EthCrossChainManagerFilterer, error) { + contract, err := bindEthCrossChainManager(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &EthCrossChainManagerFilterer{contract: contract}, nil +} + +// bindEthCrossChainManager binds a generic wrapper to an already deployed contract. +func bindEthCrossChainManager(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := abi.JSON(strings.NewReader(EthCrossChainManagerABI)) + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_EthCrossChainManager *EthCrossChainManagerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { + return _EthCrossChainManager.Contract.EthCrossChainManagerCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_EthCrossChainManager *EthCrossChainManagerRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _EthCrossChainManager.Contract.EthCrossChainManagerTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_EthCrossChainManager *EthCrossChainManagerRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _EthCrossChainManager.Contract.EthCrossChainManagerTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_EthCrossChainManager *EthCrossChainManagerCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { + return _EthCrossChainManager.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_EthCrossChainManager *EthCrossChainManagerTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _EthCrossChainManager.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_EthCrossChainManager *EthCrossChainManagerTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _EthCrossChainManager.Contract.contract.Transact(opts, method, params...) +} + +// EthCrossChainDataAddress is a free data retrieval call binding the contract method 0x00ba1694. +// +// Solidity: function EthCrossChainDataAddress() view returns(address) +func (_EthCrossChainManager *EthCrossChainManagerCaller) EthCrossChainDataAddress(opts *bind.CallOpts) (common.Address, error) { + var ( + ret0 = new(common.Address) + ) + out := ret0 + err := _EthCrossChainManager.contract.Call(opts, out, "EthCrossChainDataAddress") + return *ret0, err +} + +// EthCrossChainDataAddress is a free data retrieval call binding the contract method 0x00ba1694. +// +// Solidity: function EthCrossChainDataAddress() view returns(address) +func (_EthCrossChainManager *EthCrossChainManagerSession) EthCrossChainDataAddress() (common.Address, error) { + return _EthCrossChainManager.Contract.EthCrossChainDataAddress(&_EthCrossChainManager.CallOpts) +} + +// EthCrossChainDataAddress is a free data retrieval call binding the contract method 0x00ba1694. +// +// Solidity: function EthCrossChainDataAddress() view returns(address) +func (_EthCrossChainManager *EthCrossChainManagerCallerSession) EthCrossChainDataAddress() (common.Address, error) { + return _EthCrossChainManager.Contract.EthCrossChainDataAddress(&_EthCrossChainManager.CallOpts) +} + +// ChainId is a free data retrieval call binding the contract method 0x9a8a0592. +// +// Solidity: function chainId() view returns(uint64) +func (_EthCrossChainManager *EthCrossChainManagerCaller) ChainId(opts *bind.CallOpts) (uint64, error) { + var ( + ret0 = new(uint64) + ) + out := ret0 + err := _EthCrossChainManager.contract.Call(opts, out, "chainId") + return *ret0, err +} + +// ChainId is a free data retrieval call binding the contract method 0x9a8a0592. +// +// Solidity: function chainId() view returns(uint64) +func (_EthCrossChainManager *EthCrossChainManagerSession) ChainId() (uint64, error) { + return _EthCrossChainManager.Contract.ChainId(&_EthCrossChainManager.CallOpts) +} + +// ChainId is a free data retrieval call binding the contract method 0x9a8a0592. +// +// Solidity: function chainId() view returns(uint64) +func (_EthCrossChainManager *EthCrossChainManagerCallerSession) ChainId() (uint64, error) { + return _EthCrossChainManager.Contract.ChainId(&_EthCrossChainManager.CallOpts) +} + +// IsOwner is a free data retrieval call binding the contract method 0x8f32d59b. +// +// Solidity: function isOwner() view returns(bool) +func (_EthCrossChainManager *EthCrossChainManagerCaller) IsOwner(opts *bind.CallOpts) (bool, error) { + var ( + ret0 = new(bool) + ) + out := ret0 + err := _EthCrossChainManager.contract.Call(opts, out, "isOwner") + return *ret0, err +} + +// IsOwner is a free data retrieval call binding the contract method 0x8f32d59b. +// +// Solidity: function isOwner() view returns(bool) +func (_EthCrossChainManager *EthCrossChainManagerSession) IsOwner() (bool, error) { + return _EthCrossChainManager.Contract.IsOwner(&_EthCrossChainManager.CallOpts) +} + +// IsOwner is a free data retrieval call binding the contract method 0x8f32d59b. +// +// Solidity: function isOwner() view returns(bool) +func (_EthCrossChainManager *EthCrossChainManagerCallerSession) IsOwner() (bool, error) { + return _EthCrossChainManager.Contract.IsOwner(&_EthCrossChainManager.CallOpts) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_EthCrossChainManager *EthCrossChainManagerCaller) Owner(opts *bind.CallOpts) (common.Address, error) { + var ( + ret0 = new(common.Address) + ) + out := ret0 + err := _EthCrossChainManager.contract.Call(opts, out, "owner") + return *ret0, err +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_EthCrossChainManager *EthCrossChainManagerSession) Owner() (common.Address, error) { + return _EthCrossChainManager.Contract.Owner(&_EthCrossChainManager.CallOpts) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_EthCrossChainManager *EthCrossChainManagerCallerSession) Owner() (common.Address, error) { + return _EthCrossChainManager.Contract.Owner(&_EthCrossChainManager.CallOpts) +} + +// Paused is a free data retrieval call binding the contract method 0x5c975abb. +// +// Solidity: function paused() view returns(bool) +func (_EthCrossChainManager *EthCrossChainManagerCaller) Paused(opts *bind.CallOpts) (bool, error) { + var ( + ret0 = new(bool) + ) + out := ret0 + err := _EthCrossChainManager.contract.Call(opts, out, "paused") + return *ret0, err +} + +// Paused is a free data retrieval call binding the contract method 0x5c975abb. +// +// Solidity: function paused() view returns(bool) +func (_EthCrossChainManager *EthCrossChainManagerSession) Paused() (bool, error) { + return _EthCrossChainManager.Contract.Paused(&_EthCrossChainManager.CallOpts) +} + +// Paused is a free data retrieval call binding the contract method 0x5c975abb. +// +// Solidity: function paused() view returns(bool) +func (_EthCrossChainManager *EthCrossChainManagerCallerSession) Paused() (bool, error) { + return _EthCrossChainManager.Contract.Paused(&_EthCrossChainManager.CallOpts) +} + +// ChangeBookKeeper is a paid mutator transaction binding the contract method 0x29dcf4ab. +// +// Solidity: function changeBookKeeper(bytes rawHeader, bytes pubKeyList, bytes sigList) returns(bool) +func (_EthCrossChainManager *EthCrossChainManagerTransactor) ChangeBookKeeper(opts *bind.TransactOpts, rawHeader []byte, pubKeyList []byte, sigList []byte) (*types.Transaction, error) { + return _EthCrossChainManager.contract.Transact(opts, "changeBookKeeper", rawHeader, pubKeyList, sigList) +} + +// ChangeBookKeeper is a paid mutator transaction binding the contract method 0x29dcf4ab. +// +// Solidity: function changeBookKeeper(bytes rawHeader, bytes pubKeyList, bytes sigList) returns(bool) +func (_EthCrossChainManager *EthCrossChainManagerSession) ChangeBookKeeper(rawHeader []byte, pubKeyList []byte, sigList []byte) (*types.Transaction, error) { + return _EthCrossChainManager.Contract.ChangeBookKeeper(&_EthCrossChainManager.TransactOpts, rawHeader, pubKeyList, sigList) +} + +// ChangeBookKeeper is a paid mutator transaction binding the contract method 0x29dcf4ab. +// +// Solidity: function changeBookKeeper(bytes rawHeader, bytes pubKeyList, bytes sigList) returns(bool) +func (_EthCrossChainManager *EthCrossChainManagerTransactorSession) ChangeBookKeeper(rawHeader []byte, pubKeyList []byte, sigList []byte) (*types.Transaction, error) { + return _EthCrossChainManager.Contract.ChangeBookKeeper(&_EthCrossChainManager.TransactOpts, rawHeader, pubKeyList, sigList) +} + +// CrossChain is a paid mutator transaction binding the contract method 0xbd5cf625. +// +// Solidity: function crossChain(uint64 toChainId, bytes toContract, bytes method, bytes txData) returns(bool) +func (_EthCrossChainManager *EthCrossChainManagerTransactor) CrossChain(opts *bind.TransactOpts, toChainId uint64, toContract []byte, method []byte, txData []byte) (*types.Transaction, error) { + return _EthCrossChainManager.contract.Transact(opts, "crossChain", toChainId, toContract, method, txData) +} + +// CrossChain is a paid mutator transaction binding the contract method 0xbd5cf625. +// +// Solidity: function crossChain(uint64 toChainId, bytes toContract, bytes method, bytes txData) returns(bool) +func (_EthCrossChainManager *EthCrossChainManagerSession) CrossChain(toChainId uint64, toContract []byte, method []byte, txData []byte) (*types.Transaction, error) { + return _EthCrossChainManager.Contract.CrossChain(&_EthCrossChainManager.TransactOpts, toChainId, toContract, method, txData) +} + +// CrossChain is a paid mutator transaction binding the contract method 0xbd5cf625. +// +// Solidity: function crossChain(uint64 toChainId, bytes toContract, bytes method, bytes txData) returns(bool) +func (_EthCrossChainManager *EthCrossChainManagerTransactorSession) CrossChain(toChainId uint64, toContract []byte, method []byte, txData []byte) (*types.Transaction, error) { + return _EthCrossChainManager.Contract.CrossChain(&_EthCrossChainManager.TransactOpts, toChainId, toContract, method, txData) +} + +// InitGenesisBlock is a paid mutator transaction binding the contract method 0x34a773eb. +// +// Solidity: function initGenesisBlock(bytes rawHeader, bytes pubKeyList) returns(bool) +func (_EthCrossChainManager *EthCrossChainManagerTransactor) InitGenesisBlock(opts *bind.TransactOpts, rawHeader []byte, pubKeyList []byte) (*types.Transaction, error) { + return _EthCrossChainManager.contract.Transact(opts, "initGenesisBlock", rawHeader, pubKeyList) +} + +// InitGenesisBlock is a paid mutator transaction binding the contract method 0x34a773eb. +// +// Solidity: function initGenesisBlock(bytes rawHeader, bytes pubKeyList) returns(bool) +func (_EthCrossChainManager *EthCrossChainManagerSession) InitGenesisBlock(rawHeader []byte, pubKeyList []byte) (*types.Transaction, error) { + return _EthCrossChainManager.Contract.InitGenesisBlock(&_EthCrossChainManager.TransactOpts, rawHeader, pubKeyList) +} + +// InitGenesisBlock is a paid mutator transaction binding the contract method 0x34a773eb. +// +// Solidity: function initGenesisBlock(bytes rawHeader, bytes pubKeyList) returns(bool) +func (_EthCrossChainManager *EthCrossChainManagerTransactorSession) InitGenesisBlock(rawHeader []byte, pubKeyList []byte) (*types.Transaction, error) { + return _EthCrossChainManager.Contract.InitGenesisBlock(&_EthCrossChainManager.TransactOpts, rawHeader, pubKeyList) +} + +// Pause is a paid mutator transaction binding the contract method 0x8456cb59. +// +// Solidity: function pause() returns(bool) +func (_EthCrossChainManager *EthCrossChainManagerTransactor) Pause(opts *bind.TransactOpts) (*types.Transaction, error) { + return _EthCrossChainManager.contract.Transact(opts, "pause") +} + +// Pause is a paid mutator transaction binding the contract method 0x8456cb59. +// +// Solidity: function pause() returns(bool) +func (_EthCrossChainManager *EthCrossChainManagerSession) Pause() (*types.Transaction, error) { + return _EthCrossChainManager.Contract.Pause(&_EthCrossChainManager.TransactOpts) +} + +// Pause is a paid mutator transaction binding the contract method 0x8456cb59. +// +// Solidity: function pause() returns(bool) +func (_EthCrossChainManager *EthCrossChainManagerTransactorSession) Pause() (*types.Transaction, error) { + return _EthCrossChainManager.Contract.Pause(&_EthCrossChainManager.TransactOpts) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_EthCrossChainManager *EthCrossChainManagerTransactor) RenounceOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { + return _EthCrossChainManager.contract.Transact(opts, "renounceOwnership") +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_EthCrossChainManager *EthCrossChainManagerSession) RenounceOwnership() (*types.Transaction, error) { + return _EthCrossChainManager.Contract.RenounceOwnership(&_EthCrossChainManager.TransactOpts) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_EthCrossChainManager *EthCrossChainManagerTransactorSession) RenounceOwnership() (*types.Transaction, error) { + return _EthCrossChainManager.Contract.RenounceOwnership(&_EthCrossChainManager.TransactOpts) +} + +// SetChainId is a paid mutator transaction binding the contract method 0x6f31031d. +// +// Solidity: function setChainId(uint64 _newChainId) returns(bool) +func (_EthCrossChainManager *EthCrossChainManagerTransactor) SetChainId(opts *bind.TransactOpts, _newChainId uint64) (*types.Transaction, error) { + return _EthCrossChainManager.contract.Transact(opts, "setChainId", _newChainId) +} + +// SetChainId is a paid mutator transaction binding the contract method 0x6f31031d. +// +// Solidity: function setChainId(uint64 _newChainId) returns(bool) +func (_EthCrossChainManager *EthCrossChainManagerSession) SetChainId(_newChainId uint64) (*types.Transaction, error) { + return _EthCrossChainManager.Contract.SetChainId(&_EthCrossChainManager.TransactOpts, _newChainId) +} + +// SetChainId is a paid mutator transaction binding the contract method 0x6f31031d. +// +// Solidity: function setChainId(uint64 _newChainId) returns(bool) +func (_EthCrossChainManager *EthCrossChainManagerTransactorSession) SetChainId(_newChainId uint64) (*types.Transaction, error) { + return _EthCrossChainManager.Contract.SetChainId(&_EthCrossChainManager.TransactOpts, _newChainId) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_EthCrossChainManager *EthCrossChainManagerTransactor) TransferOwnership(opts *bind.TransactOpts, newOwner common.Address) (*types.Transaction, error) { + return _EthCrossChainManager.contract.Transact(opts, "transferOwnership", newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_EthCrossChainManager *EthCrossChainManagerSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _EthCrossChainManager.Contract.TransferOwnership(&_EthCrossChainManager.TransactOpts, newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_EthCrossChainManager *EthCrossChainManagerTransactorSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _EthCrossChainManager.Contract.TransferOwnership(&_EthCrossChainManager.TransactOpts, newOwner) +} + +// Unpause is a paid mutator transaction binding the contract method 0x3f4ba83a. +// +// Solidity: function unpause() returns(bool) +func (_EthCrossChainManager *EthCrossChainManagerTransactor) Unpause(opts *bind.TransactOpts) (*types.Transaction, error) { + return _EthCrossChainManager.contract.Transact(opts, "unpause") +} + +// Unpause is a paid mutator transaction binding the contract method 0x3f4ba83a. +// +// Solidity: function unpause() returns(bool) +func (_EthCrossChainManager *EthCrossChainManagerSession) Unpause() (*types.Transaction, error) { + return _EthCrossChainManager.Contract.Unpause(&_EthCrossChainManager.TransactOpts) +} + +// Unpause is a paid mutator transaction binding the contract method 0x3f4ba83a. +// +// Solidity: function unpause() returns(bool) +func (_EthCrossChainManager *EthCrossChainManagerTransactorSession) Unpause() (*types.Transaction, error) { + return _EthCrossChainManager.Contract.Unpause(&_EthCrossChainManager.TransactOpts) +} + +// UpgradeToNew is a paid mutator transaction binding the contract method 0x7e724ff3. +// +// Solidity: function upgradeToNew(address newEthCrossChainManagerAddress) returns(bool) +func (_EthCrossChainManager *EthCrossChainManagerTransactor) UpgradeToNew(opts *bind.TransactOpts, newEthCrossChainManagerAddress common.Address) (*types.Transaction, error) { + return _EthCrossChainManager.contract.Transact(opts, "upgradeToNew", newEthCrossChainManagerAddress) +} + +// UpgradeToNew is a paid mutator transaction binding the contract method 0x7e724ff3. +// +// Solidity: function upgradeToNew(address newEthCrossChainManagerAddress) returns(bool) +func (_EthCrossChainManager *EthCrossChainManagerSession) UpgradeToNew(newEthCrossChainManagerAddress common.Address) (*types.Transaction, error) { + return _EthCrossChainManager.Contract.UpgradeToNew(&_EthCrossChainManager.TransactOpts, newEthCrossChainManagerAddress) +} + +// UpgradeToNew is a paid mutator transaction binding the contract method 0x7e724ff3. +// +// Solidity: function upgradeToNew(address newEthCrossChainManagerAddress) returns(bool) +func (_EthCrossChainManager *EthCrossChainManagerTransactorSession) UpgradeToNew(newEthCrossChainManagerAddress common.Address) (*types.Transaction, error) { + return _EthCrossChainManager.Contract.UpgradeToNew(&_EthCrossChainManager.TransactOpts, newEthCrossChainManagerAddress) +} + +// VerifyHeaderAndExecuteTx is a paid mutator transaction binding the contract method 0xd450e04c. +// +// Solidity: function verifyHeaderAndExecuteTx(bytes proof, bytes rawHeader, bytes headerProof, bytes curRawHeader, bytes headerSig) returns(bool) +func (_EthCrossChainManager *EthCrossChainManagerTransactor) VerifyHeaderAndExecuteTx(opts *bind.TransactOpts, proof []byte, rawHeader []byte, headerProof []byte, curRawHeader []byte, headerSig []byte) (*types.Transaction, error) { + return _EthCrossChainManager.contract.Transact(opts, "verifyHeaderAndExecuteTx", proof, rawHeader, headerProof, curRawHeader, headerSig) +} + +// VerifyHeaderAndExecuteTx is a paid mutator transaction binding the contract method 0xd450e04c. +// +// Solidity: function verifyHeaderAndExecuteTx(bytes proof, bytes rawHeader, bytes headerProof, bytes curRawHeader, bytes headerSig) returns(bool) +func (_EthCrossChainManager *EthCrossChainManagerSession) VerifyHeaderAndExecuteTx(proof []byte, rawHeader []byte, headerProof []byte, curRawHeader []byte, headerSig []byte) (*types.Transaction, error) { + return _EthCrossChainManager.Contract.VerifyHeaderAndExecuteTx(&_EthCrossChainManager.TransactOpts, proof, rawHeader, headerProof, curRawHeader, headerSig) +} + +// VerifyHeaderAndExecuteTx is a paid mutator transaction binding the contract method 0xd450e04c. +// +// Solidity: function verifyHeaderAndExecuteTx(bytes proof, bytes rawHeader, bytes headerProof, bytes curRawHeader, bytes headerSig) returns(bool) +func (_EthCrossChainManager *EthCrossChainManagerTransactorSession) VerifyHeaderAndExecuteTx(proof []byte, rawHeader []byte, headerProof []byte, curRawHeader []byte, headerSig []byte) (*types.Transaction, error) { + return _EthCrossChainManager.Contract.VerifyHeaderAndExecuteTx(&_EthCrossChainManager.TransactOpts, proof, rawHeader, headerProof, curRawHeader, headerSig) +} + +// EthCrossChainManagerChangeBookKeeperEventIterator is returned from FilterChangeBookKeeperEvent and is used to iterate over the raw logs and unpacked data for ChangeBookKeeperEvent events raised by the EthCrossChainManager contract. +type EthCrossChainManagerChangeBookKeeperEventIterator struct { + Event *EthCrossChainManagerChangeBookKeeperEvent // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *EthCrossChainManagerChangeBookKeeperEventIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(EthCrossChainManagerChangeBookKeeperEvent) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(EthCrossChainManagerChangeBookKeeperEvent) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *EthCrossChainManagerChangeBookKeeperEventIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *EthCrossChainManagerChangeBookKeeperEventIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// EthCrossChainManagerChangeBookKeeperEvent represents a ChangeBookKeeperEvent event raised by the EthCrossChainManager contract. +type EthCrossChainManagerChangeBookKeeperEvent struct { + Height *big.Int + RawHeader []byte + Raw types.Log // Blockchain specific contextual infos +} + +// FilterChangeBookKeeperEvent is a free log retrieval operation binding the contract event 0xe60d33488cba3977bf65766cd2f8ac9617f64bf3b3198aff6240ce5c7d43b690. +// +// Solidity: event ChangeBookKeeperEvent(uint256 height, bytes rawHeader) +func (_EthCrossChainManager *EthCrossChainManagerFilterer) FilterChangeBookKeeperEvent(opts *bind.FilterOpts) (*EthCrossChainManagerChangeBookKeeperEventIterator, error) { + + logs, sub, err := _EthCrossChainManager.contract.FilterLogs(opts, "ChangeBookKeeperEvent") + if err != nil { + return nil, err + } + return &EthCrossChainManagerChangeBookKeeperEventIterator{contract: _EthCrossChainManager.contract, event: "ChangeBookKeeperEvent", logs: logs, sub: sub}, nil +} + +// WatchChangeBookKeeperEvent is a free log subscription operation binding the contract event 0xe60d33488cba3977bf65766cd2f8ac9617f64bf3b3198aff6240ce5c7d43b690. +// +// Solidity: event ChangeBookKeeperEvent(uint256 height, bytes rawHeader) +func (_EthCrossChainManager *EthCrossChainManagerFilterer) WatchChangeBookKeeperEvent(opts *bind.WatchOpts, sink chan<- *EthCrossChainManagerChangeBookKeeperEvent) (event.Subscription, error) { + + logs, sub, err := _EthCrossChainManager.contract.WatchLogs(opts, "ChangeBookKeeperEvent") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(EthCrossChainManagerChangeBookKeeperEvent) + if err := _EthCrossChainManager.contract.UnpackLog(event, "ChangeBookKeeperEvent", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseChangeBookKeeperEvent is a log parse operation binding the contract event 0xe60d33488cba3977bf65766cd2f8ac9617f64bf3b3198aff6240ce5c7d43b690. +// +// Solidity: event ChangeBookKeeperEvent(uint256 height, bytes rawHeader) +func (_EthCrossChainManager *EthCrossChainManagerFilterer) ParseChangeBookKeeperEvent(log types.Log) (*EthCrossChainManagerChangeBookKeeperEvent, error) { + event := new(EthCrossChainManagerChangeBookKeeperEvent) + if err := _EthCrossChainManager.contract.UnpackLog(event, "ChangeBookKeeperEvent", log); err != nil { + return nil, err + } + return event, nil +} + +// EthCrossChainManagerCrossChainEventIterator is returned from FilterCrossChainEvent and is used to iterate over the raw logs and unpacked data for CrossChainEvent events raised by the EthCrossChainManager contract. +type EthCrossChainManagerCrossChainEventIterator struct { + Event *EthCrossChainManagerCrossChainEvent // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *EthCrossChainManagerCrossChainEventIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(EthCrossChainManagerCrossChainEvent) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(EthCrossChainManagerCrossChainEvent) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *EthCrossChainManagerCrossChainEventIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *EthCrossChainManagerCrossChainEventIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// EthCrossChainManagerCrossChainEvent represents a CrossChainEvent event raised by the EthCrossChainManager contract. +type EthCrossChainManagerCrossChainEvent struct { + Sender common.Address + TxId []byte + ProxyOrAssetContract common.Address + ToChainId uint64 + ToContract []byte + Rawdata []byte + Raw types.Log // Blockchain specific contextual infos +} + +// FilterCrossChainEvent is a free log retrieval operation binding the contract event 0x6ad3bf15c1988bc04bc153490cab16db8efb9a3990215bf1c64ea6e28be88483. +// +// Solidity: event CrossChainEvent(address indexed sender, bytes txId, address proxyOrAssetContract, uint64 toChainId, bytes toContract, bytes rawdata) +func (_EthCrossChainManager *EthCrossChainManagerFilterer) FilterCrossChainEvent(opts *bind.FilterOpts, sender []common.Address) (*EthCrossChainManagerCrossChainEventIterator, error) { + + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) + } + + logs, sub, err := _EthCrossChainManager.contract.FilterLogs(opts, "CrossChainEvent", senderRule) + if err != nil { + return nil, err + } + return &EthCrossChainManagerCrossChainEventIterator{contract: _EthCrossChainManager.contract, event: "CrossChainEvent", logs: logs, sub: sub}, nil +} + +// WatchCrossChainEvent is a free log subscription operation binding the contract event 0x6ad3bf15c1988bc04bc153490cab16db8efb9a3990215bf1c64ea6e28be88483. +// +// Solidity: event CrossChainEvent(address indexed sender, bytes txId, address proxyOrAssetContract, uint64 toChainId, bytes toContract, bytes rawdata) +func (_EthCrossChainManager *EthCrossChainManagerFilterer) WatchCrossChainEvent(opts *bind.WatchOpts, sink chan<- *EthCrossChainManagerCrossChainEvent, sender []common.Address) (event.Subscription, error) { + + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) + } + + logs, sub, err := _EthCrossChainManager.contract.WatchLogs(opts, "CrossChainEvent", senderRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(EthCrossChainManagerCrossChainEvent) + if err := _EthCrossChainManager.contract.UnpackLog(event, "CrossChainEvent", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseCrossChainEvent is a log parse operation binding the contract event 0x6ad3bf15c1988bc04bc153490cab16db8efb9a3990215bf1c64ea6e28be88483. +// +// Solidity: event CrossChainEvent(address indexed sender, bytes txId, address proxyOrAssetContract, uint64 toChainId, bytes toContract, bytes rawdata) +func (_EthCrossChainManager *EthCrossChainManagerFilterer) ParseCrossChainEvent(log types.Log) (*EthCrossChainManagerCrossChainEvent, error) { + event := new(EthCrossChainManagerCrossChainEvent) + if err := _EthCrossChainManager.contract.UnpackLog(event, "CrossChainEvent", log); err != nil { + return nil, err + } + return event, nil +} + +// EthCrossChainManagerInitGenesisBlockEventIterator is returned from FilterInitGenesisBlockEvent and is used to iterate over the raw logs and unpacked data for InitGenesisBlockEvent events raised by the EthCrossChainManager contract. +type EthCrossChainManagerInitGenesisBlockEventIterator struct { + Event *EthCrossChainManagerInitGenesisBlockEvent // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *EthCrossChainManagerInitGenesisBlockEventIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(EthCrossChainManagerInitGenesisBlockEvent) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(EthCrossChainManagerInitGenesisBlockEvent) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *EthCrossChainManagerInitGenesisBlockEventIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *EthCrossChainManagerInitGenesisBlockEventIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// EthCrossChainManagerInitGenesisBlockEvent represents a InitGenesisBlockEvent event raised by the EthCrossChainManager contract. +type EthCrossChainManagerInitGenesisBlockEvent struct { + Height *big.Int + RawHeader []byte + Raw types.Log // Blockchain specific contextual infos +} + +// FilterInitGenesisBlockEvent is a free log retrieval operation binding the contract event 0xf01968fc3a2655cf1b5144cb32de6dc898f91b9239c103744e8457152ab2fbde. +// +// Solidity: event InitGenesisBlockEvent(uint256 height, bytes rawHeader) +func (_EthCrossChainManager *EthCrossChainManagerFilterer) FilterInitGenesisBlockEvent(opts *bind.FilterOpts) (*EthCrossChainManagerInitGenesisBlockEventIterator, error) { + + logs, sub, err := _EthCrossChainManager.contract.FilterLogs(opts, "InitGenesisBlockEvent") + if err != nil { + return nil, err + } + return &EthCrossChainManagerInitGenesisBlockEventIterator{contract: _EthCrossChainManager.contract, event: "InitGenesisBlockEvent", logs: logs, sub: sub}, nil +} + +// WatchInitGenesisBlockEvent is a free log subscription operation binding the contract event 0xf01968fc3a2655cf1b5144cb32de6dc898f91b9239c103744e8457152ab2fbde. +// +// Solidity: event InitGenesisBlockEvent(uint256 height, bytes rawHeader) +func (_EthCrossChainManager *EthCrossChainManagerFilterer) WatchInitGenesisBlockEvent(opts *bind.WatchOpts, sink chan<- *EthCrossChainManagerInitGenesisBlockEvent) (event.Subscription, error) { + + logs, sub, err := _EthCrossChainManager.contract.WatchLogs(opts, "InitGenesisBlockEvent") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(EthCrossChainManagerInitGenesisBlockEvent) + if err := _EthCrossChainManager.contract.UnpackLog(event, "InitGenesisBlockEvent", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseInitGenesisBlockEvent is a log parse operation binding the contract event 0xf01968fc3a2655cf1b5144cb32de6dc898f91b9239c103744e8457152ab2fbde. +// +// Solidity: event InitGenesisBlockEvent(uint256 height, bytes rawHeader) +func (_EthCrossChainManager *EthCrossChainManagerFilterer) ParseInitGenesisBlockEvent(log types.Log) (*EthCrossChainManagerInitGenesisBlockEvent, error) { + event := new(EthCrossChainManagerInitGenesisBlockEvent) + if err := _EthCrossChainManager.contract.UnpackLog(event, "InitGenesisBlockEvent", log); err != nil { + return nil, err + } + return event, nil +} + +// EthCrossChainManagerOwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the EthCrossChainManager contract. +type EthCrossChainManagerOwnershipTransferredIterator struct { + Event *EthCrossChainManagerOwnershipTransferred // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *EthCrossChainManagerOwnershipTransferredIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(EthCrossChainManagerOwnershipTransferred) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(EthCrossChainManagerOwnershipTransferred) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *EthCrossChainManagerOwnershipTransferredIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *EthCrossChainManagerOwnershipTransferredIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// EthCrossChainManagerOwnershipTransferred represents a OwnershipTransferred event raised by the EthCrossChainManager contract. +type EthCrossChainManagerOwnershipTransferred struct { + PreviousOwner common.Address + NewOwner common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterOwnershipTransferred is a free log retrieval operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_EthCrossChainManager *EthCrossChainManagerFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*EthCrossChainManagerOwnershipTransferredIterator, error) { + + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + } + var newOwnerRule []interface{} + for _, newOwnerItem := range newOwner { + newOwnerRule = append(newOwnerRule, newOwnerItem) + } + + logs, sub, err := _EthCrossChainManager.contract.FilterLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return &EthCrossChainManagerOwnershipTransferredIterator{contract: _EthCrossChainManager.contract, event: "OwnershipTransferred", logs: logs, sub: sub}, nil +} + +// WatchOwnershipTransferred is a free log subscription operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_EthCrossChainManager *EthCrossChainManagerFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *EthCrossChainManagerOwnershipTransferred, previousOwner []common.Address, newOwner []common.Address) (event.Subscription, error) { + + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + } + var newOwnerRule []interface{} + for _, newOwnerItem := range newOwner { + newOwnerRule = append(newOwnerRule, newOwnerItem) + } + + logs, sub, err := _EthCrossChainManager.contract.WatchLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(EthCrossChainManagerOwnershipTransferred) + if err := _EthCrossChainManager.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseOwnershipTransferred is a log parse operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_EthCrossChainManager *EthCrossChainManagerFilterer) ParseOwnershipTransferred(log types.Log) (*EthCrossChainManagerOwnershipTransferred, error) { + event := new(EthCrossChainManagerOwnershipTransferred) + if err := _EthCrossChainManager.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return nil, err + } + return event, nil +} + +// EthCrossChainManagerPausedIterator is returned from FilterPaused and is used to iterate over the raw logs and unpacked data for Paused events raised by the EthCrossChainManager contract. +type EthCrossChainManagerPausedIterator struct { + Event *EthCrossChainManagerPaused // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *EthCrossChainManagerPausedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(EthCrossChainManagerPaused) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(EthCrossChainManagerPaused) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *EthCrossChainManagerPausedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *EthCrossChainManagerPausedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// EthCrossChainManagerPaused represents a Paused event raised by the EthCrossChainManager contract. +type EthCrossChainManagerPaused struct { + Account common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterPaused is a free log retrieval operation binding the contract event 0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258. +// +// Solidity: event Paused(address account) +func (_EthCrossChainManager *EthCrossChainManagerFilterer) FilterPaused(opts *bind.FilterOpts) (*EthCrossChainManagerPausedIterator, error) { + + logs, sub, err := _EthCrossChainManager.contract.FilterLogs(opts, "Paused") + if err != nil { + return nil, err + } + return &EthCrossChainManagerPausedIterator{contract: _EthCrossChainManager.contract, event: "Paused", logs: logs, sub: sub}, nil +} + +// WatchPaused is a free log subscription operation binding the contract event 0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258. +// +// Solidity: event Paused(address account) +func (_EthCrossChainManager *EthCrossChainManagerFilterer) WatchPaused(opts *bind.WatchOpts, sink chan<- *EthCrossChainManagerPaused) (event.Subscription, error) { + + logs, sub, err := _EthCrossChainManager.contract.WatchLogs(opts, "Paused") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(EthCrossChainManagerPaused) + if err := _EthCrossChainManager.contract.UnpackLog(event, "Paused", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParsePaused is a log parse operation binding the contract event 0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258. +// +// Solidity: event Paused(address account) +func (_EthCrossChainManager *EthCrossChainManagerFilterer) ParsePaused(log types.Log) (*EthCrossChainManagerPaused, error) { + event := new(EthCrossChainManagerPaused) + if err := _EthCrossChainManager.contract.UnpackLog(event, "Paused", log); err != nil { + return nil, err + } + return event, nil +} + +// EthCrossChainManagerUnpausedIterator is returned from FilterUnpaused and is used to iterate over the raw logs and unpacked data for Unpaused events raised by the EthCrossChainManager contract. +type EthCrossChainManagerUnpausedIterator struct { + Event *EthCrossChainManagerUnpaused // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *EthCrossChainManagerUnpausedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(EthCrossChainManagerUnpaused) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(EthCrossChainManagerUnpaused) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *EthCrossChainManagerUnpausedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *EthCrossChainManagerUnpausedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// EthCrossChainManagerUnpaused represents a Unpaused event raised by the EthCrossChainManager contract. +type EthCrossChainManagerUnpaused struct { + Account common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterUnpaused is a free log retrieval operation binding the contract event 0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa. +// +// Solidity: event Unpaused(address account) +func (_EthCrossChainManager *EthCrossChainManagerFilterer) FilterUnpaused(opts *bind.FilterOpts) (*EthCrossChainManagerUnpausedIterator, error) { + + logs, sub, err := _EthCrossChainManager.contract.FilterLogs(opts, "Unpaused") + if err != nil { + return nil, err + } + return &EthCrossChainManagerUnpausedIterator{contract: _EthCrossChainManager.contract, event: "Unpaused", logs: logs, sub: sub}, nil +} + +// WatchUnpaused is a free log subscription operation binding the contract event 0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa. +// +// Solidity: event Unpaused(address account) +func (_EthCrossChainManager *EthCrossChainManagerFilterer) WatchUnpaused(opts *bind.WatchOpts, sink chan<- *EthCrossChainManagerUnpaused) (event.Subscription, error) { + + logs, sub, err := _EthCrossChainManager.contract.WatchLogs(opts, "Unpaused") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(EthCrossChainManagerUnpaused) + if err := _EthCrossChainManager.contract.UnpackLog(event, "Unpaused", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseUnpaused is a log parse operation binding the contract event 0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa. +// +// Solidity: event Unpaused(address account) +func (_EthCrossChainManager *EthCrossChainManagerFilterer) ParseUnpaused(log types.Log) (*EthCrossChainManagerUnpaused, error) { + event := new(EthCrossChainManagerUnpaused) + if err := _EthCrossChainManager.contract.UnpackLog(event, "Unpaused", log); err != nil { + return nil, err + } + return event, nil +} + +// EthCrossChainManagerVerifyHeaderAndExecuteTxEventIterator is returned from FilterVerifyHeaderAndExecuteTxEvent and is used to iterate over the raw logs and unpacked data for VerifyHeaderAndExecuteTxEvent events raised by the EthCrossChainManager contract. +type EthCrossChainManagerVerifyHeaderAndExecuteTxEventIterator struct { + Event *EthCrossChainManagerVerifyHeaderAndExecuteTxEvent // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *EthCrossChainManagerVerifyHeaderAndExecuteTxEventIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(EthCrossChainManagerVerifyHeaderAndExecuteTxEvent) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(EthCrossChainManagerVerifyHeaderAndExecuteTxEvent) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *EthCrossChainManagerVerifyHeaderAndExecuteTxEventIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *EthCrossChainManagerVerifyHeaderAndExecuteTxEventIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// EthCrossChainManagerVerifyHeaderAndExecuteTxEvent represents a VerifyHeaderAndExecuteTxEvent event raised by the EthCrossChainManager contract. +type EthCrossChainManagerVerifyHeaderAndExecuteTxEvent struct { + FromChainID uint64 + ToContract []byte + CrossChainTxHash []byte + FromChainTxHash []byte + Raw types.Log // Blockchain specific contextual infos +} + +// FilterVerifyHeaderAndExecuteTxEvent is a free log retrieval operation binding the contract event 0x8a4a2663ce60ce4955c595da2894de0415240f1ace024cfbff85f513b656bdae. +// +// Solidity: event VerifyHeaderAndExecuteTxEvent(uint64 fromChainID, bytes toContract, bytes crossChainTxHash, bytes fromChainTxHash) +func (_EthCrossChainManager *EthCrossChainManagerFilterer) FilterVerifyHeaderAndExecuteTxEvent(opts *bind.FilterOpts) (*EthCrossChainManagerVerifyHeaderAndExecuteTxEventIterator, error) { + + logs, sub, err := _EthCrossChainManager.contract.FilterLogs(opts, "VerifyHeaderAndExecuteTxEvent") + if err != nil { + return nil, err + } + return &EthCrossChainManagerVerifyHeaderAndExecuteTxEventIterator{contract: _EthCrossChainManager.contract, event: "VerifyHeaderAndExecuteTxEvent", logs: logs, sub: sub}, nil +} + +// WatchVerifyHeaderAndExecuteTxEvent is a free log subscription operation binding the contract event 0x8a4a2663ce60ce4955c595da2894de0415240f1ace024cfbff85f513b656bdae. +// +// Solidity: event VerifyHeaderAndExecuteTxEvent(uint64 fromChainID, bytes toContract, bytes crossChainTxHash, bytes fromChainTxHash) +func (_EthCrossChainManager *EthCrossChainManagerFilterer) WatchVerifyHeaderAndExecuteTxEvent(opts *bind.WatchOpts, sink chan<- *EthCrossChainManagerVerifyHeaderAndExecuteTxEvent) (event.Subscription, error) { + + logs, sub, err := _EthCrossChainManager.contract.WatchLogs(opts, "VerifyHeaderAndExecuteTxEvent") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(EthCrossChainManagerVerifyHeaderAndExecuteTxEvent) + if err := _EthCrossChainManager.contract.UnpackLog(event, "VerifyHeaderAndExecuteTxEvent", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseVerifyHeaderAndExecuteTxEvent is a log parse operation binding the contract event 0x8a4a2663ce60ce4955c595da2894de0415240f1ace024cfbff85f513b656bdae. +// +// Solidity: event VerifyHeaderAndExecuteTxEvent(uint64 fromChainID, bytes toContract, bytes crossChainTxHash, bytes fromChainTxHash) +func (_EthCrossChainManager *EthCrossChainManagerFilterer) ParseVerifyHeaderAndExecuteTxEvent(log types.Log) (*EthCrossChainManagerVerifyHeaderAndExecuteTxEvent, error) { + event := new(EthCrossChainManagerVerifyHeaderAndExecuteTxEvent) + if err := _EthCrossChainManager.contract.UnpackLog(event, "VerifyHeaderAndExecuteTxEvent", log); err != nil { + return nil, err + } + return event, nil +} + +// IEthCrossChainDataABI is the input ABI used to generate the binding from. +const IEthCrossChainDataABI = "[{\"constant\":true,\"inputs\":[{\"name\":\"fromChainId\",\"type\":\"uint64\"},{\"name\":\"fromChainTx\",\"type\":\"bytes32\"}],\"name\":\"checkIfFromChainTxExist\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"key1\",\"type\":\"bytes32\"},{\"name\":\"key2\",\"type\":\"bytes32\"},{\"name\":\"value\",\"type\":\"bytes\"}],\"name\":\"putExtraData\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"ethTxHashIndex\",\"type\":\"uint256\"}],\"name\":\"getEthTxHash\",\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"unpause\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"key1\",\"type\":\"bytes32\"},{\"name\":\"key2\",\"type\":\"bytes32\"}],\"name\":\"getExtraData\",\"outputs\":[{\"name\":\"\",\"type\":\"bytes\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"curEpochPkBytes\",\"type\":\"bytes\"}],\"name\":\"putCurEpochConPubKeyBytes\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"ethTxHash\",\"type\":\"bytes32\"}],\"name\":\"putEthTxHash\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"getCurEpochStartHeight\",\"outputs\":[{\"name\":\"\",\"type\":\"uint32\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"getCurEpochConPubKeyBytes\",\"outputs\":[{\"name\":\"\",\"type\":\"bytes\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"pause\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"curEpochStartHeight\",\"type\":\"uint32\"}],\"name\":\"putCurEpochStartHeight\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"fromChainId\",\"type\":\"uint64\"},{\"name\":\"fromChainTx\",\"type\":\"bytes32\"}],\"name\":\"markFromChainTxExist\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"getEthTxHashIndex\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"}]" + +// IEthCrossChainDataFuncSigs maps the 4-byte function signature to its string representation. +var IEthCrossChainDataFuncSigs = map[string]string{ + "0586763c": "checkIfFromChainTxExist(uint64,bytes32)", + "69d48074": "getCurEpochConPubKeyBytes()", + "5ac40790": "getCurEpochStartHeight()", + "29927875": "getEthTxHash(uint256)", + "ff3d24a1": "getEthTxHashIndex()", + "40602bb5": "getExtraData(bytes32,bytes32)", + "e90bfdcf": "markFromChainTxExist(uint64,bytes32)", + "8456cb59": "pause()", + "5c975abb": "paused()", + "41973cd9": "putCurEpochConPubKeyBytes(bytes)", + "8a8bd17f": "putCurEpochStartHeight(uint32)", + "4c3ccf64": "putEthTxHash(bytes32)", + "1afe374e": "putExtraData(bytes32,bytes32,bytes)", + "f2fde38b": "transferOwnership(address)", + "3f4ba83a": "unpause()", +} + +// IEthCrossChainData is an auto generated Go binding around an Ethereum contract. +type IEthCrossChainData struct { + IEthCrossChainDataCaller // Read-only binding to the contract + IEthCrossChainDataTransactor // Write-only binding to the contract + IEthCrossChainDataFilterer // Log filterer for contract events +} + +// IEthCrossChainDataCaller is an auto generated read-only Go binding around an Ethereum contract. +type IEthCrossChainDataCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// IEthCrossChainDataTransactor is an auto generated write-only Go binding around an Ethereum contract. +type IEthCrossChainDataTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// IEthCrossChainDataFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type IEthCrossChainDataFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// IEthCrossChainDataSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type IEthCrossChainDataSession struct { + Contract *IEthCrossChainData // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// IEthCrossChainDataCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type IEthCrossChainDataCallerSession struct { + Contract *IEthCrossChainDataCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// IEthCrossChainDataTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type IEthCrossChainDataTransactorSession struct { + Contract *IEthCrossChainDataTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// IEthCrossChainDataRaw is an auto generated low-level Go binding around an Ethereum contract. +type IEthCrossChainDataRaw struct { + Contract *IEthCrossChainData // Generic contract binding to access the raw methods on +} + +// IEthCrossChainDataCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type IEthCrossChainDataCallerRaw struct { + Contract *IEthCrossChainDataCaller // Generic read-only contract binding to access the raw methods on +} + +// IEthCrossChainDataTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type IEthCrossChainDataTransactorRaw struct { + Contract *IEthCrossChainDataTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewIEthCrossChainData creates a new instance of IEthCrossChainData, bound to a specific deployed contract. +func NewIEthCrossChainData(address common.Address, backend bind.ContractBackend) (*IEthCrossChainData, error) { + contract, err := bindIEthCrossChainData(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &IEthCrossChainData{IEthCrossChainDataCaller: IEthCrossChainDataCaller{contract: contract}, IEthCrossChainDataTransactor: IEthCrossChainDataTransactor{contract: contract}, IEthCrossChainDataFilterer: IEthCrossChainDataFilterer{contract: contract}}, nil +} + +// NewIEthCrossChainDataCaller creates a new read-only instance of IEthCrossChainData, bound to a specific deployed contract. +func NewIEthCrossChainDataCaller(address common.Address, caller bind.ContractCaller) (*IEthCrossChainDataCaller, error) { + contract, err := bindIEthCrossChainData(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &IEthCrossChainDataCaller{contract: contract}, nil +} + +// NewIEthCrossChainDataTransactor creates a new write-only instance of IEthCrossChainData, bound to a specific deployed contract. +func NewIEthCrossChainDataTransactor(address common.Address, transactor bind.ContractTransactor) (*IEthCrossChainDataTransactor, error) { + contract, err := bindIEthCrossChainData(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &IEthCrossChainDataTransactor{contract: contract}, nil +} + +// NewIEthCrossChainDataFilterer creates a new log filterer instance of IEthCrossChainData, bound to a specific deployed contract. +func NewIEthCrossChainDataFilterer(address common.Address, filterer bind.ContractFilterer) (*IEthCrossChainDataFilterer, error) { + contract, err := bindIEthCrossChainData(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &IEthCrossChainDataFilterer{contract: contract}, nil +} + +// bindIEthCrossChainData binds a generic wrapper to an already deployed contract. +func bindIEthCrossChainData(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := abi.JSON(strings.NewReader(IEthCrossChainDataABI)) + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_IEthCrossChainData *IEthCrossChainDataRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { + return _IEthCrossChainData.Contract.IEthCrossChainDataCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_IEthCrossChainData *IEthCrossChainDataRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _IEthCrossChainData.Contract.IEthCrossChainDataTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_IEthCrossChainData *IEthCrossChainDataRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _IEthCrossChainData.Contract.IEthCrossChainDataTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_IEthCrossChainData *IEthCrossChainDataCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { + return _IEthCrossChainData.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_IEthCrossChainData *IEthCrossChainDataTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _IEthCrossChainData.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_IEthCrossChainData *IEthCrossChainDataTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _IEthCrossChainData.Contract.contract.Transact(opts, method, params...) +} + +// CheckIfFromChainTxExist is a free data retrieval call binding the contract method 0x0586763c. +// +// Solidity: function checkIfFromChainTxExist(uint64 fromChainId, bytes32 fromChainTx) view returns(bool) +func (_IEthCrossChainData *IEthCrossChainDataCaller) CheckIfFromChainTxExist(opts *bind.CallOpts, fromChainId uint64, fromChainTx [32]byte) (bool, error) { + var ( + ret0 = new(bool) + ) + out := ret0 + err := _IEthCrossChainData.contract.Call(opts, out, "checkIfFromChainTxExist", fromChainId, fromChainTx) + return *ret0, err +} + +// CheckIfFromChainTxExist is a free data retrieval call binding the contract method 0x0586763c. +// +// Solidity: function checkIfFromChainTxExist(uint64 fromChainId, bytes32 fromChainTx) view returns(bool) +func (_IEthCrossChainData *IEthCrossChainDataSession) CheckIfFromChainTxExist(fromChainId uint64, fromChainTx [32]byte) (bool, error) { + return _IEthCrossChainData.Contract.CheckIfFromChainTxExist(&_IEthCrossChainData.CallOpts, fromChainId, fromChainTx) +} + +// CheckIfFromChainTxExist is a free data retrieval call binding the contract method 0x0586763c. +// +// Solidity: function checkIfFromChainTxExist(uint64 fromChainId, bytes32 fromChainTx) view returns(bool) +func (_IEthCrossChainData *IEthCrossChainDataCallerSession) CheckIfFromChainTxExist(fromChainId uint64, fromChainTx [32]byte) (bool, error) { + return _IEthCrossChainData.Contract.CheckIfFromChainTxExist(&_IEthCrossChainData.CallOpts, fromChainId, fromChainTx) +} + +// GetCurEpochConPubKeyBytes is a free data retrieval call binding the contract method 0x69d48074. +// +// Solidity: function getCurEpochConPubKeyBytes() view returns(bytes) +func (_IEthCrossChainData *IEthCrossChainDataCaller) GetCurEpochConPubKeyBytes(opts *bind.CallOpts) ([]byte, error) { + var ( + ret0 = new([]byte) + ) + out := ret0 + err := _IEthCrossChainData.contract.Call(opts, out, "getCurEpochConPubKeyBytes") + return *ret0, err +} + +// GetCurEpochConPubKeyBytes is a free data retrieval call binding the contract method 0x69d48074. +// +// Solidity: function getCurEpochConPubKeyBytes() view returns(bytes) +func (_IEthCrossChainData *IEthCrossChainDataSession) GetCurEpochConPubKeyBytes() ([]byte, error) { + return _IEthCrossChainData.Contract.GetCurEpochConPubKeyBytes(&_IEthCrossChainData.CallOpts) +} + +// GetCurEpochConPubKeyBytes is a free data retrieval call binding the contract method 0x69d48074. +// +// Solidity: function getCurEpochConPubKeyBytes() view returns(bytes) +func (_IEthCrossChainData *IEthCrossChainDataCallerSession) GetCurEpochConPubKeyBytes() ([]byte, error) { + return _IEthCrossChainData.Contract.GetCurEpochConPubKeyBytes(&_IEthCrossChainData.CallOpts) +} + +// GetCurEpochStartHeight is a free data retrieval call binding the contract method 0x5ac40790. +// +// Solidity: function getCurEpochStartHeight() view returns(uint32) +func (_IEthCrossChainData *IEthCrossChainDataCaller) GetCurEpochStartHeight(opts *bind.CallOpts) (uint32, error) { + var ( + ret0 = new(uint32) + ) + out := ret0 + err := _IEthCrossChainData.contract.Call(opts, out, "getCurEpochStartHeight") + return *ret0, err +} + +// GetCurEpochStartHeight is a free data retrieval call binding the contract method 0x5ac40790. +// +// Solidity: function getCurEpochStartHeight() view returns(uint32) +func (_IEthCrossChainData *IEthCrossChainDataSession) GetCurEpochStartHeight() (uint32, error) { + return _IEthCrossChainData.Contract.GetCurEpochStartHeight(&_IEthCrossChainData.CallOpts) +} + +// GetCurEpochStartHeight is a free data retrieval call binding the contract method 0x5ac40790. +// +// Solidity: function getCurEpochStartHeight() view returns(uint32) +func (_IEthCrossChainData *IEthCrossChainDataCallerSession) GetCurEpochStartHeight() (uint32, error) { + return _IEthCrossChainData.Contract.GetCurEpochStartHeight(&_IEthCrossChainData.CallOpts) +} + +// GetEthTxHash is a free data retrieval call binding the contract method 0x29927875. +// +// Solidity: function getEthTxHash(uint256 ethTxHashIndex) view returns(bytes32) +func (_IEthCrossChainData *IEthCrossChainDataCaller) GetEthTxHash(opts *bind.CallOpts, ethTxHashIndex *big.Int) ([32]byte, error) { + var ( + ret0 = new([32]byte) + ) + out := ret0 + err := _IEthCrossChainData.contract.Call(opts, out, "getEthTxHash", ethTxHashIndex) + return *ret0, err +} + +// GetEthTxHash is a free data retrieval call binding the contract method 0x29927875. +// +// Solidity: function getEthTxHash(uint256 ethTxHashIndex) view returns(bytes32) +func (_IEthCrossChainData *IEthCrossChainDataSession) GetEthTxHash(ethTxHashIndex *big.Int) ([32]byte, error) { + return _IEthCrossChainData.Contract.GetEthTxHash(&_IEthCrossChainData.CallOpts, ethTxHashIndex) +} + +// GetEthTxHash is a free data retrieval call binding the contract method 0x29927875. +// +// Solidity: function getEthTxHash(uint256 ethTxHashIndex) view returns(bytes32) +func (_IEthCrossChainData *IEthCrossChainDataCallerSession) GetEthTxHash(ethTxHashIndex *big.Int) ([32]byte, error) { + return _IEthCrossChainData.Contract.GetEthTxHash(&_IEthCrossChainData.CallOpts, ethTxHashIndex) +} + +// GetEthTxHashIndex is a free data retrieval call binding the contract method 0xff3d24a1. +// +// Solidity: function getEthTxHashIndex() view returns(uint256) +func (_IEthCrossChainData *IEthCrossChainDataCaller) GetEthTxHashIndex(opts *bind.CallOpts) (*big.Int, error) { + var ( + ret0 = new(*big.Int) + ) + out := ret0 + err := _IEthCrossChainData.contract.Call(opts, out, "getEthTxHashIndex") + return *ret0, err +} + +// GetEthTxHashIndex is a free data retrieval call binding the contract method 0xff3d24a1. +// +// Solidity: function getEthTxHashIndex() view returns(uint256) +func (_IEthCrossChainData *IEthCrossChainDataSession) GetEthTxHashIndex() (*big.Int, error) { + return _IEthCrossChainData.Contract.GetEthTxHashIndex(&_IEthCrossChainData.CallOpts) +} + +// GetEthTxHashIndex is a free data retrieval call binding the contract method 0xff3d24a1. +// +// Solidity: function getEthTxHashIndex() view returns(uint256) +func (_IEthCrossChainData *IEthCrossChainDataCallerSession) GetEthTxHashIndex() (*big.Int, error) { + return _IEthCrossChainData.Contract.GetEthTxHashIndex(&_IEthCrossChainData.CallOpts) +} + +// GetExtraData is a free data retrieval call binding the contract method 0x40602bb5. +// +// Solidity: function getExtraData(bytes32 key1, bytes32 key2) view returns(bytes) +func (_IEthCrossChainData *IEthCrossChainDataCaller) GetExtraData(opts *bind.CallOpts, key1 [32]byte, key2 [32]byte) ([]byte, error) { + var ( + ret0 = new([]byte) + ) + out := ret0 + err := _IEthCrossChainData.contract.Call(opts, out, "getExtraData", key1, key2) + return *ret0, err +} + +// GetExtraData is a free data retrieval call binding the contract method 0x40602bb5. +// +// Solidity: function getExtraData(bytes32 key1, bytes32 key2) view returns(bytes) +func (_IEthCrossChainData *IEthCrossChainDataSession) GetExtraData(key1 [32]byte, key2 [32]byte) ([]byte, error) { + return _IEthCrossChainData.Contract.GetExtraData(&_IEthCrossChainData.CallOpts, key1, key2) +} + +// GetExtraData is a free data retrieval call binding the contract method 0x40602bb5. +// +// Solidity: function getExtraData(bytes32 key1, bytes32 key2) view returns(bytes) +func (_IEthCrossChainData *IEthCrossChainDataCallerSession) GetExtraData(key1 [32]byte, key2 [32]byte) ([]byte, error) { + return _IEthCrossChainData.Contract.GetExtraData(&_IEthCrossChainData.CallOpts, key1, key2) +} + +// Paused is a free data retrieval call binding the contract method 0x5c975abb. +// +// Solidity: function paused() view returns(bool) +func (_IEthCrossChainData *IEthCrossChainDataCaller) Paused(opts *bind.CallOpts) (bool, error) { + var ( + ret0 = new(bool) + ) + out := ret0 + err := _IEthCrossChainData.contract.Call(opts, out, "paused") + return *ret0, err +} + +// Paused is a free data retrieval call binding the contract method 0x5c975abb. +// +// Solidity: function paused() view returns(bool) +func (_IEthCrossChainData *IEthCrossChainDataSession) Paused() (bool, error) { + return _IEthCrossChainData.Contract.Paused(&_IEthCrossChainData.CallOpts) +} + +// Paused is a free data retrieval call binding the contract method 0x5c975abb. +// +// Solidity: function paused() view returns(bool) +func (_IEthCrossChainData *IEthCrossChainDataCallerSession) Paused() (bool, error) { + return _IEthCrossChainData.Contract.Paused(&_IEthCrossChainData.CallOpts) +} + +// MarkFromChainTxExist is a paid mutator transaction binding the contract method 0xe90bfdcf. +// +// Solidity: function markFromChainTxExist(uint64 fromChainId, bytes32 fromChainTx) returns(bool) +func (_IEthCrossChainData *IEthCrossChainDataTransactor) MarkFromChainTxExist(opts *bind.TransactOpts, fromChainId uint64, fromChainTx [32]byte) (*types.Transaction, error) { + return _IEthCrossChainData.contract.Transact(opts, "markFromChainTxExist", fromChainId, fromChainTx) +} + +// MarkFromChainTxExist is a paid mutator transaction binding the contract method 0xe90bfdcf. +// +// Solidity: function markFromChainTxExist(uint64 fromChainId, bytes32 fromChainTx) returns(bool) +func (_IEthCrossChainData *IEthCrossChainDataSession) MarkFromChainTxExist(fromChainId uint64, fromChainTx [32]byte) (*types.Transaction, error) { + return _IEthCrossChainData.Contract.MarkFromChainTxExist(&_IEthCrossChainData.TransactOpts, fromChainId, fromChainTx) +} + +// MarkFromChainTxExist is a paid mutator transaction binding the contract method 0xe90bfdcf. +// +// Solidity: function markFromChainTxExist(uint64 fromChainId, bytes32 fromChainTx) returns(bool) +func (_IEthCrossChainData *IEthCrossChainDataTransactorSession) MarkFromChainTxExist(fromChainId uint64, fromChainTx [32]byte) (*types.Transaction, error) { + return _IEthCrossChainData.Contract.MarkFromChainTxExist(&_IEthCrossChainData.TransactOpts, fromChainId, fromChainTx) +} + +// Pause is a paid mutator transaction binding the contract method 0x8456cb59. +// +// Solidity: function pause() returns(bool) +func (_IEthCrossChainData *IEthCrossChainDataTransactor) Pause(opts *bind.TransactOpts) (*types.Transaction, error) { + return _IEthCrossChainData.contract.Transact(opts, "pause") +} + +// Pause is a paid mutator transaction binding the contract method 0x8456cb59. +// +// Solidity: function pause() returns(bool) +func (_IEthCrossChainData *IEthCrossChainDataSession) Pause() (*types.Transaction, error) { + return _IEthCrossChainData.Contract.Pause(&_IEthCrossChainData.TransactOpts) +} + +// Pause is a paid mutator transaction binding the contract method 0x8456cb59. +// +// Solidity: function pause() returns(bool) +func (_IEthCrossChainData *IEthCrossChainDataTransactorSession) Pause() (*types.Transaction, error) { + return _IEthCrossChainData.Contract.Pause(&_IEthCrossChainData.TransactOpts) +} + +// PutCurEpochConPubKeyBytes is a paid mutator transaction binding the contract method 0x41973cd9. +// +// Solidity: function putCurEpochConPubKeyBytes(bytes curEpochPkBytes) returns(bool) +func (_IEthCrossChainData *IEthCrossChainDataTransactor) PutCurEpochConPubKeyBytes(opts *bind.TransactOpts, curEpochPkBytes []byte) (*types.Transaction, error) { + return _IEthCrossChainData.contract.Transact(opts, "putCurEpochConPubKeyBytes", curEpochPkBytes) +} + +// PutCurEpochConPubKeyBytes is a paid mutator transaction binding the contract method 0x41973cd9. +// +// Solidity: function putCurEpochConPubKeyBytes(bytes curEpochPkBytes) returns(bool) +func (_IEthCrossChainData *IEthCrossChainDataSession) PutCurEpochConPubKeyBytes(curEpochPkBytes []byte) (*types.Transaction, error) { + return _IEthCrossChainData.Contract.PutCurEpochConPubKeyBytes(&_IEthCrossChainData.TransactOpts, curEpochPkBytes) +} + +// PutCurEpochConPubKeyBytes is a paid mutator transaction binding the contract method 0x41973cd9. +// +// Solidity: function putCurEpochConPubKeyBytes(bytes curEpochPkBytes) returns(bool) +func (_IEthCrossChainData *IEthCrossChainDataTransactorSession) PutCurEpochConPubKeyBytes(curEpochPkBytes []byte) (*types.Transaction, error) { + return _IEthCrossChainData.Contract.PutCurEpochConPubKeyBytes(&_IEthCrossChainData.TransactOpts, curEpochPkBytes) +} + +// PutCurEpochStartHeight is a paid mutator transaction binding the contract method 0x8a8bd17f. +// +// Solidity: function putCurEpochStartHeight(uint32 curEpochStartHeight) returns(bool) +func (_IEthCrossChainData *IEthCrossChainDataTransactor) PutCurEpochStartHeight(opts *bind.TransactOpts, curEpochStartHeight uint32) (*types.Transaction, error) { + return _IEthCrossChainData.contract.Transact(opts, "putCurEpochStartHeight", curEpochStartHeight) +} + +// PutCurEpochStartHeight is a paid mutator transaction binding the contract method 0x8a8bd17f. +// +// Solidity: function putCurEpochStartHeight(uint32 curEpochStartHeight) returns(bool) +func (_IEthCrossChainData *IEthCrossChainDataSession) PutCurEpochStartHeight(curEpochStartHeight uint32) (*types.Transaction, error) { + return _IEthCrossChainData.Contract.PutCurEpochStartHeight(&_IEthCrossChainData.TransactOpts, curEpochStartHeight) +} + +// PutCurEpochStartHeight is a paid mutator transaction binding the contract method 0x8a8bd17f. +// +// Solidity: function putCurEpochStartHeight(uint32 curEpochStartHeight) returns(bool) +func (_IEthCrossChainData *IEthCrossChainDataTransactorSession) PutCurEpochStartHeight(curEpochStartHeight uint32) (*types.Transaction, error) { + return _IEthCrossChainData.Contract.PutCurEpochStartHeight(&_IEthCrossChainData.TransactOpts, curEpochStartHeight) +} + +// PutEthTxHash is a paid mutator transaction binding the contract method 0x4c3ccf64. +// +// Solidity: function putEthTxHash(bytes32 ethTxHash) returns(bool) +func (_IEthCrossChainData *IEthCrossChainDataTransactor) PutEthTxHash(opts *bind.TransactOpts, ethTxHash [32]byte) (*types.Transaction, error) { + return _IEthCrossChainData.contract.Transact(opts, "putEthTxHash", ethTxHash) +} + +// PutEthTxHash is a paid mutator transaction binding the contract method 0x4c3ccf64. +// +// Solidity: function putEthTxHash(bytes32 ethTxHash) returns(bool) +func (_IEthCrossChainData *IEthCrossChainDataSession) PutEthTxHash(ethTxHash [32]byte) (*types.Transaction, error) { + return _IEthCrossChainData.Contract.PutEthTxHash(&_IEthCrossChainData.TransactOpts, ethTxHash) +} + +// PutEthTxHash is a paid mutator transaction binding the contract method 0x4c3ccf64. +// +// Solidity: function putEthTxHash(bytes32 ethTxHash) returns(bool) +func (_IEthCrossChainData *IEthCrossChainDataTransactorSession) PutEthTxHash(ethTxHash [32]byte) (*types.Transaction, error) { + return _IEthCrossChainData.Contract.PutEthTxHash(&_IEthCrossChainData.TransactOpts, ethTxHash) +} + +// PutExtraData is a paid mutator transaction binding the contract method 0x1afe374e. +// +// Solidity: function putExtraData(bytes32 key1, bytes32 key2, bytes value) returns(bool) +func (_IEthCrossChainData *IEthCrossChainDataTransactor) PutExtraData(opts *bind.TransactOpts, key1 [32]byte, key2 [32]byte, value []byte) (*types.Transaction, error) { + return _IEthCrossChainData.contract.Transact(opts, "putExtraData", key1, key2, value) +} + +// PutExtraData is a paid mutator transaction binding the contract method 0x1afe374e. +// +// Solidity: function putExtraData(bytes32 key1, bytes32 key2, bytes value) returns(bool) +func (_IEthCrossChainData *IEthCrossChainDataSession) PutExtraData(key1 [32]byte, key2 [32]byte, value []byte) (*types.Transaction, error) { + return _IEthCrossChainData.Contract.PutExtraData(&_IEthCrossChainData.TransactOpts, key1, key2, value) +} + +// PutExtraData is a paid mutator transaction binding the contract method 0x1afe374e. +// +// Solidity: function putExtraData(bytes32 key1, bytes32 key2, bytes value) returns(bool) +func (_IEthCrossChainData *IEthCrossChainDataTransactorSession) PutExtraData(key1 [32]byte, key2 [32]byte, value []byte) (*types.Transaction, error) { + return _IEthCrossChainData.Contract.PutExtraData(&_IEthCrossChainData.TransactOpts, key1, key2, value) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_IEthCrossChainData *IEthCrossChainDataTransactor) TransferOwnership(opts *bind.TransactOpts, newOwner common.Address) (*types.Transaction, error) { + return _IEthCrossChainData.contract.Transact(opts, "transferOwnership", newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_IEthCrossChainData *IEthCrossChainDataSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _IEthCrossChainData.Contract.TransferOwnership(&_IEthCrossChainData.TransactOpts, newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_IEthCrossChainData *IEthCrossChainDataTransactorSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _IEthCrossChainData.Contract.TransferOwnership(&_IEthCrossChainData.TransactOpts, newOwner) +} + +// Unpause is a paid mutator transaction binding the contract method 0x3f4ba83a. +// +// Solidity: function unpause() returns(bool) +func (_IEthCrossChainData *IEthCrossChainDataTransactor) Unpause(opts *bind.TransactOpts) (*types.Transaction, error) { + return _IEthCrossChainData.contract.Transact(opts, "unpause") +} + +// Unpause is a paid mutator transaction binding the contract method 0x3f4ba83a. +// +// Solidity: function unpause() returns(bool) +func (_IEthCrossChainData *IEthCrossChainDataSession) Unpause() (*types.Transaction, error) { + return _IEthCrossChainData.Contract.Unpause(&_IEthCrossChainData.TransactOpts) +} + +// Unpause is a paid mutator transaction binding the contract method 0x3f4ba83a. +// +// Solidity: function unpause() returns(bool) +func (_IEthCrossChainData *IEthCrossChainDataTransactorSession) Unpause() (*types.Transaction, error) { + return _IEthCrossChainData.Contract.Unpause(&_IEthCrossChainData.TransactOpts) +} + +// IEthCrossChainManagerABI is the input ABI used to generate the binding from. +const IEthCrossChainManagerABI = "[{\"constant\":false,\"inputs\":[{\"name\":\"_toChainId\",\"type\":\"uint64\"},{\"name\":\"_toContract\",\"type\":\"bytes\"},{\"name\":\"_method\",\"type\":\"bytes\"},{\"name\":\"_txData\",\"type\":\"bytes\"}],\"name\":\"crossChain\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]" + +// IEthCrossChainManagerFuncSigs maps the 4-byte function signature to its string representation. +var IEthCrossChainManagerFuncSigs = map[string]string{ + "bd5cf625": "crossChain(uint64,bytes,bytes,bytes)", +} + +// IEthCrossChainManager is an auto generated Go binding around an Ethereum contract. +type IEthCrossChainManager struct { + IEthCrossChainManagerCaller // Read-only binding to the contract + IEthCrossChainManagerTransactor // Write-only binding to the contract + IEthCrossChainManagerFilterer // Log filterer for contract events +} + +// IEthCrossChainManagerCaller is an auto generated read-only Go binding around an Ethereum contract. +type IEthCrossChainManagerCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// IEthCrossChainManagerTransactor is an auto generated write-only Go binding around an Ethereum contract. +type IEthCrossChainManagerTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// IEthCrossChainManagerFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type IEthCrossChainManagerFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// IEthCrossChainManagerSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type IEthCrossChainManagerSession struct { + Contract *IEthCrossChainManager // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// IEthCrossChainManagerCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type IEthCrossChainManagerCallerSession struct { + Contract *IEthCrossChainManagerCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// IEthCrossChainManagerTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type IEthCrossChainManagerTransactorSession struct { + Contract *IEthCrossChainManagerTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// IEthCrossChainManagerRaw is an auto generated low-level Go binding around an Ethereum contract. +type IEthCrossChainManagerRaw struct { + Contract *IEthCrossChainManager // Generic contract binding to access the raw methods on +} + +// IEthCrossChainManagerCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type IEthCrossChainManagerCallerRaw struct { + Contract *IEthCrossChainManagerCaller // Generic read-only contract binding to access the raw methods on +} + +// IEthCrossChainManagerTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type IEthCrossChainManagerTransactorRaw struct { + Contract *IEthCrossChainManagerTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewIEthCrossChainManager creates a new instance of IEthCrossChainManager, bound to a specific deployed contract. +func NewIEthCrossChainManager(address common.Address, backend bind.ContractBackend) (*IEthCrossChainManager, error) { + contract, err := bindIEthCrossChainManager(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &IEthCrossChainManager{IEthCrossChainManagerCaller: IEthCrossChainManagerCaller{contract: contract}, IEthCrossChainManagerTransactor: IEthCrossChainManagerTransactor{contract: contract}, IEthCrossChainManagerFilterer: IEthCrossChainManagerFilterer{contract: contract}}, nil +} + +// NewIEthCrossChainManagerCaller creates a new read-only instance of IEthCrossChainManager, bound to a specific deployed contract. +func NewIEthCrossChainManagerCaller(address common.Address, caller bind.ContractCaller) (*IEthCrossChainManagerCaller, error) { + contract, err := bindIEthCrossChainManager(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &IEthCrossChainManagerCaller{contract: contract}, nil +} + +// NewIEthCrossChainManagerTransactor creates a new write-only instance of IEthCrossChainManager, bound to a specific deployed contract. +func NewIEthCrossChainManagerTransactor(address common.Address, transactor bind.ContractTransactor) (*IEthCrossChainManagerTransactor, error) { + contract, err := bindIEthCrossChainManager(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &IEthCrossChainManagerTransactor{contract: contract}, nil +} + +// NewIEthCrossChainManagerFilterer creates a new log filterer instance of IEthCrossChainManager, bound to a specific deployed contract. +func NewIEthCrossChainManagerFilterer(address common.Address, filterer bind.ContractFilterer) (*IEthCrossChainManagerFilterer, error) { + contract, err := bindIEthCrossChainManager(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &IEthCrossChainManagerFilterer{contract: contract}, nil +} + +// bindIEthCrossChainManager binds a generic wrapper to an already deployed contract. +func bindIEthCrossChainManager(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := abi.JSON(strings.NewReader(IEthCrossChainManagerABI)) + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_IEthCrossChainManager *IEthCrossChainManagerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { + return _IEthCrossChainManager.Contract.IEthCrossChainManagerCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_IEthCrossChainManager *IEthCrossChainManagerRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _IEthCrossChainManager.Contract.IEthCrossChainManagerTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_IEthCrossChainManager *IEthCrossChainManagerRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _IEthCrossChainManager.Contract.IEthCrossChainManagerTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_IEthCrossChainManager *IEthCrossChainManagerCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { + return _IEthCrossChainManager.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_IEthCrossChainManager *IEthCrossChainManagerTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _IEthCrossChainManager.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_IEthCrossChainManager *IEthCrossChainManagerTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _IEthCrossChainManager.Contract.contract.Transact(opts, method, params...) +} + +// CrossChain is a paid mutator transaction binding the contract method 0xbd5cf625. +// +// Solidity: function crossChain(uint64 _toChainId, bytes _toContract, bytes _method, bytes _txData) returns(bool) +func (_IEthCrossChainManager *IEthCrossChainManagerTransactor) CrossChain(opts *bind.TransactOpts, _toChainId uint64, _toContract []byte, _method []byte, _txData []byte) (*types.Transaction, error) { + return _IEthCrossChainManager.contract.Transact(opts, "crossChain", _toChainId, _toContract, _method, _txData) +} + +// CrossChain is a paid mutator transaction binding the contract method 0xbd5cf625. +// +// Solidity: function crossChain(uint64 _toChainId, bytes _toContract, bytes _method, bytes _txData) returns(bool) +func (_IEthCrossChainManager *IEthCrossChainManagerSession) CrossChain(_toChainId uint64, _toContract []byte, _method []byte, _txData []byte) (*types.Transaction, error) { + return _IEthCrossChainManager.Contract.CrossChain(&_IEthCrossChainManager.TransactOpts, _toChainId, _toContract, _method, _txData) +} + +// CrossChain is a paid mutator transaction binding the contract method 0xbd5cf625. +// +// Solidity: function crossChain(uint64 _toChainId, bytes _toContract, bytes _method, bytes _txData) returns(bool) +func (_IEthCrossChainManager *IEthCrossChainManagerTransactorSession) CrossChain(_toChainId uint64, _toContract []byte, _method []byte, _txData []byte) (*types.Transaction, error) { + return _IEthCrossChainManager.Contract.CrossChain(&_IEthCrossChainManager.TransactOpts, _toChainId, _toContract, _method, _txData) +} + +// IUpgradableECCMABI is the input ABI used to generate the binding from. +const IUpgradableECCMABI = "[{\"constant\":false,\"inputs\":[],\"name\":\"unpause\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_newChainId\",\"type\":\"uint64\"}],\"name\":\"setChainId\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"\",\"type\":\"address\"}],\"name\":\"upgradeToNew\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"pause\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"isOwner\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"}]" + +// IUpgradableECCMFuncSigs maps the 4-byte function signature to its string representation. +var IUpgradableECCMFuncSigs = map[string]string{ + "8f32d59b": "isOwner()", + "8456cb59": "pause()", + "5c975abb": "paused()", + "6f31031d": "setChainId(uint64)", + "3f4ba83a": "unpause()", + "7e724ff3": "upgradeToNew(address)", +} + +// IUpgradableECCM is an auto generated Go binding around an Ethereum contract. +type IUpgradableECCM struct { + IUpgradableECCMCaller // Read-only binding to the contract + IUpgradableECCMTransactor // Write-only binding to the contract + IUpgradableECCMFilterer // Log filterer for contract events +} + +// IUpgradableECCMCaller is an auto generated read-only Go binding around an Ethereum contract. +type IUpgradableECCMCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// IUpgradableECCMTransactor is an auto generated write-only Go binding around an Ethereum contract. +type IUpgradableECCMTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// IUpgradableECCMFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type IUpgradableECCMFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// IUpgradableECCMSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type IUpgradableECCMSession struct { + Contract *IUpgradableECCM // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// IUpgradableECCMCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type IUpgradableECCMCallerSession struct { + Contract *IUpgradableECCMCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// IUpgradableECCMTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type IUpgradableECCMTransactorSession struct { + Contract *IUpgradableECCMTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// IUpgradableECCMRaw is an auto generated low-level Go binding around an Ethereum contract. +type IUpgradableECCMRaw struct { + Contract *IUpgradableECCM // Generic contract binding to access the raw methods on +} + +// IUpgradableECCMCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type IUpgradableECCMCallerRaw struct { + Contract *IUpgradableECCMCaller // Generic read-only contract binding to access the raw methods on +} + +// IUpgradableECCMTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type IUpgradableECCMTransactorRaw struct { + Contract *IUpgradableECCMTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewIUpgradableECCM creates a new instance of IUpgradableECCM, bound to a specific deployed contract. +func NewIUpgradableECCM(address common.Address, backend bind.ContractBackend) (*IUpgradableECCM, error) { + contract, err := bindIUpgradableECCM(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &IUpgradableECCM{IUpgradableECCMCaller: IUpgradableECCMCaller{contract: contract}, IUpgradableECCMTransactor: IUpgradableECCMTransactor{contract: contract}, IUpgradableECCMFilterer: IUpgradableECCMFilterer{contract: contract}}, nil +} + +// NewIUpgradableECCMCaller creates a new read-only instance of IUpgradableECCM, bound to a specific deployed contract. +func NewIUpgradableECCMCaller(address common.Address, caller bind.ContractCaller) (*IUpgradableECCMCaller, error) { + contract, err := bindIUpgradableECCM(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &IUpgradableECCMCaller{contract: contract}, nil +} + +// NewIUpgradableECCMTransactor creates a new write-only instance of IUpgradableECCM, bound to a specific deployed contract. +func NewIUpgradableECCMTransactor(address common.Address, transactor bind.ContractTransactor) (*IUpgradableECCMTransactor, error) { + contract, err := bindIUpgradableECCM(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &IUpgradableECCMTransactor{contract: contract}, nil +} + +// NewIUpgradableECCMFilterer creates a new log filterer instance of IUpgradableECCM, bound to a specific deployed contract. +func NewIUpgradableECCMFilterer(address common.Address, filterer bind.ContractFilterer) (*IUpgradableECCMFilterer, error) { + contract, err := bindIUpgradableECCM(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &IUpgradableECCMFilterer{contract: contract}, nil +} + +// bindIUpgradableECCM binds a generic wrapper to an already deployed contract. +func bindIUpgradableECCM(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := abi.JSON(strings.NewReader(IUpgradableECCMABI)) + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_IUpgradableECCM *IUpgradableECCMRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { + return _IUpgradableECCM.Contract.IUpgradableECCMCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_IUpgradableECCM *IUpgradableECCMRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _IUpgradableECCM.Contract.IUpgradableECCMTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_IUpgradableECCM *IUpgradableECCMRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _IUpgradableECCM.Contract.IUpgradableECCMTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_IUpgradableECCM *IUpgradableECCMCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { + return _IUpgradableECCM.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_IUpgradableECCM *IUpgradableECCMTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _IUpgradableECCM.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_IUpgradableECCM *IUpgradableECCMTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _IUpgradableECCM.Contract.contract.Transact(opts, method, params...) +} + +// IsOwner is a free data retrieval call binding the contract method 0x8f32d59b. +// +// Solidity: function isOwner() view returns(bool) +func (_IUpgradableECCM *IUpgradableECCMCaller) IsOwner(opts *bind.CallOpts) (bool, error) { + var ( + ret0 = new(bool) + ) + out := ret0 + err := _IUpgradableECCM.contract.Call(opts, out, "isOwner") + return *ret0, err +} + +// IsOwner is a free data retrieval call binding the contract method 0x8f32d59b. +// +// Solidity: function isOwner() view returns(bool) +func (_IUpgradableECCM *IUpgradableECCMSession) IsOwner() (bool, error) { + return _IUpgradableECCM.Contract.IsOwner(&_IUpgradableECCM.CallOpts) +} + +// IsOwner is a free data retrieval call binding the contract method 0x8f32d59b. +// +// Solidity: function isOwner() view returns(bool) +func (_IUpgradableECCM *IUpgradableECCMCallerSession) IsOwner() (bool, error) { + return _IUpgradableECCM.Contract.IsOwner(&_IUpgradableECCM.CallOpts) +} + +// Paused is a free data retrieval call binding the contract method 0x5c975abb. +// +// Solidity: function paused() view returns(bool) +func (_IUpgradableECCM *IUpgradableECCMCaller) Paused(opts *bind.CallOpts) (bool, error) { + var ( + ret0 = new(bool) + ) + out := ret0 + err := _IUpgradableECCM.contract.Call(opts, out, "paused") + return *ret0, err +} + +// Paused is a free data retrieval call binding the contract method 0x5c975abb. +// +// Solidity: function paused() view returns(bool) +func (_IUpgradableECCM *IUpgradableECCMSession) Paused() (bool, error) { + return _IUpgradableECCM.Contract.Paused(&_IUpgradableECCM.CallOpts) +} + +// Paused is a free data retrieval call binding the contract method 0x5c975abb. +// +// Solidity: function paused() view returns(bool) +func (_IUpgradableECCM *IUpgradableECCMCallerSession) Paused() (bool, error) { + return _IUpgradableECCM.Contract.Paused(&_IUpgradableECCM.CallOpts) +} + +// Pause is a paid mutator transaction binding the contract method 0x8456cb59. +// +// Solidity: function pause() returns(bool) +func (_IUpgradableECCM *IUpgradableECCMTransactor) Pause(opts *bind.TransactOpts) (*types.Transaction, error) { + return _IUpgradableECCM.contract.Transact(opts, "pause") +} + +// Pause is a paid mutator transaction binding the contract method 0x8456cb59. +// +// Solidity: function pause() returns(bool) +func (_IUpgradableECCM *IUpgradableECCMSession) Pause() (*types.Transaction, error) { + return _IUpgradableECCM.Contract.Pause(&_IUpgradableECCM.TransactOpts) +} + +// Pause is a paid mutator transaction binding the contract method 0x8456cb59. +// +// Solidity: function pause() returns(bool) +func (_IUpgradableECCM *IUpgradableECCMTransactorSession) Pause() (*types.Transaction, error) { + return _IUpgradableECCM.Contract.Pause(&_IUpgradableECCM.TransactOpts) +} + +// SetChainId is a paid mutator transaction binding the contract method 0x6f31031d. +// +// Solidity: function setChainId(uint64 _newChainId) returns(bool) +func (_IUpgradableECCM *IUpgradableECCMTransactor) SetChainId(opts *bind.TransactOpts, _newChainId uint64) (*types.Transaction, error) { + return _IUpgradableECCM.contract.Transact(opts, "setChainId", _newChainId) +} + +// SetChainId is a paid mutator transaction binding the contract method 0x6f31031d. +// +// Solidity: function setChainId(uint64 _newChainId) returns(bool) +func (_IUpgradableECCM *IUpgradableECCMSession) SetChainId(_newChainId uint64) (*types.Transaction, error) { + return _IUpgradableECCM.Contract.SetChainId(&_IUpgradableECCM.TransactOpts, _newChainId) +} + +// SetChainId is a paid mutator transaction binding the contract method 0x6f31031d. +// +// Solidity: function setChainId(uint64 _newChainId) returns(bool) +func (_IUpgradableECCM *IUpgradableECCMTransactorSession) SetChainId(_newChainId uint64) (*types.Transaction, error) { + return _IUpgradableECCM.Contract.SetChainId(&_IUpgradableECCM.TransactOpts, _newChainId) +} + +// Unpause is a paid mutator transaction binding the contract method 0x3f4ba83a. +// +// Solidity: function unpause() returns(bool) +func (_IUpgradableECCM *IUpgradableECCMTransactor) Unpause(opts *bind.TransactOpts) (*types.Transaction, error) { + return _IUpgradableECCM.contract.Transact(opts, "unpause") +} + +// Unpause is a paid mutator transaction binding the contract method 0x3f4ba83a. +// +// Solidity: function unpause() returns(bool) +func (_IUpgradableECCM *IUpgradableECCMSession) Unpause() (*types.Transaction, error) { + return _IUpgradableECCM.Contract.Unpause(&_IUpgradableECCM.TransactOpts) +} + +// Unpause is a paid mutator transaction binding the contract method 0x3f4ba83a. +// +// Solidity: function unpause() returns(bool) +func (_IUpgradableECCM *IUpgradableECCMTransactorSession) Unpause() (*types.Transaction, error) { + return _IUpgradableECCM.Contract.Unpause(&_IUpgradableECCM.TransactOpts) +} + +// UpgradeToNew is a paid mutator transaction binding the contract method 0x7e724ff3. +// +// Solidity: function upgradeToNew(address ) returns(bool) +func (_IUpgradableECCM *IUpgradableECCMTransactor) UpgradeToNew(opts *bind.TransactOpts, arg0 common.Address) (*types.Transaction, error) { + return _IUpgradableECCM.contract.Transact(opts, "upgradeToNew", arg0) +} + +// UpgradeToNew is a paid mutator transaction binding the contract method 0x7e724ff3. +// +// Solidity: function upgradeToNew(address ) returns(bool) +func (_IUpgradableECCM *IUpgradableECCMSession) UpgradeToNew(arg0 common.Address) (*types.Transaction, error) { + return _IUpgradableECCM.Contract.UpgradeToNew(&_IUpgradableECCM.TransactOpts, arg0) +} + +// UpgradeToNew is a paid mutator transaction binding the contract method 0x7e724ff3. +// +// Solidity: function upgradeToNew(address ) returns(bool) +func (_IUpgradableECCM *IUpgradableECCMTransactorSession) UpgradeToNew(arg0 common.Address) (*types.Transaction, error) { + return _IUpgradableECCM.Contract.UpgradeToNew(&_IUpgradableECCM.TransactOpts, arg0) +} + +// OwnableABI is the input ABI used to generate the binding from. +const OwnableABI = "[{\"constant\":false,\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"isOwner\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"}]" + +// OwnableFuncSigs maps the 4-byte function signature to its string representation. +var OwnableFuncSigs = map[string]string{ + "8f32d59b": "isOwner()", + "8da5cb5b": "owner()", + "715018a6": "renounceOwnership()", + "f2fde38b": "transferOwnership(address)", +} + +// Ownable is an auto generated Go binding around an Ethereum contract. +type Ownable struct { + OwnableCaller // Read-only binding to the contract + OwnableTransactor // Write-only binding to the contract + OwnableFilterer // Log filterer for contract events +} + +// OwnableCaller is an auto generated read-only Go binding around an Ethereum contract. +type OwnableCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// OwnableTransactor is an auto generated write-only Go binding around an Ethereum contract. +type OwnableTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// OwnableFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type OwnableFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// OwnableSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type OwnableSession struct { + Contract *Ownable // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// OwnableCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type OwnableCallerSession struct { + Contract *OwnableCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// OwnableTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type OwnableTransactorSession struct { + Contract *OwnableTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// OwnableRaw is an auto generated low-level Go binding around an Ethereum contract. +type OwnableRaw struct { + Contract *Ownable // Generic contract binding to access the raw methods on +} + +// OwnableCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type OwnableCallerRaw struct { + Contract *OwnableCaller // Generic read-only contract binding to access the raw methods on +} + +// OwnableTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type OwnableTransactorRaw struct { + Contract *OwnableTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewOwnable creates a new instance of Ownable, bound to a specific deployed contract. +func NewOwnable(address common.Address, backend bind.ContractBackend) (*Ownable, error) { + contract, err := bindOwnable(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &Ownable{OwnableCaller: OwnableCaller{contract: contract}, OwnableTransactor: OwnableTransactor{contract: contract}, OwnableFilterer: OwnableFilterer{contract: contract}}, nil +} + +// NewOwnableCaller creates a new read-only instance of Ownable, bound to a specific deployed contract. +func NewOwnableCaller(address common.Address, caller bind.ContractCaller) (*OwnableCaller, error) { + contract, err := bindOwnable(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &OwnableCaller{contract: contract}, nil +} + +// NewOwnableTransactor creates a new write-only instance of Ownable, bound to a specific deployed contract. +func NewOwnableTransactor(address common.Address, transactor bind.ContractTransactor) (*OwnableTransactor, error) { + contract, err := bindOwnable(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &OwnableTransactor{contract: contract}, nil +} + +// NewOwnableFilterer creates a new log filterer instance of Ownable, bound to a specific deployed contract. +func NewOwnableFilterer(address common.Address, filterer bind.ContractFilterer) (*OwnableFilterer, error) { + contract, err := bindOwnable(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &OwnableFilterer{contract: contract}, nil +} + +// bindOwnable binds a generic wrapper to an already deployed contract. +func bindOwnable(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := abi.JSON(strings.NewReader(OwnableABI)) + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_Ownable *OwnableRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { + return _Ownable.Contract.OwnableCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_Ownable *OwnableRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Ownable.Contract.OwnableTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_Ownable *OwnableRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _Ownable.Contract.OwnableTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_Ownable *OwnableCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { + return _Ownable.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_Ownable *OwnableTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Ownable.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_Ownable *OwnableTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _Ownable.Contract.contract.Transact(opts, method, params...) +} + +// IsOwner is a free data retrieval call binding the contract method 0x8f32d59b. +// +// Solidity: function isOwner() view returns(bool) +func (_Ownable *OwnableCaller) IsOwner(opts *bind.CallOpts) (bool, error) { + var ( + ret0 = new(bool) + ) + out := ret0 + err := _Ownable.contract.Call(opts, out, "isOwner") + return *ret0, err +} + +// IsOwner is a free data retrieval call binding the contract method 0x8f32d59b. +// +// Solidity: function isOwner() view returns(bool) +func (_Ownable *OwnableSession) IsOwner() (bool, error) { + return _Ownable.Contract.IsOwner(&_Ownable.CallOpts) +} + +// IsOwner is a free data retrieval call binding the contract method 0x8f32d59b. +// +// Solidity: function isOwner() view returns(bool) +func (_Ownable *OwnableCallerSession) IsOwner() (bool, error) { + return _Ownable.Contract.IsOwner(&_Ownable.CallOpts) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_Ownable *OwnableCaller) Owner(opts *bind.CallOpts) (common.Address, error) { + var ( + ret0 = new(common.Address) + ) + out := ret0 + err := _Ownable.contract.Call(opts, out, "owner") + return *ret0, err +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_Ownable *OwnableSession) Owner() (common.Address, error) { + return _Ownable.Contract.Owner(&_Ownable.CallOpts) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_Ownable *OwnableCallerSession) Owner() (common.Address, error) { + return _Ownable.Contract.Owner(&_Ownable.CallOpts) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_Ownable *OwnableTransactor) RenounceOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Ownable.contract.Transact(opts, "renounceOwnership") +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_Ownable *OwnableSession) RenounceOwnership() (*types.Transaction, error) { + return _Ownable.Contract.RenounceOwnership(&_Ownable.TransactOpts) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_Ownable *OwnableTransactorSession) RenounceOwnership() (*types.Transaction, error) { + return _Ownable.Contract.RenounceOwnership(&_Ownable.TransactOpts) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_Ownable *OwnableTransactor) TransferOwnership(opts *bind.TransactOpts, newOwner common.Address) (*types.Transaction, error) { + return _Ownable.contract.Transact(opts, "transferOwnership", newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_Ownable *OwnableSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _Ownable.Contract.TransferOwnership(&_Ownable.TransactOpts, newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_Ownable *OwnableTransactorSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _Ownable.Contract.TransferOwnership(&_Ownable.TransactOpts, newOwner) +} + +// OwnableOwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the Ownable contract. +type OwnableOwnershipTransferredIterator struct { + Event *OwnableOwnershipTransferred // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *OwnableOwnershipTransferredIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(OwnableOwnershipTransferred) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(OwnableOwnershipTransferred) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *OwnableOwnershipTransferredIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *OwnableOwnershipTransferredIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// OwnableOwnershipTransferred represents a OwnershipTransferred event raised by the Ownable contract. +type OwnableOwnershipTransferred struct { + PreviousOwner common.Address + NewOwner common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterOwnershipTransferred is a free log retrieval operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_Ownable *OwnableFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*OwnableOwnershipTransferredIterator, error) { + + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + } + var newOwnerRule []interface{} + for _, newOwnerItem := range newOwner { + newOwnerRule = append(newOwnerRule, newOwnerItem) + } + + logs, sub, err := _Ownable.contract.FilterLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return &OwnableOwnershipTransferredIterator{contract: _Ownable.contract, event: "OwnershipTransferred", logs: logs, sub: sub}, nil +} + +// WatchOwnershipTransferred is a free log subscription operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_Ownable *OwnableFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *OwnableOwnershipTransferred, previousOwner []common.Address, newOwner []common.Address) (event.Subscription, error) { + + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + } + var newOwnerRule []interface{} + for _, newOwnerItem := range newOwner { + newOwnerRule = append(newOwnerRule, newOwnerItem) + } + + logs, sub, err := _Ownable.contract.WatchLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(OwnableOwnershipTransferred) + if err := _Ownable.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseOwnershipTransferred is a log parse operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_Ownable *OwnableFilterer) ParseOwnershipTransferred(log types.Log) (*OwnableOwnershipTransferred, error) { + event := new(OwnableOwnershipTransferred) + if err := _Ownable.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return nil, err + } + return event, nil +} + +// PausableABI is the input ABI used to generate the binding from. +const PausableABI = "[{\"constant\":true,\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"}]" + +// PausableFuncSigs maps the 4-byte function signature to its string representation. +var PausableFuncSigs = map[string]string{ + "5c975abb": "paused()", +} + +// Pausable is an auto generated Go binding around an Ethereum contract. +type Pausable struct { + PausableCaller // Read-only binding to the contract + PausableTransactor // Write-only binding to the contract + PausableFilterer // Log filterer for contract events +} + +// PausableCaller is an auto generated read-only Go binding around an Ethereum contract. +type PausableCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// PausableTransactor is an auto generated write-only Go binding around an Ethereum contract. +type PausableTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// PausableFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type PausableFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// PausableSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type PausableSession struct { + Contract *Pausable // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// PausableCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type PausableCallerSession struct { + Contract *PausableCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// PausableTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type PausableTransactorSession struct { + Contract *PausableTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// PausableRaw is an auto generated low-level Go binding around an Ethereum contract. +type PausableRaw struct { + Contract *Pausable // Generic contract binding to access the raw methods on +} + +// PausableCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type PausableCallerRaw struct { + Contract *PausableCaller // Generic read-only contract binding to access the raw methods on +} + +// PausableTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type PausableTransactorRaw struct { + Contract *PausableTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewPausable creates a new instance of Pausable, bound to a specific deployed contract. +func NewPausable(address common.Address, backend bind.ContractBackend) (*Pausable, error) { + contract, err := bindPausable(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &Pausable{PausableCaller: PausableCaller{contract: contract}, PausableTransactor: PausableTransactor{contract: contract}, PausableFilterer: PausableFilterer{contract: contract}}, nil +} + +// NewPausableCaller creates a new read-only instance of Pausable, bound to a specific deployed contract. +func NewPausableCaller(address common.Address, caller bind.ContractCaller) (*PausableCaller, error) { + contract, err := bindPausable(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &PausableCaller{contract: contract}, nil +} + +// NewPausableTransactor creates a new write-only instance of Pausable, bound to a specific deployed contract. +func NewPausableTransactor(address common.Address, transactor bind.ContractTransactor) (*PausableTransactor, error) { + contract, err := bindPausable(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &PausableTransactor{contract: contract}, nil +} + +// NewPausableFilterer creates a new log filterer instance of Pausable, bound to a specific deployed contract. +func NewPausableFilterer(address common.Address, filterer bind.ContractFilterer) (*PausableFilterer, error) { + contract, err := bindPausable(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &PausableFilterer{contract: contract}, nil +} + +// bindPausable binds a generic wrapper to an already deployed contract. +func bindPausable(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := abi.JSON(strings.NewReader(PausableABI)) + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_Pausable *PausableRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { + return _Pausable.Contract.PausableCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_Pausable *PausableRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Pausable.Contract.PausableTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_Pausable *PausableRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _Pausable.Contract.PausableTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_Pausable *PausableCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { + return _Pausable.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_Pausable *PausableTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Pausable.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_Pausable *PausableTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _Pausable.Contract.contract.Transact(opts, method, params...) +} + +// Paused is a free data retrieval call binding the contract method 0x5c975abb. +// +// Solidity: function paused() view returns(bool) +func (_Pausable *PausableCaller) Paused(opts *bind.CallOpts) (bool, error) { + var ( + ret0 = new(bool) + ) + out := ret0 + err := _Pausable.contract.Call(opts, out, "paused") + return *ret0, err +} + +// Paused is a free data retrieval call binding the contract method 0x5c975abb. +// +// Solidity: function paused() view returns(bool) +func (_Pausable *PausableSession) Paused() (bool, error) { + return _Pausable.Contract.Paused(&_Pausable.CallOpts) +} + +// Paused is a free data retrieval call binding the contract method 0x5c975abb. +// +// Solidity: function paused() view returns(bool) +func (_Pausable *PausableCallerSession) Paused() (bool, error) { + return _Pausable.Contract.Paused(&_Pausable.CallOpts) +} + +// PausablePausedIterator is returned from FilterPaused and is used to iterate over the raw logs and unpacked data for Paused events raised by the Pausable contract. +type PausablePausedIterator struct { + Event *PausablePaused // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *PausablePausedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(PausablePaused) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(PausablePaused) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *PausablePausedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *PausablePausedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// PausablePaused represents a Paused event raised by the Pausable contract. +type PausablePaused struct { + Account common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterPaused is a free log retrieval operation binding the contract event 0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258. +// +// Solidity: event Paused(address account) +func (_Pausable *PausableFilterer) FilterPaused(opts *bind.FilterOpts) (*PausablePausedIterator, error) { + + logs, sub, err := _Pausable.contract.FilterLogs(opts, "Paused") + if err != nil { + return nil, err + } + return &PausablePausedIterator{contract: _Pausable.contract, event: "Paused", logs: logs, sub: sub}, nil +} + +// WatchPaused is a free log subscription operation binding the contract event 0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258. +// +// Solidity: event Paused(address account) +func (_Pausable *PausableFilterer) WatchPaused(opts *bind.WatchOpts, sink chan<- *PausablePaused) (event.Subscription, error) { + + logs, sub, err := _Pausable.contract.WatchLogs(opts, "Paused") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(PausablePaused) + if err := _Pausable.contract.UnpackLog(event, "Paused", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParsePaused is a log parse operation binding the contract event 0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258. +// +// Solidity: event Paused(address account) +func (_Pausable *PausableFilterer) ParsePaused(log types.Log) (*PausablePaused, error) { + event := new(PausablePaused) + if err := _Pausable.contract.UnpackLog(event, "Paused", log); err != nil { + return nil, err + } + return event, nil +} + +// PausableUnpausedIterator is returned from FilterUnpaused and is used to iterate over the raw logs and unpacked data for Unpaused events raised by the Pausable contract. +type PausableUnpausedIterator struct { + Event *PausableUnpaused // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *PausableUnpausedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(PausableUnpaused) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(PausableUnpaused) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *PausableUnpausedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *PausableUnpausedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// PausableUnpaused represents a Unpaused event raised by the Pausable contract. +type PausableUnpaused struct { + Account common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterUnpaused is a free log retrieval operation binding the contract event 0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa. +// +// Solidity: event Unpaused(address account) +func (_Pausable *PausableFilterer) FilterUnpaused(opts *bind.FilterOpts) (*PausableUnpausedIterator, error) { + + logs, sub, err := _Pausable.contract.FilterLogs(opts, "Unpaused") + if err != nil { + return nil, err + } + return &PausableUnpausedIterator{contract: _Pausable.contract, event: "Unpaused", logs: logs, sub: sub}, nil +} + +// WatchUnpaused is a free log subscription operation binding the contract event 0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa. +// +// Solidity: event Unpaused(address account) +func (_Pausable *PausableFilterer) WatchUnpaused(opts *bind.WatchOpts, sink chan<- *PausableUnpaused) (event.Subscription, error) { + + logs, sub, err := _Pausable.contract.WatchLogs(opts, "Unpaused") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(PausableUnpaused) + if err := _Pausable.contract.UnpackLog(event, "Unpaused", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseUnpaused is a log parse operation binding the contract event 0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa. +// +// Solidity: event Unpaused(address account) +func (_Pausable *PausableFilterer) ParseUnpaused(log types.Log) (*PausableUnpaused, error) { + event := new(PausableUnpaused) + if err := _Pausable.contract.UnpackLog(event, "Unpaused", log); err != nil { + return nil, err + } + return event, nil +} + +// SafeMathABI is the input ABI used to generate the binding from. +const SafeMathABI = "[]" + +// SafeMathBin is the compiled bytecode used for deploying new contracts. +var SafeMathBin = "0x604c602c600b82828239805160001a60731460008114601c57601e565bfe5b5030600052607381538281f30073000000000000000000000000000000000000000030146080604052600080fd00a165627a7a72305820c938ec4337f24043c234aaec1c0523074d951e14bc3bf4ef0a5ce40289f39cca0029" + +// DeploySafeMath deploys a new Ethereum contract, binding an instance of SafeMath to it. +func DeploySafeMath(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *SafeMath, error) { + parsed, err := abi.JSON(strings.NewReader(SafeMathABI)) + if err != nil { + return common.Address{}, nil, nil, err + } + + address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(SafeMathBin), backend) + if err != nil { + return common.Address{}, nil, nil, err + } + return address, tx, &SafeMath{SafeMathCaller: SafeMathCaller{contract: contract}, SafeMathTransactor: SafeMathTransactor{contract: contract}, SafeMathFilterer: SafeMathFilterer{contract: contract}}, nil +} + +// SafeMath is an auto generated Go binding around an Ethereum contract. +type SafeMath struct { + SafeMathCaller // Read-only binding to the contract + SafeMathTransactor // Write-only binding to the contract + SafeMathFilterer // Log filterer for contract events +} + +// SafeMathCaller is an auto generated read-only Go binding around an Ethereum contract. +type SafeMathCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// SafeMathTransactor is an auto generated write-only Go binding around an Ethereum contract. +type SafeMathTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// SafeMathFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type SafeMathFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// SafeMathSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type SafeMathSession struct { + Contract *SafeMath // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// SafeMathCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type SafeMathCallerSession struct { + Contract *SafeMathCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// SafeMathTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type SafeMathTransactorSession struct { + Contract *SafeMathTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// SafeMathRaw is an auto generated low-level Go binding around an Ethereum contract. +type SafeMathRaw struct { + Contract *SafeMath // Generic contract binding to access the raw methods on +} + +// SafeMathCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type SafeMathCallerRaw struct { + Contract *SafeMathCaller // Generic read-only contract binding to access the raw methods on +} + +// SafeMathTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type SafeMathTransactorRaw struct { + Contract *SafeMathTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewSafeMath creates a new instance of SafeMath, bound to a specific deployed contract. +func NewSafeMath(address common.Address, backend bind.ContractBackend) (*SafeMath, error) { + contract, err := bindSafeMath(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &SafeMath{SafeMathCaller: SafeMathCaller{contract: contract}, SafeMathTransactor: SafeMathTransactor{contract: contract}, SafeMathFilterer: SafeMathFilterer{contract: contract}}, nil +} + +// NewSafeMathCaller creates a new read-only instance of SafeMath, bound to a specific deployed contract. +func NewSafeMathCaller(address common.Address, caller bind.ContractCaller) (*SafeMathCaller, error) { + contract, err := bindSafeMath(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &SafeMathCaller{contract: contract}, nil +} + +// NewSafeMathTransactor creates a new write-only instance of SafeMath, bound to a specific deployed contract. +func NewSafeMathTransactor(address common.Address, transactor bind.ContractTransactor) (*SafeMathTransactor, error) { + contract, err := bindSafeMath(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &SafeMathTransactor{contract: contract}, nil +} + +// NewSafeMathFilterer creates a new log filterer instance of SafeMath, bound to a specific deployed contract. +func NewSafeMathFilterer(address common.Address, filterer bind.ContractFilterer) (*SafeMathFilterer, error) { + contract, err := bindSafeMath(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &SafeMathFilterer{contract: contract}, nil +} + +// bindSafeMath binds a generic wrapper to an already deployed contract. +func bindSafeMath(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := abi.JSON(strings.NewReader(SafeMathABI)) + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_SafeMath *SafeMathRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { + return _SafeMath.Contract.SafeMathCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_SafeMath *SafeMathRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _SafeMath.Contract.SafeMathTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_SafeMath *SafeMathRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _SafeMath.Contract.SafeMathTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_SafeMath *SafeMathCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { + return _SafeMath.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_SafeMath *SafeMathTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _SafeMath.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_SafeMath *SafeMathTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _SafeMath.Contract.contract.Transact(opts, method, params...) +} + +// UpgradableECCMABI is the input ABI used to generate the binding from. +const UpgradableECCMABI = "[{\"constant\":true,\"inputs\":[],\"name\":\"EthCrossChainDataAddress\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"unpause\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_newChainId\",\"type\":\"uint64\"}],\"name\":\"setChainId\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"newEthCrossChainManagerAddress\",\"type\":\"address\"}],\"name\":\"upgradeToNew\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"pause\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"isOwner\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"chainId\",\"outputs\":[{\"name\":\"\",\"type\":\"uint64\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"name\":\"ethCrossChainDataAddr\",\"type\":\"address\"},{\"name\":\"_chainId\",\"type\":\"uint64\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"}]" + +// UpgradableECCMFuncSigs maps the 4-byte function signature to its string representation. +var UpgradableECCMFuncSigs = map[string]string{ + "00ba1694": "EthCrossChainDataAddress()", + "9a8a0592": "chainId()", + "8f32d59b": "isOwner()", + "8da5cb5b": "owner()", + "8456cb59": "pause()", + "5c975abb": "paused()", + "715018a6": "renounceOwnership()", + "6f31031d": "setChainId(uint64)", + "f2fde38b": "transferOwnership(address)", + "3f4ba83a": "unpause()", + "7e724ff3": "upgradeToNew(address)", +} + +// UpgradableECCMBin is the compiled bytecode used for deploying new contracts. +var UpgradableECCMBin = "0x608060405234801561001057600080fd5b50604051604080610cff833981016040528051602090910151600061003c6401000000006100f0810204565b60008054600160a060020a031916600160a060020a0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3506000805460a060020a60ff02191690556001805467ffffffffffffffff909216740100000000000000000000000000000000000000000260a060020a60e060020a0319600160a060020a03909416600160a060020a031990931692909217929092161790556100f4565b3390565b610bfc806101036000396000f3006080604052600436106100945763ffffffff60e060020a600035041662ba169481146100995780633f4ba83a146100ca5780635c975abb146100f35780636f31031d14610108578063715018a61461012a5780637e724ff3146101415780638456cb59146101625780638da5cb5b146101775780638f32d59b1461018c5780639a8a0592146101a1578063f2fde38b146101d3575b600080fd5b3480156100a557600080fd5b506100ae6101f4565b60408051600160a060020a039092168252519081900360200190f35b3480156100d657600080fd5b506100df610203565b604080519115158252519081900360200190f35b3480156100ff57600080fd5b506100df6103e8565b34801561011457600080fd5b506100df67ffffffffffffffff600435166103f8565b34801561013657600080fd5b5061013f6104ea565b005b34801561014d57600080fd5b506100df600160a060020a036004351661058d565b34801561016e57600080fd5b506100df6106cb565b34801561018357600080fd5b506100ae6108aa565b34801561019857600080fd5b506100df6108b9565b3480156101ad57600080fd5b506101b66108dd565b6040805167ffffffffffffffff9092168252519081900360200190f35b3480156101df57600080fd5b5061013f600160a060020a03600435166108f4565b600154600160a060020a031681565b60008061020e6108b9565b1515610252576040805160e560020a62461bcd0281526020600482018190526024820152600080516020610bb1833981519152604482015290519081900360640190fd5b61025a6103e8565b156102675761026761094c565b50600154604080517f5c975abb0000000000000000000000000000000000000000000000000000000081529051600160a060020a03909216918291635c975abb9160048083019260209291908290030181600087803b1580156102c957600080fd5b505af11580156102dd573d6000803e3d6000fd5b505050506040513d60208110156102f357600080fd5b5051156103e05780600160a060020a0316633f4ba83a6040518163ffffffff1660e060020a028152600401602060405180830381600087803b15801561033857600080fd5b505af115801561034c573d6000803e3d6000fd5b505050506040513d602081101561036257600080fd5b505115156103e0576040805160e560020a62461bcd02815260206004820152602960248201527f756e70617573652045746843726f7373436861696e4461746120636f6e74726160448201527f6374206661696c65640000000000000000000000000000000000000000000000606482015290519081900360840190fd5b600191505090565b60005460a060020a900460ff1690565b6000805460a060020a900460ff16151561045c576040805160e560020a62461bcd02815260206004820152601460248201527f5061757361626c653a206e6f7420706175736564000000000000000000000000604482015290519081900360640190fd5b6104646108b9565b15156104a8576040805160e560020a62461bcd0281526020600482018190526024820152600080516020610bb1833981519152604482015290519081900360640190fd5b506001805467ffffffffffffffff831660a060020a027fffffffff0000000000000000ffffffffffffffffffffffffffffffffffffffff909116178155919050565b6104f26108b9565b1515610536576040805160e560020a62461bcd0281526020600482018190526024820152600080516020610bb1833981519152604482015290519081900360640190fd5b60008054604051600160a060020a03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a36000805473ffffffffffffffffffffffffffffffffffffffff19169055565b60008054819060a060020a900460ff1615156105f3576040805160e560020a62461bcd02815260206004820152601460248201527f5061757361626c653a206e6f7420706175736564000000000000000000000000604482015290519081900360640190fd5b6105fb6108b9565b151561063f576040805160e560020a62461bcd0281526020600482018190526024820152600080516020610bb1833981519152604482015290519081900360640190fd5b50600154604080517ff2fde38b000000000000000000000000000000000000000000000000000000008152600160a060020a03858116600483015291519190921691829163f2fde38b9160248082019260009290919082900301818387803b1580156106aa57600080fd5b505af11580156106be573d6000803e3d6000fd5b5060019695505050505050565b6000806106d66108b9565b151561071a576040805160e560020a62461bcd0281526020600482018190526024820152600080516020610bb1833981519152604482015290519081900360640190fd5b6107226103e8565b151561073057610730610a13565b50600154604080517f5c975abb0000000000000000000000000000000000000000000000000000000081529051600160a060020a03909216918291635c975abb9160048083019260209291908290030181600087803b15801561079257600080fd5b505af11580156107a6573d6000803e3d6000fd5b505050506040513d60208110156107bc57600080fd5b505115156103e05780600160a060020a0316638456cb596040518163ffffffff1660e060020a028152600401602060405180830381600087803b15801561080257600080fd5b505af1158015610816573d6000803e3d6000fd5b505050506040513d602081101561082c57600080fd5b505115156103e0576040805160e560020a62461bcd02815260206004820152602760248201527f70617573652045746843726f7373436861696e4461746120636f6e747261637460448201527f206661696c656400000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b600054600160a060020a031690565b60008054600160a060020a03166108ce610abe565b600160a060020a031614905090565b60015460a060020a900467ffffffffffffffff1681565b6108fc6108b9565b1515610940576040805160e560020a62461bcd0281526020600482018190526024820152600080516020610bb1833981519152604482015290519081900360640190fd5b61094981610ac2565b50565b60005460a060020a900460ff1615156109af576040805160e560020a62461bcd02815260206004820152601460248201527f5061757361626c653a206e6f7420706175736564000000000000000000000000604482015290519081900360640190fd5b6000805474ff0000000000000000000000000000000000000000191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa6109f6610abe565b60408051600160a060020a039092168252519081900360200190a1565b60005460a060020a900460ff1615610a75576040805160e560020a62461bcd02815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b6000805474ff0000000000000000000000000000000000000000191660a060020a1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586109f65b3390565b600160a060020a0381161515610b48576040805160e560020a62461bcd02815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f6464726573730000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b60008054604051600160a060020a03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a039290921691909117905556004f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572a165627a7a72305820c5803d60fceea45a89206dcdf7b32c9cf14cd74b9d17fb8dd137ad5481aafc370029" + +// DeployUpgradableECCM deploys a new Ethereum contract, binding an instance of UpgradableECCM to it. +func DeployUpgradableECCM(auth *bind.TransactOpts, backend bind.ContractBackend, ethCrossChainDataAddr common.Address, _chainId uint64) (common.Address, *types.Transaction, *UpgradableECCM, error) { + parsed, err := abi.JSON(strings.NewReader(UpgradableECCMABI)) + if err != nil { + return common.Address{}, nil, nil, err + } + + address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(UpgradableECCMBin), backend, ethCrossChainDataAddr, _chainId) + if err != nil { + return common.Address{}, nil, nil, err + } + return address, tx, &UpgradableECCM{UpgradableECCMCaller: UpgradableECCMCaller{contract: contract}, UpgradableECCMTransactor: UpgradableECCMTransactor{contract: contract}, UpgradableECCMFilterer: UpgradableECCMFilterer{contract: contract}}, nil +} + +// UpgradableECCM is an auto generated Go binding around an Ethereum contract. +type UpgradableECCM struct { + UpgradableECCMCaller // Read-only binding to the contract + UpgradableECCMTransactor // Write-only binding to the contract + UpgradableECCMFilterer // Log filterer for contract events +} + +// UpgradableECCMCaller is an auto generated read-only Go binding around an Ethereum contract. +type UpgradableECCMCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// UpgradableECCMTransactor is an auto generated write-only Go binding around an Ethereum contract. +type UpgradableECCMTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// UpgradableECCMFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type UpgradableECCMFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// UpgradableECCMSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type UpgradableECCMSession struct { + Contract *UpgradableECCM // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// UpgradableECCMCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type UpgradableECCMCallerSession struct { + Contract *UpgradableECCMCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// UpgradableECCMTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type UpgradableECCMTransactorSession struct { + Contract *UpgradableECCMTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// UpgradableECCMRaw is an auto generated low-level Go binding around an Ethereum contract. +type UpgradableECCMRaw struct { + Contract *UpgradableECCM // Generic contract binding to access the raw methods on +} + +// UpgradableECCMCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type UpgradableECCMCallerRaw struct { + Contract *UpgradableECCMCaller // Generic read-only contract binding to access the raw methods on +} + +// UpgradableECCMTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type UpgradableECCMTransactorRaw struct { + Contract *UpgradableECCMTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewUpgradableECCM creates a new instance of UpgradableECCM, bound to a specific deployed contract. +func NewUpgradableECCM(address common.Address, backend bind.ContractBackend) (*UpgradableECCM, error) { + contract, err := bindUpgradableECCM(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &UpgradableECCM{UpgradableECCMCaller: UpgradableECCMCaller{contract: contract}, UpgradableECCMTransactor: UpgradableECCMTransactor{contract: contract}, UpgradableECCMFilterer: UpgradableECCMFilterer{contract: contract}}, nil +} + +// NewUpgradableECCMCaller creates a new read-only instance of UpgradableECCM, bound to a specific deployed contract. +func NewUpgradableECCMCaller(address common.Address, caller bind.ContractCaller) (*UpgradableECCMCaller, error) { + contract, err := bindUpgradableECCM(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &UpgradableECCMCaller{contract: contract}, nil +} + +// NewUpgradableECCMTransactor creates a new write-only instance of UpgradableECCM, bound to a specific deployed contract. +func NewUpgradableECCMTransactor(address common.Address, transactor bind.ContractTransactor) (*UpgradableECCMTransactor, error) { + contract, err := bindUpgradableECCM(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &UpgradableECCMTransactor{contract: contract}, nil +} + +// NewUpgradableECCMFilterer creates a new log filterer instance of UpgradableECCM, bound to a specific deployed contract. +func NewUpgradableECCMFilterer(address common.Address, filterer bind.ContractFilterer) (*UpgradableECCMFilterer, error) { + contract, err := bindUpgradableECCM(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &UpgradableECCMFilterer{contract: contract}, nil +} + +// bindUpgradableECCM binds a generic wrapper to an already deployed contract. +func bindUpgradableECCM(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := abi.JSON(strings.NewReader(UpgradableECCMABI)) + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_UpgradableECCM *UpgradableECCMRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { + return _UpgradableECCM.Contract.UpgradableECCMCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_UpgradableECCM *UpgradableECCMRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _UpgradableECCM.Contract.UpgradableECCMTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_UpgradableECCM *UpgradableECCMRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _UpgradableECCM.Contract.UpgradableECCMTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_UpgradableECCM *UpgradableECCMCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { + return _UpgradableECCM.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_UpgradableECCM *UpgradableECCMTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _UpgradableECCM.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_UpgradableECCM *UpgradableECCMTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _UpgradableECCM.Contract.contract.Transact(opts, method, params...) +} + +// EthCrossChainDataAddress is a free data retrieval call binding the contract method 0x00ba1694. +// +// Solidity: function EthCrossChainDataAddress() view returns(address) +func (_UpgradableECCM *UpgradableECCMCaller) EthCrossChainDataAddress(opts *bind.CallOpts) (common.Address, error) { + var ( + ret0 = new(common.Address) + ) + out := ret0 + err := _UpgradableECCM.contract.Call(opts, out, "EthCrossChainDataAddress") + return *ret0, err +} + +// EthCrossChainDataAddress is a free data retrieval call binding the contract method 0x00ba1694. +// +// Solidity: function EthCrossChainDataAddress() view returns(address) +func (_UpgradableECCM *UpgradableECCMSession) EthCrossChainDataAddress() (common.Address, error) { + return _UpgradableECCM.Contract.EthCrossChainDataAddress(&_UpgradableECCM.CallOpts) +} + +// EthCrossChainDataAddress is a free data retrieval call binding the contract method 0x00ba1694. +// +// Solidity: function EthCrossChainDataAddress() view returns(address) +func (_UpgradableECCM *UpgradableECCMCallerSession) EthCrossChainDataAddress() (common.Address, error) { + return _UpgradableECCM.Contract.EthCrossChainDataAddress(&_UpgradableECCM.CallOpts) +} + +// ChainId is a free data retrieval call binding the contract method 0x9a8a0592. +// +// Solidity: function chainId() view returns(uint64) +func (_UpgradableECCM *UpgradableECCMCaller) ChainId(opts *bind.CallOpts) (uint64, error) { + var ( + ret0 = new(uint64) + ) + out := ret0 + err := _UpgradableECCM.contract.Call(opts, out, "chainId") + return *ret0, err +} + +// ChainId is a free data retrieval call binding the contract method 0x9a8a0592. +// +// Solidity: function chainId() view returns(uint64) +func (_UpgradableECCM *UpgradableECCMSession) ChainId() (uint64, error) { + return _UpgradableECCM.Contract.ChainId(&_UpgradableECCM.CallOpts) +} + +// ChainId is a free data retrieval call binding the contract method 0x9a8a0592. +// +// Solidity: function chainId() view returns(uint64) +func (_UpgradableECCM *UpgradableECCMCallerSession) ChainId() (uint64, error) { + return _UpgradableECCM.Contract.ChainId(&_UpgradableECCM.CallOpts) +} + +// IsOwner is a free data retrieval call binding the contract method 0x8f32d59b. +// +// Solidity: function isOwner() view returns(bool) +func (_UpgradableECCM *UpgradableECCMCaller) IsOwner(opts *bind.CallOpts) (bool, error) { + var ( + ret0 = new(bool) + ) + out := ret0 + err := _UpgradableECCM.contract.Call(opts, out, "isOwner") + return *ret0, err +} + +// IsOwner is a free data retrieval call binding the contract method 0x8f32d59b. +// +// Solidity: function isOwner() view returns(bool) +func (_UpgradableECCM *UpgradableECCMSession) IsOwner() (bool, error) { + return _UpgradableECCM.Contract.IsOwner(&_UpgradableECCM.CallOpts) +} + +// IsOwner is a free data retrieval call binding the contract method 0x8f32d59b. +// +// Solidity: function isOwner() view returns(bool) +func (_UpgradableECCM *UpgradableECCMCallerSession) IsOwner() (bool, error) { + return _UpgradableECCM.Contract.IsOwner(&_UpgradableECCM.CallOpts) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_UpgradableECCM *UpgradableECCMCaller) Owner(opts *bind.CallOpts) (common.Address, error) { + var ( + ret0 = new(common.Address) + ) + out := ret0 + err := _UpgradableECCM.contract.Call(opts, out, "owner") + return *ret0, err +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_UpgradableECCM *UpgradableECCMSession) Owner() (common.Address, error) { + return _UpgradableECCM.Contract.Owner(&_UpgradableECCM.CallOpts) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_UpgradableECCM *UpgradableECCMCallerSession) Owner() (common.Address, error) { + return _UpgradableECCM.Contract.Owner(&_UpgradableECCM.CallOpts) +} + +// Paused is a free data retrieval call binding the contract method 0x5c975abb. +// +// Solidity: function paused() view returns(bool) +func (_UpgradableECCM *UpgradableECCMCaller) Paused(opts *bind.CallOpts) (bool, error) { + var ( + ret0 = new(bool) + ) + out := ret0 + err := _UpgradableECCM.contract.Call(opts, out, "paused") + return *ret0, err +} + +// Paused is a free data retrieval call binding the contract method 0x5c975abb. +// +// Solidity: function paused() view returns(bool) +func (_UpgradableECCM *UpgradableECCMSession) Paused() (bool, error) { + return _UpgradableECCM.Contract.Paused(&_UpgradableECCM.CallOpts) +} + +// Paused is a free data retrieval call binding the contract method 0x5c975abb. +// +// Solidity: function paused() view returns(bool) +func (_UpgradableECCM *UpgradableECCMCallerSession) Paused() (bool, error) { + return _UpgradableECCM.Contract.Paused(&_UpgradableECCM.CallOpts) +} + +// Pause is a paid mutator transaction binding the contract method 0x8456cb59. +// +// Solidity: function pause() returns(bool) +func (_UpgradableECCM *UpgradableECCMTransactor) Pause(opts *bind.TransactOpts) (*types.Transaction, error) { + return _UpgradableECCM.contract.Transact(opts, "pause") +} + +// Pause is a paid mutator transaction binding the contract method 0x8456cb59. +// +// Solidity: function pause() returns(bool) +func (_UpgradableECCM *UpgradableECCMSession) Pause() (*types.Transaction, error) { + return _UpgradableECCM.Contract.Pause(&_UpgradableECCM.TransactOpts) +} + +// Pause is a paid mutator transaction binding the contract method 0x8456cb59. +// +// Solidity: function pause() returns(bool) +func (_UpgradableECCM *UpgradableECCMTransactorSession) Pause() (*types.Transaction, error) { + return _UpgradableECCM.Contract.Pause(&_UpgradableECCM.TransactOpts) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_UpgradableECCM *UpgradableECCMTransactor) RenounceOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { + return _UpgradableECCM.contract.Transact(opts, "renounceOwnership") +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_UpgradableECCM *UpgradableECCMSession) RenounceOwnership() (*types.Transaction, error) { + return _UpgradableECCM.Contract.RenounceOwnership(&_UpgradableECCM.TransactOpts) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_UpgradableECCM *UpgradableECCMTransactorSession) RenounceOwnership() (*types.Transaction, error) { + return _UpgradableECCM.Contract.RenounceOwnership(&_UpgradableECCM.TransactOpts) +} + +// SetChainId is a paid mutator transaction binding the contract method 0x6f31031d. +// +// Solidity: function setChainId(uint64 _newChainId) returns(bool) +func (_UpgradableECCM *UpgradableECCMTransactor) SetChainId(opts *bind.TransactOpts, _newChainId uint64) (*types.Transaction, error) { + return _UpgradableECCM.contract.Transact(opts, "setChainId", _newChainId) +} + +// SetChainId is a paid mutator transaction binding the contract method 0x6f31031d. +// +// Solidity: function setChainId(uint64 _newChainId) returns(bool) +func (_UpgradableECCM *UpgradableECCMSession) SetChainId(_newChainId uint64) (*types.Transaction, error) { + return _UpgradableECCM.Contract.SetChainId(&_UpgradableECCM.TransactOpts, _newChainId) +} + +// SetChainId is a paid mutator transaction binding the contract method 0x6f31031d. +// +// Solidity: function setChainId(uint64 _newChainId) returns(bool) +func (_UpgradableECCM *UpgradableECCMTransactorSession) SetChainId(_newChainId uint64) (*types.Transaction, error) { + return _UpgradableECCM.Contract.SetChainId(&_UpgradableECCM.TransactOpts, _newChainId) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_UpgradableECCM *UpgradableECCMTransactor) TransferOwnership(opts *bind.TransactOpts, newOwner common.Address) (*types.Transaction, error) { + return _UpgradableECCM.contract.Transact(opts, "transferOwnership", newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_UpgradableECCM *UpgradableECCMSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _UpgradableECCM.Contract.TransferOwnership(&_UpgradableECCM.TransactOpts, newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_UpgradableECCM *UpgradableECCMTransactorSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _UpgradableECCM.Contract.TransferOwnership(&_UpgradableECCM.TransactOpts, newOwner) +} + +// Unpause is a paid mutator transaction binding the contract method 0x3f4ba83a. +// +// Solidity: function unpause() returns(bool) +func (_UpgradableECCM *UpgradableECCMTransactor) Unpause(opts *bind.TransactOpts) (*types.Transaction, error) { + return _UpgradableECCM.contract.Transact(opts, "unpause") +} + +// Unpause is a paid mutator transaction binding the contract method 0x3f4ba83a. +// +// Solidity: function unpause() returns(bool) +func (_UpgradableECCM *UpgradableECCMSession) Unpause() (*types.Transaction, error) { + return _UpgradableECCM.Contract.Unpause(&_UpgradableECCM.TransactOpts) +} + +// Unpause is a paid mutator transaction binding the contract method 0x3f4ba83a. +// +// Solidity: function unpause() returns(bool) +func (_UpgradableECCM *UpgradableECCMTransactorSession) Unpause() (*types.Transaction, error) { + return _UpgradableECCM.Contract.Unpause(&_UpgradableECCM.TransactOpts) +} + +// UpgradeToNew is a paid mutator transaction binding the contract method 0x7e724ff3. +// +// Solidity: function upgradeToNew(address newEthCrossChainManagerAddress) returns(bool) +func (_UpgradableECCM *UpgradableECCMTransactor) UpgradeToNew(opts *bind.TransactOpts, newEthCrossChainManagerAddress common.Address) (*types.Transaction, error) { + return _UpgradableECCM.contract.Transact(opts, "upgradeToNew", newEthCrossChainManagerAddress) +} + +// UpgradeToNew is a paid mutator transaction binding the contract method 0x7e724ff3. +// +// Solidity: function upgradeToNew(address newEthCrossChainManagerAddress) returns(bool) +func (_UpgradableECCM *UpgradableECCMSession) UpgradeToNew(newEthCrossChainManagerAddress common.Address) (*types.Transaction, error) { + return _UpgradableECCM.Contract.UpgradeToNew(&_UpgradableECCM.TransactOpts, newEthCrossChainManagerAddress) +} + +// UpgradeToNew is a paid mutator transaction binding the contract method 0x7e724ff3. +// +// Solidity: function upgradeToNew(address newEthCrossChainManagerAddress) returns(bool) +func (_UpgradableECCM *UpgradableECCMTransactorSession) UpgradeToNew(newEthCrossChainManagerAddress common.Address) (*types.Transaction, error) { + return _UpgradableECCM.Contract.UpgradeToNew(&_UpgradableECCM.TransactOpts, newEthCrossChainManagerAddress) +} + +// UpgradableECCMOwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the UpgradableECCM contract. +type UpgradableECCMOwnershipTransferredIterator struct { + Event *UpgradableECCMOwnershipTransferred // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *UpgradableECCMOwnershipTransferredIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(UpgradableECCMOwnershipTransferred) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(UpgradableECCMOwnershipTransferred) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *UpgradableECCMOwnershipTransferredIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *UpgradableECCMOwnershipTransferredIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// UpgradableECCMOwnershipTransferred represents a OwnershipTransferred event raised by the UpgradableECCM contract. +type UpgradableECCMOwnershipTransferred struct { + PreviousOwner common.Address + NewOwner common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterOwnershipTransferred is a free log retrieval operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_UpgradableECCM *UpgradableECCMFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*UpgradableECCMOwnershipTransferredIterator, error) { + + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + } + var newOwnerRule []interface{} + for _, newOwnerItem := range newOwner { + newOwnerRule = append(newOwnerRule, newOwnerItem) + } + + logs, sub, err := _UpgradableECCM.contract.FilterLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return &UpgradableECCMOwnershipTransferredIterator{contract: _UpgradableECCM.contract, event: "OwnershipTransferred", logs: logs, sub: sub}, nil +} + +// WatchOwnershipTransferred is a free log subscription operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_UpgradableECCM *UpgradableECCMFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *UpgradableECCMOwnershipTransferred, previousOwner []common.Address, newOwner []common.Address) (event.Subscription, error) { + + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + } + var newOwnerRule []interface{} + for _, newOwnerItem := range newOwner { + newOwnerRule = append(newOwnerRule, newOwnerItem) + } + + logs, sub, err := _UpgradableECCM.contract.WatchLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(UpgradableECCMOwnershipTransferred) + if err := _UpgradableECCM.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseOwnershipTransferred is a log parse operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_UpgradableECCM *UpgradableECCMFilterer) ParseOwnershipTransferred(log types.Log) (*UpgradableECCMOwnershipTransferred, error) { + event := new(UpgradableECCMOwnershipTransferred) + if err := _UpgradableECCM.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return nil, err + } + return event, nil +} + +// UpgradableECCMPausedIterator is returned from FilterPaused and is used to iterate over the raw logs and unpacked data for Paused events raised by the UpgradableECCM contract. +type UpgradableECCMPausedIterator struct { + Event *UpgradableECCMPaused // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *UpgradableECCMPausedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(UpgradableECCMPaused) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(UpgradableECCMPaused) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *UpgradableECCMPausedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *UpgradableECCMPausedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// UpgradableECCMPaused represents a Paused event raised by the UpgradableECCM contract. +type UpgradableECCMPaused struct { + Account common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterPaused is a free log retrieval operation binding the contract event 0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258. +// +// Solidity: event Paused(address account) +func (_UpgradableECCM *UpgradableECCMFilterer) FilterPaused(opts *bind.FilterOpts) (*UpgradableECCMPausedIterator, error) { + + logs, sub, err := _UpgradableECCM.contract.FilterLogs(opts, "Paused") + if err != nil { + return nil, err + } + return &UpgradableECCMPausedIterator{contract: _UpgradableECCM.contract, event: "Paused", logs: logs, sub: sub}, nil +} + +// WatchPaused is a free log subscription operation binding the contract event 0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258. +// +// Solidity: event Paused(address account) +func (_UpgradableECCM *UpgradableECCMFilterer) WatchPaused(opts *bind.WatchOpts, sink chan<- *UpgradableECCMPaused) (event.Subscription, error) { + + logs, sub, err := _UpgradableECCM.contract.WatchLogs(opts, "Paused") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(UpgradableECCMPaused) + if err := _UpgradableECCM.contract.UnpackLog(event, "Paused", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParsePaused is a log parse operation binding the contract event 0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258. +// +// Solidity: event Paused(address account) +func (_UpgradableECCM *UpgradableECCMFilterer) ParsePaused(log types.Log) (*UpgradableECCMPaused, error) { + event := new(UpgradableECCMPaused) + if err := _UpgradableECCM.contract.UnpackLog(event, "Paused", log); err != nil { + return nil, err + } + return event, nil +} + +// UpgradableECCMUnpausedIterator is returned from FilterUnpaused and is used to iterate over the raw logs and unpacked data for Unpaused events raised by the UpgradableECCM contract. +type UpgradableECCMUnpausedIterator struct { + Event *UpgradableECCMUnpaused // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *UpgradableECCMUnpausedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(UpgradableECCMUnpaused) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(UpgradableECCMUnpaused) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *UpgradableECCMUnpausedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *UpgradableECCMUnpausedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// UpgradableECCMUnpaused represents a Unpaused event raised by the UpgradableECCM contract. +type UpgradableECCMUnpaused struct { + Account common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterUnpaused is a free log retrieval operation binding the contract event 0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa. +// +// Solidity: event Unpaused(address account) +func (_UpgradableECCM *UpgradableECCMFilterer) FilterUnpaused(opts *bind.FilterOpts) (*UpgradableECCMUnpausedIterator, error) { + + logs, sub, err := _UpgradableECCM.contract.FilterLogs(opts, "Unpaused") + if err != nil { + return nil, err + } + return &UpgradableECCMUnpausedIterator{contract: _UpgradableECCM.contract, event: "Unpaused", logs: logs, sub: sub}, nil +} + +// WatchUnpaused is a free log subscription operation binding the contract event 0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa. +// +// Solidity: event Unpaused(address account) +func (_UpgradableECCM *UpgradableECCMFilterer) WatchUnpaused(opts *bind.WatchOpts, sink chan<- *UpgradableECCMUnpaused) (event.Subscription, error) { + + logs, sub, err := _UpgradableECCM.contract.WatchLogs(opts, "Unpaused") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(UpgradableECCMUnpaused) + if err := _UpgradableECCM.contract.UnpackLog(event, "Unpaused", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseUnpaused is a log parse operation binding the contract event 0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa. +// +// Solidity: event Unpaused(address account) +func (_UpgradableECCM *UpgradableECCMFilterer) ParseUnpaused(log types.Log) (*UpgradableECCMUnpaused, error) { + event := new(UpgradableECCMUnpaused) + if err := _UpgradableECCM.contract.UnpackLog(event, "Unpaused", log); err != nil { + return nil, err + } + return event, nil +} + +// UtilsABI is the input ABI used to generate the binding from. +const UtilsABI = "[]" + +// UtilsBin is the compiled bytecode used for deploying new contracts. +var UtilsBin = "0x604c602c600b82828239805160001a60731460008114601c57601e565bfe5b5030600052607381538281f30073000000000000000000000000000000000000000030146080604052600080fd00a165627a7a723058208a60132972f4588bd303e2381120e29c85cbbd8b8c9f795d327d8ea418d7efc60029" + +// DeployUtils deploys a new Ethereum contract, binding an instance of Utils to it. +func DeployUtils(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *Utils, error) { + parsed, err := abi.JSON(strings.NewReader(UtilsABI)) + if err != nil { + return common.Address{}, nil, nil, err + } + + address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(UtilsBin), backend) + if err != nil { + return common.Address{}, nil, nil, err + } + return address, tx, &Utils{UtilsCaller: UtilsCaller{contract: contract}, UtilsTransactor: UtilsTransactor{contract: contract}, UtilsFilterer: UtilsFilterer{contract: contract}}, nil +} + +// Utils is an auto generated Go binding around an Ethereum contract. +type Utils struct { + UtilsCaller // Read-only binding to the contract + UtilsTransactor // Write-only binding to the contract + UtilsFilterer // Log filterer for contract events +} + +// UtilsCaller is an auto generated read-only Go binding around an Ethereum contract. +type UtilsCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// UtilsTransactor is an auto generated write-only Go binding around an Ethereum contract. +type UtilsTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// UtilsFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type UtilsFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// UtilsSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type UtilsSession struct { + Contract *Utils // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// UtilsCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type UtilsCallerSession struct { + Contract *UtilsCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// UtilsTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type UtilsTransactorSession struct { + Contract *UtilsTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// UtilsRaw is an auto generated low-level Go binding around an Ethereum contract. +type UtilsRaw struct { + Contract *Utils // Generic contract binding to access the raw methods on +} + +// UtilsCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type UtilsCallerRaw struct { + Contract *UtilsCaller // Generic read-only contract binding to access the raw methods on +} + +// UtilsTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type UtilsTransactorRaw struct { + Contract *UtilsTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewUtils creates a new instance of Utils, bound to a specific deployed contract. +func NewUtils(address common.Address, backend bind.ContractBackend) (*Utils, error) { + contract, err := bindUtils(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &Utils{UtilsCaller: UtilsCaller{contract: contract}, UtilsTransactor: UtilsTransactor{contract: contract}, UtilsFilterer: UtilsFilterer{contract: contract}}, nil +} + +// NewUtilsCaller creates a new read-only instance of Utils, bound to a specific deployed contract. +func NewUtilsCaller(address common.Address, caller bind.ContractCaller) (*UtilsCaller, error) { + contract, err := bindUtils(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &UtilsCaller{contract: contract}, nil +} + +// NewUtilsTransactor creates a new write-only instance of Utils, bound to a specific deployed contract. +func NewUtilsTransactor(address common.Address, transactor bind.ContractTransactor) (*UtilsTransactor, error) { + contract, err := bindUtils(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &UtilsTransactor{contract: contract}, nil +} + +// NewUtilsFilterer creates a new log filterer instance of Utils, bound to a specific deployed contract. +func NewUtilsFilterer(address common.Address, filterer bind.ContractFilterer) (*UtilsFilterer, error) { + contract, err := bindUtils(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &UtilsFilterer{contract: contract}, nil +} + +// bindUtils binds a generic wrapper to an already deployed contract. +func bindUtils(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := abi.JSON(strings.NewReader(UtilsABI)) + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_Utils *UtilsRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { + return _Utils.Contract.UtilsCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_Utils *UtilsRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Utils.Contract.UtilsTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_Utils *UtilsRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _Utils.Contract.UtilsTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_Utils *UtilsCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { + return _Utils.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_Utils *UtilsTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Utils.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_Utils *UtilsTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _Utils.Contract.contract.Transact(opts, method, params...) +} + +// ZeroCopySinkABI is the input ABI used to generate the binding from. +const ZeroCopySinkABI = "[]" + +// ZeroCopySinkBin is the compiled bytecode used for deploying new contracts. +var ZeroCopySinkBin = "0x604c602c600b82828239805160001a60731460008114601c57601e565bfe5b5030600052607381538281f30073000000000000000000000000000000000000000030146080604052600080fd00a165627a7a723058204f47695057e7187f82247488c32cd30a9032dc119489941daa298b13e466117c0029" + +// DeployZeroCopySink deploys a new Ethereum contract, binding an instance of ZeroCopySink to it. +func DeployZeroCopySink(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *ZeroCopySink, error) { + parsed, err := abi.JSON(strings.NewReader(ZeroCopySinkABI)) + if err != nil { + return common.Address{}, nil, nil, err + } + + address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(ZeroCopySinkBin), backend) + if err != nil { + return common.Address{}, nil, nil, err + } + return address, tx, &ZeroCopySink{ZeroCopySinkCaller: ZeroCopySinkCaller{contract: contract}, ZeroCopySinkTransactor: ZeroCopySinkTransactor{contract: contract}, ZeroCopySinkFilterer: ZeroCopySinkFilterer{contract: contract}}, nil +} + +// ZeroCopySink is an auto generated Go binding around an Ethereum contract. +type ZeroCopySink struct { + ZeroCopySinkCaller // Read-only binding to the contract + ZeroCopySinkTransactor // Write-only binding to the contract + ZeroCopySinkFilterer // Log filterer for contract events +} + +// ZeroCopySinkCaller is an auto generated read-only Go binding around an Ethereum contract. +type ZeroCopySinkCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// ZeroCopySinkTransactor is an auto generated write-only Go binding around an Ethereum contract. +type ZeroCopySinkTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// ZeroCopySinkFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type ZeroCopySinkFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// ZeroCopySinkSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type ZeroCopySinkSession struct { + Contract *ZeroCopySink // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// ZeroCopySinkCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type ZeroCopySinkCallerSession struct { + Contract *ZeroCopySinkCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// ZeroCopySinkTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type ZeroCopySinkTransactorSession struct { + Contract *ZeroCopySinkTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// ZeroCopySinkRaw is an auto generated low-level Go binding around an Ethereum contract. +type ZeroCopySinkRaw struct { + Contract *ZeroCopySink // Generic contract binding to access the raw methods on +} + +// ZeroCopySinkCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type ZeroCopySinkCallerRaw struct { + Contract *ZeroCopySinkCaller // Generic read-only contract binding to access the raw methods on +} + +// ZeroCopySinkTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type ZeroCopySinkTransactorRaw struct { + Contract *ZeroCopySinkTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewZeroCopySink creates a new instance of ZeroCopySink, bound to a specific deployed contract. +func NewZeroCopySink(address common.Address, backend bind.ContractBackend) (*ZeroCopySink, error) { + contract, err := bindZeroCopySink(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &ZeroCopySink{ZeroCopySinkCaller: ZeroCopySinkCaller{contract: contract}, ZeroCopySinkTransactor: ZeroCopySinkTransactor{contract: contract}, ZeroCopySinkFilterer: ZeroCopySinkFilterer{contract: contract}}, nil +} + +// NewZeroCopySinkCaller creates a new read-only instance of ZeroCopySink, bound to a specific deployed contract. +func NewZeroCopySinkCaller(address common.Address, caller bind.ContractCaller) (*ZeroCopySinkCaller, error) { + contract, err := bindZeroCopySink(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &ZeroCopySinkCaller{contract: contract}, nil +} + +// NewZeroCopySinkTransactor creates a new write-only instance of ZeroCopySink, bound to a specific deployed contract. +func NewZeroCopySinkTransactor(address common.Address, transactor bind.ContractTransactor) (*ZeroCopySinkTransactor, error) { + contract, err := bindZeroCopySink(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &ZeroCopySinkTransactor{contract: contract}, nil +} + +// NewZeroCopySinkFilterer creates a new log filterer instance of ZeroCopySink, bound to a specific deployed contract. +func NewZeroCopySinkFilterer(address common.Address, filterer bind.ContractFilterer) (*ZeroCopySinkFilterer, error) { + contract, err := bindZeroCopySink(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &ZeroCopySinkFilterer{contract: contract}, nil +} + +// bindZeroCopySink binds a generic wrapper to an already deployed contract. +func bindZeroCopySink(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := abi.JSON(strings.NewReader(ZeroCopySinkABI)) + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_ZeroCopySink *ZeroCopySinkRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { + return _ZeroCopySink.Contract.ZeroCopySinkCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_ZeroCopySink *ZeroCopySinkRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _ZeroCopySink.Contract.ZeroCopySinkTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_ZeroCopySink *ZeroCopySinkRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _ZeroCopySink.Contract.ZeroCopySinkTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_ZeroCopySink *ZeroCopySinkCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { + return _ZeroCopySink.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_ZeroCopySink *ZeroCopySinkTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _ZeroCopySink.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_ZeroCopySink *ZeroCopySinkTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _ZeroCopySink.Contract.contract.Transact(opts, method, params...) +} + +// ZeroCopySourceABI is the input ABI used to generate the binding from. +const ZeroCopySourceABI = "[]" + +// ZeroCopySourceBin is the compiled bytecode used for deploying new contracts. +var ZeroCopySourceBin = "0x604c602c600b82828239805160001a60731460008114601c57601e565bfe5b5030600052607381538281f30073000000000000000000000000000000000000000030146080604052600080fd00a165627a7a72305820a33172abb1398f340b94d76e2d2c55aa5388c6435d59c7abc85d78c2386cef5d0029" + +// DeployZeroCopySource deploys a new Ethereum contract, binding an instance of ZeroCopySource to it. +func DeployZeroCopySource(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *ZeroCopySource, error) { + parsed, err := abi.JSON(strings.NewReader(ZeroCopySourceABI)) + if err != nil { + return common.Address{}, nil, nil, err + } + + address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(ZeroCopySourceBin), backend) + if err != nil { + return common.Address{}, nil, nil, err + } + return address, tx, &ZeroCopySource{ZeroCopySourceCaller: ZeroCopySourceCaller{contract: contract}, ZeroCopySourceTransactor: ZeroCopySourceTransactor{contract: contract}, ZeroCopySourceFilterer: ZeroCopySourceFilterer{contract: contract}}, nil +} + +// ZeroCopySource is an auto generated Go binding around an Ethereum contract. +type ZeroCopySource struct { + ZeroCopySourceCaller // Read-only binding to the contract + ZeroCopySourceTransactor // Write-only binding to the contract + ZeroCopySourceFilterer // Log filterer for contract events +} + +// ZeroCopySourceCaller is an auto generated read-only Go binding around an Ethereum contract. +type ZeroCopySourceCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// ZeroCopySourceTransactor is an auto generated write-only Go binding around an Ethereum contract. +type ZeroCopySourceTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// ZeroCopySourceFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type ZeroCopySourceFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// ZeroCopySourceSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type ZeroCopySourceSession struct { + Contract *ZeroCopySource // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// ZeroCopySourceCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type ZeroCopySourceCallerSession struct { + Contract *ZeroCopySourceCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// ZeroCopySourceTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type ZeroCopySourceTransactorSession struct { + Contract *ZeroCopySourceTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// ZeroCopySourceRaw is an auto generated low-level Go binding around an Ethereum contract. +type ZeroCopySourceRaw struct { + Contract *ZeroCopySource // Generic contract binding to access the raw methods on +} + +// ZeroCopySourceCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type ZeroCopySourceCallerRaw struct { + Contract *ZeroCopySourceCaller // Generic read-only contract binding to access the raw methods on +} + +// ZeroCopySourceTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type ZeroCopySourceTransactorRaw struct { + Contract *ZeroCopySourceTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewZeroCopySource creates a new instance of ZeroCopySource, bound to a specific deployed contract. +func NewZeroCopySource(address common.Address, backend bind.ContractBackend) (*ZeroCopySource, error) { + contract, err := bindZeroCopySource(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &ZeroCopySource{ZeroCopySourceCaller: ZeroCopySourceCaller{contract: contract}, ZeroCopySourceTransactor: ZeroCopySourceTransactor{contract: contract}, ZeroCopySourceFilterer: ZeroCopySourceFilterer{contract: contract}}, nil +} + +// NewZeroCopySourceCaller creates a new read-only instance of ZeroCopySource, bound to a specific deployed contract. +func NewZeroCopySourceCaller(address common.Address, caller bind.ContractCaller) (*ZeroCopySourceCaller, error) { + contract, err := bindZeroCopySource(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &ZeroCopySourceCaller{contract: contract}, nil +} + +// NewZeroCopySourceTransactor creates a new write-only instance of ZeroCopySource, bound to a specific deployed contract. +func NewZeroCopySourceTransactor(address common.Address, transactor bind.ContractTransactor) (*ZeroCopySourceTransactor, error) { + contract, err := bindZeroCopySource(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &ZeroCopySourceTransactor{contract: contract}, nil +} + +// NewZeroCopySourceFilterer creates a new log filterer instance of ZeroCopySource, bound to a specific deployed contract. +func NewZeroCopySourceFilterer(address common.Address, filterer bind.ContractFilterer) (*ZeroCopySourceFilterer, error) { + contract, err := bindZeroCopySource(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &ZeroCopySourceFilterer{contract: contract}, nil +} + +// bindZeroCopySource binds a generic wrapper to an already deployed contract. +func bindZeroCopySource(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := abi.JSON(strings.NewReader(ZeroCopySourceABI)) + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_ZeroCopySource *ZeroCopySourceRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { + return _ZeroCopySource.Contract.ZeroCopySourceCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_ZeroCopySource *ZeroCopySourceRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _ZeroCopySource.Contract.ZeroCopySourceTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_ZeroCopySource *ZeroCopySourceRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _ZeroCopySource.Contract.ZeroCopySourceTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_ZeroCopySource *ZeroCopySourceCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { + return _ZeroCopySource.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_ZeroCopySource *ZeroCopySourceTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _ZeroCopySource.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_ZeroCopySource *ZeroCopySourceTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _ZeroCopySource.Contract.contract.Transact(opts, method, params...) +} diff --git a/go_abi/v0.4.25/eccmp/eccmp_abi.go b/go_abi/v0.4.25/eccmp/eccmp_abi.go new file mode 100644 index 0000000..b35dd48 --- /dev/null +++ b/go_abi/v0.4.25/eccmp/eccmp_abi.go @@ -0,0 +1,2348 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package eccmp + +import ( + "math/big" + "strings" + + ethereum "github.com/ethereum/go-ethereum" + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/event" +) + +// Reference imports to suppress errors if they are not otherwise used. +var ( + _ = big.NewInt + _ = strings.NewReader + _ = ethereum.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription +) + +// ContextABI is the input ABI used to generate the binding from. +const ContextABI = "[{\"inputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"}]" + +// Context is an auto generated Go binding around an Ethereum contract. +type Context struct { + ContextCaller // Read-only binding to the contract + ContextTransactor // Write-only binding to the contract + ContextFilterer // Log filterer for contract events +} + +// ContextCaller is an auto generated read-only Go binding around an Ethereum contract. +type ContextCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// ContextTransactor is an auto generated write-only Go binding around an Ethereum contract. +type ContextTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// ContextFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type ContextFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// ContextSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type ContextSession struct { + Contract *Context // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// ContextCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type ContextCallerSession struct { + Contract *ContextCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// ContextTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type ContextTransactorSession struct { + Contract *ContextTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// ContextRaw is an auto generated low-level Go binding around an Ethereum contract. +type ContextRaw struct { + Contract *Context // Generic contract binding to access the raw methods on +} + +// ContextCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type ContextCallerRaw struct { + Contract *ContextCaller // Generic read-only contract binding to access the raw methods on +} + +// ContextTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type ContextTransactorRaw struct { + Contract *ContextTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewContext creates a new instance of Context, bound to a specific deployed contract. +func NewContext(address common.Address, backend bind.ContractBackend) (*Context, error) { + contract, err := bindContext(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &Context{ContextCaller: ContextCaller{contract: contract}, ContextTransactor: ContextTransactor{contract: contract}, ContextFilterer: ContextFilterer{contract: contract}}, nil +} + +// NewContextCaller creates a new read-only instance of Context, bound to a specific deployed contract. +func NewContextCaller(address common.Address, caller bind.ContractCaller) (*ContextCaller, error) { + contract, err := bindContext(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &ContextCaller{contract: contract}, nil +} + +// NewContextTransactor creates a new write-only instance of Context, bound to a specific deployed contract. +func NewContextTransactor(address common.Address, transactor bind.ContractTransactor) (*ContextTransactor, error) { + contract, err := bindContext(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &ContextTransactor{contract: contract}, nil +} + +// NewContextFilterer creates a new log filterer instance of Context, bound to a specific deployed contract. +func NewContextFilterer(address common.Address, filterer bind.ContractFilterer) (*ContextFilterer, error) { + contract, err := bindContext(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &ContextFilterer{contract: contract}, nil +} + +// bindContext binds a generic wrapper to an already deployed contract. +func bindContext(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := abi.JSON(strings.NewReader(ContextABI)) + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_Context *ContextRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { + return _Context.Contract.ContextCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_Context *ContextRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Context.Contract.ContextTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_Context *ContextRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _Context.Contract.ContextTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_Context *ContextCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { + return _Context.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_Context *ContextTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Context.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_Context *ContextTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _Context.Contract.contract.Transact(opts, method, params...) +} + +// EthCrossChainManagerProxyABI is the input ABI used to generate the binding from. +const EthCrossChainManagerProxyABI = "[{\"constant\":false,\"inputs\":[],\"name\":\"pauseEthCrossChainManager\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"unpause\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"unpauseEthCrossChainManager\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"pause\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"getEthCrossChainManager\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"isOwner\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_newChainId\",\"type\":\"uint64\"}],\"name\":\"changeManagerChainID\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_newEthCrossChainManagerAddr\",\"type\":\"address\"}],\"name\":\"upgradeEthCrossChainManager\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"name\":\"_ethCrossChainManagerAddr\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"}]" + +// EthCrossChainManagerProxyFuncSigs maps the 4-byte function signature to its string representation. +var EthCrossChainManagerProxyFuncSigs = map[string]string{ + "a2681d28": "changeManagerChainID(uint64)", + "87939a7f": "getEthCrossChainManager()", + "8f32d59b": "isOwner()", + "8da5cb5b": "owner()", + "8456cb59": "pause()", + "3b9a80b8": "pauseEthCrossChainManager()", + "5c975abb": "paused()", + "715018a6": "renounceOwnership()", + "f2fde38b": "transferOwnership(address)", + "3f4ba83a": "unpause()", + "4390c707": "unpauseEthCrossChainManager()", + "ab59d32d": "upgradeEthCrossChainManager(address)", +} + +// EthCrossChainManagerProxyBin is the compiled bytecode used for deploying new contracts. +var EthCrossChainManagerProxyBin = "0x608060405234801561001057600080fd5b506040516020806113c5833981016040525160006100356401000000006100b4810204565b60008054600160a060020a031916600160a060020a0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3506000805460a060020a60ff021916905560018054600160a060020a031916600160a060020a03929092169190911790556100b8565b3390565b6112fe806100c76000396000f3006080604052600436106100a05763ffffffff60e060020a6000350416633b9a80b881146100a55780633f4ba83a146100ce5780634390c707146100e35780635c975abb146100f8578063715018a61461010d5780638456cb591461012457806387939a7f146101395780638da5cb5b1461016a5780638f32d59b1461017f578063a2681d2814610194578063ab59d32d146101b6578063f2fde38b146101d7575b600080fd5b3480156100b157600080fd5b506100ba6101f8565b604080519115158252519081900360200190f35b3480156100da57600080fd5b506100ba610424565b3480156100ef57600080fd5b506100ba610497565b34801561010457600080fd5b506100ba6106c5565b34801561011957600080fd5b506101226106d5565b005b34801561013057600080fd5b506100ba610778565b34801561014557600080fd5b5061014e6107e3565b60408051600160a060020a039092168252519081900360200190f35b34801561017657600080fd5b5061014e610856565b34801561018b57600080fd5b506100ba610865565b3480156101a057600080fd5b5061012267ffffffffffffffff60043516610889565b3480156101c257600080fd5b506100ba600160a060020a0360043516610b93565b3480156101e357600080fd5b50610122600160a060020a0360043516610fe8565b600080610203610865565b1515610247576040805160e560020a62461bcd02815260206004820181905260248201526000805160206112b3833981519152604482015290519081900360640190fd5b60005460a060020a900460ff16156102a9576040805160e560020a62461bcd02815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b50600154600160a060020a03166102be610778565b151561033a576040805160e560020a62461bcd02815260206004820152603060248201527f70617573652045746843726f7373436861696e4d616e6167657250726f78792060448201527f636f6e7472616374206661696c65642100000000000000000000000000000000606482015290519081900360840190fd5b80600160a060020a0316638456cb596040518163ffffffff1660e060020a028152600401602060405180830381600087803b15801561037857600080fd5b505af115801561038c573d6000803e3d6000fd5b505050506040513d60208110156103a257600080fd5b50511515610420576040805160e560020a62461bcd02815260206004820152602b60248201527f70617573652045746843726f7373436861696e4d616e6167657220636f6e747260448201527f616374206661696c656421000000000000000000000000000000000000000000606482015290519081900360840190fd5b5090565b600061042e610865565b1515610472576040805160e560020a62461bcd02815260206004820181905260248201526000805160206112b3833981519152604482015290519081900360640190fd5b61047a6106c5565b151561048857506001610494565b610490611040565b5060015b90565b6000806104a2610865565b15156104e6576040805160e560020a62461bcd02815260206004820181905260248201526000805160206112b3833981519152604482015290519081900360640190fd5b60005460a060020a900460ff161515610537576040805160e560020a62461bcd0281526020600482015260146024820152600080516020611293833981519152604482015290519081900360640190fd5b50600154604080517f3f4ba83a0000000000000000000000000000000000000000000000000000000081529051600160a060020a03909216918291633f4ba83a9160048083019260209291908290030181600087803b15801561059957600080fd5b505af11580156105ad573d6000803e3d6000fd5b505050506040513d60208110156105c357600080fd5b50511515610641576040805160e560020a62461bcd02815260206004820152602d60248201527f756e70617573652045746843726f7373436861696e4d616e6167657220636f6e60448201527f7472616374206661696c65642100000000000000000000000000000000000000606482015290519081900360840190fd5b610649610424565b1515610420576040805160e560020a62461bcd02815260206004820152603260248201527f756e70617573652045746843726f7373436861696e4d616e6167657250726f7860448201527f7920636f6e7472616374206661696c6564210000000000000000000000000000606482015290519081900360840190fd5b60005460a060020a900460ff1690565b6106dd610865565b1515610721576040805160e560020a62461bcd02815260206004820181905260248201526000805160206112b3833981519152604482015290519081900360640190fd5b60008054604051600160a060020a03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a36000805473ffffffffffffffffffffffffffffffffffffffff19169055565b6000610782610865565b15156107c6576040805160e560020a62461bcd02815260206004820181905260248201526000805160206112b3833981519152604482015290519081900360640190fd5b6107ce6106c5565b156107db57506001610494565b6104906110f5565b6000805460a060020a900460ff1615610846576040805160e560020a62461bcd02815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b50600154600160a060020a031690565b600054600160a060020a031690565b60008054600160a060020a031661087a6111a0565b600160a060020a031614905090565b6000610893610865565b15156108d7576040805160e560020a62461bcd02815260206004820181905260248201526000805160206112b3833981519152604482015290519081900360640190fd5b60005460a060020a900460ff161515610928576040805160e560020a62461bcd0281526020600482015260146024820152600080516020611293833981519152604482015290519081900360640190fd5b50600154604080517f5c975abb0000000000000000000000000000000000000000000000000000000081529051600160a060020a03909216918291635c975abb9160048083019260209291908290030181600087803b15801561098a57600080fd5b505af115801561099e573d6000803e3d6000fd5b505050506040513d60208110156109b457600080fd5b50511515610aa25780600160a060020a0316638456cb596040518163ffffffff1660e060020a028152600401602060405180830381600087803b1580156109fa57600080fd5b505af1158015610a0e573d6000803e3d6000fd5b505050506040513d6020811015610a2457600080fd5b50511515610aa2576040805160e560020a62461bcd02815260206004820152602f60248201527f5061757365206f6c642045746843726f7373436861696e4d616e61676572206360448201527f6f6e7472616374206661696c6564210000000000000000000000000000000000606482015290519081900360840190fd5b604080517f6f31031d00000000000000000000000000000000000000000000000000000000815267ffffffffffffffff841660048201529051600160a060020a03831691636f31031d9160248083019260209291908290030181600087803b158015610b0d57600080fd5b505af1158015610b21573d6000803e3d6000fd5b505050506040513d6020811015610b3757600080fd5b50511515610b8f576040805160e560020a62461bcd02815260206004820152601560248201527f73657420636861696e204944206661696c65642e200000000000000000000000604482015290519081900360640190fd5b5050565b6000806000610ba0610865565b1515610be4576040805160e560020a62461bcd02815260206004820181905260248201526000805160206112b3833981519152604482015290519081900360640190fd5b60005460a060020a900460ff161515610c35576040805160e560020a62461bcd0281526020600482015260146024820152600080516020611293833981519152604482015290519081900360640190fd5b600160009054906101000a9004600160a060020a0316915081600160a060020a0316635c975abb6040518163ffffffff1660e060020a028152600401602060405180830381600087803b158015610c8b57600080fd5b505af1158015610c9f573d6000803e3d6000fd5b505050506040513d6020811015610cb557600080fd5b50511515610da35781600160a060020a0316638456cb596040518163ffffffff1660e060020a028152600401602060405180830381600087803b158015610cfb57600080fd5b505af1158015610d0f573d6000803e3d6000fd5b505050506040513d6020811015610d2557600080fd5b50511515610da3576040805160e560020a62461bcd02815260206004820152602f60248201527f5061757365206f6c642045746843726f7373436861696e4d616e61676572206360448201527f6f6e7472616374206661696c6564210000000000000000000000000000000000606482015290519081900360840190fd5b81600160a060020a0316637e724ff3856040518263ffffffff1660e060020a0281526004018082600160a060020a0316600160a060020a03168152602001915050602060405180830381600087803b158015610dfe57600080fd5b505af1158015610e12573d6000803e3d6000fd5b505050506040513d6020811015610e2857600080fd5b50511515610ea6576040805160e560020a62461bcd02815260206004820152602960248201527f45746843726f7373436861696e4d616e616765722075706772616465546f4e6560448201527f77206661696c6564210000000000000000000000000000000000000000000000606482015290519081900360840190fd5b83905080600160a060020a0316638f32d59b6040518163ffffffff1660e060020a028152600401602060405180830381600087803b158015610ee757600080fd5b505af1158015610efb573d6000803e3d6000fd5b505050506040513d6020811015610f1157600080fd5b50511515610fb5576040805160e560020a62461bcd02815260206004820152604b60248201527f45746843726f7373436861696e4d616e6167657250726f7879206973206e6f7460448201527f206f776e6572206f66206e65772045746843726f7373436861696e4d616e616760648201527f657220636f6e7472616374000000000000000000000000000000000000000000608482015290519081900360a40190fd5b50506001805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03939093169290921790915590565b610ff0610865565b1515611034576040805160e560020a62461bcd02815260206004820181905260248201526000805160206112b3833981519152604482015290519081900360640190fd5b61103d816111a4565b50565b60005460a060020a900460ff161515611091576040805160e560020a62461bcd0281526020600482015260146024820152600080516020611293833981519152604482015290519081900360640190fd5b6000805474ff0000000000000000000000000000000000000000191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa6110d86111a0565b60408051600160a060020a039092168252519081900360200190a1565b60005460a060020a900460ff1615611157576040805160e560020a62461bcd02815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b6000805474ff0000000000000000000000000000000000000000191660a060020a1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586110d85b3390565b600160a060020a038116151561122a576040805160e560020a62461bcd02815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f6464726573730000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b60008054604051600160a060020a03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a039290921691909117905556005061757361626c653a206e6f74207061757365640000000000000000000000004f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572a165627a7a72305820cd33b56ff8bb164405358e069e7bbfd49463ca2e605298ce11e73de2616a9bf30029" + +// DeployEthCrossChainManagerProxy deploys a new Ethereum contract, binding an instance of EthCrossChainManagerProxy to it. +func DeployEthCrossChainManagerProxy(auth *bind.TransactOpts, backend bind.ContractBackend, _ethCrossChainManagerAddr common.Address) (common.Address, *types.Transaction, *EthCrossChainManagerProxy, error) { + parsed, err := abi.JSON(strings.NewReader(EthCrossChainManagerProxyABI)) + if err != nil { + return common.Address{}, nil, nil, err + } + + address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(EthCrossChainManagerProxyBin), backend, _ethCrossChainManagerAddr) + if err != nil { + return common.Address{}, nil, nil, err + } + return address, tx, &EthCrossChainManagerProxy{EthCrossChainManagerProxyCaller: EthCrossChainManagerProxyCaller{contract: contract}, EthCrossChainManagerProxyTransactor: EthCrossChainManagerProxyTransactor{contract: contract}, EthCrossChainManagerProxyFilterer: EthCrossChainManagerProxyFilterer{contract: contract}}, nil +} + +// EthCrossChainManagerProxy is an auto generated Go binding around an Ethereum contract. +type EthCrossChainManagerProxy struct { + EthCrossChainManagerProxyCaller // Read-only binding to the contract + EthCrossChainManagerProxyTransactor // Write-only binding to the contract + EthCrossChainManagerProxyFilterer // Log filterer for contract events +} + +// EthCrossChainManagerProxyCaller is an auto generated read-only Go binding around an Ethereum contract. +type EthCrossChainManagerProxyCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// EthCrossChainManagerProxyTransactor is an auto generated write-only Go binding around an Ethereum contract. +type EthCrossChainManagerProxyTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// EthCrossChainManagerProxyFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type EthCrossChainManagerProxyFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// EthCrossChainManagerProxySession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type EthCrossChainManagerProxySession struct { + Contract *EthCrossChainManagerProxy // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// EthCrossChainManagerProxyCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type EthCrossChainManagerProxyCallerSession struct { + Contract *EthCrossChainManagerProxyCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// EthCrossChainManagerProxyTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type EthCrossChainManagerProxyTransactorSession struct { + Contract *EthCrossChainManagerProxyTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// EthCrossChainManagerProxyRaw is an auto generated low-level Go binding around an Ethereum contract. +type EthCrossChainManagerProxyRaw struct { + Contract *EthCrossChainManagerProxy // Generic contract binding to access the raw methods on +} + +// EthCrossChainManagerProxyCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type EthCrossChainManagerProxyCallerRaw struct { + Contract *EthCrossChainManagerProxyCaller // Generic read-only contract binding to access the raw methods on +} + +// EthCrossChainManagerProxyTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type EthCrossChainManagerProxyTransactorRaw struct { + Contract *EthCrossChainManagerProxyTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewEthCrossChainManagerProxy creates a new instance of EthCrossChainManagerProxy, bound to a specific deployed contract. +func NewEthCrossChainManagerProxy(address common.Address, backend bind.ContractBackend) (*EthCrossChainManagerProxy, error) { + contract, err := bindEthCrossChainManagerProxy(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &EthCrossChainManagerProxy{EthCrossChainManagerProxyCaller: EthCrossChainManagerProxyCaller{contract: contract}, EthCrossChainManagerProxyTransactor: EthCrossChainManagerProxyTransactor{contract: contract}, EthCrossChainManagerProxyFilterer: EthCrossChainManagerProxyFilterer{contract: contract}}, nil +} + +// NewEthCrossChainManagerProxyCaller creates a new read-only instance of EthCrossChainManagerProxy, bound to a specific deployed contract. +func NewEthCrossChainManagerProxyCaller(address common.Address, caller bind.ContractCaller) (*EthCrossChainManagerProxyCaller, error) { + contract, err := bindEthCrossChainManagerProxy(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &EthCrossChainManagerProxyCaller{contract: contract}, nil +} + +// NewEthCrossChainManagerProxyTransactor creates a new write-only instance of EthCrossChainManagerProxy, bound to a specific deployed contract. +func NewEthCrossChainManagerProxyTransactor(address common.Address, transactor bind.ContractTransactor) (*EthCrossChainManagerProxyTransactor, error) { + contract, err := bindEthCrossChainManagerProxy(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &EthCrossChainManagerProxyTransactor{contract: contract}, nil +} + +// NewEthCrossChainManagerProxyFilterer creates a new log filterer instance of EthCrossChainManagerProxy, bound to a specific deployed contract. +func NewEthCrossChainManagerProxyFilterer(address common.Address, filterer bind.ContractFilterer) (*EthCrossChainManagerProxyFilterer, error) { + contract, err := bindEthCrossChainManagerProxy(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &EthCrossChainManagerProxyFilterer{contract: contract}, nil +} + +// bindEthCrossChainManagerProxy binds a generic wrapper to an already deployed contract. +func bindEthCrossChainManagerProxy(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := abi.JSON(strings.NewReader(EthCrossChainManagerProxyABI)) + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_EthCrossChainManagerProxy *EthCrossChainManagerProxyRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { + return _EthCrossChainManagerProxy.Contract.EthCrossChainManagerProxyCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_EthCrossChainManagerProxy *EthCrossChainManagerProxyRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _EthCrossChainManagerProxy.Contract.EthCrossChainManagerProxyTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_EthCrossChainManagerProxy *EthCrossChainManagerProxyRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _EthCrossChainManagerProxy.Contract.EthCrossChainManagerProxyTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_EthCrossChainManagerProxy *EthCrossChainManagerProxyCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { + return _EthCrossChainManagerProxy.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_EthCrossChainManagerProxy *EthCrossChainManagerProxyTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _EthCrossChainManagerProxy.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_EthCrossChainManagerProxy *EthCrossChainManagerProxyTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _EthCrossChainManagerProxy.Contract.contract.Transact(opts, method, params...) +} + +// GetEthCrossChainManager is a free data retrieval call binding the contract method 0x87939a7f. +// +// Solidity: function getEthCrossChainManager() view returns(address) +func (_EthCrossChainManagerProxy *EthCrossChainManagerProxyCaller) GetEthCrossChainManager(opts *bind.CallOpts) (common.Address, error) { + var ( + ret0 = new(common.Address) + ) + out := ret0 + err := _EthCrossChainManagerProxy.contract.Call(opts, out, "getEthCrossChainManager") + return *ret0, err +} + +// GetEthCrossChainManager is a free data retrieval call binding the contract method 0x87939a7f. +// +// Solidity: function getEthCrossChainManager() view returns(address) +func (_EthCrossChainManagerProxy *EthCrossChainManagerProxySession) GetEthCrossChainManager() (common.Address, error) { + return _EthCrossChainManagerProxy.Contract.GetEthCrossChainManager(&_EthCrossChainManagerProxy.CallOpts) +} + +// GetEthCrossChainManager is a free data retrieval call binding the contract method 0x87939a7f. +// +// Solidity: function getEthCrossChainManager() view returns(address) +func (_EthCrossChainManagerProxy *EthCrossChainManagerProxyCallerSession) GetEthCrossChainManager() (common.Address, error) { + return _EthCrossChainManagerProxy.Contract.GetEthCrossChainManager(&_EthCrossChainManagerProxy.CallOpts) +} + +// IsOwner is a free data retrieval call binding the contract method 0x8f32d59b. +// +// Solidity: function isOwner() view returns(bool) +func (_EthCrossChainManagerProxy *EthCrossChainManagerProxyCaller) IsOwner(opts *bind.CallOpts) (bool, error) { + var ( + ret0 = new(bool) + ) + out := ret0 + err := _EthCrossChainManagerProxy.contract.Call(opts, out, "isOwner") + return *ret0, err +} + +// IsOwner is a free data retrieval call binding the contract method 0x8f32d59b. +// +// Solidity: function isOwner() view returns(bool) +func (_EthCrossChainManagerProxy *EthCrossChainManagerProxySession) IsOwner() (bool, error) { + return _EthCrossChainManagerProxy.Contract.IsOwner(&_EthCrossChainManagerProxy.CallOpts) +} + +// IsOwner is a free data retrieval call binding the contract method 0x8f32d59b. +// +// Solidity: function isOwner() view returns(bool) +func (_EthCrossChainManagerProxy *EthCrossChainManagerProxyCallerSession) IsOwner() (bool, error) { + return _EthCrossChainManagerProxy.Contract.IsOwner(&_EthCrossChainManagerProxy.CallOpts) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_EthCrossChainManagerProxy *EthCrossChainManagerProxyCaller) Owner(opts *bind.CallOpts) (common.Address, error) { + var ( + ret0 = new(common.Address) + ) + out := ret0 + err := _EthCrossChainManagerProxy.contract.Call(opts, out, "owner") + return *ret0, err +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_EthCrossChainManagerProxy *EthCrossChainManagerProxySession) Owner() (common.Address, error) { + return _EthCrossChainManagerProxy.Contract.Owner(&_EthCrossChainManagerProxy.CallOpts) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_EthCrossChainManagerProxy *EthCrossChainManagerProxyCallerSession) Owner() (common.Address, error) { + return _EthCrossChainManagerProxy.Contract.Owner(&_EthCrossChainManagerProxy.CallOpts) +} + +// Paused is a free data retrieval call binding the contract method 0x5c975abb. +// +// Solidity: function paused() view returns(bool) +func (_EthCrossChainManagerProxy *EthCrossChainManagerProxyCaller) Paused(opts *bind.CallOpts) (bool, error) { + var ( + ret0 = new(bool) + ) + out := ret0 + err := _EthCrossChainManagerProxy.contract.Call(opts, out, "paused") + return *ret0, err +} + +// Paused is a free data retrieval call binding the contract method 0x5c975abb. +// +// Solidity: function paused() view returns(bool) +func (_EthCrossChainManagerProxy *EthCrossChainManagerProxySession) Paused() (bool, error) { + return _EthCrossChainManagerProxy.Contract.Paused(&_EthCrossChainManagerProxy.CallOpts) +} + +// Paused is a free data retrieval call binding the contract method 0x5c975abb. +// +// Solidity: function paused() view returns(bool) +func (_EthCrossChainManagerProxy *EthCrossChainManagerProxyCallerSession) Paused() (bool, error) { + return _EthCrossChainManagerProxy.Contract.Paused(&_EthCrossChainManagerProxy.CallOpts) +} + +// ChangeManagerChainID is a paid mutator transaction binding the contract method 0xa2681d28. +// +// Solidity: function changeManagerChainID(uint64 _newChainId) returns() +func (_EthCrossChainManagerProxy *EthCrossChainManagerProxyTransactor) ChangeManagerChainID(opts *bind.TransactOpts, _newChainId uint64) (*types.Transaction, error) { + return _EthCrossChainManagerProxy.contract.Transact(opts, "changeManagerChainID", _newChainId) +} + +// ChangeManagerChainID is a paid mutator transaction binding the contract method 0xa2681d28. +// +// Solidity: function changeManagerChainID(uint64 _newChainId) returns() +func (_EthCrossChainManagerProxy *EthCrossChainManagerProxySession) ChangeManagerChainID(_newChainId uint64) (*types.Transaction, error) { + return _EthCrossChainManagerProxy.Contract.ChangeManagerChainID(&_EthCrossChainManagerProxy.TransactOpts, _newChainId) +} + +// ChangeManagerChainID is a paid mutator transaction binding the contract method 0xa2681d28. +// +// Solidity: function changeManagerChainID(uint64 _newChainId) returns() +func (_EthCrossChainManagerProxy *EthCrossChainManagerProxyTransactorSession) ChangeManagerChainID(_newChainId uint64) (*types.Transaction, error) { + return _EthCrossChainManagerProxy.Contract.ChangeManagerChainID(&_EthCrossChainManagerProxy.TransactOpts, _newChainId) +} + +// Pause is a paid mutator transaction binding the contract method 0x8456cb59. +// +// Solidity: function pause() returns(bool) +func (_EthCrossChainManagerProxy *EthCrossChainManagerProxyTransactor) Pause(opts *bind.TransactOpts) (*types.Transaction, error) { + return _EthCrossChainManagerProxy.contract.Transact(opts, "pause") +} + +// Pause is a paid mutator transaction binding the contract method 0x8456cb59. +// +// Solidity: function pause() returns(bool) +func (_EthCrossChainManagerProxy *EthCrossChainManagerProxySession) Pause() (*types.Transaction, error) { + return _EthCrossChainManagerProxy.Contract.Pause(&_EthCrossChainManagerProxy.TransactOpts) +} + +// Pause is a paid mutator transaction binding the contract method 0x8456cb59. +// +// Solidity: function pause() returns(bool) +func (_EthCrossChainManagerProxy *EthCrossChainManagerProxyTransactorSession) Pause() (*types.Transaction, error) { + return _EthCrossChainManagerProxy.Contract.Pause(&_EthCrossChainManagerProxy.TransactOpts) +} + +// PauseEthCrossChainManager is a paid mutator transaction binding the contract method 0x3b9a80b8. +// +// Solidity: function pauseEthCrossChainManager() returns(bool) +func (_EthCrossChainManagerProxy *EthCrossChainManagerProxyTransactor) PauseEthCrossChainManager(opts *bind.TransactOpts) (*types.Transaction, error) { + return _EthCrossChainManagerProxy.contract.Transact(opts, "pauseEthCrossChainManager") +} + +// PauseEthCrossChainManager is a paid mutator transaction binding the contract method 0x3b9a80b8. +// +// Solidity: function pauseEthCrossChainManager() returns(bool) +func (_EthCrossChainManagerProxy *EthCrossChainManagerProxySession) PauseEthCrossChainManager() (*types.Transaction, error) { + return _EthCrossChainManagerProxy.Contract.PauseEthCrossChainManager(&_EthCrossChainManagerProxy.TransactOpts) +} + +// PauseEthCrossChainManager is a paid mutator transaction binding the contract method 0x3b9a80b8. +// +// Solidity: function pauseEthCrossChainManager() returns(bool) +func (_EthCrossChainManagerProxy *EthCrossChainManagerProxyTransactorSession) PauseEthCrossChainManager() (*types.Transaction, error) { + return _EthCrossChainManagerProxy.Contract.PauseEthCrossChainManager(&_EthCrossChainManagerProxy.TransactOpts) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_EthCrossChainManagerProxy *EthCrossChainManagerProxyTransactor) RenounceOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { + return _EthCrossChainManagerProxy.contract.Transact(opts, "renounceOwnership") +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_EthCrossChainManagerProxy *EthCrossChainManagerProxySession) RenounceOwnership() (*types.Transaction, error) { + return _EthCrossChainManagerProxy.Contract.RenounceOwnership(&_EthCrossChainManagerProxy.TransactOpts) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_EthCrossChainManagerProxy *EthCrossChainManagerProxyTransactorSession) RenounceOwnership() (*types.Transaction, error) { + return _EthCrossChainManagerProxy.Contract.RenounceOwnership(&_EthCrossChainManagerProxy.TransactOpts) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_EthCrossChainManagerProxy *EthCrossChainManagerProxyTransactor) TransferOwnership(opts *bind.TransactOpts, newOwner common.Address) (*types.Transaction, error) { + return _EthCrossChainManagerProxy.contract.Transact(opts, "transferOwnership", newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_EthCrossChainManagerProxy *EthCrossChainManagerProxySession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _EthCrossChainManagerProxy.Contract.TransferOwnership(&_EthCrossChainManagerProxy.TransactOpts, newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_EthCrossChainManagerProxy *EthCrossChainManagerProxyTransactorSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _EthCrossChainManagerProxy.Contract.TransferOwnership(&_EthCrossChainManagerProxy.TransactOpts, newOwner) +} + +// Unpause is a paid mutator transaction binding the contract method 0x3f4ba83a. +// +// Solidity: function unpause() returns(bool) +func (_EthCrossChainManagerProxy *EthCrossChainManagerProxyTransactor) Unpause(opts *bind.TransactOpts) (*types.Transaction, error) { + return _EthCrossChainManagerProxy.contract.Transact(opts, "unpause") +} + +// Unpause is a paid mutator transaction binding the contract method 0x3f4ba83a. +// +// Solidity: function unpause() returns(bool) +func (_EthCrossChainManagerProxy *EthCrossChainManagerProxySession) Unpause() (*types.Transaction, error) { + return _EthCrossChainManagerProxy.Contract.Unpause(&_EthCrossChainManagerProxy.TransactOpts) +} + +// Unpause is a paid mutator transaction binding the contract method 0x3f4ba83a. +// +// Solidity: function unpause() returns(bool) +func (_EthCrossChainManagerProxy *EthCrossChainManagerProxyTransactorSession) Unpause() (*types.Transaction, error) { + return _EthCrossChainManagerProxy.Contract.Unpause(&_EthCrossChainManagerProxy.TransactOpts) +} + +// UnpauseEthCrossChainManager is a paid mutator transaction binding the contract method 0x4390c707. +// +// Solidity: function unpauseEthCrossChainManager() returns(bool) +func (_EthCrossChainManagerProxy *EthCrossChainManagerProxyTransactor) UnpauseEthCrossChainManager(opts *bind.TransactOpts) (*types.Transaction, error) { + return _EthCrossChainManagerProxy.contract.Transact(opts, "unpauseEthCrossChainManager") +} + +// UnpauseEthCrossChainManager is a paid mutator transaction binding the contract method 0x4390c707. +// +// Solidity: function unpauseEthCrossChainManager() returns(bool) +func (_EthCrossChainManagerProxy *EthCrossChainManagerProxySession) UnpauseEthCrossChainManager() (*types.Transaction, error) { + return _EthCrossChainManagerProxy.Contract.UnpauseEthCrossChainManager(&_EthCrossChainManagerProxy.TransactOpts) +} + +// UnpauseEthCrossChainManager is a paid mutator transaction binding the contract method 0x4390c707. +// +// Solidity: function unpauseEthCrossChainManager() returns(bool) +func (_EthCrossChainManagerProxy *EthCrossChainManagerProxyTransactorSession) UnpauseEthCrossChainManager() (*types.Transaction, error) { + return _EthCrossChainManagerProxy.Contract.UnpauseEthCrossChainManager(&_EthCrossChainManagerProxy.TransactOpts) +} + +// UpgradeEthCrossChainManager is a paid mutator transaction binding the contract method 0xab59d32d. +// +// Solidity: function upgradeEthCrossChainManager(address _newEthCrossChainManagerAddr) returns(bool) +func (_EthCrossChainManagerProxy *EthCrossChainManagerProxyTransactor) UpgradeEthCrossChainManager(opts *bind.TransactOpts, _newEthCrossChainManagerAddr common.Address) (*types.Transaction, error) { + return _EthCrossChainManagerProxy.contract.Transact(opts, "upgradeEthCrossChainManager", _newEthCrossChainManagerAddr) +} + +// UpgradeEthCrossChainManager is a paid mutator transaction binding the contract method 0xab59d32d. +// +// Solidity: function upgradeEthCrossChainManager(address _newEthCrossChainManagerAddr) returns(bool) +func (_EthCrossChainManagerProxy *EthCrossChainManagerProxySession) UpgradeEthCrossChainManager(_newEthCrossChainManagerAddr common.Address) (*types.Transaction, error) { + return _EthCrossChainManagerProxy.Contract.UpgradeEthCrossChainManager(&_EthCrossChainManagerProxy.TransactOpts, _newEthCrossChainManagerAddr) +} + +// UpgradeEthCrossChainManager is a paid mutator transaction binding the contract method 0xab59d32d. +// +// Solidity: function upgradeEthCrossChainManager(address _newEthCrossChainManagerAddr) returns(bool) +func (_EthCrossChainManagerProxy *EthCrossChainManagerProxyTransactorSession) UpgradeEthCrossChainManager(_newEthCrossChainManagerAddr common.Address) (*types.Transaction, error) { + return _EthCrossChainManagerProxy.Contract.UpgradeEthCrossChainManager(&_EthCrossChainManagerProxy.TransactOpts, _newEthCrossChainManagerAddr) +} + +// EthCrossChainManagerProxyOwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the EthCrossChainManagerProxy contract. +type EthCrossChainManagerProxyOwnershipTransferredIterator struct { + Event *EthCrossChainManagerProxyOwnershipTransferred // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *EthCrossChainManagerProxyOwnershipTransferredIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(EthCrossChainManagerProxyOwnershipTransferred) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(EthCrossChainManagerProxyOwnershipTransferred) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *EthCrossChainManagerProxyOwnershipTransferredIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *EthCrossChainManagerProxyOwnershipTransferredIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// EthCrossChainManagerProxyOwnershipTransferred represents a OwnershipTransferred event raised by the EthCrossChainManagerProxy contract. +type EthCrossChainManagerProxyOwnershipTransferred struct { + PreviousOwner common.Address + NewOwner common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterOwnershipTransferred is a free log retrieval operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_EthCrossChainManagerProxy *EthCrossChainManagerProxyFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*EthCrossChainManagerProxyOwnershipTransferredIterator, error) { + + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + } + var newOwnerRule []interface{} + for _, newOwnerItem := range newOwner { + newOwnerRule = append(newOwnerRule, newOwnerItem) + } + + logs, sub, err := _EthCrossChainManagerProxy.contract.FilterLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return &EthCrossChainManagerProxyOwnershipTransferredIterator{contract: _EthCrossChainManagerProxy.contract, event: "OwnershipTransferred", logs: logs, sub: sub}, nil +} + +// WatchOwnershipTransferred is a free log subscription operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_EthCrossChainManagerProxy *EthCrossChainManagerProxyFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *EthCrossChainManagerProxyOwnershipTransferred, previousOwner []common.Address, newOwner []common.Address) (event.Subscription, error) { + + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + } + var newOwnerRule []interface{} + for _, newOwnerItem := range newOwner { + newOwnerRule = append(newOwnerRule, newOwnerItem) + } + + logs, sub, err := _EthCrossChainManagerProxy.contract.WatchLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(EthCrossChainManagerProxyOwnershipTransferred) + if err := _EthCrossChainManagerProxy.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseOwnershipTransferred is a log parse operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_EthCrossChainManagerProxy *EthCrossChainManagerProxyFilterer) ParseOwnershipTransferred(log types.Log) (*EthCrossChainManagerProxyOwnershipTransferred, error) { + event := new(EthCrossChainManagerProxyOwnershipTransferred) + if err := _EthCrossChainManagerProxy.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return nil, err + } + return event, nil +} + +// EthCrossChainManagerProxyPausedIterator is returned from FilterPaused and is used to iterate over the raw logs and unpacked data for Paused events raised by the EthCrossChainManagerProxy contract. +type EthCrossChainManagerProxyPausedIterator struct { + Event *EthCrossChainManagerProxyPaused // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *EthCrossChainManagerProxyPausedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(EthCrossChainManagerProxyPaused) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(EthCrossChainManagerProxyPaused) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *EthCrossChainManagerProxyPausedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *EthCrossChainManagerProxyPausedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// EthCrossChainManagerProxyPaused represents a Paused event raised by the EthCrossChainManagerProxy contract. +type EthCrossChainManagerProxyPaused struct { + Account common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterPaused is a free log retrieval operation binding the contract event 0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258. +// +// Solidity: event Paused(address account) +func (_EthCrossChainManagerProxy *EthCrossChainManagerProxyFilterer) FilterPaused(opts *bind.FilterOpts) (*EthCrossChainManagerProxyPausedIterator, error) { + + logs, sub, err := _EthCrossChainManagerProxy.contract.FilterLogs(opts, "Paused") + if err != nil { + return nil, err + } + return &EthCrossChainManagerProxyPausedIterator{contract: _EthCrossChainManagerProxy.contract, event: "Paused", logs: logs, sub: sub}, nil +} + +// WatchPaused is a free log subscription operation binding the contract event 0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258. +// +// Solidity: event Paused(address account) +func (_EthCrossChainManagerProxy *EthCrossChainManagerProxyFilterer) WatchPaused(opts *bind.WatchOpts, sink chan<- *EthCrossChainManagerProxyPaused) (event.Subscription, error) { + + logs, sub, err := _EthCrossChainManagerProxy.contract.WatchLogs(opts, "Paused") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(EthCrossChainManagerProxyPaused) + if err := _EthCrossChainManagerProxy.contract.UnpackLog(event, "Paused", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParsePaused is a log parse operation binding the contract event 0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258. +// +// Solidity: event Paused(address account) +func (_EthCrossChainManagerProxy *EthCrossChainManagerProxyFilterer) ParsePaused(log types.Log) (*EthCrossChainManagerProxyPaused, error) { + event := new(EthCrossChainManagerProxyPaused) + if err := _EthCrossChainManagerProxy.contract.UnpackLog(event, "Paused", log); err != nil { + return nil, err + } + return event, nil +} + +// EthCrossChainManagerProxyUnpausedIterator is returned from FilterUnpaused and is used to iterate over the raw logs and unpacked data for Unpaused events raised by the EthCrossChainManagerProxy contract. +type EthCrossChainManagerProxyUnpausedIterator struct { + Event *EthCrossChainManagerProxyUnpaused // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *EthCrossChainManagerProxyUnpausedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(EthCrossChainManagerProxyUnpaused) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(EthCrossChainManagerProxyUnpaused) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *EthCrossChainManagerProxyUnpausedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *EthCrossChainManagerProxyUnpausedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// EthCrossChainManagerProxyUnpaused represents a Unpaused event raised by the EthCrossChainManagerProxy contract. +type EthCrossChainManagerProxyUnpaused struct { + Account common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterUnpaused is a free log retrieval operation binding the contract event 0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa. +// +// Solidity: event Unpaused(address account) +func (_EthCrossChainManagerProxy *EthCrossChainManagerProxyFilterer) FilterUnpaused(opts *bind.FilterOpts) (*EthCrossChainManagerProxyUnpausedIterator, error) { + + logs, sub, err := _EthCrossChainManagerProxy.contract.FilterLogs(opts, "Unpaused") + if err != nil { + return nil, err + } + return &EthCrossChainManagerProxyUnpausedIterator{contract: _EthCrossChainManagerProxy.contract, event: "Unpaused", logs: logs, sub: sub}, nil +} + +// WatchUnpaused is a free log subscription operation binding the contract event 0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa. +// +// Solidity: event Unpaused(address account) +func (_EthCrossChainManagerProxy *EthCrossChainManagerProxyFilterer) WatchUnpaused(opts *bind.WatchOpts, sink chan<- *EthCrossChainManagerProxyUnpaused) (event.Subscription, error) { + + logs, sub, err := _EthCrossChainManagerProxy.contract.WatchLogs(opts, "Unpaused") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(EthCrossChainManagerProxyUnpaused) + if err := _EthCrossChainManagerProxy.contract.UnpackLog(event, "Unpaused", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseUnpaused is a log parse operation binding the contract event 0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa. +// +// Solidity: event Unpaused(address account) +func (_EthCrossChainManagerProxy *EthCrossChainManagerProxyFilterer) ParseUnpaused(log types.Log) (*EthCrossChainManagerProxyUnpaused, error) { + event := new(EthCrossChainManagerProxyUnpaused) + if err := _EthCrossChainManagerProxy.contract.UnpackLog(event, "Unpaused", log); err != nil { + return nil, err + } + return event, nil +} + +// IEthCrossChainManagerProxyABI is the input ABI used to generate the binding from. +const IEthCrossChainManagerProxyABI = "[{\"constant\":true,\"inputs\":[],\"name\":\"getEthCrossChainManager\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"}]" + +// IEthCrossChainManagerProxyFuncSigs maps the 4-byte function signature to its string representation. +var IEthCrossChainManagerProxyFuncSigs = map[string]string{ + "87939a7f": "getEthCrossChainManager()", +} + +// IEthCrossChainManagerProxy is an auto generated Go binding around an Ethereum contract. +type IEthCrossChainManagerProxy struct { + IEthCrossChainManagerProxyCaller // Read-only binding to the contract + IEthCrossChainManagerProxyTransactor // Write-only binding to the contract + IEthCrossChainManagerProxyFilterer // Log filterer for contract events +} + +// IEthCrossChainManagerProxyCaller is an auto generated read-only Go binding around an Ethereum contract. +type IEthCrossChainManagerProxyCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// IEthCrossChainManagerProxyTransactor is an auto generated write-only Go binding around an Ethereum contract. +type IEthCrossChainManagerProxyTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// IEthCrossChainManagerProxyFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type IEthCrossChainManagerProxyFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// IEthCrossChainManagerProxySession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type IEthCrossChainManagerProxySession struct { + Contract *IEthCrossChainManagerProxy // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// IEthCrossChainManagerProxyCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type IEthCrossChainManagerProxyCallerSession struct { + Contract *IEthCrossChainManagerProxyCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// IEthCrossChainManagerProxyTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type IEthCrossChainManagerProxyTransactorSession struct { + Contract *IEthCrossChainManagerProxyTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// IEthCrossChainManagerProxyRaw is an auto generated low-level Go binding around an Ethereum contract. +type IEthCrossChainManagerProxyRaw struct { + Contract *IEthCrossChainManagerProxy // Generic contract binding to access the raw methods on +} + +// IEthCrossChainManagerProxyCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type IEthCrossChainManagerProxyCallerRaw struct { + Contract *IEthCrossChainManagerProxyCaller // Generic read-only contract binding to access the raw methods on +} + +// IEthCrossChainManagerProxyTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type IEthCrossChainManagerProxyTransactorRaw struct { + Contract *IEthCrossChainManagerProxyTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewIEthCrossChainManagerProxy creates a new instance of IEthCrossChainManagerProxy, bound to a specific deployed contract. +func NewIEthCrossChainManagerProxy(address common.Address, backend bind.ContractBackend) (*IEthCrossChainManagerProxy, error) { + contract, err := bindIEthCrossChainManagerProxy(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &IEthCrossChainManagerProxy{IEthCrossChainManagerProxyCaller: IEthCrossChainManagerProxyCaller{contract: contract}, IEthCrossChainManagerProxyTransactor: IEthCrossChainManagerProxyTransactor{contract: contract}, IEthCrossChainManagerProxyFilterer: IEthCrossChainManagerProxyFilterer{contract: contract}}, nil +} + +// NewIEthCrossChainManagerProxyCaller creates a new read-only instance of IEthCrossChainManagerProxy, bound to a specific deployed contract. +func NewIEthCrossChainManagerProxyCaller(address common.Address, caller bind.ContractCaller) (*IEthCrossChainManagerProxyCaller, error) { + contract, err := bindIEthCrossChainManagerProxy(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &IEthCrossChainManagerProxyCaller{contract: contract}, nil +} + +// NewIEthCrossChainManagerProxyTransactor creates a new write-only instance of IEthCrossChainManagerProxy, bound to a specific deployed contract. +func NewIEthCrossChainManagerProxyTransactor(address common.Address, transactor bind.ContractTransactor) (*IEthCrossChainManagerProxyTransactor, error) { + contract, err := bindIEthCrossChainManagerProxy(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &IEthCrossChainManagerProxyTransactor{contract: contract}, nil +} + +// NewIEthCrossChainManagerProxyFilterer creates a new log filterer instance of IEthCrossChainManagerProxy, bound to a specific deployed contract. +func NewIEthCrossChainManagerProxyFilterer(address common.Address, filterer bind.ContractFilterer) (*IEthCrossChainManagerProxyFilterer, error) { + contract, err := bindIEthCrossChainManagerProxy(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &IEthCrossChainManagerProxyFilterer{contract: contract}, nil +} + +// bindIEthCrossChainManagerProxy binds a generic wrapper to an already deployed contract. +func bindIEthCrossChainManagerProxy(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := abi.JSON(strings.NewReader(IEthCrossChainManagerProxyABI)) + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_IEthCrossChainManagerProxy *IEthCrossChainManagerProxyRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { + return _IEthCrossChainManagerProxy.Contract.IEthCrossChainManagerProxyCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_IEthCrossChainManagerProxy *IEthCrossChainManagerProxyRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _IEthCrossChainManagerProxy.Contract.IEthCrossChainManagerProxyTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_IEthCrossChainManagerProxy *IEthCrossChainManagerProxyRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _IEthCrossChainManagerProxy.Contract.IEthCrossChainManagerProxyTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_IEthCrossChainManagerProxy *IEthCrossChainManagerProxyCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { + return _IEthCrossChainManagerProxy.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_IEthCrossChainManagerProxy *IEthCrossChainManagerProxyTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _IEthCrossChainManagerProxy.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_IEthCrossChainManagerProxy *IEthCrossChainManagerProxyTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _IEthCrossChainManagerProxy.Contract.contract.Transact(opts, method, params...) +} + +// GetEthCrossChainManager is a free data retrieval call binding the contract method 0x87939a7f. +// +// Solidity: function getEthCrossChainManager() view returns(address) +func (_IEthCrossChainManagerProxy *IEthCrossChainManagerProxyCaller) GetEthCrossChainManager(opts *bind.CallOpts) (common.Address, error) { + var ( + ret0 = new(common.Address) + ) + out := ret0 + err := _IEthCrossChainManagerProxy.contract.Call(opts, out, "getEthCrossChainManager") + return *ret0, err +} + +// GetEthCrossChainManager is a free data retrieval call binding the contract method 0x87939a7f. +// +// Solidity: function getEthCrossChainManager() view returns(address) +func (_IEthCrossChainManagerProxy *IEthCrossChainManagerProxySession) GetEthCrossChainManager() (common.Address, error) { + return _IEthCrossChainManagerProxy.Contract.GetEthCrossChainManager(&_IEthCrossChainManagerProxy.CallOpts) +} + +// GetEthCrossChainManager is a free data retrieval call binding the contract method 0x87939a7f. +// +// Solidity: function getEthCrossChainManager() view returns(address) +func (_IEthCrossChainManagerProxy *IEthCrossChainManagerProxyCallerSession) GetEthCrossChainManager() (common.Address, error) { + return _IEthCrossChainManagerProxy.Contract.GetEthCrossChainManager(&_IEthCrossChainManagerProxy.CallOpts) +} + +// IUpgradableECCMABI is the input ABI used to generate the binding from. +const IUpgradableECCMABI = "[{\"constant\":false,\"inputs\":[],\"name\":\"unpause\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_newChainId\",\"type\":\"uint64\"}],\"name\":\"setChainId\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"\",\"type\":\"address\"}],\"name\":\"upgradeToNew\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"pause\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"isOwner\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"}]" + +// IUpgradableECCMFuncSigs maps the 4-byte function signature to its string representation. +var IUpgradableECCMFuncSigs = map[string]string{ + "8f32d59b": "isOwner()", + "8456cb59": "pause()", + "5c975abb": "paused()", + "6f31031d": "setChainId(uint64)", + "3f4ba83a": "unpause()", + "7e724ff3": "upgradeToNew(address)", +} + +// IUpgradableECCM is an auto generated Go binding around an Ethereum contract. +type IUpgradableECCM struct { + IUpgradableECCMCaller // Read-only binding to the contract + IUpgradableECCMTransactor // Write-only binding to the contract + IUpgradableECCMFilterer // Log filterer for contract events +} + +// IUpgradableECCMCaller is an auto generated read-only Go binding around an Ethereum contract. +type IUpgradableECCMCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// IUpgradableECCMTransactor is an auto generated write-only Go binding around an Ethereum contract. +type IUpgradableECCMTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// IUpgradableECCMFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type IUpgradableECCMFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// IUpgradableECCMSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type IUpgradableECCMSession struct { + Contract *IUpgradableECCM // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// IUpgradableECCMCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type IUpgradableECCMCallerSession struct { + Contract *IUpgradableECCMCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// IUpgradableECCMTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type IUpgradableECCMTransactorSession struct { + Contract *IUpgradableECCMTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// IUpgradableECCMRaw is an auto generated low-level Go binding around an Ethereum contract. +type IUpgradableECCMRaw struct { + Contract *IUpgradableECCM // Generic contract binding to access the raw methods on +} + +// IUpgradableECCMCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type IUpgradableECCMCallerRaw struct { + Contract *IUpgradableECCMCaller // Generic read-only contract binding to access the raw methods on +} + +// IUpgradableECCMTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type IUpgradableECCMTransactorRaw struct { + Contract *IUpgradableECCMTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewIUpgradableECCM creates a new instance of IUpgradableECCM, bound to a specific deployed contract. +func NewIUpgradableECCM(address common.Address, backend bind.ContractBackend) (*IUpgradableECCM, error) { + contract, err := bindIUpgradableECCM(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &IUpgradableECCM{IUpgradableECCMCaller: IUpgradableECCMCaller{contract: contract}, IUpgradableECCMTransactor: IUpgradableECCMTransactor{contract: contract}, IUpgradableECCMFilterer: IUpgradableECCMFilterer{contract: contract}}, nil +} + +// NewIUpgradableECCMCaller creates a new read-only instance of IUpgradableECCM, bound to a specific deployed contract. +func NewIUpgradableECCMCaller(address common.Address, caller bind.ContractCaller) (*IUpgradableECCMCaller, error) { + contract, err := bindIUpgradableECCM(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &IUpgradableECCMCaller{contract: contract}, nil +} + +// NewIUpgradableECCMTransactor creates a new write-only instance of IUpgradableECCM, bound to a specific deployed contract. +func NewIUpgradableECCMTransactor(address common.Address, transactor bind.ContractTransactor) (*IUpgradableECCMTransactor, error) { + contract, err := bindIUpgradableECCM(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &IUpgradableECCMTransactor{contract: contract}, nil +} + +// NewIUpgradableECCMFilterer creates a new log filterer instance of IUpgradableECCM, bound to a specific deployed contract. +func NewIUpgradableECCMFilterer(address common.Address, filterer bind.ContractFilterer) (*IUpgradableECCMFilterer, error) { + contract, err := bindIUpgradableECCM(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &IUpgradableECCMFilterer{contract: contract}, nil +} + +// bindIUpgradableECCM binds a generic wrapper to an already deployed contract. +func bindIUpgradableECCM(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := abi.JSON(strings.NewReader(IUpgradableECCMABI)) + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_IUpgradableECCM *IUpgradableECCMRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { + return _IUpgradableECCM.Contract.IUpgradableECCMCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_IUpgradableECCM *IUpgradableECCMRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _IUpgradableECCM.Contract.IUpgradableECCMTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_IUpgradableECCM *IUpgradableECCMRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _IUpgradableECCM.Contract.IUpgradableECCMTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_IUpgradableECCM *IUpgradableECCMCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { + return _IUpgradableECCM.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_IUpgradableECCM *IUpgradableECCMTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _IUpgradableECCM.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_IUpgradableECCM *IUpgradableECCMTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _IUpgradableECCM.Contract.contract.Transact(opts, method, params...) +} + +// IsOwner is a free data retrieval call binding the contract method 0x8f32d59b. +// +// Solidity: function isOwner() view returns(bool) +func (_IUpgradableECCM *IUpgradableECCMCaller) IsOwner(opts *bind.CallOpts) (bool, error) { + var ( + ret0 = new(bool) + ) + out := ret0 + err := _IUpgradableECCM.contract.Call(opts, out, "isOwner") + return *ret0, err +} + +// IsOwner is a free data retrieval call binding the contract method 0x8f32d59b. +// +// Solidity: function isOwner() view returns(bool) +func (_IUpgradableECCM *IUpgradableECCMSession) IsOwner() (bool, error) { + return _IUpgradableECCM.Contract.IsOwner(&_IUpgradableECCM.CallOpts) +} + +// IsOwner is a free data retrieval call binding the contract method 0x8f32d59b. +// +// Solidity: function isOwner() view returns(bool) +func (_IUpgradableECCM *IUpgradableECCMCallerSession) IsOwner() (bool, error) { + return _IUpgradableECCM.Contract.IsOwner(&_IUpgradableECCM.CallOpts) +} + +// Paused is a free data retrieval call binding the contract method 0x5c975abb. +// +// Solidity: function paused() view returns(bool) +func (_IUpgradableECCM *IUpgradableECCMCaller) Paused(opts *bind.CallOpts) (bool, error) { + var ( + ret0 = new(bool) + ) + out := ret0 + err := _IUpgradableECCM.contract.Call(opts, out, "paused") + return *ret0, err +} + +// Paused is a free data retrieval call binding the contract method 0x5c975abb. +// +// Solidity: function paused() view returns(bool) +func (_IUpgradableECCM *IUpgradableECCMSession) Paused() (bool, error) { + return _IUpgradableECCM.Contract.Paused(&_IUpgradableECCM.CallOpts) +} + +// Paused is a free data retrieval call binding the contract method 0x5c975abb. +// +// Solidity: function paused() view returns(bool) +func (_IUpgradableECCM *IUpgradableECCMCallerSession) Paused() (bool, error) { + return _IUpgradableECCM.Contract.Paused(&_IUpgradableECCM.CallOpts) +} + +// Pause is a paid mutator transaction binding the contract method 0x8456cb59. +// +// Solidity: function pause() returns(bool) +func (_IUpgradableECCM *IUpgradableECCMTransactor) Pause(opts *bind.TransactOpts) (*types.Transaction, error) { + return _IUpgradableECCM.contract.Transact(opts, "pause") +} + +// Pause is a paid mutator transaction binding the contract method 0x8456cb59. +// +// Solidity: function pause() returns(bool) +func (_IUpgradableECCM *IUpgradableECCMSession) Pause() (*types.Transaction, error) { + return _IUpgradableECCM.Contract.Pause(&_IUpgradableECCM.TransactOpts) +} + +// Pause is a paid mutator transaction binding the contract method 0x8456cb59. +// +// Solidity: function pause() returns(bool) +func (_IUpgradableECCM *IUpgradableECCMTransactorSession) Pause() (*types.Transaction, error) { + return _IUpgradableECCM.Contract.Pause(&_IUpgradableECCM.TransactOpts) +} + +// SetChainId is a paid mutator transaction binding the contract method 0x6f31031d. +// +// Solidity: function setChainId(uint64 _newChainId) returns(bool) +func (_IUpgradableECCM *IUpgradableECCMTransactor) SetChainId(opts *bind.TransactOpts, _newChainId uint64) (*types.Transaction, error) { + return _IUpgradableECCM.contract.Transact(opts, "setChainId", _newChainId) +} + +// SetChainId is a paid mutator transaction binding the contract method 0x6f31031d. +// +// Solidity: function setChainId(uint64 _newChainId) returns(bool) +func (_IUpgradableECCM *IUpgradableECCMSession) SetChainId(_newChainId uint64) (*types.Transaction, error) { + return _IUpgradableECCM.Contract.SetChainId(&_IUpgradableECCM.TransactOpts, _newChainId) +} + +// SetChainId is a paid mutator transaction binding the contract method 0x6f31031d. +// +// Solidity: function setChainId(uint64 _newChainId) returns(bool) +func (_IUpgradableECCM *IUpgradableECCMTransactorSession) SetChainId(_newChainId uint64) (*types.Transaction, error) { + return _IUpgradableECCM.Contract.SetChainId(&_IUpgradableECCM.TransactOpts, _newChainId) +} + +// Unpause is a paid mutator transaction binding the contract method 0x3f4ba83a. +// +// Solidity: function unpause() returns(bool) +func (_IUpgradableECCM *IUpgradableECCMTransactor) Unpause(opts *bind.TransactOpts) (*types.Transaction, error) { + return _IUpgradableECCM.contract.Transact(opts, "unpause") +} + +// Unpause is a paid mutator transaction binding the contract method 0x3f4ba83a. +// +// Solidity: function unpause() returns(bool) +func (_IUpgradableECCM *IUpgradableECCMSession) Unpause() (*types.Transaction, error) { + return _IUpgradableECCM.Contract.Unpause(&_IUpgradableECCM.TransactOpts) +} + +// Unpause is a paid mutator transaction binding the contract method 0x3f4ba83a. +// +// Solidity: function unpause() returns(bool) +func (_IUpgradableECCM *IUpgradableECCMTransactorSession) Unpause() (*types.Transaction, error) { + return _IUpgradableECCM.Contract.Unpause(&_IUpgradableECCM.TransactOpts) +} + +// UpgradeToNew is a paid mutator transaction binding the contract method 0x7e724ff3. +// +// Solidity: function upgradeToNew(address ) returns(bool) +func (_IUpgradableECCM *IUpgradableECCMTransactor) UpgradeToNew(opts *bind.TransactOpts, arg0 common.Address) (*types.Transaction, error) { + return _IUpgradableECCM.contract.Transact(opts, "upgradeToNew", arg0) +} + +// UpgradeToNew is a paid mutator transaction binding the contract method 0x7e724ff3. +// +// Solidity: function upgradeToNew(address ) returns(bool) +func (_IUpgradableECCM *IUpgradableECCMSession) UpgradeToNew(arg0 common.Address) (*types.Transaction, error) { + return _IUpgradableECCM.Contract.UpgradeToNew(&_IUpgradableECCM.TransactOpts, arg0) +} + +// UpgradeToNew is a paid mutator transaction binding the contract method 0x7e724ff3. +// +// Solidity: function upgradeToNew(address ) returns(bool) +func (_IUpgradableECCM *IUpgradableECCMTransactorSession) UpgradeToNew(arg0 common.Address) (*types.Transaction, error) { + return _IUpgradableECCM.Contract.UpgradeToNew(&_IUpgradableECCM.TransactOpts, arg0) +} + +// OwnableABI is the input ABI used to generate the binding from. +const OwnableABI = "[{\"constant\":false,\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"isOwner\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"}]" + +// OwnableFuncSigs maps the 4-byte function signature to its string representation. +var OwnableFuncSigs = map[string]string{ + "8f32d59b": "isOwner()", + "8da5cb5b": "owner()", + "715018a6": "renounceOwnership()", + "f2fde38b": "transferOwnership(address)", +} + +// Ownable is an auto generated Go binding around an Ethereum contract. +type Ownable struct { + OwnableCaller // Read-only binding to the contract + OwnableTransactor // Write-only binding to the contract + OwnableFilterer // Log filterer for contract events +} + +// OwnableCaller is an auto generated read-only Go binding around an Ethereum contract. +type OwnableCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// OwnableTransactor is an auto generated write-only Go binding around an Ethereum contract. +type OwnableTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// OwnableFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type OwnableFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// OwnableSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type OwnableSession struct { + Contract *Ownable // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// OwnableCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type OwnableCallerSession struct { + Contract *OwnableCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// OwnableTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type OwnableTransactorSession struct { + Contract *OwnableTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// OwnableRaw is an auto generated low-level Go binding around an Ethereum contract. +type OwnableRaw struct { + Contract *Ownable // Generic contract binding to access the raw methods on +} + +// OwnableCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type OwnableCallerRaw struct { + Contract *OwnableCaller // Generic read-only contract binding to access the raw methods on +} + +// OwnableTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type OwnableTransactorRaw struct { + Contract *OwnableTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewOwnable creates a new instance of Ownable, bound to a specific deployed contract. +func NewOwnable(address common.Address, backend bind.ContractBackend) (*Ownable, error) { + contract, err := bindOwnable(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &Ownable{OwnableCaller: OwnableCaller{contract: contract}, OwnableTransactor: OwnableTransactor{contract: contract}, OwnableFilterer: OwnableFilterer{contract: contract}}, nil +} + +// NewOwnableCaller creates a new read-only instance of Ownable, bound to a specific deployed contract. +func NewOwnableCaller(address common.Address, caller bind.ContractCaller) (*OwnableCaller, error) { + contract, err := bindOwnable(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &OwnableCaller{contract: contract}, nil +} + +// NewOwnableTransactor creates a new write-only instance of Ownable, bound to a specific deployed contract. +func NewOwnableTransactor(address common.Address, transactor bind.ContractTransactor) (*OwnableTransactor, error) { + contract, err := bindOwnable(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &OwnableTransactor{contract: contract}, nil +} + +// NewOwnableFilterer creates a new log filterer instance of Ownable, bound to a specific deployed contract. +func NewOwnableFilterer(address common.Address, filterer bind.ContractFilterer) (*OwnableFilterer, error) { + contract, err := bindOwnable(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &OwnableFilterer{contract: contract}, nil +} + +// bindOwnable binds a generic wrapper to an already deployed contract. +func bindOwnable(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := abi.JSON(strings.NewReader(OwnableABI)) + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_Ownable *OwnableRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { + return _Ownable.Contract.OwnableCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_Ownable *OwnableRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Ownable.Contract.OwnableTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_Ownable *OwnableRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _Ownable.Contract.OwnableTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_Ownable *OwnableCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { + return _Ownable.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_Ownable *OwnableTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Ownable.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_Ownable *OwnableTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _Ownable.Contract.contract.Transact(opts, method, params...) +} + +// IsOwner is a free data retrieval call binding the contract method 0x8f32d59b. +// +// Solidity: function isOwner() view returns(bool) +func (_Ownable *OwnableCaller) IsOwner(opts *bind.CallOpts) (bool, error) { + var ( + ret0 = new(bool) + ) + out := ret0 + err := _Ownable.contract.Call(opts, out, "isOwner") + return *ret0, err +} + +// IsOwner is a free data retrieval call binding the contract method 0x8f32d59b. +// +// Solidity: function isOwner() view returns(bool) +func (_Ownable *OwnableSession) IsOwner() (bool, error) { + return _Ownable.Contract.IsOwner(&_Ownable.CallOpts) +} + +// IsOwner is a free data retrieval call binding the contract method 0x8f32d59b. +// +// Solidity: function isOwner() view returns(bool) +func (_Ownable *OwnableCallerSession) IsOwner() (bool, error) { + return _Ownable.Contract.IsOwner(&_Ownable.CallOpts) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_Ownable *OwnableCaller) Owner(opts *bind.CallOpts) (common.Address, error) { + var ( + ret0 = new(common.Address) + ) + out := ret0 + err := _Ownable.contract.Call(opts, out, "owner") + return *ret0, err +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_Ownable *OwnableSession) Owner() (common.Address, error) { + return _Ownable.Contract.Owner(&_Ownable.CallOpts) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_Ownable *OwnableCallerSession) Owner() (common.Address, error) { + return _Ownable.Contract.Owner(&_Ownable.CallOpts) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_Ownable *OwnableTransactor) RenounceOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Ownable.contract.Transact(opts, "renounceOwnership") +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_Ownable *OwnableSession) RenounceOwnership() (*types.Transaction, error) { + return _Ownable.Contract.RenounceOwnership(&_Ownable.TransactOpts) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_Ownable *OwnableTransactorSession) RenounceOwnership() (*types.Transaction, error) { + return _Ownable.Contract.RenounceOwnership(&_Ownable.TransactOpts) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_Ownable *OwnableTransactor) TransferOwnership(opts *bind.TransactOpts, newOwner common.Address) (*types.Transaction, error) { + return _Ownable.contract.Transact(opts, "transferOwnership", newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_Ownable *OwnableSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _Ownable.Contract.TransferOwnership(&_Ownable.TransactOpts, newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_Ownable *OwnableTransactorSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _Ownable.Contract.TransferOwnership(&_Ownable.TransactOpts, newOwner) +} + +// OwnableOwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the Ownable contract. +type OwnableOwnershipTransferredIterator struct { + Event *OwnableOwnershipTransferred // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *OwnableOwnershipTransferredIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(OwnableOwnershipTransferred) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(OwnableOwnershipTransferred) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *OwnableOwnershipTransferredIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *OwnableOwnershipTransferredIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// OwnableOwnershipTransferred represents a OwnershipTransferred event raised by the Ownable contract. +type OwnableOwnershipTransferred struct { + PreviousOwner common.Address + NewOwner common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterOwnershipTransferred is a free log retrieval operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_Ownable *OwnableFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*OwnableOwnershipTransferredIterator, error) { + + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + } + var newOwnerRule []interface{} + for _, newOwnerItem := range newOwner { + newOwnerRule = append(newOwnerRule, newOwnerItem) + } + + logs, sub, err := _Ownable.contract.FilterLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return &OwnableOwnershipTransferredIterator{contract: _Ownable.contract, event: "OwnershipTransferred", logs: logs, sub: sub}, nil +} + +// WatchOwnershipTransferred is a free log subscription operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_Ownable *OwnableFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *OwnableOwnershipTransferred, previousOwner []common.Address, newOwner []common.Address) (event.Subscription, error) { + + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + } + var newOwnerRule []interface{} + for _, newOwnerItem := range newOwner { + newOwnerRule = append(newOwnerRule, newOwnerItem) + } + + logs, sub, err := _Ownable.contract.WatchLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(OwnableOwnershipTransferred) + if err := _Ownable.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseOwnershipTransferred is a log parse operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_Ownable *OwnableFilterer) ParseOwnershipTransferred(log types.Log) (*OwnableOwnershipTransferred, error) { + event := new(OwnableOwnershipTransferred) + if err := _Ownable.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return nil, err + } + return event, nil +} + +// PausableABI is the input ABI used to generate the binding from. +const PausableABI = "[{\"constant\":true,\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"}]" + +// PausableFuncSigs maps the 4-byte function signature to its string representation. +var PausableFuncSigs = map[string]string{ + "5c975abb": "paused()", +} + +// Pausable is an auto generated Go binding around an Ethereum contract. +type Pausable struct { + PausableCaller // Read-only binding to the contract + PausableTransactor // Write-only binding to the contract + PausableFilterer // Log filterer for contract events +} + +// PausableCaller is an auto generated read-only Go binding around an Ethereum contract. +type PausableCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// PausableTransactor is an auto generated write-only Go binding around an Ethereum contract. +type PausableTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// PausableFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type PausableFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// PausableSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type PausableSession struct { + Contract *Pausable // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// PausableCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type PausableCallerSession struct { + Contract *PausableCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// PausableTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type PausableTransactorSession struct { + Contract *PausableTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// PausableRaw is an auto generated low-level Go binding around an Ethereum contract. +type PausableRaw struct { + Contract *Pausable // Generic contract binding to access the raw methods on +} + +// PausableCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type PausableCallerRaw struct { + Contract *PausableCaller // Generic read-only contract binding to access the raw methods on +} + +// PausableTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type PausableTransactorRaw struct { + Contract *PausableTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewPausable creates a new instance of Pausable, bound to a specific deployed contract. +func NewPausable(address common.Address, backend bind.ContractBackend) (*Pausable, error) { + contract, err := bindPausable(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &Pausable{PausableCaller: PausableCaller{contract: contract}, PausableTransactor: PausableTransactor{contract: contract}, PausableFilterer: PausableFilterer{contract: contract}}, nil +} + +// NewPausableCaller creates a new read-only instance of Pausable, bound to a specific deployed contract. +func NewPausableCaller(address common.Address, caller bind.ContractCaller) (*PausableCaller, error) { + contract, err := bindPausable(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &PausableCaller{contract: contract}, nil +} + +// NewPausableTransactor creates a new write-only instance of Pausable, bound to a specific deployed contract. +func NewPausableTransactor(address common.Address, transactor bind.ContractTransactor) (*PausableTransactor, error) { + contract, err := bindPausable(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &PausableTransactor{contract: contract}, nil +} + +// NewPausableFilterer creates a new log filterer instance of Pausable, bound to a specific deployed contract. +func NewPausableFilterer(address common.Address, filterer bind.ContractFilterer) (*PausableFilterer, error) { + contract, err := bindPausable(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &PausableFilterer{contract: contract}, nil +} + +// bindPausable binds a generic wrapper to an already deployed contract. +func bindPausable(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := abi.JSON(strings.NewReader(PausableABI)) + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_Pausable *PausableRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { + return _Pausable.Contract.PausableCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_Pausable *PausableRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Pausable.Contract.PausableTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_Pausable *PausableRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _Pausable.Contract.PausableTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_Pausable *PausableCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { + return _Pausable.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_Pausable *PausableTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Pausable.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_Pausable *PausableTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _Pausable.Contract.contract.Transact(opts, method, params...) +} + +// Paused is a free data retrieval call binding the contract method 0x5c975abb. +// +// Solidity: function paused() view returns(bool) +func (_Pausable *PausableCaller) Paused(opts *bind.CallOpts) (bool, error) { + var ( + ret0 = new(bool) + ) + out := ret0 + err := _Pausable.contract.Call(opts, out, "paused") + return *ret0, err +} + +// Paused is a free data retrieval call binding the contract method 0x5c975abb. +// +// Solidity: function paused() view returns(bool) +func (_Pausable *PausableSession) Paused() (bool, error) { + return _Pausable.Contract.Paused(&_Pausable.CallOpts) +} + +// Paused is a free data retrieval call binding the contract method 0x5c975abb. +// +// Solidity: function paused() view returns(bool) +func (_Pausable *PausableCallerSession) Paused() (bool, error) { + return _Pausable.Contract.Paused(&_Pausable.CallOpts) +} + +// PausablePausedIterator is returned from FilterPaused and is used to iterate over the raw logs and unpacked data for Paused events raised by the Pausable contract. +type PausablePausedIterator struct { + Event *PausablePaused // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *PausablePausedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(PausablePaused) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(PausablePaused) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *PausablePausedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *PausablePausedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// PausablePaused represents a Paused event raised by the Pausable contract. +type PausablePaused struct { + Account common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterPaused is a free log retrieval operation binding the contract event 0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258. +// +// Solidity: event Paused(address account) +func (_Pausable *PausableFilterer) FilterPaused(opts *bind.FilterOpts) (*PausablePausedIterator, error) { + + logs, sub, err := _Pausable.contract.FilterLogs(opts, "Paused") + if err != nil { + return nil, err + } + return &PausablePausedIterator{contract: _Pausable.contract, event: "Paused", logs: logs, sub: sub}, nil +} + +// WatchPaused is a free log subscription operation binding the contract event 0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258. +// +// Solidity: event Paused(address account) +func (_Pausable *PausableFilterer) WatchPaused(opts *bind.WatchOpts, sink chan<- *PausablePaused) (event.Subscription, error) { + + logs, sub, err := _Pausable.contract.WatchLogs(opts, "Paused") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(PausablePaused) + if err := _Pausable.contract.UnpackLog(event, "Paused", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParsePaused is a log parse operation binding the contract event 0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258. +// +// Solidity: event Paused(address account) +func (_Pausable *PausableFilterer) ParsePaused(log types.Log) (*PausablePaused, error) { + event := new(PausablePaused) + if err := _Pausable.contract.UnpackLog(event, "Paused", log); err != nil { + return nil, err + } + return event, nil +} + +// PausableUnpausedIterator is returned from FilterUnpaused and is used to iterate over the raw logs and unpacked data for Unpaused events raised by the Pausable contract. +type PausableUnpausedIterator struct { + Event *PausableUnpaused // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *PausableUnpausedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(PausableUnpaused) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(PausableUnpaused) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *PausableUnpausedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *PausableUnpausedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// PausableUnpaused represents a Unpaused event raised by the Pausable contract. +type PausableUnpaused struct { + Account common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterUnpaused is a free log retrieval operation binding the contract event 0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa. +// +// Solidity: event Unpaused(address account) +func (_Pausable *PausableFilterer) FilterUnpaused(opts *bind.FilterOpts) (*PausableUnpausedIterator, error) { + + logs, sub, err := _Pausable.contract.FilterLogs(opts, "Unpaused") + if err != nil { + return nil, err + } + return &PausableUnpausedIterator{contract: _Pausable.contract, event: "Unpaused", logs: logs, sub: sub}, nil +} + +// WatchUnpaused is a free log subscription operation binding the contract event 0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa. +// +// Solidity: event Unpaused(address account) +func (_Pausable *PausableFilterer) WatchUnpaused(opts *bind.WatchOpts, sink chan<- *PausableUnpaused) (event.Subscription, error) { + + logs, sub, err := _Pausable.contract.WatchLogs(opts, "Unpaused") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(PausableUnpaused) + if err := _Pausable.contract.UnpackLog(event, "Unpaused", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseUnpaused is a log parse operation binding the contract event 0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa. +// +// Solidity: event Unpaused(address account) +func (_Pausable *PausableFilterer) ParseUnpaused(log types.Log) (*PausableUnpaused, error) { + event := new(PausableUnpaused) + if err := _Pausable.contract.UnpackLog(event, "Unpaused", log); err != nil { + return nil, err + } + return event, nil +} diff --git a/test/EthCrossChainManagerTest.js b/test/EthCrossChainManagerTest.js index 16f9e33..5ab5fc2 100644 --- a/test/EthCrossChainManagerTest.js +++ b/test/EthCrossChainManagerTest.js @@ -9,7 +9,7 @@ contract('EthCrossChain', (accounts) => { before(async function () { this.ECCD = await EthCrossChainData.new({ from: accounts[0], value: web3.utils.toWei('0', 'ether'), gas: 10000000, gasPrice: 50 }); console.log("this.ECCD.address = ", this.ECCD.address); - this.ECCM = await EthCrossChainManager.new(this.ECCD.address, { from: accounts[0], value: web3.utils.toWei('0', 'ether'), gas: 200000000, gasPrice: 50 }); + this.ECCM = await EthCrossChainManager.new(this.ECCD.address, 2, { from: accounts[0], value: web3.utils.toWei('0', 'ether'), gas: 200000000, gasPrice: 50 }); console.log("this.ECCM.address........... = ", this.ECCM.address); this.ECCMP = await EthCrossChainManagerProxy.new(this.ECCM.address, { from: accounts[0], value: web3.utils.toWei('0', 'ether'), gas: 60000000, gasPrice: 50 }); console.log("this.ECCMP.address........... = ", this.ECCMP.address);