From e3a7d0c36adb3d1a4d51a11eaedacd1a36dd8e46 Mon Sep 17 00:00:00 2001 From: Dylan Moreland Date: Fri, 1 May 2026 15:17:11 -0400 Subject: [PATCH 1/9] Remove the on-chain vehicle device definition This is instead determined by the most recent attestation of type "dimo.attestation" having the vehicle NFT as its subject. --- .../MultipleMinter.sol/MultipleMinter.json | 240 +- .../SyntheticDevice.sol/SyntheticDevice.json | 31 - .../nodes/Vehicle.sol/Vehicle.json | 91 +- .../VehicleInternal.sol/VehicleInternal.json | 31 - contracts/dev/DevAdmin.sol | 6 +- contracts/implementations/MultipleMinter.sol | 429 +--- contracts/implementations/nodes/Vehicle.sol | 143 +- .../implementations/nodes/VehicleInternal.sol | 11 - contracts/libraries/nodes/VehicleStorage.sol | 6 +- contracts/shared/Types.sol | 31 +- scripts/tasks.ts | 3 +- test/DevAdmin.test.ts | 118 +- test/DimoForwarder.test.ts | 4 +- test/Multicall.test.ts | 21 +- test/MultipleMinter.test.ts | 2045 ++--------------- test/NFTs/AftermarketDeviceId.test.ts | 2 +- test/NFTs/SyntheticDeviceId.test.ts | 2 +- test/NFTs/VehicleId.test.ts | 24 +- test/nodes/AftermarketDevice.test.ts | 70 +- test/nodes/SyntheticDevice.test.ts | 18 +- test/nodes/Vehicle.test.ts | 260 +-- test/storageNode/StorageNodeRegistry.test.ts | 3 +- test/streamr/VehicleStream.test.ts | 6 +- utils/constants/Eip712Types.json | 22 - utils/types.ts | 29 +- 25 files changed, 517 insertions(+), 3129 deletions(-) diff --git a/abis/contracts/implementations/MultipleMinter.sol/MultipleMinter.json b/abis/contracts/implementations/MultipleMinter.sol/MultipleMinter.json index 9d614efa..53603a67 100644 --- a/abis/contracts/implementations/MultipleMinter.sol/MultipleMinter.json +++ b/abis/contracts/implementations/MultipleMinter.sol/MultipleMinter.json @@ -176,37 +176,6 @@ "name": "VehicleNodeMinted", "type": "event" }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "manufacturerId", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "vehicleId", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": false, - "internalType": "string", - "name": "deviceDefinitionId", - "type": "string" - } - ], - "name": "VehicleNodeMintedWithDeviceDefinition", - "type": "event" - }, { "anonymous": false, "inputs": [ @@ -403,11 +372,6 @@ "name": "owner", "type": "address" }, - { - "internalType": "string", - "name": "deviceDefinitionId", - "type": "string" - }, { "internalType": "uint256", "name": "storageNodeId", @@ -468,175 +432,7 @@ "type": "tuple[]" } ], - "internalType": "struct MintVehicleAndSdWithDdInputWithSnId", - "name": "data", - "type": "tuple" - } - ], - "name": "mintVehicleAndSdWithDeviceDefinitionSign", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "manufacturerNode", - "type": "uint256" - }, - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "string", - "name": "deviceDefinitionId", - "type": "string" - }, - { - "components": [ - { - "internalType": "string", - "name": "attribute", - "type": "string" - }, - { - "internalType": "string", - "name": "info", - "type": "string" - } - ], - "internalType": "struct AttributeInfoPair[]", - "name": "attrInfoPairsVehicle", - "type": "tuple[]" - }, - { - "internalType": "uint256", - "name": "connectionId", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "vehicleOwnerSig", - "type": "bytes" - }, - { - "internalType": "bytes", - "name": "syntheticDeviceSig", - "type": "bytes" - }, - { - "internalType": "address", - "name": "syntheticDeviceAddr", - "type": "address" - }, - { - "components": [ - { - "internalType": "string", - "name": "attribute", - "type": "string" - }, - { - "internalType": "string", - "name": "info", - "type": "string" - } - ], - "internalType": "struct AttributeInfoPair[]", - "name": "attrInfoPairsDevice", - "type": "tuple[]" - } - ], - "internalType": "struct MintVehicleAndSdWithDdInput", - "name": "data", - "type": "tuple" - } - ], - "name": "mintVehicleAndSdWithDeviceDefinitionSign", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "manufacturerNode", - "type": "uint256" - }, - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "string", - "name": "deviceDefinitionId", - "type": "string" - }, - { - "components": [ - { - "internalType": "string", - "name": "attribute", - "type": "string" - }, - { - "internalType": "string", - "name": "info", - "type": "string" - } - ], - "internalType": "struct AttributeInfoPair[]", - "name": "attrInfoPairsVehicle", - "type": "tuple[]" - }, - { - "internalType": "uint256", - "name": "connectionId", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "vehicleOwnerSig", - "type": "bytes" - }, - { - "internalType": "bytes", - "name": "syntheticDeviceSig", - "type": "bytes" - }, - { - "internalType": "address", - "name": "syntheticDeviceAddr", - "type": "address" - }, - { - "components": [ - { - "internalType": "string", - "name": "attribute", - "type": "string" - }, - { - "internalType": "string", - "name": "info", - "type": "string" - } - ], - "internalType": "struct AttributeInfoPair[]", - "name": "attrInfoPairsDevice", - "type": "tuple[]" - } - ], - "internalType": "struct MintVehicleAndSdWithDdInput", + "internalType": "struct MintVehicleAndSdInputWithSnId", "name": "data", "type": "tuple" }, @@ -668,7 +464,7 @@ "type": "tuple" } ], - "name": "mintVehicleAndSdWithDeviceDefinitionSignAndSacd", + "name": "mintVehicleAndSdSignAndSacd", "outputs": [], "stateMutability": "nonpayable", "type": "function" @@ -687,16 +483,6 @@ "name": "owner", "type": "address" }, - { - "internalType": "string", - "name": "deviceDefinitionId", - "type": "string" - }, - { - "internalType": "uint256", - "name": "storageNodeId", - "type": "uint256" - }, { "components": [ { @@ -752,7 +538,7 @@ "type": "tuple[]" } ], - "internalType": "struct MintVehicleAndSdWithDdInputWithSnId", + "internalType": "struct MintVehicleAndSdInput", "name": "data", "type": "tuple" }, @@ -784,7 +570,7 @@ "type": "tuple" } ], - "name": "mintVehicleAndSdWithDeviceDefinitionSignAndSacd", + "name": "mintVehicleAndSdSignAndSacd", "outputs": [], "stateMutability": "nonpayable", "type": "function" @@ -803,11 +589,6 @@ "name": "owner", "type": "address" }, - { - "internalType": "string", - "name": "deviceDefinitionId", - "type": "string" - }, { "internalType": "uint256", "name": "storageNodeId", @@ -895,12 +676,12 @@ "type": "tuple" } ], - "internalType": "struct MintVehicleAndSdWithDdInputWithSnIdBatch[]", + "internalType": "struct MintVehicleAndSdInputWithSnIdBatch[]", "name": "data", "type": "tuple[]" } ], - "name": "mintVehicleAndSdWithDeviceDefinitionSignBatch", + "name": "mintVehicleAndSdSignBatch", "outputs": [], "stateMutability": "nonpayable", "type": "function" @@ -919,11 +700,6 @@ "name": "owner", "type": "address" }, - { - "internalType": "string", - "name": "deviceDefinitionId", - "type": "string" - }, { "components": [ { @@ -1006,12 +782,12 @@ "type": "tuple" } ], - "internalType": "struct MintVehicleAndSdWithDdInputBatch[]", + "internalType": "struct MintVehicleAndSdInputBatch[]", "name": "data", "type": "tuple[]" } ], - "name": "mintVehicleAndSdWithDeviceDefinitionSignBatch", + "name": "mintVehicleAndSdSignBatch", "outputs": [], "stateMutability": "nonpayable", "type": "function" diff --git a/abis/contracts/implementations/nodes/SyntheticDevice.sol/SyntheticDevice.json b/abis/contracts/implementations/nodes/SyntheticDevice.sol/SyntheticDevice.json index 77665663..3a9d0b17 100644 --- a/abis/contracts/implementations/nodes/SyntheticDevice.sol/SyntheticDevice.json +++ b/abis/contracts/implementations/nodes/SyntheticDevice.sol/SyntheticDevice.json @@ -355,37 +355,6 @@ "name": "VehicleNodeMinted", "type": "event" }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "manufacturerId", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "vehicleId", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": false, - "internalType": "string", - "name": "deviceDefinitionId", - "type": "string" - } - ], - "name": "VehicleNodeMintedWithDeviceDefinition", - "type": "event" - }, { "inputs": [ { diff --git a/abis/contracts/implementations/nodes/Vehicle.sol/Vehicle.json b/abis/contracts/implementations/nodes/Vehicle.sol/Vehicle.json index 7b1d3e1e..8f27f867 100644 --- a/abis/contracts/implementations/nodes/Vehicle.sol/Vehicle.json +++ b/abis/contracts/implementations/nodes/Vehicle.sol/Vehicle.json @@ -260,37 +260,6 @@ "name": "VehicleNodeMinted", "type": "event" }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "manufacturerId", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "vehicleId", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": false, - "internalType": "string", - "name": "deviceDefinitionId", - "type": "string" - } - ], - "name": "VehicleNodeMintedWithDeviceDefinition", - "type": "event" - }, { "anonymous": false, "inputs": [ @@ -372,16 +341,6 @@ "name": "owner", "type": "address" }, - { - "internalType": "uint256", - "name": "storageNodeId", - "type": "uint256" - }, - { - "internalType": "string", - "name": "deviceDefinitionId", - "type": "string" - }, { "components": [ { @@ -400,7 +359,7 @@ "type": "tuple[]" } ], - "name": "mintVehicleWithDeviceDefinition", + "name": "mintVehicle", "outputs": [], "stateMutability": "nonpayable", "type": "function" @@ -417,16 +376,6 @@ "name": "owner", "type": "address" }, - { - "internalType": "uint256", - "name": "storageNodeId", - "type": "uint256" - }, - { - "internalType": "string", - "name": "deviceDefinitionId", - "type": "string" - }, { "components": [ { @@ -472,7 +421,7 @@ "type": "tuple" } ], - "name": "mintVehicleWithDeviceDefinition", + "name": "mintVehicle", "outputs": [], "stateMutability": "nonpayable", "type": "function" @@ -490,9 +439,9 @@ "type": "address" }, { - "internalType": "string", - "name": "deviceDefinitionId", - "type": "string" + "internalType": "uint256", + "name": "storageNodeId", + "type": "uint256" }, { "components": [ @@ -539,7 +488,7 @@ "type": "tuple" } ], - "name": "mintVehicleWithDeviceDefinition", + "name": "mintVehicle", "outputs": [], "stateMutability": "nonpayable", "type": "function" @@ -557,9 +506,9 @@ "type": "address" }, { - "internalType": "string", - "name": "deviceDefinitionId", - "type": "string" + "internalType": "uint256", + "name": "storageNodeId", + "type": "uint256" }, { "components": [ @@ -579,7 +528,7 @@ "type": "tuple[]" } ], - "name": "mintVehicleWithDeviceDefinition", + "name": "mintVehicle", "outputs": [], "stateMutability": "nonpayable", "type": "function" @@ -596,16 +545,6 @@ "name": "owner", "type": "address" }, - { - "internalType": "uint256", - "name": "storageNodeId", - "type": "uint256" - }, - { - "internalType": "string", - "name": "deviceDefinitionId", - "type": "string" - }, { "components": [ { @@ -629,7 +568,7 @@ "type": "bytes" } ], - "name": "mintVehicleWithDeviceDefinitionSign", + "name": "mintVehicleSign", "outputs": [], "stateMutability": "nonpayable", "type": "function" @@ -647,9 +586,9 @@ "type": "address" }, { - "internalType": "string", - "name": "deviceDefinitionId", - "type": "string" + "internalType": "uint256", + "name": "storageNodeId", + "type": "uint256" }, { "components": [ @@ -674,7 +613,7 @@ "type": "bytes" } ], - "name": "mintVehicleWithDeviceDefinitionSign", + "name": "mintVehicleSign", "outputs": [], "stateMutability": "nonpayable", "type": "function" diff --git a/abis/contracts/implementations/nodes/VehicleInternal.sol/VehicleInternal.json b/abis/contracts/implementations/nodes/VehicleInternal.sol/VehicleInternal.json index 28d1d394..5ad2ae75 100644 --- a/abis/contracts/implementations/nodes/VehicleInternal.sol/VehicleInternal.json +++ b/abis/contracts/implementations/nodes/VehicleInternal.sol/VehicleInternal.json @@ -48,36 +48,5 @@ ], "name": "VehicleNodeMinted", "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "manufacturerId", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "vehicleId", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": false, - "internalType": "string", - "name": "deviceDefinitionId", - "type": "string" - } - ], - "name": "VehicleNodeMintedWithDeviceDefinition", - "type": "event" } ] diff --git a/contracts/dev/DevAdmin.sol b/contracts/dev/DevAdmin.sol index 4f3facf1..8571b63c 100644 --- a/contracts/dev/DevAdmin.sol +++ b/contracts/dev/DevAdmin.sol @@ -287,7 +287,7 @@ contract DevAdmin is AccessControlInternal { owner = INFT(vehicleIdProxyAddress).ownerOf(tokenId); delete ns.nodes[vehicleIdProxyAddress][tokenId].parentNode; - delete vs.vehicleIdToDeviceDefinitionId[tokenId]; + delete vs._deprecated_vehicleIdToDeviceDefinitionId[tokenId]; emit VehicleNodeBurned(tokenId, owner); @@ -375,7 +375,7 @@ contract DevAdmin is AccessControlInternal { } delete ns.nodes[vehicleIdProxyAddress][tokenId].parentNode; - delete vs.vehicleIdToDeviceDefinitionId[tokenId]; + delete vs._deprecated_vehicleIdToDeviceDefinitionId[tokenId]; emit VehicleNodeBurned(tokenId, owner); @@ -673,7 +673,7 @@ contract DevAdmin is AccessControlInternal { if (!INFT(vehicleIdProxyAddress).exists(vehicleId)) revert InvalidNode(vehicleIdProxyAddress, vehicleId); - vs.vehicleIdToDeviceDefinitionId[vehicleId] = ddId; + vs._deprecated_vehicleIdToDeviceDefinitionId[vehicleId] = ddId; emit DeviceDefinitionIdSet(vehicleId, ddId); } diff --git a/contracts/implementations/MultipleMinter.sol b/contracts/implementations/MultipleMinter.sol index adde0ec2..ccafcc07 100644 --- a/contracts/implementations/MultipleMinter.sol +++ b/contracts/implementations/MultipleMinter.sol @@ -31,8 +31,6 @@ contract MultipleMinter is /** * @notice Mints and pairs a vehicle and a synthetic device through a metatransaction - * @dev DEPRECATED: This function will be removed in a future release - * Please use the version with storageNodeId parameter instead * @dev The vehicle owner signs a typed structured (EIP-712) message in advance which is verified during execution. * Caller must have the CONNECTION_MINT_SD_PERMISSION for the specified connection or be the connection ID owner * @param data A MintVehicleAndSdInput struct containing: @@ -303,329 +301,35 @@ contract MultipleMinter is } /** - * @notice Mints and pairs a vehicle with a Device Definition ID and a synthetic device through a metatransaction - * @dev DEPRECATED: This function will be removed in a future release - * Please use the version with storageNodeId parameter instead + * @notice Mints and pairs a vehicle and a synthetic device, and sets permissions with SACD through a metatransaction * @dev The vehicle owner signs a typed structured (EIP-712) message in advance which is verified during execution. * Caller must have the CONNECTION_MINT_SD_PERMISSION for the specified connection or be the connection ID owner. - * @param data A MintVehicleAndSdWithDdInput struct containing: - * - manufacturerNode: Parent manufacturer node ID of the vehicle - * - owner: The new nodes owner address - * - deviceDefinitionId: The Device Definition ID to associate with the vehicle - * - attrInfoPairsVehicle: List of attribute-info pairs to be added to the vehicle - * - connectionId: Parent connection ID of the synthetic device - * - vehicleOwnerSig: Vehicle owner's EIP-712 signature - * - syntheticDeviceSig: Synthetic device's EIP-712 signature - * - syntheticDeviceAddr: Address associated with the synthetic device - * - attrInfoPairsDevice: List of attribute-info pairs to be added to the synthetic device - * Emits VehicleNodeMintedWithDeviceDefinition and SyntheticDeviceNodeMinted events on success. - * Reverts if connection or manufacturer node doesn't exist, caller lacks permission, - * device is already registered, or signatures are invalid. - */ - function mintVehicleAndSdWithDeviceDefinitionSign( - MintVehicleAndSdWithDdInput calldata data - ) external { - MapperStorage.Storage storage ms = MapperStorage.getStorage(); - VehicleStorage.Storage storage vs = VehicleStorage.getStorage(); - SyntheticDeviceStorage.Storage storage sds = SyntheticDeviceStorage - .getStorage(); - SharedStorage.Storage storage sharedStorage = SharedStorage - .getStorage(); - - address vehicleIdProxyAddress = vs.idProxyAddress; - address sdIdProxyAddress = sds.idProxyAddress; - - if ( - !INFT(SharedStorage.getStorage().connectionsManager).exists( - data.connectionId - ) - ) revert InvalidParentNode(data.connectionId); - if ( - !INFT(ManufacturerStorage.getStorage().idProxyAddress).exists( - data.manufacturerNode - ) - ) revert InvalidParentNode(data.manufacturerNode); - if ( - !ISacd(sharedStorage.sacd).hasPermission( - sharedStorage.connectionsManager, - data.connectionId, - msg.sender, - CONNECTION_MINT_SD_PERMISSION - ) - ) revert Errors.Unauthorized(msg.sender); - if (sds.deviceAddressToNodeId[data.syntheticDeviceAddr] != 0) - revert DeviceAlreadyRegistered(data.syntheticDeviceAddr); - - bytes32 message = keccak256( - abi.encode(MINT_VEHICLE_SD_TYPEHASH, data.connectionId) - ); - - if ( - !Eip712CheckerInternal._verifySignature( - data.syntheticDeviceAddr, - message, - data.syntheticDeviceSig - ) - ) revert InvalidSdSignature(); - - // ----- START Vehicle mint ----- - uint256 newTokenIdVehicle = INFT(vehicleIdProxyAddress).safeMint( - data.owner - ); - - emit VehicleNodeMintedWithDeviceDefinition( - data.manufacturerNode, - newTokenIdVehicle, - data.owner, - data.deviceDefinitionId - ); - - (bytes32 attributesHash, bytes32 infosHash) = _setInfosHash( - newTokenIdVehicle, - data.attrInfoPairsVehicle - ); - - message = keccak256( - abi.encode( - MINT_VEHICLE_WITH_DD_TYPEHASH, - data.manufacturerNode, - data.owner, - keccak256(bytes(data.deviceDefinitionId)), - attributesHash, - infosHash - ) - ); - - if ( - !Eip712CheckerInternal._verifySignature( - data.owner, - message, - data.vehicleOwnerSig - ) - ) revert InvalidOwnerSignature(); - // ----- END Vehicle mint ----- - - // ----- START Synthetic Device mint and attributes ----- - uint256 newTokenIdDevice = INFT(sdIdProxyAddress).safeMint(data.owner); - - emit SyntheticDeviceNodeMinted( - data.connectionId, - newTokenIdDevice, - newTokenIdVehicle, - data.syntheticDeviceAddr, - data.owner - ); - - if (data.attrInfoPairsDevice.length > 0) - _setInfos(newTokenIdDevice, data.attrInfoPairsDevice); - // ----- END Synthetic Device mint and attributes ----- - - // ----- Internal contract state change ----- - NodesStorage - .getStorage() - .nodes[vehicleIdProxyAddress][newTokenIdVehicle].parentNode = data - .manufacturerNode; - vs.vehicleIdToDeviceDefinitionId[newTokenIdVehicle] = data - .deviceDefinitionId; - - NodesStorage - .getStorage() - .nodes[sdIdProxyAddress][newTokenIdDevice].parentNode = data - .connectionId; - - ms.nodeLinks[vehicleIdProxyAddress][sdIdProxyAddress][ - newTokenIdVehicle - ] = newTokenIdDevice; - ms.nodeLinks[sdIdProxyAddress][vehicleIdProxyAddress][ - newTokenIdDevice - ] = newTokenIdVehicle; - - sds.deviceAddressToNodeId[data.syntheticDeviceAddr] = newTokenIdDevice; - sds.nodeIdToDeviceAddress[newTokenIdDevice] = data.syntheticDeviceAddr; - - ChargingInternal._chargeDcx(msg.sender, MINT_VEHICLE_OPERATION); - } - - /** - * @notice Mints and pairs a vehicle with a Device Definition ID and a synthetic device through a metatransaction - * @dev The vehicle owner signs a typed structured (EIP-712) message in advance which is verified during execution. - * Caller must have the CONNECTION_MINT_SD_PERMISSION for the specified connection or be the connection ID owner. - * @param data A MintVehicleAndSdWithDdInputWithSnId struct containing: - * - manufacturerNode: Parent manufacturer node ID of the vehicle - * - owner: The new nodes owner address - * - storageNodeId: ID of the storage node to associate with the vehicle - * - deviceDefinitionId: The Device Definition ID to associate with the vehicle - * - attrInfoPairsVehicle: List of attribute-info pairs to be added to the vehicle - * - connectionId: Parent connection ID of the synthetic device - * - vehicleOwnerSig: Vehicle owner's EIP-712 signature - * - syntheticDeviceSig: Synthetic device's EIP-712 signature - * - syntheticDeviceAddr: Address associated with the synthetic device - * - attrInfoPairsDevice: List of attribute-info pairs to be added to the synthetic device - * Emits VehicleNodeMintedWithDeviceDefinition and SyntheticDeviceNodeMinted events on success. - * Reverts if connection or manufacturer node doesn't exist, caller lacks permission, - * device is already registered, storage node is invalid, or signatures are invalid. - */ - function mintVehicleAndSdWithDeviceDefinitionSign( - MintVehicleAndSdWithDdInputWithSnId calldata data - ) external { - MapperStorage.Storage storage ms = MapperStorage.getStorage(); - VehicleStorage.Storage storage vs = VehicleStorage.getStorage(); - SyntheticDeviceStorage.Storage storage sds = SyntheticDeviceStorage - .getStorage(); - SharedStorage.Storage storage sharedStorage = SharedStorage - .getStorage(); - - address vehicleIdProxyAddress = vs.idProxyAddress; - address sdIdProxyAddress = sds.idProxyAddress; - - if ( - !INFT(SharedStorage.getStorage().connectionsManager).exists( - data.connectionId - ) - ) revert InvalidParentNode(data.connectionId); - if ( - !INFT(ManufacturerStorage.getStorage().idProxyAddress).exists( - data.manufacturerNode - ) - ) revert InvalidParentNode(data.manufacturerNode); - if ( - !ISacd(sharedStorage.sacd).hasPermission( - sharedStorage.connectionsManager, - data.connectionId, - msg.sender, - CONNECTION_MINT_SD_PERMISSION - ) - ) revert Errors.Unauthorized(msg.sender); - if (sds.deviceAddressToNodeId[data.syntheticDeviceAddr] != 0) - revert DeviceAlreadyRegistered(data.syntheticDeviceAddr); - - bytes32 message = keccak256( - abi.encode(MINT_VEHICLE_SD_TYPEHASH, data.connectionId) - ); - - if ( - !Eip712CheckerInternal._verifySignature( - data.syntheticDeviceAddr, - message, - data.syntheticDeviceSig - ) - ) revert InvalidSdSignature(); - - // ----- START Vehicle mint ----- - uint256 newTokenIdVehicle = INFT(vehicleIdProxyAddress).safeMint( - data.owner - ); - - emit VehicleNodeMintedWithDeviceDefinition( - data.manufacturerNode, - newTokenIdVehicle, - data.owner, - data.deviceDefinitionId - ); - - (bytes32 attributesHash, bytes32 infosHash) = _setInfosHash( - newTokenIdVehicle, - data.attrInfoPairsVehicle - ); - - message = keccak256( - abi.encode( - MINT_VEHICLE_WITH_DD_TYPEHASH, - data.manufacturerNode, - data.owner, - keccak256(bytes(data.deviceDefinitionId)), - attributesHash, - infosHash - ) - ); - - if ( - !Eip712CheckerInternal._verifySignature( - data.owner, - message, - data.vehicleOwnerSig - ) - ) revert InvalidOwnerSignature(); - // ----- END Vehicle mint ----- - - // ----- START Synthetic Device mint and attributes ----- - uint256 newTokenIdDevice = INFT(sdIdProxyAddress).safeMint(data.owner); - - emit SyntheticDeviceNodeMinted( - data.connectionId, - newTokenIdDevice, - newTokenIdVehicle, - data.syntheticDeviceAddr, - data.owner - ); - - if (data.attrInfoPairsDevice.length > 0) - _setInfos(newTokenIdDevice, data.attrInfoPairsDevice); - // ----- END Synthetic Device mint and attributes ----- - - // ----- Internal contract state change ----- - NodesStorage - .getStorage() - .nodes[vehicleIdProxyAddress][newTokenIdVehicle].parentNode = data - .manufacturerNode; - vs.vehicleIdToDeviceDefinitionId[newTokenIdVehicle] = data - .deviceDefinitionId; - - NodesStorage - .getStorage() - .nodes[sdIdProxyAddress][newTokenIdDevice].parentNode = data - .connectionId; - - ms.nodeLinks[vehicleIdProxyAddress][sdIdProxyAddress][ - newTokenIdVehicle - ] = newTokenIdDevice; - ms.nodeLinks[sdIdProxyAddress][vehicleIdProxyAddress][ - newTokenIdDevice - ] = newTokenIdVehicle; - - sds.deviceAddressToNodeId[data.syntheticDeviceAddr] = newTokenIdDevice; - sds.nodeIdToDeviceAddress[newTokenIdDevice] = data.syntheticDeviceAddr; - - ChargingInternal._chargeDcx(msg.sender, MINT_VEHICLE_OPERATION); - _setStorageNodeIdForVehicleId(newTokenIdVehicle, data.storageNodeId); - } - - /** - * @notice Mints and pairs a vehicle (with a Device Definition Id) and a synthetic device, and sets permissions with SACD through a metatransaction - * @dev DEPRECATED: This function will be removed in a future release - * Please use the version with storageNodeId parameter instead - * @dev The vehicle owner signs a typed structured (EIP-712) message in advance which is verified during execution. - * Caller must have the CONNECTION_MINT_SD_PERMISSION for the specified connection or be the connection ID owner. - * @param data A MintVehicleAndSdWithDdInput struct containing: + * @param data A MintVehicleAndSdInput struct containing: * - manufacturerNode: Parent manufacturer node ID of the vehicle * - owner: The new nodes owner address - * - deviceDefinitionId: The Device Definition ID to associate with the vehicle * - attrInfoPairsVehicle: List of attribute-info pairs to be added to the vehicle * - connectionId: Parent connection ID of the synthetic device * - vehicleOwnerSig: Vehicle owner's EIP-712 signature * - syntheticDeviceSig: Synthetic device's EIP-712 signature * - syntheticDeviceAddr: Address associated with the synthetic device * - attrInfoPairsDevice: List of attribute-info pairs to be added to the synthetic device - * @param sacdInput SACD input args for setting permissions: - * - grantee: The address to receive the permissions - * - permissions: The uint256 that represents the byte array of permissions - * - expiration: Expiration timestamp of the permissions - * - source: The URI source associated with the permissions - * Emits VehicleNodeMintedWithDeviceDefinition and SyntheticDeviceNodeMinted events on success. + * @param sacdInput SACD input args for setting permissions + * Emits VehicleNodeMinted and SyntheticDeviceNodeMinted events on success. * Reverts if connection or manufacturer node doesn't exist, caller lacks permission, * device is already registered, or signatures are invalid. */ - function mintVehicleAndSdWithDeviceDefinitionSignAndSacd( - MintVehicleAndSdWithDdInput calldata data, + function mintVehicleAndSdSignAndSacd( + MintVehicleAndSdInput calldata data, SacdInput calldata sacdInput ) external { - VehicleStorage.Storage storage vs = VehicleStorage.getStorage(); SyntheticDeviceStorage.Storage storage sds = SyntheticDeviceStorage .getStorage(); SharedStorage.Storage storage sharedStorage = SharedStorage .getStorage(); - address vehicleIdProxyAddress = vs.idProxyAddress; + address vehicleIdProxyAddress = VehicleStorage + .getStorage() + .idProxyAddress; address sdIdProxyAddress = sds.idProxyAddress; if ( @@ -666,11 +370,10 @@ contract MultipleMinter is data.owner ); - emit VehicleNodeMintedWithDeviceDefinition( + emit VehicleNodeMinted( data.manufacturerNode, newTokenIdVehicle, - data.owner, - data.deviceDefinitionId + data.owner ); (bytes32 attributesHash, bytes32 infosHash) = _setInfosHash( @@ -680,10 +383,9 @@ contract MultipleMinter is message = keccak256( abi.encode( - MINT_VEHICLE_WITH_DD_TYPEHASH, + MINT_VEHICLE_TYPEHASH, data.manufacturerNode, data.owner, - keccak256(bytes(data.deviceDefinitionId)), attributesHash, infosHash ) @@ -718,8 +420,6 @@ contract MultipleMinter is .getStorage() .nodes[vehicleIdProxyAddress][newTokenIdVehicle].parentNode = data .manufacturerNode; - vs.vehicleIdToDeviceDefinitionId[newTokenIdVehicle] = data - .deviceDefinitionId; NodesStorage .getStorage() @@ -742,40 +442,26 @@ contract MultipleMinter is } /** - * @notice Mints and pairs a vehicle (with a Device Definition Id) and a synthetic device, and sets permissions with SACD through a metatransaction + * @notice Mints and pairs a vehicle and a synthetic device, and sets permissions with SACD through a metatransaction * @dev The vehicle owner signs a typed structured (EIP-712) message in advance which is verified during execution. * Caller must have the CONNECTION_MINT_SD_PERMISSION for the specified connection or be the connection ID owner. - * @param data A MintVehicleAndSdWithDdInputWithSnId struct containing: - * - manufacturerNode: Parent manufacturer node ID of the vehicle - * - owner: The new nodes owner address - * - storageNodeId: ID of the storage node to associate with the vehicle - * - deviceDefinitionId: The Device Definition ID to associate with the vehicle - * - attrInfoPairsVehicle: List of attribute-info pairs to be added to the vehicle - * - connectionId: Parent connection ID of the synthetic device - * - vehicleOwnerSig: Vehicle owner's EIP-712 signature - * - syntheticDeviceSig: Synthetic device's EIP-712 signature - * - syntheticDeviceAddr: Address associated with the synthetic device - * - attrInfoPairsDevice: List of attribute-info pairs to be added to the synthetic device - * @param sacdInput SACD input args for setting permissions: - * - grantee: The address to receive the permissions - * - permissions: The uint256 that represents the byte array of permissions - * - expiration: Expiration timestamp of the permissions - * - source: The URI source associated with the permissions - * Emits VehicleNodeMintedWithDeviceDefinition and SyntheticDeviceNodeMinted events on success. + * @param data A MintVehicleAndSdInputWithSnId struct + * @param sacdInput SACD input args for setting permissions * Reverts if connection or manufacturer node doesn't exist, caller lacks permission, * device is already registered, storage node is invalid, or signatures are invalid. */ - function mintVehicleAndSdWithDeviceDefinitionSignAndSacd( - MintVehicleAndSdWithDdInputWithSnId calldata data, + function mintVehicleAndSdSignAndSacd( + MintVehicleAndSdInputWithSnId calldata data, SacdInput calldata sacdInput ) external { - VehicleStorage.Storage storage vs = VehicleStorage.getStorage(); SyntheticDeviceStorage.Storage storage sds = SyntheticDeviceStorage .getStorage(); SharedStorage.Storage storage sharedStorage = SharedStorage .getStorage(); - address vehicleIdProxyAddress = vs.idProxyAddress; + address vehicleIdProxyAddress = VehicleStorage + .getStorage() + .idProxyAddress; address sdIdProxyAddress = sds.idProxyAddress; if ( @@ -816,11 +502,10 @@ contract MultipleMinter is data.owner ); - emit VehicleNodeMintedWithDeviceDefinition( + emit VehicleNodeMinted( data.manufacturerNode, newTokenIdVehicle, - data.owner, - data.deviceDefinitionId + data.owner ); (bytes32 attributesHash, bytes32 infosHash) = _setInfosHash( @@ -830,10 +515,9 @@ contract MultipleMinter is message = keccak256( abi.encode( - MINT_VEHICLE_WITH_DD_TYPEHASH, + MINT_VEHICLE_TYPEHASH, data.manufacturerNode, data.owner, - keccak256(bytes(data.deviceDefinitionId)), attributesHash, infosHash ) @@ -868,8 +552,6 @@ contract MultipleMinter is .getStorage() .nodes[vehicleIdProxyAddress][newTokenIdVehicle].parentNode = data .manufacturerNode; - vs.vehicleIdToDeviceDefinitionId[newTokenIdVehicle] = data - .deviceDefinitionId; NodesStorage .getStorage() @@ -893,29 +575,17 @@ contract MultipleMinter is } /** - * @notice Mints and pairs multiple vehicles (with Device Definition Ids) and synthetic devices in batch - * @dev DEPRECATED: This function will be removed in a future release - * Please use the version with storageNodeId parameter instead + * @notice Mints and pairs multiple vehicles and synthetic devices in batch * @dev Processes multiple vehicle and synthetic device pairs in a single transaction. * For each pair, verifies signatures, mints tokens, sets attributes, and establishes relationships. * Caller must have the CONNECTION_MINT_SD_PERMISSION for each specified connection or be the connection ID owner. - * @param data An array of MintVehicleAndSdWithDdInputBatch structs, each containing: - * - manufacturerNode: Parent manufacturer node ID of the vehicle - * - owner: The new nodes owner address - * - deviceDefinitionId: The Device Definition ID to associate with the vehicle - * - attrInfoPairsVehicle: List of attribute-info pairs to be added to the vehicle - * - connectionId: Parent connection ID of the synthetic device - * - vehicleOwnerSig: Vehicle owner's EIP-712 signature - * - syntheticDeviceSig: Synthetic device's EIP-712 signature - * - syntheticDeviceAddr: Address associated with the synthetic device - * - attrInfoPairsDevice: List of attribute-info pairs to be added to the synthetic device - * - sacdInput: SACD input args for setting permissions on the vehicle - * Emits VehicleNodeMintedWithDeviceDefinition and SyntheticDeviceNodeMinted events for each pair. + * @param data An array of MintVehicleAndSdInputBatch structs + * Emits VehicleNodeMinted and SyntheticDeviceNodeMinted events for each pair. * Reverts if any connection or manufacturer node doesn't exist, caller lacks permission, * any device is already registered, or any signature is invalid. */ - function mintVehicleAndSdWithDeviceDefinitionSignBatch( - MintVehicleAndSdWithDdInputBatch[] calldata data + function mintVehicleAndSdSignBatch( + MintVehicleAndSdInputBatch[] calldata data ) external { SyntheticDeviceStorage.Storage storage sds = SyntheticDeviceStorage .getStorage(); @@ -966,11 +636,10 @@ contract MultipleMinter is data[i].owner ); - emit VehicleNodeMintedWithDeviceDefinition( + emit VehicleNodeMinted( data[i].manufacturerNode, newTokenIdVehicle, - data[i].owner, - data[i].deviceDefinitionId + data[i].owner ); (bytes32 attributesHash, bytes32 infosHash) = _setInfosHash( @@ -980,10 +649,9 @@ contract MultipleMinter is message = keccak256( abi.encode( - MINT_VEHICLE_WITH_DD_TYPEHASH, + MINT_VEHICLE_TYPEHASH, data[i].manufacturerNode, data[i].owner, - keccak256(bytes(data[i].deviceDefinitionId)), attributesHash, infosHash ) @@ -1021,9 +689,6 @@ contract MultipleMinter is .nodes[vehicleIdProxyAddress][newTokenIdVehicle].parentNode = data[ i ].manufacturerNode; - VehicleStorage.getStorage().vehicleIdToDeviceDefinitionId[ - newTokenIdVehicle - ] = data[i].deviceDefinitionId; NodesStorage .getStorage() @@ -1053,28 +718,17 @@ contract MultipleMinter is } /** - * @notice Mints and pairs multiple vehicles (with Device Definition Ids) and synthetic devices in batch + * @notice Mints and pairs multiple vehicles and synthetic devices in batch * @dev Processes multiple vehicle and synthetic device pairs in a single transaction. * For each pair, verifies signatures, mints tokens, sets attributes, and establishes relationships. * Caller must have the CONNECTION_MINT_SD_PERMISSION for each specified connection or be the connection ID owner. - * @param data An array of MintVehicleAndSdWithDdInputWithSnIdBatch structs, each containing: - * - manufacturerNode: Parent manufacturer node ID of the vehicle - * - owner: The new nodes owner address - * - storageNodeId: ID of the storage node to associate with the vehicle - * - deviceDefinitionId: The Device Definition ID to associate with the vehicle - * - attrInfoPairsVehicle: List of attribute-info pairs to be added to the vehicle - * - connectionId: Parent connection ID of the synthetic device - * - vehicleOwnerSig: Vehicle owner's EIP-712 signature - * - syntheticDeviceSig: Synthetic device's EIP-712 signature - * - syntheticDeviceAddr: Address associated with the synthetic device - * - attrInfoPairsDevice: List of attribute-info pairs to be added to the synthetic device - * - sacdInput: SACD input args for setting permissions on the vehicle - * @dev Emits VehicleNodeMintedWithDeviceDefinition and SyntheticDeviceNodeMinted events for each pair. + * @param data An array of MintVehicleAndSdInputWithSnIdBatch structs + * @dev Emits VehicleNodeMinted and SyntheticDeviceNodeMinted events for each pair. * Reverts if any connection or manufacturer node doesn't exist, caller lacks permission, * any device is already registered, any storage node is invalid, or any signature is invalid. */ - function mintVehicleAndSdWithDeviceDefinitionSignBatch( - MintVehicleAndSdWithDdInputWithSnIdBatch[] calldata data + function mintVehicleAndSdSignBatch( + MintVehicleAndSdInputWithSnIdBatch[] calldata data ) external { SyntheticDeviceStorage.Storage storage sds = SyntheticDeviceStorage .getStorage(); @@ -1125,11 +779,10 @@ contract MultipleMinter is data[i].owner ); - emit VehicleNodeMintedWithDeviceDefinition( + emit VehicleNodeMinted( data[i].manufacturerNode, newTokenIdVehicle, - data[i].owner, - data[i].deviceDefinitionId + data[i].owner ); (bytes32 attributesHash, bytes32 infosHash) = _setInfosHash( @@ -1139,10 +792,9 @@ contract MultipleMinter is message = keccak256( abi.encode( - MINT_VEHICLE_WITH_DD_TYPEHASH, + MINT_VEHICLE_TYPEHASH, data[i].manufacturerNode, data[i].owner, - keccak256(bytes(data[i].deviceDefinitionId)), attributesHash, infosHash ) @@ -1180,9 +832,6 @@ contract MultipleMinter is .nodes[vehicleIdProxyAddress][newTokenIdVehicle].parentNode = data[ i ].manufacturerNode; - VehicleStorage.getStorage().vehicleIdToDeviceDefinitionId[ - newTokenIdVehicle - ] = data[i].deviceDefinitionId; NodesStorage .getStorage() diff --git a/contracts/implementations/nodes/Vehicle.sol b/contracts/implementations/nodes/Vehicle.sol index e2e01511..9cd0fa9f 100644 --- a/contracts/implementations/nodes/Vehicle.sol +++ b/contracts/implementations/nodes/Vehicle.sol @@ -77,22 +77,19 @@ contract Vehicle is // ***** Interaction with nodes *****// /** - * @notice Function to mint a vehicle with a Device Definition Id - * @dev DEPRECATED: This function will be removed in a future release - * Please use the version with storageNodeId parameter instead + * @notice Function to mint a vehicle * @param manufacturerNode Parent manufacturer node id * @param owner The address of the new owner - * @param deviceDefinitionId The Device Definition Id * @param attrInfo List of attribute-info pairs to be added */ - function mintVehicleWithDeviceDefinition( + function mintVehicle( uint256 manufacturerNode, address owner, - string calldata deviceDefinitionId, AttributeInfoPair[] calldata attrInfo ) external { - VehicleStorage.Storage storage vs = VehicleStorage.getStorage(); - address vehicleIdProxyAddress = vs.idProxyAddress; + address vehicleIdProxyAddress = VehicleStorage + .getStorage() + .idProxyAddress; if ( !INFT(ManufacturerStorage.getStorage().idProxyAddress).exists( @@ -105,14 +102,8 @@ contract Vehicle is NodesStorage .getStorage() .nodes[vehicleIdProxyAddress][newTokenId].parentNode = manufacturerNode; - vs.vehicleIdToDeviceDefinitionId[newTokenId] = deviceDefinitionId; - emit VehicleNodeMintedWithDeviceDefinition( - manufacturerNode, - newTokenId, - owner, - deviceDefinitionId - ); + emit VehicleNodeMinted(manufacturerNode, newTokenId, owner); if (attrInfo.length > 0) _setInfos(newTokenId, attrInfo); @@ -120,24 +111,21 @@ contract Vehicle is } /** - * @notice Function to mint a vehicle with a Device Definition Id and associate it with a Storage Node Id - * @dev This function creates a new vehicle node, associates it with a manufacturer, - * assigns a device definition ID, and links it to a Storage Node Id + * @notice Function to mint a vehicle and associate it with a Storage Node Id * @param manufacturerNode The ID of the parent manufacturer node * @param owner The address that will own the newly minted vehicle * @param storageNodeId The ID of the storage node to associate with this vehicle - * @param deviceDefinitionId The unique identifier for the device definition * @param attrInfo Array of attribute-info pairs to be added to the vehicle */ - function mintVehicleWithDeviceDefinition( + function mintVehicle( uint256 manufacturerNode, address owner, uint256 storageNodeId, - string calldata deviceDefinitionId, AttributeInfoPair[] calldata attrInfo ) external { - VehicleStorage.Storage storage vs = VehicleStorage.getStorage(); - address vehicleIdProxyAddress = vs.idProxyAddress; + address vehicleIdProxyAddress = VehicleStorage + .getStorage() + .idProxyAddress; if ( !INFT(ManufacturerStorage.getStorage().idProxyAddress).exists( @@ -150,14 +138,8 @@ contract Vehicle is NodesStorage .getStorage() .nodes[vehicleIdProxyAddress][newTokenId].parentNode = manufacturerNode; - vs.vehicleIdToDeviceDefinitionId[newTokenId] = deviceDefinitionId; - emit VehicleNodeMintedWithDeviceDefinition( - manufacturerNode, - newTokenId, - owner, - deviceDefinitionId - ); + emit VehicleNodeMinted(manufacturerNode, newTokenId, owner); if (attrInfo.length > 0) _setInfos(newTokenId, attrInfo); @@ -166,12 +148,9 @@ contract Vehicle is } /** - * @notice Function to mint a vehicle with a Device Definition Id and set permissions with SACD - * @dev DEPRECATED: This function will be removed in a future release - * Please use the version with storageNodeId parameter instead + * @notice Function to mint a vehicle and set permissions with SACD * @param manufacturerNode Parent manufacturer node id * @param owner The address of the new owner - * @param deviceDefinitionId The Device Definition Id * @param attrInfo List of attribute-info pairs to be added * @param sacdInput SACD input args * grantee -> The address to receive the permissions @@ -179,15 +158,15 @@ contract Vehicle is * expiration -> Expiration of the permissions * source -> The URI source associated with the permissions */ - function mintVehicleWithDeviceDefinition( + function mintVehicle( uint256 manufacturerNode, address owner, - string calldata deviceDefinitionId, AttributeInfoPair[] calldata attrInfo, SacdInput calldata sacdInput ) external { - VehicleStorage.Storage storage vs = VehicleStorage.getStorage(); - address vehicleIdProxyAddress = vs.idProxyAddress; + address vehicleIdProxyAddress = VehicleStorage + .getStorage() + .idProxyAddress; if ( !INFT(ManufacturerStorage.getStorage().idProxyAddress).exists( @@ -200,14 +179,8 @@ contract Vehicle is NodesStorage .getStorage() .nodes[vehicleIdProxyAddress][newTokenId].parentNode = manufacturerNode; - vs.vehicleIdToDeviceDefinitionId[newTokenId] = deviceDefinitionId; - emit VehicleNodeMintedWithDeviceDefinition( - manufacturerNode, - newTokenId, - owner, - deviceDefinitionId - ); + emit VehicleNodeMinted(manufacturerNode, newTokenId, owner); if (attrInfo.length > 0) _setInfos(newTokenId, attrInfo); @@ -217,13 +190,10 @@ contract Vehicle is } /** - * @notice Function to mint a vehicle with a Device Definition Id, associate it with a Storage Node Id, and set permissions with SACD - * @dev This function creates a new vehicle node, associates it with a manufacturer, - * assigns a device definition ID, links it to a Storage Node Id, and sets SACD permissions + * @notice Function to mint a vehicle, associate it with a Storage Node Id, and set permissions with SACD * @param manufacturerNode The ID of the parent manufacturer node * @param owner The address that will own the newly minted vehicle * @param storageNodeId The ID of the storage node to associate with this vehicle - * @param deviceDefinitionId The unique identifier for the device definition * @param attrInfo Array of attribute-info pairs to be added to the vehicle * @param sacdInput SACD input args containing: * - grantee: The address to receive the permissions @@ -231,16 +201,16 @@ contract Vehicle is * - expiration: Expiration of the permissions * - source: The URI source associated with the permissions */ - function mintVehicleWithDeviceDefinition( + function mintVehicle( uint256 manufacturerNode, address owner, uint256 storageNodeId, - string calldata deviceDefinitionId, AttributeInfoPair[] calldata attrInfo, SacdInput calldata sacdInput ) external { - VehicleStorage.Storage storage vs = VehicleStorage.getStorage(); - address vehicleIdProxyAddress = vs.idProxyAddress; + address vehicleIdProxyAddress = VehicleStorage + .getStorage() + .idProxyAddress; if ( !INFT(ManufacturerStorage.getStorage().idProxyAddress).exists( @@ -253,14 +223,8 @@ contract Vehicle is NodesStorage .getStorage() .nodes[vehicleIdProxyAddress][newTokenId].parentNode = manufacturerNode; - vs.vehicleIdToDeviceDefinitionId[newTokenId] = deviceDefinitionId; - emit VehicleNodeMintedWithDeviceDefinition( - manufacturerNode, - newTokenId, - owner, - deviceDefinitionId - ); + emit VehicleNodeMinted(manufacturerNode, newTokenId, owner); if (attrInfo.length > 0) _setInfos(newTokenId, attrInfo); @@ -271,20 +235,16 @@ contract Vehicle is } /** - * @notice Mint a vehicle with a Device Definition Id through a metatransaction - * @dev DEPRECATED: This function will be removed in a future release - * Please use the version with storageNodeId parameter instead + * @notice Mint a vehicle through a metatransaction * @dev Caller must have the mint vehicle role * @param manufacturerNode Parent manufacturer node id * @param owner The address of the new owner - * @param deviceDefinitionId The Device Definition Id * @param attrInfo attrInfo * @param signature User's signature hash */ - function mintVehicleWithDeviceDefinitionSign( + function mintVehicleSign( uint256 manufacturerNode, address owner, - string calldata deviceDefinitionId, AttributeInfoPair[] calldata attrInfo, bytes calldata signature ) external onlyRole(MINT_VEHICLE_ROLE) { @@ -303,16 +263,8 @@ contract Vehicle is NodesStorage .getStorage() .nodes[vehicleIdProxyAddress][newTokenId].parentNode = manufacturerNode; - VehicleStorage.getStorage().vehicleIdToDeviceDefinitionId[ - newTokenId - ] = deviceDefinitionId; - emit VehicleNodeMintedWithDeviceDefinition( - manufacturerNode, - newTokenId, - owner, - deviceDefinitionId - ); + emit VehicleNodeMinted(manufacturerNode, newTokenId, owner); (bytes32 attributesHash, bytes32 infosHash) = _setInfosHash( newTokenId, @@ -321,10 +273,9 @@ contract Vehicle is bytes32 message = keccak256( abi.encode( - MINT_VEHICLE_WITH_DD_TYPEHASH, + MINT_VEHICLE_TYPEHASH, manufacturerNode, owner, - keccak256(bytes(deviceDefinitionId)), attributesHash, infosHash ) @@ -337,21 +288,18 @@ contract Vehicle is } /** - * @notice Mints a vehicle with a Device Definition Id through a metatransaction and associates it with a Storage Node Id - * @dev This function creates a new vehicle node via a signed transaction, associates it with a manufacturer, - * assigns a device definition ID, and links it to a Storage Node. Caller must have the MINT_VEHICLE_ROLE + * @notice Mints a vehicle through a metatransaction and associates it with a Storage Node Id + * @dev Caller must have the MINT_VEHICLE_ROLE * @param manufacturerNode The ID of the parent manufacturer node * @param owner The address that will own the newly minted vehicle * @param storageNodeId The ID of the storage node to associate with this vehicle - * @param deviceDefinitionId The unique identifier for the device definition * @param attrInfo Array of attribute-info pairs to be added to the vehicle * @param signature The owner's EIP-712 signature authorizing the mint operation */ - function mintVehicleWithDeviceDefinitionSign( + function mintVehicleSign( uint256 manufacturerNode, address owner, uint256 storageNodeId, - string calldata deviceDefinitionId, AttributeInfoPair[] calldata attrInfo, bytes calldata signature ) external onlyRole(MINT_VEHICLE_ROLE) { @@ -370,16 +318,8 @@ contract Vehicle is NodesStorage .getStorage() .nodes[vehicleIdProxyAddress][newTokenId].parentNode = manufacturerNode; - VehicleStorage.getStorage().vehicleIdToDeviceDefinitionId[ - newTokenId - ] = deviceDefinitionId; - emit VehicleNodeMintedWithDeviceDefinition( - manufacturerNode, - newTokenId, - owner, - deviceDefinitionId - ); + emit VehicleNodeMinted(manufacturerNode, newTokenId, owner); (bytes32 attributesHash, bytes32 infosHash) = _setInfosHash( newTokenId, @@ -388,10 +328,9 @@ contract Vehicle is bytes32 message = keccak256( abi.encode( - MINT_VEHICLE_WITH_DD_TYPEHASH, + MINT_VEHICLE_TYPEHASH, manufacturerNode, owner, - keccak256(bytes(deviceDefinitionId)), attributesHash, infosHash ) @@ -456,7 +395,7 @@ contract Vehicle is revert InvalidOwnerSignature(); delete ns.nodes[vehicleIdProxyAddress][tokenId].parentNode; - delete vs.vehicleIdToDeviceDefinitionId[tokenId]; + delete vs._deprecated_vehicleIdToDeviceDefinitionId[tokenId]; _resetInfos(tokenId); @@ -493,7 +432,7 @@ contract Vehicle is address owner = INFT(vehicleIdProxyAddress).ownerOf(tokenId); delete ns.nodes[vehicleIdProxyAddress][tokenId].parentNode; - delete vs.vehicleIdToDeviceDefinitionId[tokenId]; + delete vs._deprecated_vehicleIdToDeviceDefinitionId[tokenId]; delete sn.vehicleIdToStorageNodeId[tokenId]; _resetInfos(tokenId); @@ -502,16 +441,18 @@ contract Vehicle is } /** - * @notice Gets the Device Definition Id associated to a Vehicle Id - * @dev If there is no ddId associated, it returns an empty string + * @notice Gets the legacy on-chain Device Definition Id associated to a Vehicle Id + * @dev Device definitions are now stored off-chain. This getter only returns + * values written by the legacy mint flow or by `DevAdmin.adminSetVehicleDDs`; + * it returns an empty string for vehicles minted after the migration. * @param vehicleId Vehicle Id */ function getDeviceDefinitionIdByVehicleId( uint256 vehicleId ) external view returns (string memory ddId) { - ddId = VehicleStorage.getStorage().vehicleIdToDeviceDefinitionId[ - vehicleId - ]; + ddId = VehicleStorage + .getStorage() + ._deprecated_vehicleIdToDeviceDefinitionId[vehicleId]; } // ***** PRIVATE FUNCTIONS ***** // diff --git a/contracts/implementations/nodes/VehicleInternal.sol b/contracts/implementations/nodes/VehicleInternal.sol index f4ce569f..3941d4af 100644 --- a/contracts/implementations/nodes/VehicleInternal.sol +++ b/contracts/implementations/nodes/VehicleInternal.sol @@ -17,11 +17,6 @@ contract VehicleInternal { keccak256( "MintVehicleSign(uint256 manufacturerNode,address owner,string[] attributes,string[] infos)" ); - // TODO Should we change the signature to add Storage Node ID? - bytes32 internal constant MINT_VEHICLE_WITH_DD_TYPEHASH = - keccak256( - "MintVehicleWithDeviceDefinitionSign(uint256 manufacturerNode,address owner,string deviceDefinitionId,string[] attributes,string[] infos)" - ); event VehicleAttributeSet(uint256 tokenId, string attribute, string info); event VehicleNodeMinted( @@ -29,12 +24,6 @@ contract VehicleInternal { uint256 tokenId, address owner ); - event VehicleNodeMintedWithDeviceDefinition( - uint256 indexed manufacturerId, - uint256 indexed vehicleId, - address indexed owner, - string deviceDefinitionId - ); /** * @dev Internal function to add infos to node and calculate attribute and info hashes diff --git a/contracts/libraries/nodes/VehicleStorage.sol b/contracts/libraries/nodes/VehicleStorage.sol index d18b335f..970da8b4 100644 --- a/contracts/libraries/nodes/VehicleStorage.sol +++ b/contracts/libraries/nodes/VehicleStorage.sol @@ -17,8 +17,10 @@ library VehicleStorage { address idProxyAddress; // Allowed node attribute AttributeSet.Set whitelistedAttributes; - // Vehicle Id to Device Definition Id - mapping(uint256 => string) vehicleIdToDeviceDefinitionId; + // Deprecated: device definitions are now off-chain. Slot retained so + // that legacy on-chain DDs remain readable via getDeviceDefinitionIdByVehicleId + // and so a future trailing field doesn't alias the orphaned data. + mapping(uint256 => string) _deprecated_vehicleIdToDeviceDefinitionId; } /* solhint-disable no-inline-assembly */ diff --git a/contracts/shared/Types.sol b/contracts/shared/Types.sol index 2f0d36a0..2e829231 100644 --- a/contracts/shared/Types.sol +++ b/contracts/shared/Types.sol @@ -61,35 +61,9 @@ struct MintVehicleAndSdInputWithSnId { AttributeInfoPair[] attrInfoPairsDevice; // List of attribute-info pairs to be added of the synthetic device } -struct MintVehicleAndSdWithDdInput { +struct MintVehicleAndSdInputBatch { uint256 manufacturerNode; // Parent manufacturer node id of the vehicle address owner; // The new nodes owner - string deviceDefinitionId; // The Device Definition Id - AttributeInfoPair[] attrInfoPairsVehicle; // List of attribute-info pairs to be added of the vehicle - uint256 connectionId; // Parent connection id of the synthetic device - bytes vehicleOwnerSig; // Vehicle owner signature hash - bytes syntheticDeviceSig; // Synthetic Device's signature hash - address syntheticDeviceAddr; // Address associated with the synthetic device - AttributeInfoPair[] attrInfoPairsDevice; // List of attribute-info pairs to be added of the synthetic device -} - -struct MintVehicleAndSdWithDdInputWithSnId { - uint256 manufacturerNode; // Parent manufacturer node id of the vehicle - address owner; // The new nodes owner - string deviceDefinitionId; // The Device Definition Id - uint256 storageNodeId; // ID of the storage node to associate with the vehicle - AttributeInfoPair[] attrInfoPairsVehicle; // List of attribute-info pairs to be added of the vehicle - uint256 connectionId; // Parent connection id of the synthetic device - bytes vehicleOwnerSig; // Vehicle owner signature hash - bytes syntheticDeviceSig; // Synthetic Device's signature hash - address syntheticDeviceAddr; // Address associated with the synthetic device - AttributeInfoPair[] attrInfoPairsDevice; // List of attribute-info pairs to be added of the synthetic device -} - -struct MintVehicleAndSdWithDdInputBatch { - uint256 manufacturerNode; // Parent manufacturer node id of the vehicle - address owner; // The new nodes owner - string deviceDefinitionId; // The Device Definition Id AttributeInfoPair[] attrInfoPairsVehicle; // List of attribute-info pairs to be added of the vehicle uint256 connectionId; // Parent connection id of the synthetic device bytes vehicleOwnerSig; // Vehicle owner signature hash @@ -99,10 +73,9 @@ struct MintVehicleAndSdWithDdInputBatch { SacdInput sacdInput; } -struct MintVehicleAndSdWithDdInputWithSnIdBatch { +struct MintVehicleAndSdInputWithSnIdBatch { uint256 manufacturerNode; // Parent manufacturer node id of the vehicle address owner; // The new nodes owner - string deviceDefinitionId; // The Device Definition Id uint256 storageNodeId; // ID of the storage node to associate with the vehicle AttributeInfoPair[] attrInfoPairsVehicle; // List of attribute-info pairs to be added of the vehicle uint256 connectionId; // Parent connection id of the synthetic device diff --git a/scripts/tasks.ts b/scripts/tasks.ts index 2c761b58..26114a92 100644 --- a/scripts/tasks.ts +++ b/scripts/tasks.ts @@ -40,10 +40,9 @@ task('mint-vehicle', 'Mints a new Vehicle') const tx = await vehicleInstance .connect(signer) - ['mintVehicleWithDeviceDefinition(uint256,address,string,(string,string)[],(address,uint256,uint256,string))']( + ['mintVehicle(uint256,address,(string,string)[],(address,uint256,uint256,string))']( 131, owner, - 'toyota_4runner_2024', [ { attribute: 'Make', diff --git a/test/DevAdmin.test.ts b/test/DevAdmin.test.ts index 9b53a5a1..93b62225 100644 --- a/test/DevAdmin.test.ts +++ b/test/DevAdmin.test.ts @@ -581,10 +581,10 @@ describe('DevAdmin', function () { ); await vehicleInstance .connect(admin) - ['mintVehicleWithDeviceDefinition(uint256,address,uint256,string,(string,string)[])'](1, user1.address, C.STORAGE_NODE_ID_1, C.mockDdId1, C.mockVehicleAttributeInfoPairs); + ['mintVehicle(uint256,address,uint256,(string,string)[])'](1, user1.address, C.STORAGE_NODE_ID_1, C.mockVehicleAttributeInfoPairs); await vehicleInstance .connect(admin) - ['mintVehicleWithDeviceDefinition(uint256,address,uint256,string,(string,string)[])'](1, user1.address, C.STORAGE_NODE_ID_1, C.mockDdId1, C.mockVehicleAttributeInfoPairs); + ['mintVehicle(uint256,address,uint256,(string,string)[])'](1, user1.address, C.STORAGE_NODE_ID_1, C.mockVehicleAttributeInfoPairs); await aftermarketDeviceInstance .connect(admin) .claimAftermarketDeviceSign( @@ -775,10 +775,10 @@ describe('DevAdmin', function () { ); await vehicleInstance .connect(admin) - ['mintVehicleWithDeviceDefinition(uint256,address,uint256,string,(string,string)[])'](1, user1.address, C.STORAGE_NODE_ID_1, C.mockDdId1, C.mockVehicleAttributeInfoPairs); + ['mintVehicle(uint256,address,uint256,(string,string)[])'](1, user1.address, C.STORAGE_NODE_ID_1, C.mockVehicleAttributeInfoPairs); await vehicleInstance .connect(admin) - ['mintVehicleWithDeviceDefinition(uint256,address,uint256,string,(string,string)[])'](1, user1.address, C.STORAGE_NODE_ID_1, C.mockDdId1, C.mockVehicleAttributeInfoPairs); + ['mintVehicle(uint256,address,uint256,(string,string)[])'](1, user1.address, C.STORAGE_NODE_ID_1, C.mockVehicleAttributeInfoPairs); await aftermarketDeviceInstance .connect(admin) .claimAftermarketDeviceSign( @@ -960,10 +960,10 @@ describe('DevAdmin', function () { ); await vehicleInstance .connect(admin) - ['mintVehicleWithDeviceDefinition(uint256,address,uint256,string,(string,string)[])'](1, user1.address, C.STORAGE_NODE_ID_1, C.mockDdId1, C.mockVehicleAttributeInfoPairs); + ['mintVehicle(uint256,address,uint256,(string,string)[])'](1, user1.address, C.STORAGE_NODE_ID_1, C.mockVehicleAttributeInfoPairs); await vehicleInstance .connect(admin) - ['mintVehicleWithDeviceDefinition(uint256,address,uint256,string,(string,string)[])'](1, user1.address, C.STORAGE_NODE_ID_1, C.mockDdId1, C.mockVehicleAttributeInfoPairs); + ['mintVehicle(uint256,address,uint256,(string,string)[])'](1, user1.address, C.STORAGE_NODE_ID_1, C.mockVehicleAttributeInfoPairs); await aftermarketDeviceInstance .connect(admin) .claimAftermarketDeviceSign( @@ -1148,10 +1148,10 @@ describe('DevAdmin', function () { beforeEach(async () => { await vehicleInstance .connect(admin) - ['mintVehicleWithDeviceDefinition(uint256,address,uint256,string,(string,string)[])'](1, user1.address, C.STORAGE_NODE_ID_1, C.mockDdId1, C.mockVehicleAttributeInfoPairs); + ['mintVehicle(uint256,address,uint256,(string,string)[])'](1, user1.address, C.STORAGE_NODE_ID_1, C.mockVehicleAttributeInfoPairs); await vehicleInstance .connect(admin) - ['mintVehicleWithDeviceDefinition(uint256,address,uint256,string,(string,string)[])'](1, user2.address, C.STORAGE_NODE_ID_1, C.mockDdId1, C.mockVehicleAttributeInfoPairs); + ['mintVehicle(uint256,address,uint256,(string,string)[])'](1, user2.address, C.STORAGE_NODE_ID_1, C.mockVehicleAttributeInfoPairs); }); context('Error handling', () => { @@ -1294,33 +1294,19 @@ describe('DevAdmin', function () { 'ERC721: invalid token ID', ); }); - it('Should correctly reset device definition Id to empty if it was minted with DD', async () => { - await vehicleInstance - .connect(admin) - ['mintVehicleWithDeviceDefinition(uint256,address,uint256,string,(string,string)[])']( - 1, - user1.address, - C.STORAGE_NODE_ID_1, - C.mockDdId1, - C.mockVehicleAttributeInfoPairs - ); - await vehicleInstance - .connect(admin) - ['mintVehicleWithDeviceDefinition(uint256,address,uint256,string,(string,string)[])']( - 1, - user1.address, - C.STORAGE_NODE_ID_1, - C.mockDdId2, - C.mockVehicleAttributeInfoPairs - ); + it('Should correctly reset legacy device definition Id mapping when burning', async () => { + await devAdminInstance.connect(admin).adminSetVehicleDDs([ + { vehicleId: 1, deviceDefinitionId: C.mockDdId1 }, + { vehicleId: 2, deviceDefinitionId: C.mockDdId2 } + ]); - expect(await vehicleInstance.getDeviceDefinitionIdByVehicleId(3)).to.be.equal(C.mockDdId1); - expect(await vehicleInstance.getDeviceDefinitionIdByVehicleId(4)).to.be.equal(C.mockDdId2); + expect(await vehicleInstance.getDeviceDefinitionIdByVehicleId(1)).to.be.equal(C.mockDdId1); + expect(await vehicleInstance.getDeviceDefinitionIdByVehicleId(2)).to.be.equal(C.mockDdId2); - await devAdminInstance.connect(admin).adminBurnVehicles([3, 4]); + await devAdminInstance.connect(admin).adminBurnVehicles([1, 2]); - expect(await vehicleInstance.getDeviceDefinitionIdByVehicleId(3)).to.be.empty; - expect(await vehicleInstance.getDeviceDefinitionIdByVehicleId(4)).to.be.empty; + expect(await vehicleInstance.getDeviceDefinitionIdByVehicleId(1)).to.be.empty; + expect(await vehicleInstance.getDeviceDefinitionIdByVehicleId(2)).to.be.empty; }); it('Should correctly reset vehicle infos to blank', async () => { await devAdminInstance.connect(admin).adminBurnVehicles([1, 2]); @@ -1403,10 +1389,10 @@ describe('DevAdmin', function () { beforeEach(async () => { await vehicleInstance .connect(admin) - ['mintVehicleWithDeviceDefinition(uint256,address,uint256,string,(string,string)[])'](1, user1.address, C.STORAGE_NODE_ID_1, C.mockDdId1, C.mockVehicleAttributeInfoPairs); + ['mintVehicle(uint256,address,uint256,(string,string)[])'](1, user1.address, C.STORAGE_NODE_ID_1, C.mockVehicleAttributeInfoPairs); await vehicleInstance .connect(admin) - ['mintVehicleWithDeviceDefinition(uint256,address,uint256,string,(string,string)[])'](1, user2.address, C.STORAGE_NODE_ID_1, C.mockDdId1, C.mockVehicleAttributeInfoPairs); + ['mintVehicle(uint256,address,uint256,(string,string)[])'](1, user2.address, C.STORAGE_NODE_ID_1, C.mockVehicleAttributeInfoPairs); }); context('Error handling', () => { @@ -1552,33 +1538,19 @@ describe('DevAdmin', function () { 'ERC721: invalid token ID', ); }); - it('Should correctly reset device definition Id to empty if it was minted with DD', async () => { - await vehicleInstance - .connect(admin) - ['mintVehicleWithDeviceDefinition(uint256,address,uint256,string,(string,string)[])']( - 1, - user1.address, - C.STORAGE_NODE_ID_1, - C.mockDdId1, - C.mockVehicleAttributeInfoPairs - ); - await vehicleInstance - .connect(admin) - ['mintVehicleWithDeviceDefinition(uint256,address,uint256,string,(string,string)[])']( - 1, - user1.address, - C.STORAGE_NODE_ID_1, - C.mockDdId2, - C.mockVehicleAttributeInfoPairs - ); + it('Should correctly reset legacy device definition Id mapping when burning', async () => { + await devAdminInstance.connect(admin).adminSetVehicleDDs([ + { vehicleId: 1, deviceDefinitionId: C.mockDdId1 }, + { vehicleId: 2, deviceDefinitionId: C.mockDdId2 } + ]); - expect(await vehicleInstance.getDeviceDefinitionIdByVehicleId(3)).to.be.equal(C.mockDdId1); - expect(await vehicleInstance.getDeviceDefinitionIdByVehicleId(4)).to.be.equal(C.mockDdId2); + expect(await vehicleInstance.getDeviceDefinitionIdByVehicleId(1)).to.be.equal(C.mockDdId1); + expect(await vehicleInstance.getDeviceDefinitionIdByVehicleId(2)).to.be.equal(C.mockDdId2); - await devAdminInstance.connect(admin).adminBurnVehiclesAndDeletePairings([3, 4]); + await devAdminInstance.connect(admin).adminBurnVehiclesAndDeletePairings([1, 2]); - expect(await vehicleInstance.getDeviceDefinitionIdByVehicleId(3)).to.be.empty; - expect(await vehicleInstance.getDeviceDefinitionIdByVehicleId(4)).to.be.empty; + expect(await vehicleInstance.getDeviceDefinitionIdByVehicleId(1)).to.be.empty; + expect(await vehicleInstance.getDeviceDefinitionIdByVehicleId(2)).to.be.empty; }); it('Should correctly reset vehicle infos to blank', async () => { await devAdminInstance @@ -1929,7 +1901,7 @@ describe('DevAdmin', function () { await vehicleInstance .connect(admin) - ['mintVehicleWithDeviceDefinition(uint256,address,uint256,string,(string,string)[])'](1, user1.address, C.STORAGE_NODE_ID_1, C.mockDdId1, C.mockVehicleAttributeInfoPairs); + ['mintVehicle(uint256,address,uint256,(string,string)[])'](1, user1.address, C.STORAGE_NODE_ID_1, C.mockVehicleAttributeInfoPairs); await aftermarketDeviceInstance .connect(admin) .claimAftermarketDeviceBatch([{ aftermarketDeviceNodeId: '1', owner: await user1.address }]); @@ -2129,10 +2101,10 @@ describe('DevAdmin', function () { await vehicleInstance .connect(admin) - ['mintVehicleWithDeviceDefinition(uint256,address,uint256,string,(string,string)[])'](1, user1.address, C.STORAGE_NODE_ID_1, C.mockDdId1, C.mockVehicleAttributeInfoPairs); + ['mintVehicle(uint256,address,uint256,(string,string)[])'](1, user1.address, C.STORAGE_NODE_ID_1, C.mockVehicleAttributeInfoPairs); await vehicleInstance .connect(admin) - ['mintVehicleWithDeviceDefinition(uint256,address,uint256,string,(string,string)[])'](2, user2.address, C.STORAGE_NODE_ID_1, C.mockDdId2, C.mockVehicleAttributeInfoPairs); + ['mintVehicle(uint256,address,uint256,(string,string)[])'](2, user2.address, C.STORAGE_NODE_ID_1, C.mockVehicleAttributeInfoPairs); await aftermarketDeviceInstance .connect(admin) @@ -2320,10 +2292,10 @@ describe('DevAdmin', function () { await vehicleInstance .connect(admin) - ['mintVehicleWithDeviceDefinition(uint256,address,uint256,string,(string,string)[])'](1, user1.address, C.STORAGE_NODE_ID_1, C.mockDdId1, C.mockVehicleAttributeInfoPairs); + ['mintVehicle(uint256,address,uint256,(string,string)[])'](1, user1.address, C.STORAGE_NODE_ID_1, C.mockVehicleAttributeInfoPairs); await vehicleInstance .connect(admin) - ['mintVehicleWithDeviceDefinition(uint256,address,uint256,string,(string,string)[])'](2, user2.address, C.STORAGE_NODE_ID_1, C.mockDdId2, C.mockVehicleAttributeInfoPairs); + ['mintVehicle(uint256,address,uint256,(string,string)[])'](2, user2.address, C.STORAGE_NODE_ID_1, C.mockVehicleAttributeInfoPairs); await aftermarketDeviceInstance .connect(admin) @@ -2430,10 +2402,10 @@ describe('DevAdmin', function () { await vehicleInstance .connect(admin) - ['mintVehicleWithDeviceDefinition(uint256,address,uint256,string,(string,string)[])'](1, user1.address, C.STORAGE_NODE_ID_1, C.mockDdId1, C.mockVehicleAttributeInfoPairs); + ['mintVehicle(uint256,address,uint256,(string,string)[])'](1, user1.address, C.STORAGE_NODE_ID_1, C.mockVehicleAttributeInfoPairs); await vehicleInstance .connect(admin) - ['mintVehicleWithDeviceDefinition(uint256,address,uint256,string,(string,string)[])'](1, user2.address, C.STORAGE_NODE_ID_1, C.mockDdId1, C.mockVehicleAttributeInfoPairs); + ['mintVehicle(uint256,address,uint256,(string,string)[])'](1, user2.address, C.STORAGE_NODE_ID_1, C.mockVehicleAttributeInfoPairs); await syntheticDeviceInstance .connect(connectionOwner1) @@ -2662,7 +2634,7 @@ describe('DevAdmin', function () { ); await vehicleInstance .connect(admin) - ['mintVehicleWithDeviceDefinition(uint256,address,uint256,string,(string,string)[])'](1, user1.address, C.STORAGE_NODE_ID_1, C.mockDdId1, C.mockVehicleAttributeInfoPairs); + ['mintVehicle(uint256,address,uint256,(string,string)[])'](1, user1.address, C.STORAGE_NODE_ID_1, C.mockVehicleAttributeInfoPairs); await aftermarketDeviceInstance .connect(admin) .claimAftermarketDeviceSign( @@ -2717,7 +2689,7 @@ describe('DevAdmin', function () { await vehicleInstance .connect(admin) - ['mintVehicleWithDeviceDefinition(uint256,address,uint256,string,(string,string)[])'](1, user1.address, C.STORAGE_NODE_ID_1, C.mockDdId1, C.mockVehicleAttributeInfoPairs); + ['mintVehicle(uint256,address,uint256,(string,string)[])'](1, user1.address, C.STORAGE_NODE_ID_1, C.mockVehicleAttributeInfoPairs); await expect( devAdminInstance.connect(admin).adminPairAftermarketDevice(1, 2), @@ -2907,10 +2879,10 @@ describe('DevAdmin', function () { beforeEach(async () => { await vehicleInstance .connect(admin) - ['mintVehicleWithDeviceDefinition(uint256,address,uint256,string,(string,string)[])'](1, user1.address, C.STORAGE_NODE_ID_1, C.mockDdId1, C.mockVehicleAttributeInfoPairs); + ['mintVehicle(uint256,address,uint256,(string,string)[])'](1, user1.address, C.STORAGE_NODE_ID_1, C.mockVehicleAttributeInfoPairs); await vehicleInstance .connect(admin) - ['mintVehicleWithDeviceDefinition(uint256,address,uint256,string,(string,string)[])'](2, user2.address, C.STORAGE_NODE_ID_1, C.mockDdId1, C.mockVehicleAttributeInfoPairs); + ['mintVehicle(uint256,address,uint256,(string,string)[])'](2, user2.address, C.STORAGE_NODE_ID_1, C.mockVehicleAttributeInfoPairs); }); context('Error handling', () => { @@ -2941,8 +2913,8 @@ describe('DevAdmin', function () { const ddBefore1 = await vehicleInstance.getDeviceDefinitionIdByVehicleId(1); const ddBefore2 = await vehicleInstance.getDeviceDefinitionIdByVehicleId(2); - expect(ddBefore1).to.equal(C.mockDdId1); - expect(ddBefore2).to.equal(C.mockDdId1); + expect(ddBefore1).to.be.empty; + expect(ddBefore2).to.be.empty; await devAdminInstance .connect(admin) @@ -2983,10 +2955,10 @@ describe('DevAdmin', function () { beforeEach(async () => { await vehicleInstance .connect(admin) - ['mintVehicleWithDeviceDefinition(uint256,address,uint256,string,(string,string)[])'](1, user1.address, C.STORAGE_NODE_ID_1, C.mockDdId1, C.mockVehicleAttributeInfoPairs); + ['mintVehicle(uint256,address,uint256,(string,string)[])'](1, user1.address, C.STORAGE_NODE_ID_1, C.mockVehicleAttributeInfoPairs); await vehicleInstance .connect(admin) - ['mintVehicleWithDeviceDefinition(uint256,address,uint256,string,(string,string)[])'](1, user1.address, C.STORAGE_NODE_ID_1, C.mockDdId1, C.mockVehicleAttributeInfoPairs); + ['mintVehicle(uint256,address,uint256,(string,string)[])'](1, user1.address, C.STORAGE_NODE_ID_1, C.mockVehicleAttributeInfoPairs); }) context('Error handling', () => { diff --git a/test/DimoForwarder.test.ts b/test/DimoForwarder.test.ts index 78b41e4b..015698cf 100644 --- a/test/DimoForwarder.test.ts +++ b/test/DimoForwarder.test.ts @@ -383,10 +383,10 @@ describe('DimoForwarder', async function () { await vehicleInstance .connect(admin) - ['mintVehicleWithDeviceDefinition(uint256,address,uint256,string,(string,string)[])'](1, user1.address, C.STORAGE_NODE_ID_1, C.mockDdId1, C.mockVehicleAttributeInfoPairs); + ['mintVehicle(uint256,address,uint256,(string,string)[])'](1, user1.address, C.STORAGE_NODE_ID_1, C.mockVehicleAttributeInfoPairs); await vehicleInstance .connect(admin) - ['mintVehicleWithDeviceDefinition(uint256,address,uint256,string,(string,string)[])'](1, user1.address, C.STORAGE_NODE_ID_1, C.mockDdId2, C.mockVehicleAttributeInfoPairs); + ['mintVehicle(uint256,address,uint256,(string,string)[])'](1, user1.address, C.STORAGE_NODE_ID_1, C.mockVehicleAttributeInfoPairs); await aftermarketDeviceInstance .connect(admin) .claimAftermarketDeviceSign( diff --git a/test/Multicall.test.ts b/test/Multicall.test.ts index 08eea0d6..0dca20eb 100644 --- a/test/Multicall.test.ts +++ b/test/Multicall.test.ts @@ -299,12 +299,11 @@ describe('Multicall', function () { before(async () => { mintSig = await signMessage({ _signer: user1, - _primaryType: 'MintVehicleWithDeviceDefinitionSign', + _primaryType: 'MintVehicleSign', _verifyingContract: await vehicleInstance.getAddress(), message: { manufacturerNode: '1', owner: user1.address, - deviceDefinitionId: C.mockDdId1, attributes: C.mockVehicleAttributes, infos: C.mockVehicleInfos } @@ -340,9 +339,9 @@ describe('Multicall', function () { context('State', () => { it('Should mint vehicle and claim aftermarket device in the same transaction', async () => { - const mintVehicleWithDdSignEncoded = vehicleInstance.interface.encodeFunctionData( - 'mintVehicleWithDeviceDefinitionSign(uint256,address,uint256,string,(string,string)[],bytes)', - [1, user1.address, C.STORAGE_NODE_ID_1, C.mockDdId1, C.mockVehicleAttributeInfoPairs, mintSig] + const mintVehicleSignEncoded = vehicleInstance.interface.encodeFunctionData( + 'mintVehicleSign(uint256,address,uint256,(string,string)[],bytes)', + [1, user1.address, C.STORAGE_NODE_ID_1, C.mockVehicleAttributeInfoPairs, mintSig] ); const claimAftermarketDeviceSignEncoded = aftermarketDeviceInstance.interface.encodeFunctionData( @@ -356,7 +355,7 @@ describe('Multicall', function () { ); await multicallInstance.multiDelegateCall([ - mintVehicleWithDdSignEncoded, + mintVehicleSignEncoded, claimAftermarketDeviceSignEncoded ]); @@ -364,9 +363,9 @@ describe('Multicall', function () { expect(await adIdInstance.ownerOf(1)).to.be.equal(user1.address); }); it('Should mint vehicle, claim aftermarket device and pair them in the same transaction', async () => { - const mintVehicleWithDdSignEncoded = vehicleInstance.interface.encodeFunctionData( - 'mintVehicleWithDeviceDefinitionSign(uint256,address,uint256,string,(string,string)[],bytes)', - [1, user1.address, C.STORAGE_NODE_ID_1, C.mockDdId1, C.mockVehicleAttributeInfoPairs, mintSig] + const mintVehicleSignEncoded = vehicleInstance.interface.encodeFunctionData( + 'mintVehicleSign(uint256,address,uint256,(string,string)[],bytes)', + [1, user1.address, C.STORAGE_NODE_ID_1, C.mockVehicleAttributeInfoPairs, mintSig] ); const claimAftermarketDeviceSignEncoded = aftermarketDeviceInstance.interface.encodeFunctionData( @@ -387,7 +386,7 @@ describe('Multicall', function () { ).to.be.equal(0); await multicallInstance.multiDelegateCall([ - mintVehicleWithDdSignEncoded, + mintVehicleSignEncoded, claimAftermarketDeviceSignEncoded, pairAftermarketDeviceSignEncoded ]); @@ -447,7 +446,7 @@ describe('Multicall', function () { it('Should return information about vehicle', async () => { await vehicleInstance .connect(admin) - ['mintVehicleWithDeviceDefinition(uint256,address,uint256,string,(string,string)[])'](1, user1.address, C.STORAGE_NODE_ID_1, C.mockDdId1, C.mockVehicleAttributeInfoPairs); + ['mintVehicle(uint256,address,uint256,(string,string)[])'](1, user1.address, C.STORAGE_NODE_ID_1, C.mockVehicleAttributeInfoPairs); const getInfoEncoded1 = nodesInstance.interface.encodeFunctionData('getInfo', [ await vehicleIdInstance.getAddress(), diff --git a/test/MultipleMinter.test.ts b/test/MultipleMinter.test.ts index c2783713..26f625ac 100644 --- a/test/MultipleMinter.test.ts +++ b/test/MultipleMinter.test.ts @@ -32,8 +32,7 @@ import { revertToSnapshot, signMessage, MintVehicleAndSdInputWithSdId, - MintVehicleAndSdWithDdInputWithSnId, - MintVehicleAndSdWithDdInputWithSnIdBatch, + MintVehicleAndSdInputWithSnIdBatch, SacdInput, C } from '../utils'; @@ -337,10 +336,10 @@ describe('MultipleMinter', function () { await vehicleInstance .connect(admin) - ['mintVehicleWithDeviceDefinition(uint256,address,uint256,string,(string,string)[])'](1, user1.address, C.STORAGE_NODE_ID_1, C.mockDdId1, C.mockVehicleAttributeInfoPairs); + ['mintVehicle(uint256,address,uint256,(string,string)[])'](1, user1.address, C.STORAGE_NODE_ID_1, C.mockVehicleAttributeInfoPairs); await vehicleInstance .connect(admin) - ['mintVehicleWithDeviceDefinition(uint256,address,uint256,string,(string,string)[])'](1, user1.address, C.STORAGE_NODE_ID_1, C.mockDdId1, C.mockVehicleAttributeInfoPairs); + ['mintVehicle(uint256,address,uint256,(string,string)[])'](1, user1.address, C.STORAGE_NODE_ID_1, C.mockVehicleAttributeInfoPairs); }); beforeEach(async () => { @@ -1662,1438 +1661,12 @@ describe('MultipleMinter', function () { }); }); - describe('mintVehicleAndSdWithDeviceDefinitionSign((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]))', () => { - let mintSyntheticDeviceSig1: string; - let mintVehicleOwnerSig1: string; - let correctMintInput: MintVehicleAndSdWithDdInputWithSnId; - let incorrectMintInput: MintVehicleAndSdWithDdInputWithSnId; - - before(async () => { - mintSyntheticDeviceSig1 = await signMessage({ - _signer: sdAddress1, - _primaryType: 'MintVehicleAndSdSign', - _verifyingContract: await syntheticDeviceInstance.getAddress(), - message: { - connectionId: C.CONNECTION_ID_1 - } - }); - mintVehicleOwnerSig1 = await signMessage({ - _signer: user1, - _primaryType: 'MintVehicleWithDeviceDefinitionSign', - _verifyingContract: await vehicleInstance.getAddress(), - message: { - manufacturerNode: '1', - owner: user1.address, - deviceDefinitionId: C.mockDdId1, - attributes: C.mockVehicleAttributes, - infos: C.mockVehicleInfos - } - }); - correctMintInput = { - manufacturerNode: '1', - owner: user1.address, - deviceDefinitionId: C.mockDdId1, - storageNodeId: C.STORAGE_NODE_ID_1, - attrInfoPairsVehicle: C.mockVehicleAttributeInfoPairs, - connectionId: C.CONNECTION_ID_1, - vehicleOwnerSig: mintVehicleOwnerSig1, - syntheticDeviceSig: mintSyntheticDeviceSig1, - syntheticDeviceAddr: sdAddress1.address, - attrInfoPairsDevice: C.mockSyntheticDeviceAttributeInfoPairs - }; - }); - - context('Error handling', () => { - beforeEach(() => { - incorrectMintInput = { ...correctMintInput }; - }); - - it('Should revert if vehicle parent node is not a manufacturer node', async () => { - incorrectMintInput.manufacturerNode = '99'; - - await expect( - multipleMinterInstance - .connect(nonAdmin) - ['mintVehicleAndSdWithDeviceDefinitionSign((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]))']( - incorrectMintInput - ) - ).to.be.revertedWithCustomError(multipleMinterInstance, 'InvalidParentNode') - .withArgs(99); - }); - it('Should revert if synthetic device parent node is not a connection ID', async () => { - incorrectMintInput.connectionId = '99'; - - await expect( - multipleMinterInstance - .connect(nonAdmin) - ['mintVehicleAndSdWithDeviceDefinitionSign((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]))']( - incorrectMintInput - ) - ).to.be.revertedWithCustomError(multipleMinterInstance, 'InvalidParentNode') - .withArgs(99); - }); - it('Should revert if caller is not the connection ID owner nor has permissions', async () => { - await expect( - multipleMinterInstance - .connect(nonAdmin) - ['mintVehicleAndSdWithDeviceDefinitionSign((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]))']( - correctMintInput - ) - ) - .to.be.revertedWithCustomError( - multipleMinterInstance, - 'Unauthorized', - ) - .withArgs(nonAdmin.address); - }); - it('Should revert if Storage Node ID does not exist', async () => { - incorrectMintInput.storageNodeId = '99'; - - await expect( - multipleMinterInstance - .connect(connectionOwner1) - ['mintVehicleAndSdWithDeviceDefinitionSign((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]))']( - incorrectMintInput - ) - ).to.be.revertedWithCustomError( - multipleMinterInstance, - 'InvalidStorageNode' - ).withArgs(99); - }); - }); - - context('Connection owner as minter', () => { - context('Error handling', () => { - beforeEach(() => { - incorrectMintInput = { ...correctMintInput }; - }); - - it('Should revert if device address is already registered', async () => { - await multipleMinterInstance - .connect(connectionOwner1) - ['mintVehicleAndSdWithDeviceDefinitionSign((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]))']( - correctMintInput - ); - - await expect( - multipleMinterInstance - .connect(connectionOwner1) - ['mintVehicleAndSdWithDeviceDefinitionSign((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]))']( - correctMintInput - ) - ).to.be.revertedWithCustomError( - multipleMinterInstance, - 'DeviceAlreadyRegistered' - ).withArgs(await sdAddress1.address); - }); - it('Should revert if vehicle attribute is not whitelisted', async () => { - incorrectMintInput.attrInfoPairsVehicle = - C.mockVehicleAttributeInfoPairsNotWhitelisted; - - await expect( - multipleMinterInstance - .connect(connectionOwner1) - ['mintVehicleAndSdWithDeviceDefinitionSign((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]))']( - incorrectMintInput - ) - ).to.be.revertedWithCustomError( - multipleMinterInstance, - 'AttributeNotWhitelisted' - ).withArgs(C.mockVehicleAttributeInfoPairsNotWhitelisted[1].attribute); - }); - it('Should revert if synthetic device attribute is not whitelisted', async () => { - incorrectMintInput.attrInfoPairsDevice = - C.mockSyntheticDeviceAttributeInfoPairsNotWhitelisted; - - await expect( - multipleMinterInstance - .connect(connectionOwner1) - ['mintVehicleAndSdWithDeviceDefinitionSign((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]))']( - incorrectMintInput - ) - ).to.be.revertedWithCustomError( - multipleMinterInstance, - 'AttributeNotWhitelisted' - ).withArgs(C.mockSyntheticDeviceAttributeInfoPairsNotWhitelisted[1].attribute); - }); - - context('Wrong signature', () => { - context('Vehicle owner signature', () => { - it('Should revert if signer does not match vehicle owner', async () => { - const invalidSignature = await signMessage({ - _signer: user2, - _primaryType: 'MintVehicleWithDeviceDefinitionSign', - _verifyingContract: await vehicleInstance.getAddress(), - message: { - manufacturerNode: '1', - owner: user1.address, - deviceDefinitionId: C.mockDdId1, - attributes: C.mockVehicleAttributes, - infos: C.mockVehicleInfos - } - }); - incorrectMintInput.vehicleOwnerSig = invalidSignature; - - await expect( - multipleMinterInstance - .connect(connectionOwner1) - ['mintVehicleAndSdWithDeviceDefinitionSign((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]))']( - incorrectMintInput - ) - ).to.be.revertedWithCustomError(multipleMinterInstance, 'InvalidOwnerSignature'); - }); - it('Should revert if domain name is incorrect', async () => { - const invalidSignature = await signMessage({ - _signer: user1, - _domainName: 'Wrong domain', - _primaryType: 'MintVehicleWithDeviceDefinitionSign', - _verifyingContract: await vehicleInstance.getAddress(), - message: { - manufacturerNode: '1', - owner: user1.address, - deviceDefinitionId: C.mockDdId1, - attributes: C.mockVehicleAttributes, - infos: C.mockVehicleInfos - } - }); - incorrectMintInput.vehicleOwnerSig = invalidSignature; - - await expect( - multipleMinterInstance - .connect(connectionOwner1) - ['mintVehicleAndSdWithDeviceDefinitionSign((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]))']( - incorrectMintInput - ) - ).to.be.revertedWithCustomError(multipleMinterInstance, 'InvalidOwnerSignature'); - }); - it('Should revert if domain version is incorrect', async () => { - const invalidSignature = await signMessage({ - _signer: user1, - _domainVersion: '99', - _primaryType: 'MintVehicleWithDeviceDefinitionSign', - _verifyingContract: await vehicleInstance.getAddress(), - message: { - manufacturerNode: '1', - owner: user1.address, - deviceDefinitionId: C.mockDdId1, - attributes: C.mockVehicleAttributes, - infos: C.mockVehicleInfos - } - }); - incorrectMintInput.vehicleOwnerSig = invalidSignature; - - await expect( - multipleMinterInstance - .connect(connectionOwner1) - ['mintVehicleAndSdWithDeviceDefinitionSign((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]))']( - incorrectMintInput - ) - ).to.be.revertedWithCustomError(multipleMinterInstance, 'InvalidOwnerSignature'); - }); - it('Should revert if domain chain ID is incorrect', async () => { - const invalidSignature = await signMessage({ - _signer: user1, - _chainId: 99, - _primaryType: 'MintVehicleWithDeviceDefinitionSign', - _verifyingContract: await vehicleInstance.getAddress(), - message: { - manufacturerNode: '1', - owner: user1.address, - deviceDefinitionId: C.mockDdId1, - attributes: C.mockVehicleAttributes, - infos: C.mockVehicleInfos - } - }); - incorrectMintInput.vehicleOwnerSig = invalidSignature; - - await expect( - multipleMinterInstance - .connect(connectionOwner1) - ['mintVehicleAndSdWithDeviceDefinitionSign((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]))']( - incorrectMintInput - ) - ).to.be.revertedWithCustomError(multipleMinterInstance, 'InvalidOwnerSignature'); - }); - it('Should revert if manufacturer node is incorrect', async () => { - const invalidSignature = await signMessage({ - _signer: user1, - _primaryType: 'MintVehicleWithDeviceDefinitionSign', - _verifyingContract: await vehicleInstance.getAddress(), - message: { - manufacturerNode: '99', - owner: user1.address, - deviceDefinitionId: C.mockDdId1, - attributes: C.mockVehicleAttributes, - infos: C.mockVehicleInfos - } - }); - incorrectMintInput.vehicleOwnerSig = invalidSignature; - - await expect( - multipleMinterInstance - .connect(connectionOwner1) - ['mintVehicleAndSdWithDeviceDefinitionSign((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]))']( - incorrectMintInput - ) - ).to.be.revertedWithCustomError(multipleMinterInstance, 'InvalidOwnerSignature'); - }); - it('Should revert if deviceDefinitionId is incorrect', async () => { - const invalidSignature = await signMessage({ - _signer: user1, - _primaryType: 'MintVehicleWithDeviceDefinitionSign', - _verifyingContract: await vehicleInstance.getAddress(), - message: { - manufacturerNode: '1', - owner: user1.address, - deviceDefinitionId: C.mockDdId2, - attributes: C.mockVehicleAttributes, - infos: C.mockVehicleInfos - } - }); - incorrectMintInput.vehicleOwnerSig = invalidSignature; - - await expect( - multipleMinterInstance - .connect(connectionOwner1) - ['mintVehicleAndSdWithDeviceDefinitionSign((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]))']( - incorrectMintInput - ) - ).to.be.revertedWithCustomError(multipleMinterInstance, 'InvalidOwnerSignature'); - }); - it('Should revert if vehicle attributes are incorrect', async () => { - const invalidSignature = await signMessage({ - _signer: user1, - _primaryType: 'MintVehicleWithDeviceDefinitionSign', - _verifyingContract: await vehicleInstance.getAddress(), - message: { - manufacturerNode: '1', - owner: user1.address, - deviceDefinitionId: C.mockDdId1, - attributes: C.mockVehicleAttributes.slice(1), - infos: C.mockVehicleInfos - } - }); - incorrectMintInput.vehicleOwnerSig = invalidSignature; - - await expect( - multipleMinterInstance - .connect(connectionOwner1) - ['mintVehicleAndSdWithDeviceDefinitionSign((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]))']( - incorrectMintInput - ) - ).to.be.revertedWithCustomError(multipleMinterInstance, 'InvalidOwnerSignature'); - }); - it('Should revert if vehicle infos are incorrect', async () => { - const invalidSignature = await signMessage({ - _signer: user1, - _primaryType: 'MintVehicleWithDeviceDefinitionSign', - _verifyingContract: await vehicleInstance.getAddress(), - message: { - manufacturerNode: '1', - owner: user1.address, - deviceDefinitionId: C.mockDdId1, - attributes: C.mockVehicleAttributes, - infos: C.mockVehicleInfosWrongSize - } - }); - incorrectMintInput.vehicleOwnerSig = invalidSignature; - - await expect( - multipleMinterInstance - .connect(connectionOwner1) - ['mintVehicleAndSdWithDeviceDefinitionSign((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]))']( - incorrectMintInput - ) - ).to.be.revertedWithCustomError(multipleMinterInstance, 'InvalidOwnerSignature'); - }); - it('Should revert if owner does not match signer', async () => { - const invalidSignature = await signMessage({ - _signer: user1, - _primaryType: 'MintVehicleWithDeviceDefinitionSign', - _verifyingContract: await vehicleInstance.getAddress(), - message: { - manufacturerNode: '1', - owner: user2.address, - deviceDefinitionId: C.mockDdId1, - attributes: C.mockVehicleAttributes, - infos: C.mockVehicleInfos - } - }); - incorrectMintInput.vehicleOwnerSig = invalidSignature; - - await expect( - multipleMinterInstance - .connect(connectionOwner1) - ['mintVehicleAndSdWithDeviceDefinitionSign((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]))']( - incorrectMintInput - ) - ).to.be.revertedWithCustomError(multipleMinterInstance, 'InvalidOwnerSignature'); - }); - }); - - context('Synthetic device signature', () => { - it('Should revert if signer does not match vehicle owner', async () => { - const invalidSignature = await signMessage({ - _signer: sdAddress2, - _primaryType: 'MintVehicleAndSdSign', - _verifyingContract: await multipleMinterInstance.getAddress(), - message: { - connectionId: C.CONNECTION_ID_1 - } - }); - incorrectMintInput.syntheticDeviceSig = invalidSignature; - - await expect( - multipleMinterInstance - .connect(connectionOwner1) - ['mintVehicleAndSdWithDeviceDefinitionSign((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]))']( - incorrectMintInput - ) - ).to.be.revertedWithCustomError(multipleMinterInstance, 'InvalidSdSignature'); - }); - it('Should revert if domain name is incorrect', async () => { - const invalidSignature = await signMessage({ - _signer: sdAddress1, - _domainName: 'Wrong domain', - _primaryType: 'MintVehicleAndSdSign', - _verifyingContract: await multipleMinterInstance.getAddress(), - message: { - connectionId: C.CONNECTION_ID_1 - } - }); - incorrectMintInput.syntheticDeviceSig = invalidSignature; - - await expect( - multipleMinterInstance - .connect(connectionOwner1) - ['mintVehicleAndSdWithDeviceDefinitionSign((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]))']( - incorrectMintInput - ) - ).to.be.revertedWithCustomError(multipleMinterInstance, 'InvalidSdSignature'); - }); - it('Should revert if domain version is incorrect', async () => { - const invalidSignature = await signMessage({ - _signer: sdAddress1, - _domainVersion: '99', - _primaryType: 'MintVehicleAndSdSign', - _verifyingContract: await multipleMinterInstance.getAddress(), - message: { - connectionId: C.CONNECTION_ID_1 - } - }); - incorrectMintInput.syntheticDeviceSig = invalidSignature; - - await expect( - multipleMinterInstance - .connect(connectionOwner1) - ['mintVehicleAndSdWithDeviceDefinitionSign((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]))']( - incorrectMintInput - ) - ).to.be.revertedWithCustomError(multipleMinterInstance, 'InvalidSdSignature'); - }); - it('Should revert if domain chain ID is incorrect', async () => { - const invalidSignature = await signMessage({ - _signer: sdAddress1, - _chainId: 99, - _primaryType: 'MintVehicleAndSdSign', - _verifyingContract: await multipleMinterInstance.getAddress(), - message: { - connectionId: C.CONNECTION_ID_1 - } - }); - incorrectMintInput.syntheticDeviceSig = invalidSignature; - - await expect( - multipleMinterInstance - .connect(connectionOwner1) - ['mintVehicleAndSdWithDeviceDefinitionSign((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]))']( - incorrectMintInput - ) - ).to.be.revertedWithCustomError(multipleMinterInstance, 'InvalidSdSignature'); - }); - it('Should revert if connection ID is incorrect', async () => { - const invalidSignature = await signMessage({ - _signer: sdAddress1, - _primaryType: 'MintVehicleAndSdSign', - _verifyingContract: await multipleMinterInstance.getAddress(), - message: { - connectionId: '99' - } - }); - incorrectMintInput.syntheticDeviceSig = invalidSignature; - - await expect( - multipleMinterInstance - .connect(connectionOwner1) - ['mintVehicleAndSdWithDeviceDefinitionSign((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]))']( - incorrectMintInput - ) - ).to.be.revertedWithCustomError(multipleMinterInstance, 'InvalidSdSignature'); - }); - }); - }); - }); - - context('State', () => { - it('Should correctly set vehicle parent node', async () => { - await multipleMinterInstance - .connect(connectionOwner1) - ['mintVehicleAndSdWithDeviceDefinitionSign((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]))']( - correctMintInput - ); - - const parentNode = await nodesInstance.getParentNode( - await vehicleIdInstance.getAddress(), - 3 - ); - - expect(parentNode).to.be.equal(1); - }); - it('Should correctly set vehicle node owner', async () => { - await multipleMinterInstance - .connect(connectionOwner1) - ['mintVehicleAndSdWithDeviceDefinitionSign((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]))']( - correctMintInput - ); - - expect(await vehicleIdInstance.ownerOf(3)).to.be.equal(user1.address); - }); - it('Should correctly set synthetic device parent node', async () => { - await multipleMinterInstance - .connect(connectionOwner1) - ['mintVehicleAndSdWithDeviceDefinitionSign((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]))']( - correctMintInput - ); - - const parentNode = await nodesInstance.getParentNode( - await sdIdInstance.getAddress(), - 1 - ); - - expect(parentNode).to.be.equal(C.CONNECTION_ID_1); - }); - it('Should correctly set synthetic device node owner', async () => { - await multipleMinterInstance - .connect(connectionOwner1) - ['mintVehicleAndSdWithDeviceDefinitionSign((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]))']( - correctMintInput - ); - - expect(await sdIdInstance.ownerOf(1)).to.be.equal(user1.address); - }); - it('Should correctly set Device Definition Id', async () => { - await multipleMinterInstance - .connect(connectionOwner1) - ['mintVehicleAndSdWithDeviceDefinitionSign((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]))']( - correctMintInput - ); - - expect( - await vehicleInstance - .getDeviceDefinitionIdByVehicleId(3) - ).to.be.equal(C.mockDdId1); - }); - it('Should correctly set synthetic device address', async () => { - await multipleMinterInstance - .connect(connectionOwner1) - ['mintVehicleAndSdWithDeviceDefinitionSign((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]))']( - correctMintInput - ); - - const id = await syntheticDeviceInstance.getSyntheticDeviceIdByAddress( - sdAddress1.address - ); - - expect(id).to.equal(1); - }); - it('Should correctly set vehicle infos', async () => { - await multipleMinterInstance - .connect(connectionOwner1) - ['mintVehicleAndSdWithDeviceDefinitionSign((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]))']( - correctMintInput - ); - - expect( - await nodesInstance.getInfo( - await vehicleIdInstance.getAddress(), - 1, - C.mockVehicleAttribute1 - ) - ).to.be.equal(C.mockVehicleInfo1); - expect( - await nodesInstance.getInfo( - await vehicleIdInstance.getAddress(), - 1, - C.mockVehicleAttribute2 - ) - ).to.be.equal(C.mockVehicleInfo2); - }); - it('Should correctly set synthetic device infos', async () => { - await multipleMinterInstance - .connect(connectionOwner1) - ['mintVehicleAndSdWithDeviceDefinitionSign((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]))']( - correctMintInput - ); - - expect( - await nodesInstance.getInfo( - await sdIdInstance.getAddress(), - 1, - C.mockSyntheticDeviceAttribute1 - ) - ).to.be.equal(C.mockSyntheticDeviceInfo1); - expect( - await nodesInstance.getInfo( - await sdIdInstance.getAddress(), - 1, - C.mockSyntheticDeviceAttribute2 - ) - ).to.be.equal(C.mockSyntheticDeviceInfo2); - }); - it('Should correctly map the synthetic device to the vehicle', async () => { - await multipleMinterInstance - .connect(connectionOwner1) - ['mintVehicleAndSdWithDeviceDefinitionSign((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]))']( - correctMintInput - ); - - expect( - await mapperInstance.getNodeLink( - await vehicleIdInstance.getAddress(), - await sdIdInstance.getAddress(), - 3 - ) - ).to.be.equal(1); - }); - it('Should correctly map the vehicle to the synthetic device', async () => { - await multipleMinterInstance - .connect(connectionOwner1) - ['mintVehicleAndSdWithDeviceDefinitionSign((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]))']( - correctMintInput - ); - - expect( - await mapperInstance.getNodeLink( - await sdIdInstance.getAddress(), - await vehicleIdInstance.getAddress(), - 1 - ) - ).to.be.equal(3); - }); - it('Should correctly burn DIMO Credit tokens from the sender', async () => { - await expect(() => - multipleMinterInstance - .connect(connectionOwner1) - ['mintVehicleAndSdWithDeviceDefinitionSign((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]))']( - correctMintInput - ) - ).changeTokenBalance( - mockDimoCreditInstance, - connectionOwner1.address, - -C.MINT_VEHICLE_OPERATION_COST - ); - }); - it('Should correctly set Storage Node ID for vehicle ID', async () => { - const storageNodeIdForVehicleBefore = await storageNodeRegistryInstance.vehicleIdToStorageNodeId(3); - expect(storageNodeIdForVehicleBefore).to.equal(0) - - await multipleMinterInstance - .connect(connectionOwner1) - ['mintVehicleAndSdWithDeviceDefinitionSign((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]))']( - correctMintInput - ); - - const storageNodeIdForVehicleAfter = await storageNodeRegistryInstance.vehicleIdToStorageNodeId(3); - expect(storageNodeIdForVehicleAfter).to.equal(C.STORAGE_NODE_ID_1) - }); - it('Should correctly set Storage Node ID Default for vehicle ID if no Storage Node ID is specified', async () => { - const localCorrectInput = { ...correctMintInput } - localCorrectInput.storageNodeId = '0' - - const storageNodeIdForVehicleBefore = await storageNodeRegistryInstance.vehicleIdToStorageNodeId(3); - expect(storageNodeIdForVehicleBefore).to.equal(0) - - await multipleMinterInstance - .connect(connectionOwner1) - ['mintVehicleAndSdWithDeviceDefinitionSign((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]))']( - localCorrectInput - ); - - const storageNodeIdForVehicleAfter = await storageNodeRegistryInstance.vehicleIdToStorageNodeId(3); - expect(storageNodeIdForVehicleAfter).to.equal(C.STORAGE_NODE_ID_DEFAULT) - }) - }); - - context('Events', () => { - it('Should emit VehicleNodeMintedWithDeviceDefinition event with correct params', async () => { - await expect( - multipleMinterInstance - .connect(connectionOwner1) - ['mintVehicleAndSdWithDeviceDefinitionSign((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]))']( - correctMintInput - ) - ) - .to.emit(multipleMinterInstance, 'VehicleNodeMintedWithDeviceDefinition') - .withArgs(1, 3, user1.address, C.mockDdId1); - }); - it('Should emit VehicleAttributeSet events with correct params', async () => { - await expect( - multipleMinterInstance - .connect(connectionOwner1) - ['mintVehicleAndSdWithDeviceDefinitionSign((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]))']( - correctMintInput - ) - ) - .to.emit(vehicleInstance, 'VehicleAttributeSet') - .withArgs( - 3, - C.mockVehicleAttributeInfoPairs[0].attribute, - C.mockVehicleAttributeInfoPairs[0].info - ) - .to.emit(vehicleInstance, 'VehicleAttributeSet') - .withArgs( - 3, - C.mockVehicleAttributeInfoPairs[1].attribute, - C.mockVehicleAttributeInfoPairs[1].info - ); - }); - it('Should emit SyntheticDeviceNodeMinted event with correct params', async () => { - await expect( - multipleMinterInstance - .connect(connectionOwner1) - ['mintVehicleAndSdWithDeviceDefinitionSign((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]))']( - correctMintInput - ) - ) - .to.emit(multipleMinterInstance, 'SyntheticDeviceNodeMinted') - .withArgs(C.CONNECTION_ID_1, 1, 3, sdAddress1.address, user1.address); - }); - it('Should emit SyntheticDeviceAttributeSet events with correct params', async () => { - await expect( - multipleMinterInstance - .connect(connectionOwner1) - ['mintVehicleAndSdWithDeviceDefinitionSign((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]))']( - correctMintInput - ) - ) - .to.emit(multipleMinterInstance, 'SyntheticDeviceAttributeSet') - .withArgs( - 1, - C.mockSyntheticDeviceAttributeInfoPairs[0].attribute, - C.mockSyntheticDeviceAttributeInfoPairs[0].info - ) - .to.emit(multipleMinterInstance, 'SyntheticDeviceAttributeSet') - .withArgs( - 1, - C.mockSyntheticDeviceAttributeInfoPairs[1].attribute, - C.mockSyntheticDeviceAttributeInfoPairs[1].info - ); - }); - it('Should not emit SyntheticDeviceAttributeSet event if attrInfoPairsDevice is empty', async () => { - const localCorrectMintInput = { - manufacturerNode: '1', - owner: user1.address, - deviceDefinitionId: C.mockDdId1, - storageNodeId: C.STORAGE_NODE_ID_1, - attrInfoPairsVehicle: C.mockVehicleAttributeInfoPairs, - connectionId: C.CONNECTION_ID_1, - vehicleOwnerSig: mintVehicleOwnerSig1, - syntheticDeviceSig: mintSyntheticDeviceSig1, - syntheticDeviceAddr: sdAddress1.address, - attrInfoPairsDevice: [] - }; - - await expect( - multipleMinterInstance - .connect(connectionOwner1) - ['mintVehicleAndSdWithDeviceDefinitionSign((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]))']( - localCorrectMintInput - ) - ).to.not.emit(multipleMinterInstance, 'SyntheticDeviceAttributeSet'); - }); - it('Should emit VehicleStorageNodeIdSet event with correct params', async () => { - await expect( - multipleMinterInstance - .connect(connectionOwner1) - ['mintVehicleAndSdWithDeviceDefinitionSign((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]))']( - correctMintInput - ) - ) - .to.emit(multipleMinterInstance, 'VehicleStorageNodeIdSet') - .withArgs(3, C.STORAGE_NODE_ID_1); - }); - }); - }); - - context('Minter has permission', () => { - context('Error handling', () => { - beforeEach(() => { - incorrectMintInput = { ...correctMintInput }; - }); - - it('Should revert if device address is already registered', async () => { - await multipleMinterInstance - .connect(minterWithPermission1) - ['mintVehicleAndSdWithDeviceDefinitionSign((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]))']( - correctMintInput - ); - - await expect( - multipleMinterInstance - .connect(minterWithPermission1) - ['mintVehicleAndSdWithDeviceDefinitionSign((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]))']( - correctMintInput - ) - ).to.be.revertedWithCustomError( - multipleMinterInstance, - 'DeviceAlreadyRegistered' - ).withArgs(await sdAddress1.address); - }); - it('Should revert if vehicle attribute is not whitelisted', async () => { - incorrectMintInput.attrInfoPairsVehicle = - C.mockVehicleAttributeInfoPairsNotWhitelisted; - - await expect( - multipleMinterInstance - .connect(minterWithPermission1) - ['mintVehicleAndSdWithDeviceDefinitionSign((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]))']( - incorrectMintInput - ) - ).to.be.revertedWithCustomError( - multipleMinterInstance, - 'AttributeNotWhitelisted' - ).withArgs(C.mockVehicleAttributeInfoPairsNotWhitelisted[1].attribute); - }); - it('Should revert if synthetic device attribute is not whitelisted', async () => { - incorrectMintInput.attrInfoPairsDevice = - C.mockSyntheticDeviceAttributeInfoPairsNotWhitelisted; - - await expect( - multipleMinterInstance - .connect(minterWithPermission1) - ['mintVehicleAndSdWithDeviceDefinitionSign((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]))']( - incorrectMintInput - ) - ).to.be.revertedWithCustomError( - multipleMinterInstance, - 'AttributeNotWhitelisted' - ).withArgs(C.mockSyntheticDeviceAttributeInfoPairsNotWhitelisted[1].attribute); - }); - - context('Wrong signature', () => { - context('Vehicle owner signature', () => { - it('Should revert if signer does not match vehicle owner', async () => { - const invalidSignature = await signMessage({ - _signer: user2, - _primaryType: 'MintVehicleWithDeviceDefinitionSign', - _verifyingContract: await vehicleInstance.getAddress(), - message: { - manufacturerNode: '1', - owner: user1.address, - deviceDefinitionId: C.mockDdId1, - attributes: C.mockVehicleAttributes, - infos: C.mockVehicleInfos - } - }); - incorrectMintInput.vehicleOwnerSig = invalidSignature; - - await expect( - multipleMinterInstance - .connect(minterWithPermission1) - ['mintVehicleAndSdWithDeviceDefinitionSign((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]))']( - incorrectMintInput - ) - ).to.be.revertedWithCustomError(multipleMinterInstance, 'InvalidOwnerSignature'); - }); - it('Should revert if domain name is incorrect', async () => { - const invalidSignature = await signMessage({ - _signer: user1, - _domainName: 'Wrong domain', - _primaryType: 'MintVehicleWithDeviceDefinitionSign', - _verifyingContract: await vehicleInstance.getAddress(), - message: { - manufacturerNode: '1', - owner: user1.address, - deviceDefinitionId: C.mockDdId1, - attributes: C.mockVehicleAttributes, - infos: C.mockVehicleInfos - } - }); - incorrectMintInput.vehicleOwnerSig = invalidSignature; - - await expect( - multipleMinterInstance - .connect(minterWithPermission1) - ['mintVehicleAndSdWithDeviceDefinitionSign((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]))']( - incorrectMintInput - ) - ).to.be.revertedWithCustomError(multipleMinterInstance, 'InvalidOwnerSignature'); - }); - it('Should revert if domain version is incorrect', async () => { - const invalidSignature = await signMessage({ - _signer: user1, - _domainVersion: '99', - _primaryType: 'MintVehicleWithDeviceDefinitionSign', - _verifyingContract: await vehicleInstance.getAddress(), - message: { - manufacturerNode: '1', - owner: user1.address, - deviceDefinitionId: C.mockDdId1, - attributes: C.mockVehicleAttributes, - infos: C.mockVehicleInfos - } - }); - incorrectMintInput.vehicleOwnerSig = invalidSignature; - - await expect( - multipleMinterInstance - .connect(minterWithPermission1) - ['mintVehicleAndSdWithDeviceDefinitionSign((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]))']( - incorrectMintInput - ) - ).to.be.revertedWithCustomError(multipleMinterInstance, 'InvalidOwnerSignature'); - }); - it('Should revert if domain chain ID is incorrect', async () => { - const invalidSignature = await signMessage({ - _signer: user1, - _chainId: 99, - _primaryType: 'MintVehicleWithDeviceDefinitionSign', - _verifyingContract: await vehicleInstance.getAddress(), - message: { - manufacturerNode: '1', - owner: user1.address, - deviceDefinitionId: C.mockDdId1, - attributes: C.mockVehicleAttributes, - infos: C.mockVehicleInfos - } - }); - incorrectMintInput.vehicleOwnerSig = invalidSignature; - - await expect( - multipleMinterInstance - .connect(minterWithPermission1) - ['mintVehicleAndSdWithDeviceDefinitionSign((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]))']( - incorrectMintInput - ) - ).to.be.revertedWithCustomError(multipleMinterInstance, 'InvalidOwnerSignature'); - }); - it('Should revert if manufacturer node is incorrect', async () => { - const invalidSignature = await signMessage({ - _signer: user1, - _primaryType: 'MintVehicleWithDeviceDefinitionSign', - _verifyingContract: await vehicleInstance.getAddress(), - message: { - manufacturerNode: '99', - owner: user1.address, - deviceDefinitionId: C.mockDdId1, - attributes: C.mockVehicleAttributes, - infos: C.mockVehicleInfos - } - }); - incorrectMintInput.vehicleOwnerSig = invalidSignature; - - await expect( - multipleMinterInstance - .connect(minterWithPermission1) - ['mintVehicleAndSdWithDeviceDefinitionSign((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]))']( - incorrectMintInput - ) - ).to.be.revertedWithCustomError(multipleMinterInstance, 'InvalidOwnerSignature'); - }); - it('Should revert if deviceDefinitionId is incorrect', async () => { - const invalidSignature = await signMessage({ - _signer: user1, - _primaryType: 'MintVehicleWithDeviceDefinitionSign', - _verifyingContract: await vehicleInstance.getAddress(), - message: { - manufacturerNode: '1', - owner: user1.address, - deviceDefinitionId: C.mockDdId2, - attributes: C.mockVehicleAttributes, - infos: C.mockVehicleInfos - } - }); - incorrectMintInput.vehicleOwnerSig = invalidSignature; - - await expect( - multipleMinterInstance - .connect(minterWithPermission1) - ['mintVehicleAndSdWithDeviceDefinitionSign((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]))']( - incorrectMintInput - ) - ).to.be.revertedWithCustomError(multipleMinterInstance, 'InvalidOwnerSignature'); - }); - it('Should revert if vehicle attributes are incorrect', async () => { - const invalidSignature = await signMessage({ - _signer: user1, - _primaryType: 'MintVehicleWithDeviceDefinitionSign', - _verifyingContract: await vehicleInstance.getAddress(), - message: { - manufacturerNode: '1', - owner: user1.address, - deviceDefinitionId: C.mockDdId1, - attributes: C.mockVehicleAttributes.slice(1), - infos: C.mockVehicleInfos - } - }); - incorrectMintInput.vehicleOwnerSig = invalidSignature; - - await expect( - multipleMinterInstance - .connect(minterWithPermission1) - ['mintVehicleAndSdWithDeviceDefinitionSign((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]))']( - incorrectMintInput - ) - ).to.be.revertedWithCustomError(multipleMinterInstance, 'InvalidOwnerSignature'); - }); - it('Should revert if vehicle infos are incorrect', async () => { - const invalidSignature = await signMessage({ - _signer: user1, - _primaryType: 'MintVehicleWithDeviceDefinitionSign', - _verifyingContract: await vehicleInstance.getAddress(), - message: { - manufacturerNode: '1', - owner: user1.address, - deviceDefinitionId: C.mockDdId1, - attributes: C.mockVehicleAttributes, - infos: C.mockVehicleInfosWrongSize - } - }); - incorrectMintInput.vehicleOwnerSig = invalidSignature; - - await expect( - multipleMinterInstance - .connect(minterWithPermission1) - ['mintVehicleAndSdWithDeviceDefinitionSign((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]))']( - incorrectMintInput - ) - ).to.be.revertedWithCustomError(multipleMinterInstance, 'InvalidOwnerSignature'); - }); - it('Should revert if owner does not match signer', async () => { - const invalidSignature = await signMessage({ - _signer: user1, - _primaryType: 'MintVehicleWithDeviceDefinitionSign', - _verifyingContract: await vehicleInstance.getAddress(), - message: { - manufacturerNode: '1', - owner: user2.address, - deviceDefinitionId: C.mockDdId1, - attributes: C.mockVehicleAttributes, - infos: C.mockVehicleInfos - } - }); - incorrectMintInput.vehicleOwnerSig = invalidSignature; - - await expect( - multipleMinterInstance - .connect(minterWithPermission1) - ['mintVehicleAndSdWithDeviceDefinitionSign((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]))']( - incorrectMintInput - ) - ).to.be.revertedWithCustomError(multipleMinterInstance, 'InvalidOwnerSignature'); - }); - }); - - context('Synthetic device signature', () => { - it('Should revert if signer does not match vehicle owner', async () => { - const invalidSignature = await signMessage({ - _signer: sdAddress2, - _primaryType: 'MintVehicleAndSdSign', - _verifyingContract: await multipleMinterInstance.getAddress(), - message: { - connectionId: C.CONNECTION_ID_1 - } - }); - incorrectMintInput.syntheticDeviceSig = invalidSignature; - - await expect( - multipleMinterInstance - .connect(minterWithPermission1) - ['mintVehicleAndSdWithDeviceDefinitionSign((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]))']( - incorrectMintInput - ) - ).to.be.revertedWithCustomError(multipleMinterInstance, 'InvalidSdSignature'); - }); - it('Should revert if domain name is incorrect', async () => { - const invalidSignature = await signMessage({ - _signer: sdAddress1, - _domainName: 'Wrong domain', - _primaryType: 'MintVehicleAndSdSign', - _verifyingContract: await multipleMinterInstance.getAddress(), - message: { - connectionId: C.CONNECTION_ID_1 - } - }); - incorrectMintInput.syntheticDeviceSig = invalidSignature; - - await expect( - multipleMinterInstance - .connect(minterWithPermission1) - ['mintVehicleAndSdWithDeviceDefinitionSign((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]))']( - incorrectMintInput - ) - ).to.be.revertedWithCustomError(multipleMinterInstance, 'InvalidSdSignature'); - }); - it('Should revert if domain version is incorrect', async () => { - const invalidSignature = await signMessage({ - _signer: sdAddress1, - _domainVersion: '99', - _primaryType: 'MintVehicleAndSdSign', - _verifyingContract: await multipleMinterInstance.getAddress(), - message: { - connectionId: C.CONNECTION_ID_1 - } - }); - incorrectMintInput.syntheticDeviceSig = invalidSignature; - - await expect( - multipleMinterInstance - .connect(minterWithPermission1) - ['mintVehicleAndSdWithDeviceDefinitionSign((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]))']( - incorrectMintInput - ) - ).to.be.revertedWithCustomError(multipleMinterInstance, 'InvalidSdSignature'); - }); - it('Should revert if domain chain ID is incorrect', async () => { - const invalidSignature = await signMessage({ - _signer: sdAddress1, - _chainId: 99, - _primaryType: 'MintVehicleAndSdSign', - _verifyingContract: await multipleMinterInstance.getAddress(), - message: { - connectionId: C.CONNECTION_ID_1 - } - }); - incorrectMintInput.syntheticDeviceSig = invalidSignature; - - await expect( - multipleMinterInstance - .connect(minterWithPermission1) - ['mintVehicleAndSdWithDeviceDefinitionSign((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]))']( - incorrectMintInput - ) - ).to.be.revertedWithCustomError(multipleMinterInstance, 'InvalidSdSignature'); - }); - it('Should revert if connection ID is incorrect', async () => { - const invalidSignature = await signMessage({ - _signer: sdAddress1, - _primaryType: 'MintVehicleAndSdSign', - _verifyingContract: await multipleMinterInstance.getAddress(), - message: { - connectionId: '99' - } - }); - incorrectMintInput.syntheticDeviceSig = invalidSignature; - - await expect( - multipleMinterInstance - .connect(minterWithPermission1) - ['mintVehicleAndSdWithDeviceDefinitionSign((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]))']( - incorrectMintInput - ) - ).to.be.revertedWithCustomError(multipleMinterInstance, 'InvalidSdSignature'); - }); - }); - }); - }); - - context('State', () => { - it('Should correctly set vehicle parent node', async () => { - await multipleMinterInstance - .connect(minterWithPermission1) - ['mintVehicleAndSdWithDeviceDefinitionSign((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]))']( - correctMintInput - ); - - const parentNode = await nodesInstance.getParentNode( - await vehicleIdInstance.getAddress(), - 3 - ); - - expect(parentNode).to.be.equal(1); - }); - it('Should correctly set vehicle node owner', async () => { - await multipleMinterInstance - .connect(minterWithPermission1) - ['mintVehicleAndSdWithDeviceDefinitionSign((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]))']( - correctMintInput - ); - - expect(await vehicleIdInstance.ownerOf(3)).to.be.equal(user1.address); - }); - it('Should correctly set synthetic device parent node', async () => { - await multipleMinterInstance - .connect(minterWithPermission1) - ['mintVehicleAndSdWithDeviceDefinitionSign((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]))']( - correctMintInput - ); - - const parentNode = await nodesInstance.getParentNode( - await sdIdInstance.getAddress(), - 1 - ); - - expect(parentNode).to.be.equal(C.CONNECTION_ID_1); - }); - it('Should correctly set synthetic device node owner', async () => { - await multipleMinterInstance - .connect(minterWithPermission1) - ['mintVehicleAndSdWithDeviceDefinitionSign((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]))']( - correctMintInput - ); - - expect(await sdIdInstance.ownerOf(1)).to.be.equal(user1.address); - }); - it('Should correctly set Device Definition Id', async () => { - await multipleMinterInstance - .connect(minterWithPermission1) - ['mintVehicleAndSdWithDeviceDefinitionSign((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]))']( - correctMintInput - ); - - expect( - await vehicleInstance - .getDeviceDefinitionIdByVehicleId(3) - ).to.be.equal(C.mockDdId1); - }); - it('Should correctly set synthetic device address', async () => { - await multipleMinterInstance - .connect(minterWithPermission1) - ['mintVehicleAndSdWithDeviceDefinitionSign((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]))']( - correctMintInput - ); - - const id = await syntheticDeviceInstance.getSyntheticDeviceIdByAddress( - sdAddress1.address - ); - - expect(id).to.equal(1); - }); - it('Should correctly set vehicle infos', async () => { - await multipleMinterInstance - .connect(minterWithPermission1) - ['mintVehicleAndSdWithDeviceDefinitionSign((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]))']( - correctMintInput - ); - - expect( - await nodesInstance.getInfo( - await vehicleIdInstance.getAddress(), - 1, - C.mockVehicleAttribute1 - ) - ).to.be.equal(C.mockVehicleInfo1); - expect( - await nodesInstance.getInfo( - await vehicleIdInstance.getAddress(), - 1, - C.mockVehicleAttribute2 - ) - ).to.be.equal(C.mockVehicleInfo2); - }); - it('Should correctly set synthetic device infos', async () => { - await multipleMinterInstance - .connect(minterWithPermission1) - ['mintVehicleAndSdWithDeviceDefinitionSign((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]))']( - correctMintInput - ); - - expect( - await nodesInstance.getInfo( - await sdIdInstance.getAddress(), - 1, - C.mockSyntheticDeviceAttribute1 - ) - ).to.be.equal(C.mockSyntheticDeviceInfo1); - expect( - await nodesInstance.getInfo( - await sdIdInstance.getAddress(), - 1, - C.mockSyntheticDeviceAttribute2 - ) - ).to.be.equal(C.mockSyntheticDeviceInfo2); - }); - it('Should correctly map the synthetic device to the vehicle', async () => { - await multipleMinterInstance - .connect(minterWithPermission1) - ['mintVehicleAndSdWithDeviceDefinitionSign((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]))']( - correctMintInput - ); - - expect( - await mapperInstance.getNodeLink( - await vehicleIdInstance.getAddress(), - await sdIdInstance.getAddress(), - 3 - ) - ).to.be.equal(1); - }); - it('Should correctly map the vehicle to the synthetic device', async () => { - await multipleMinterInstance - .connect(minterWithPermission1) - ['mintVehicleAndSdWithDeviceDefinitionSign((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]))']( - correctMintInput - ); - - expect( - await mapperInstance.getNodeLink( - await sdIdInstance.getAddress(), - await vehicleIdInstance.getAddress(), - 1 - ) - ).to.be.equal(3); - }); - it('Should correctly burn DIMO Credit tokens from the sender', async () => { - await expect(() => - multipleMinterInstance - .connect(minterWithPermission1) - ['mintVehicleAndSdWithDeviceDefinitionSign((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]))']( - correctMintInput - ) - ).changeTokenBalance( - mockDimoCreditInstance, - minterWithPermission1.address, - -C.MINT_VEHICLE_OPERATION_COST - ); - }); - it('Should correctly set Storage Node ID for vehicle ID', async () => { - const storageNodeIdForVehicleBefore = await storageNodeRegistryInstance.vehicleIdToStorageNodeId(3); - expect(storageNodeIdForVehicleBefore).to.equal(0) - - await multipleMinterInstance - .connect(minterWithPermission1) - ['mintVehicleAndSdWithDeviceDefinitionSign((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]))']( - correctMintInput - ); - - const storageNodeIdForVehicleAfter = await storageNodeRegistryInstance.vehicleIdToStorageNodeId(3); - expect(storageNodeIdForVehicleAfter).to.equal(C.STORAGE_NODE_ID_1) - }); - it('Should correctly set Storage Node ID Default for vehicle ID if no Storage Node ID is specified', async () => { - const localCorrectInput = { ...correctMintInput } - localCorrectInput.storageNodeId = '0' - - const storageNodeIdForVehicleBefore = await storageNodeRegistryInstance.vehicleIdToStorageNodeId(3); - expect(storageNodeIdForVehicleBefore).to.equal(0) - - await multipleMinterInstance - .connect(minterWithPermission1) - ['mintVehicleAndSdWithDeviceDefinitionSign((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]))']( - localCorrectInput - ); - const storageNodeIdForVehicleAfter = await storageNodeRegistryInstance.vehicleIdToStorageNodeId(3); - expect(storageNodeIdForVehicleAfter).to.equal(C.STORAGE_NODE_ID_DEFAULT) - }) - }); - - context('Events', () => { - it('Should emit VehicleNodeMintedWithDeviceDefinition event with correct params', async () => { - await expect( - multipleMinterInstance - .connect(minterWithPermission1) - ['mintVehicleAndSdWithDeviceDefinitionSign((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]))']( - correctMintInput - ) - ) - .to.emit(multipleMinterInstance, 'VehicleNodeMintedWithDeviceDefinition') - .withArgs(1, 3, user1.address, C.mockDdId1); - }); - it('Should emit VehicleAttributeSet events with correct params', async () => { - await expect( - multipleMinterInstance - .connect(minterWithPermission1) - ['mintVehicleAndSdWithDeviceDefinitionSign((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]))']( - correctMintInput - ) - ) - .to.emit(vehicleInstance, 'VehicleAttributeSet') - .withArgs( - 3, - C.mockVehicleAttributeInfoPairs[0].attribute, - C.mockVehicleAttributeInfoPairs[0].info - ) - .to.emit(vehicleInstance, 'VehicleAttributeSet') - .withArgs( - 3, - C.mockVehicleAttributeInfoPairs[1].attribute, - C.mockVehicleAttributeInfoPairs[1].info - ); - }); - it('Should emit SyntheticDeviceNodeMinted event with correct params', async () => { - await expect( - multipleMinterInstance - .connect(minterWithPermission1) - ['mintVehicleAndSdWithDeviceDefinitionSign((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]))']( - correctMintInput - ) - ) - .to.emit(multipleMinterInstance, 'SyntheticDeviceNodeMinted') - .withArgs(C.CONNECTION_ID_1, 1, 3, sdAddress1.address, user1.address); - }); - it('Should emit SyntheticDeviceAttributeSet events with correct params', async () => { - await expect( - multipleMinterInstance - .connect(minterWithPermission1) - ['mintVehicleAndSdWithDeviceDefinitionSign((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]))']( - correctMintInput - ) - ) - .to.emit(multipleMinterInstance, 'SyntheticDeviceAttributeSet') - .withArgs( - 1, - C.mockSyntheticDeviceAttributeInfoPairs[0].attribute, - C.mockSyntheticDeviceAttributeInfoPairs[0].info - ) - .to.emit(multipleMinterInstance, 'SyntheticDeviceAttributeSet') - .withArgs( - 1, - C.mockSyntheticDeviceAttributeInfoPairs[1].attribute, - C.mockSyntheticDeviceAttributeInfoPairs[1].info - ); - }); - it('Should not emit SyntheticDeviceAttributeSet event if attrInfoPairsDevice is empty', async () => { - const localCorrectMintInput = { - manufacturerNode: '1', - owner: user1.address, - deviceDefinitionId: C.mockDdId1, - storageNodeId: C.STORAGE_NODE_ID_1, - attrInfoPairsVehicle: C.mockVehicleAttributeInfoPairs, - connectionId: C.CONNECTION_ID_1, - vehicleOwnerSig: mintVehicleOwnerSig1, - syntheticDeviceSig: mintSyntheticDeviceSig1, - syntheticDeviceAddr: sdAddress1.address, - attrInfoPairsDevice: [] - }; - - await expect( - multipleMinterInstance - .connect(minterWithPermission1) - ['mintVehicleAndSdWithDeviceDefinitionSign((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]))']( - localCorrectMintInput - ) - ).to.not.emit(multipleMinterInstance, 'SyntheticDeviceAttributeSet'); - }); - it('Should emit VehicleStorageNodeIdSet event with correct params', async () => { - await expect( - multipleMinterInstance - .connect(minterWithPermission1) - ['mintVehicleAndSdWithDeviceDefinitionSign((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]))']( - correctMintInput - ) - ) - .to.emit(multipleMinterInstance, 'VehicleStorageNodeIdSet') - .withArgs(3, C.STORAGE_NODE_ID_1); - }); - }); - }); - }); - - describe('mintVehicleAndSdWithDeviceDefinitionSignAndSacd((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))', () => { + describe('mintVehicleAndSdSignAndSacd((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))', () => { let mintSyntheticDeviceSig1: string; let mintVehicleOwnerSig1: string; - let correctMintInput: MintVehicleAndSdWithDdInputWithSnId; - let incorrectMintInput: MintVehicleAndSdWithDdInputWithSnId; + let correctMintInput: MintVehicleAndSdInputWithSdId; + let incorrectMintInput: MintVehicleAndSdInputWithSdId; let sacdInput: SacdInput; before(async () => { @@ -3107,12 +1680,11 @@ describe('MultipleMinter', function () { }); mintVehicleOwnerSig1 = await signMessage({ _signer: user1, - _primaryType: 'MintVehicleWithDeviceDefinitionSign', + _primaryType: 'MintVehicleSign', _verifyingContract: await vehicleInstance.getAddress(), message: { manufacturerNode: '1', owner: user1.address, - deviceDefinitionId: C.mockDdId1, attributes: C.mockVehicleAttributes, infos: C.mockVehicleInfos } @@ -3120,7 +1692,6 @@ describe('MultipleMinter', function () { correctMintInput = { manufacturerNode: '1', owner: user1.address, - deviceDefinitionId: C.mockDdId1, storageNodeId: C.STORAGE_NODE_ID_1, attrInfoPairsVehicle: C.mockVehicleAttributeInfoPairs, connectionId: C.CONNECTION_ID_1, @@ -3147,7 +1718,7 @@ describe('MultipleMinter', function () { await expect( multipleMinterInstance .connect(nonAdmin) - ['mintVehicleAndSdWithDeviceDefinitionSignAndSacd((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( + ['mintVehicleAndSdSignAndSacd((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( incorrectMintInput, sacdInput ) @@ -3160,7 +1731,7 @@ describe('MultipleMinter', function () { await expect( multipleMinterInstance .connect(nonAdmin) - ['mintVehicleAndSdWithDeviceDefinitionSignAndSacd((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( + ['mintVehicleAndSdSignAndSacd((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( incorrectMintInput, sacdInput ) @@ -3171,7 +1742,7 @@ describe('MultipleMinter', function () { await expect( multipleMinterInstance .connect(nonAdmin) - ['mintVehicleAndSdWithDeviceDefinitionSignAndSacd((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( + ['mintVehicleAndSdSignAndSacd((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( correctMintInput, sacdInput ) @@ -3188,7 +1759,7 @@ describe('MultipleMinter', function () { await expect( multipleMinterInstance .connect(connectionOwner1) - ['mintVehicleAndSdWithDeviceDefinitionSignAndSacd((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( + ['mintVehicleAndSdSignAndSacd((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( incorrectMintInput, sacdInput ) @@ -3208,7 +1779,7 @@ describe('MultipleMinter', function () { it('Should revert if device address is already registered', async () => { await multipleMinterInstance .connect(connectionOwner1) - ['mintVehicleAndSdWithDeviceDefinitionSignAndSacd((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( + ['mintVehicleAndSdSignAndSacd((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( correctMintInput, sacdInput ); @@ -3216,7 +1787,7 @@ describe('MultipleMinter', function () { await expect( multipleMinterInstance .connect(connectionOwner1) - ['mintVehicleAndSdWithDeviceDefinitionSignAndSacd((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( + ['mintVehicleAndSdSignAndSacd((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( correctMintInput, sacdInput ) @@ -3232,7 +1803,7 @@ describe('MultipleMinter', function () { await expect( multipleMinterInstance .connect(connectionOwner1) - ['mintVehicleAndSdWithDeviceDefinitionSignAndSacd((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( + ['mintVehicleAndSdSignAndSacd((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( incorrectMintInput, sacdInput ) @@ -3248,7 +1819,7 @@ describe('MultipleMinter', function () { await expect( multipleMinterInstance .connect(connectionOwner1) - ['mintVehicleAndSdWithDeviceDefinitionSignAndSacd((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( + ['mintVehicleAndSdSignAndSacd((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( incorrectMintInput, sacdInput ) @@ -3263,12 +1834,11 @@ describe('MultipleMinter', function () { it('Should revert if signer does not match vehicle owner', async () => { const invalidSignature = await signMessage({ _signer: user2, - _primaryType: 'MintVehicleWithDeviceDefinitionSign', + _primaryType: 'MintVehicleSign', _verifyingContract: await vehicleInstance.getAddress(), message: { manufacturerNode: '1', owner: user1.address, - deviceDefinitionId: C.mockDdId1, attributes: C.mockVehicleAttributes, infos: C.mockVehicleInfos } @@ -3278,7 +1848,7 @@ describe('MultipleMinter', function () { await expect( multipleMinterInstance .connect(connectionOwner1) - ['mintVehicleAndSdWithDeviceDefinitionSignAndSacd((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( + ['mintVehicleAndSdSignAndSacd((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( incorrectMintInput, sacdInput ) @@ -3288,12 +1858,11 @@ describe('MultipleMinter', function () { const invalidSignature = await signMessage({ _signer: user1, _domainName: 'Wrong domain', - _primaryType: 'MintVehicleWithDeviceDefinitionSign', + _primaryType: 'MintVehicleSign', _verifyingContract: await vehicleInstance.getAddress(), message: { manufacturerNode: '1', owner: user1.address, - deviceDefinitionId: C.mockDdId1, attributes: C.mockVehicleAttributes, infos: C.mockVehicleInfos } @@ -3303,7 +1872,7 @@ describe('MultipleMinter', function () { await expect( multipleMinterInstance .connect(connectionOwner1) - ['mintVehicleAndSdWithDeviceDefinitionSignAndSacd((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( + ['mintVehicleAndSdSignAndSacd((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( incorrectMintInput, sacdInput ) @@ -3313,12 +1882,11 @@ describe('MultipleMinter', function () { const invalidSignature = await signMessage({ _signer: user1, _domainVersion: '99', - _primaryType: 'MintVehicleWithDeviceDefinitionSign', + _primaryType: 'MintVehicleSign', _verifyingContract: await vehicleInstance.getAddress(), message: { manufacturerNode: '1', owner: user1.address, - deviceDefinitionId: C.mockDdId1, attributes: C.mockVehicleAttributes, infos: C.mockVehicleInfos } @@ -3328,7 +1896,7 @@ describe('MultipleMinter', function () { await expect( multipleMinterInstance .connect(connectionOwner1) - ['mintVehicleAndSdWithDeviceDefinitionSignAndSacd((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( + ['mintVehicleAndSdSignAndSacd((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( incorrectMintInput, sacdInput ) @@ -3338,12 +1906,11 @@ describe('MultipleMinter', function () { const invalidSignature = await signMessage({ _signer: user1, _chainId: 99, - _primaryType: 'MintVehicleWithDeviceDefinitionSign', + _primaryType: 'MintVehicleSign', _verifyingContract: await vehicleInstance.getAddress(), message: { manufacturerNode: '1', owner: user1.address, - deviceDefinitionId: C.mockDdId1, attributes: C.mockVehicleAttributes, infos: C.mockVehicleInfos } @@ -3353,7 +1920,7 @@ describe('MultipleMinter', function () { await expect( multipleMinterInstance .connect(connectionOwner1) - ['mintVehicleAndSdWithDeviceDefinitionSignAndSacd((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( + ['mintVehicleAndSdSignAndSacd((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( incorrectMintInput, sacdInput ) @@ -3362,36 +1929,11 @@ describe('MultipleMinter', function () { it('Should revert if manufacturer node is incorrect', async () => { const invalidSignature = await signMessage({ _signer: user1, - _primaryType: 'MintVehicleWithDeviceDefinitionSign', + _primaryType: 'MintVehicleSign', _verifyingContract: await vehicleInstance.getAddress(), message: { manufacturerNode: '99', owner: user1.address, - deviceDefinitionId: C.mockDdId1, - attributes: C.mockVehicleAttributes, - infos: C.mockVehicleInfos - } - }); - incorrectMintInput.vehicleOwnerSig = invalidSignature; - - await expect( - multipleMinterInstance - .connect(connectionOwner1) - ['mintVehicleAndSdWithDeviceDefinitionSignAndSacd((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( - incorrectMintInput, - sacdInput - ) - ).to.be.revertedWithCustomError(multipleMinterInstance, 'InvalidOwnerSignature'); - }); - it('Should revert if deviceDefinitionId is incorrect', async () => { - const invalidSignature = await signMessage({ - _signer: user1, - _primaryType: 'MintVehicleWithDeviceDefinitionSign', - _verifyingContract: await vehicleInstance.getAddress(), - message: { - manufacturerNode: '1', - owner: user1.address, - deviceDefinitionId: C.mockDdId2, attributes: C.mockVehicleAttributes, infos: C.mockVehicleInfos } @@ -3401,7 +1943,7 @@ describe('MultipleMinter', function () { await expect( multipleMinterInstance .connect(connectionOwner1) - ['mintVehicleAndSdWithDeviceDefinitionSignAndSacd((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( + ['mintVehicleAndSdSignAndSacd((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( incorrectMintInput, sacdInput ) @@ -3410,12 +1952,11 @@ describe('MultipleMinter', function () { it('Should revert if vehicle attributes are incorrect', async () => { const invalidSignature = await signMessage({ _signer: user1, - _primaryType: 'MintVehicleWithDeviceDefinitionSign', + _primaryType: 'MintVehicleSign', _verifyingContract: await vehicleInstance.getAddress(), message: { manufacturerNode: '1', owner: user1.address, - deviceDefinitionId: C.mockDdId1, attributes: C.mockVehicleAttributes.slice(1), infos: C.mockVehicleInfos } @@ -3425,7 +1966,7 @@ describe('MultipleMinter', function () { await expect( multipleMinterInstance .connect(connectionOwner1) - ['mintVehicleAndSdWithDeviceDefinitionSignAndSacd((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( + ['mintVehicleAndSdSignAndSacd((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( incorrectMintInput, sacdInput ) @@ -3434,12 +1975,11 @@ describe('MultipleMinter', function () { it('Should revert if vehicle infos are incorrect', async () => { const invalidSignature = await signMessage({ _signer: user1, - _primaryType: 'MintVehicleWithDeviceDefinitionSign', + _primaryType: 'MintVehicleSign', _verifyingContract: await vehicleInstance.getAddress(), message: { manufacturerNode: '1', owner: user1.address, - deviceDefinitionId: C.mockDdId1, attributes: C.mockVehicleAttributes, infos: C.mockVehicleInfosWrongSize } @@ -3449,7 +1989,7 @@ describe('MultipleMinter', function () { await expect( multipleMinterInstance .connect(connectionOwner1) - ['mintVehicleAndSdWithDeviceDefinitionSignAndSacd((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( + ['mintVehicleAndSdSignAndSacd((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( incorrectMintInput, sacdInput ) @@ -3458,12 +1998,11 @@ describe('MultipleMinter', function () { it('Should revert if owner does not match signer', async () => { const invalidSignature = await signMessage({ _signer: user1, - _primaryType: 'MintVehicleWithDeviceDefinitionSign', + _primaryType: 'MintVehicleSign', _verifyingContract: await vehicleInstance.getAddress(), message: { manufacturerNode: '1', owner: user2.address, - deviceDefinitionId: C.mockDdId1, attributes: C.mockVehicleAttributes, infos: C.mockVehicleInfos } @@ -3473,7 +2012,7 @@ describe('MultipleMinter', function () { await expect( multipleMinterInstance .connect(connectionOwner1) - ['mintVehicleAndSdWithDeviceDefinitionSignAndSacd((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( + ['mintVehicleAndSdSignAndSacd((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( incorrectMintInput, sacdInput ) @@ -3496,7 +2035,7 @@ describe('MultipleMinter', function () { await expect( multipleMinterInstance .connect(connectionOwner1) - ['mintVehicleAndSdWithDeviceDefinitionSignAndSacd((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( + ['mintVehicleAndSdSignAndSacd((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( incorrectMintInput, sacdInput ) @@ -3517,7 +2056,7 @@ describe('MultipleMinter', function () { await expect( multipleMinterInstance .connect(connectionOwner1) - ['mintVehicleAndSdWithDeviceDefinitionSignAndSacd((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( + ['mintVehicleAndSdSignAndSacd((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( incorrectMintInput, sacdInput ) @@ -3538,7 +2077,7 @@ describe('MultipleMinter', function () { await expect( multipleMinterInstance .connect(connectionOwner1) - ['mintVehicleAndSdWithDeviceDefinitionSignAndSacd((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( + ['mintVehicleAndSdSignAndSacd((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( incorrectMintInput, sacdInput ) @@ -3559,7 +2098,7 @@ describe('MultipleMinter', function () { await expect( multipleMinterInstance .connect(connectionOwner1) - ['mintVehicleAndSdWithDeviceDefinitionSignAndSacd((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( + ['mintVehicleAndSdSignAndSacd((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( incorrectMintInput, sacdInput ) @@ -3579,7 +2118,7 @@ describe('MultipleMinter', function () { await expect( multipleMinterInstance .connect(connectionOwner1) - ['mintVehicleAndSdWithDeviceDefinitionSignAndSacd((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( + ['mintVehicleAndSdSignAndSacd((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( incorrectMintInput, sacdInput ) @@ -3593,7 +2132,7 @@ describe('MultipleMinter', function () { it('Should correctly set vehicle parent node', async () => { await multipleMinterInstance .connect(connectionOwner1) - ['mintVehicleAndSdWithDeviceDefinitionSignAndSacd((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( + ['mintVehicleAndSdSignAndSacd((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( correctMintInput, sacdInput ); @@ -3608,7 +2147,7 @@ describe('MultipleMinter', function () { it('Should correctly set vehicle node owner', async () => { await multipleMinterInstance .connect(connectionOwner1) - ['mintVehicleAndSdWithDeviceDefinitionSignAndSacd((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( + ['mintVehicleAndSdSignAndSacd((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( correctMintInput, sacdInput ); @@ -3618,7 +2157,7 @@ describe('MultipleMinter', function () { it('Should correctly set synthetic device parent node', async () => { await multipleMinterInstance .connect(connectionOwner1) - ['mintVehicleAndSdWithDeviceDefinitionSignAndSacd((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( + ['mintVehicleAndSdSignAndSacd((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( correctMintInput, sacdInput ); @@ -3633,30 +2172,17 @@ describe('MultipleMinter', function () { it('Should correctly set synthetic device node owner', async () => { await multipleMinterInstance .connect(connectionOwner1) - ['mintVehicleAndSdWithDeviceDefinitionSignAndSacd((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( + ['mintVehicleAndSdSignAndSacd((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( correctMintInput, sacdInput ); expect(await sdIdInstance.ownerOf(1)).to.be.equal(user1.address); }); - it('Should correctly set Device Definition Id', async () => { - await multipleMinterInstance - .connect(connectionOwner1) - ['mintVehicleAndSdWithDeviceDefinitionSignAndSacd((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( - correctMintInput, - sacdInput - ); - - expect( - await vehicleInstance - .getDeviceDefinitionIdByVehicleId(3) - ).to.be.equal(C.mockDdId1); - }); it('Should correctly set synthetic device address', async () => { await multipleMinterInstance .connect(connectionOwner1) - ['mintVehicleAndSdWithDeviceDefinitionSignAndSacd((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( + ['mintVehicleAndSdSignAndSacd((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( correctMintInput, sacdInput ); @@ -3670,7 +2196,7 @@ describe('MultipleMinter', function () { it('Should correctly set vehicle infos', async () => { await multipleMinterInstance .connect(connectionOwner1) - ['mintVehicleAndSdWithDeviceDefinitionSignAndSacd((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( + ['mintVehicleAndSdSignAndSacd((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( correctMintInput, sacdInput ); @@ -3693,7 +2219,7 @@ describe('MultipleMinter', function () { it('Should correctly set synthetic device infos', async () => { await multipleMinterInstance .connect(connectionOwner1) - ['mintVehicleAndSdWithDeviceDefinitionSignAndSacd((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( + ['mintVehicleAndSdSignAndSacd((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( correctMintInput, sacdInput ); @@ -3716,7 +2242,7 @@ describe('MultipleMinter', function () { it('Should correctly map the synthetic device to the vehicle', async () => { await multipleMinterInstance .connect(connectionOwner1) - ['mintVehicleAndSdWithDeviceDefinitionSignAndSacd((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( + ['mintVehicleAndSdSignAndSacd((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( correctMintInput, sacdInput ); @@ -3732,7 +2258,7 @@ describe('MultipleMinter', function () { it('Should correctly map the vehicle to the synthetic device', async () => { await multipleMinterInstance .connect(connectionOwner1) - ['mintVehicleAndSdWithDeviceDefinitionSignAndSacd((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( + ['mintVehicleAndSdSignAndSacd((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( correctMintInput, sacdInput ); @@ -3749,7 +2275,7 @@ describe('MultipleMinter', function () { await expect(() => multipleMinterInstance .connect(connectionOwner1) - ['mintVehicleAndSdWithDeviceDefinitionSignAndSacd((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( + ['mintVehicleAndSdSignAndSacd((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( correctMintInput, sacdInput ) @@ -3766,7 +2292,7 @@ describe('MultipleMinter', function () { await multipleMinterInstance .connect(connectionOwner1) - ['mintVehicleAndSdWithDeviceDefinitionSignAndSacd((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( + ['mintVehicleAndSdSignAndSacd((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( correctMintInput, sacdInput ); @@ -3781,7 +2307,7 @@ describe('MultipleMinter', function () { await multipleMinterInstance .connect(connectionOwner1) - ['mintVehicleAndSdWithDeviceDefinitionSignAndSacd((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( + ['mintVehicleAndSdSignAndSacd((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( correctMintInput, sacdInput ); @@ -3798,7 +2324,7 @@ describe('MultipleMinter', function () { await multipleMinterInstance .connect(connectionOwner1) - ['mintVehicleAndSdWithDeviceDefinitionSignAndSacd((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( + ['mintVehicleAndSdSignAndSacd((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( localCorrectInput, sacdInput ); @@ -3809,23 +2335,23 @@ describe('MultipleMinter', function () { }); context('Events', () => { - it('Should emit VehicleNodeMintedWithDeviceDefinition event with correct params', async () => { + it('Should emit VehicleNodeMinted event with correct params', async () => { await expect( multipleMinterInstance .connect(connectionOwner1) - ['mintVehicleAndSdWithDeviceDefinitionSignAndSacd((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( + ['mintVehicleAndSdSignAndSacd((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( correctMintInput, sacdInput ) ) - .to.emit(multipleMinterInstance, 'VehicleNodeMintedWithDeviceDefinition') - .withArgs(1, 3, user1.address, C.mockDdId1); + .to.emit(multipleMinterInstance, 'VehicleNodeMinted') + .withArgs(1, 3, user1.address); }); it('Should emit VehicleAttributeSet events with correct params', async () => { await expect( multipleMinterInstance .connect(connectionOwner1) - ['mintVehicleAndSdWithDeviceDefinitionSignAndSacd((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( + ['mintVehicleAndSdSignAndSacd((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( correctMintInput, sacdInput ) @@ -3847,7 +2373,7 @@ describe('MultipleMinter', function () { await expect( multipleMinterInstance .connect(connectionOwner1) - ['mintVehicleAndSdWithDeviceDefinitionSignAndSacd((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( + ['mintVehicleAndSdSignAndSacd((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( correctMintInput, sacdInput ) @@ -3859,7 +2385,7 @@ describe('MultipleMinter', function () { await expect( multipleMinterInstance .connect(connectionOwner1) - ['mintVehicleAndSdWithDeviceDefinitionSignAndSacd((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( + ['mintVehicleAndSdSignAndSacd((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( correctMintInput, sacdInput ) @@ -3881,7 +2407,6 @@ describe('MultipleMinter', function () { const localCorrectMintInput = { manufacturerNode: '1', owner: user1.address, - deviceDefinitionId: C.mockDdId1, storageNodeId: C.STORAGE_NODE_ID_1, attrInfoPairsVehicle: C.mockVehicleAttributeInfoPairs, connectionId: C.CONNECTION_ID_1, @@ -3894,7 +2419,7 @@ describe('MultipleMinter', function () { await expect( multipleMinterInstance .connect(connectionOwner1) - ['mintVehicleAndSdWithDeviceDefinitionSignAndSacd((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( + ['mintVehicleAndSdSignAndSacd((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( localCorrectMintInput, sacdInput ) @@ -3904,7 +2429,7 @@ describe('MultipleMinter', function () { await expect( multipleMinterInstance .connect(connectionOwner1) - ['mintVehicleAndSdWithDeviceDefinitionSignAndSacd((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( + ['mintVehicleAndSdSignAndSacd((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( correctMintInput, sacdInput ) @@ -3924,7 +2449,7 @@ describe('MultipleMinter', function () { it('Should revert if device address is already registered', async () => { await multipleMinterInstance .connect(minterWithPermission1) - ['mintVehicleAndSdWithDeviceDefinitionSignAndSacd((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( + ['mintVehicleAndSdSignAndSacd((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( correctMintInput, sacdInput ); @@ -3932,7 +2457,7 @@ describe('MultipleMinter', function () { await expect( multipleMinterInstance .connect(minterWithPermission1) - ['mintVehicleAndSdWithDeviceDefinitionSignAndSacd((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( + ['mintVehicleAndSdSignAndSacd((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( correctMintInput, sacdInput ) @@ -3948,7 +2473,7 @@ describe('MultipleMinter', function () { await expect( multipleMinterInstance .connect(minterWithPermission1) - ['mintVehicleAndSdWithDeviceDefinitionSignAndSacd((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( + ['mintVehicleAndSdSignAndSacd((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( incorrectMintInput, sacdInput ) @@ -3964,7 +2489,7 @@ describe('MultipleMinter', function () { await expect( multipleMinterInstance .connect(minterWithPermission1) - ['mintVehicleAndSdWithDeviceDefinitionSignAndSacd((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( + ['mintVehicleAndSdSignAndSacd((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( incorrectMintInput, sacdInput ) @@ -3979,12 +2504,11 @@ describe('MultipleMinter', function () { it('Should revert if signer does not match vehicle owner', async () => { const invalidSignature = await signMessage({ _signer: user2, - _primaryType: 'MintVehicleWithDeviceDefinitionSign', + _primaryType: 'MintVehicleSign', _verifyingContract: await vehicleInstance.getAddress(), message: { manufacturerNode: '1', owner: user1.address, - deviceDefinitionId: C.mockDdId1, attributes: C.mockVehicleAttributes, infos: C.mockVehicleInfos } @@ -3994,7 +2518,7 @@ describe('MultipleMinter', function () { await expect( multipleMinterInstance .connect(minterWithPermission1) - ['mintVehicleAndSdWithDeviceDefinitionSignAndSacd((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( + ['mintVehicleAndSdSignAndSacd((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( incorrectMintInput, sacdInput ) @@ -4004,12 +2528,11 @@ describe('MultipleMinter', function () { const invalidSignature = await signMessage({ _signer: user1, _domainName: 'Wrong domain', - _primaryType: 'MintVehicleWithDeviceDefinitionSign', + _primaryType: 'MintVehicleSign', _verifyingContract: await vehicleInstance.getAddress(), message: { manufacturerNode: '1', owner: user1.address, - deviceDefinitionId: C.mockDdId1, attributes: C.mockVehicleAttributes, infos: C.mockVehicleInfos } @@ -4019,7 +2542,7 @@ describe('MultipleMinter', function () { await expect( multipleMinterInstance .connect(minterWithPermission1) - ['mintVehicleAndSdWithDeviceDefinitionSignAndSacd((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( + ['mintVehicleAndSdSignAndSacd((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( incorrectMintInput, sacdInput ) @@ -4029,12 +2552,11 @@ describe('MultipleMinter', function () { const invalidSignature = await signMessage({ _signer: user1, _domainVersion: '99', - _primaryType: 'MintVehicleWithDeviceDefinitionSign', + _primaryType: 'MintVehicleSign', _verifyingContract: await vehicleInstance.getAddress(), message: { manufacturerNode: '1', owner: user1.address, - deviceDefinitionId: C.mockDdId1, attributes: C.mockVehicleAttributes, infos: C.mockVehicleInfos } @@ -4044,7 +2566,7 @@ describe('MultipleMinter', function () { await expect( multipleMinterInstance .connect(minterWithPermission1) - ['mintVehicleAndSdWithDeviceDefinitionSignAndSacd((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( + ['mintVehicleAndSdSignAndSacd((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( incorrectMintInput, sacdInput ) @@ -4054,12 +2576,11 @@ describe('MultipleMinter', function () { const invalidSignature = await signMessage({ _signer: user1, _chainId: 99, - _primaryType: 'MintVehicleWithDeviceDefinitionSign', + _primaryType: 'MintVehicleSign', _verifyingContract: await vehicleInstance.getAddress(), message: { manufacturerNode: '1', owner: user1.address, - deviceDefinitionId: C.mockDdId1, attributes: C.mockVehicleAttributes, infos: C.mockVehicleInfos } @@ -4069,7 +2590,7 @@ describe('MultipleMinter', function () { await expect( multipleMinterInstance .connect(minterWithPermission1) - ['mintVehicleAndSdWithDeviceDefinitionSignAndSacd((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( + ['mintVehicleAndSdSignAndSacd((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( incorrectMintInput, sacdInput ) @@ -4078,36 +2599,11 @@ describe('MultipleMinter', function () { it('Should revert if manufacturer node is incorrect', async () => { const invalidSignature = await signMessage({ _signer: user1, - _primaryType: 'MintVehicleWithDeviceDefinitionSign', + _primaryType: 'MintVehicleSign', _verifyingContract: await vehicleInstance.getAddress(), message: { manufacturerNode: '99', owner: user1.address, - deviceDefinitionId: C.mockDdId1, - attributes: C.mockVehicleAttributes, - infos: C.mockVehicleInfos - } - }); - incorrectMintInput.vehicleOwnerSig = invalidSignature; - - await expect( - multipleMinterInstance - .connect(minterWithPermission1) - ['mintVehicleAndSdWithDeviceDefinitionSignAndSacd((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( - incorrectMintInput, - sacdInput - ) - ).to.be.revertedWithCustomError(multipleMinterInstance, 'InvalidOwnerSignature'); - }); - it('Should revert if deviceDefinitionId is incorrect', async () => { - const invalidSignature = await signMessage({ - _signer: user1, - _primaryType: 'MintVehicleWithDeviceDefinitionSign', - _verifyingContract: await vehicleInstance.getAddress(), - message: { - manufacturerNode: '1', - owner: user1.address, - deviceDefinitionId: C.mockDdId2, attributes: C.mockVehicleAttributes, infos: C.mockVehicleInfos } @@ -4117,7 +2613,7 @@ describe('MultipleMinter', function () { await expect( multipleMinterInstance .connect(minterWithPermission1) - ['mintVehicleAndSdWithDeviceDefinitionSignAndSacd((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( + ['mintVehicleAndSdSignAndSacd((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( incorrectMintInput, sacdInput ) @@ -4126,12 +2622,11 @@ describe('MultipleMinter', function () { it('Should revert if vehicle attributes are incorrect', async () => { const invalidSignature = await signMessage({ _signer: user1, - _primaryType: 'MintVehicleWithDeviceDefinitionSign', + _primaryType: 'MintVehicleSign', _verifyingContract: await vehicleInstance.getAddress(), message: { manufacturerNode: '1', owner: user1.address, - deviceDefinitionId: C.mockDdId1, attributes: C.mockVehicleAttributes.slice(1), infos: C.mockVehicleInfos } @@ -4141,7 +2636,7 @@ describe('MultipleMinter', function () { await expect( multipleMinterInstance .connect(minterWithPermission1) - ['mintVehicleAndSdWithDeviceDefinitionSignAndSacd((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( + ['mintVehicleAndSdSignAndSacd((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( incorrectMintInput, sacdInput ) @@ -4150,12 +2645,11 @@ describe('MultipleMinter', function () { it('Should revert if vehicle infos are incorrect', async () => { const invalidSignature = await signMessage({ _signer: user1, - _primaryType: 'MintVehicleWithDeviceDefinitionSign', + _primaryType: 'MintVehicleSign', _verifyingContract: await vehicleInstance.getAddress(), message: { manufacturerNode: '1', owner: user1.address, - deviceDefinitionId: C.mockDdId1, attributes: C.mockVehicleAttributes, infos: C.mockVehicleInfosWrongSize } @@ -4165,7 +2659,7 @@ describe('MultipleMinter', function () { await expect( multipleMinterInstance .connect(minterWithPermission1) - ['mintVehicleAndSdWithDeviceDefinitionSignAndSacd((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( + ['mintVehicleAndSdSignAndSacd((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( incorrectMintInput, sacdInput ) @@ -4174,12 +2668,11 @@ describe('MultipleMinter', function () { it('Should revert if owner does not match signer', async () => { const invalidSignature = await signMessage({ _signer: user1, - _primaryType: 'MintVehicleWithDeviceDefinitionSign', + _primaryType: 'MintVehicleSign', _verifyingContract: await vehicleInstance.getAddress(), message: { manufacturerNode: '1', owner: user2.address, - deviceDefinitionId: C.mockDdId1, attributes: C.mockVehicleAttributes, infos: C.mockVehicleInfos } @@ -4189,7 +2682,7 @@ describe('MultipleMinter', function () { await expect( multipleMinterInstance .connect(minterWithPermission1) - ['mintVehicleAndSdWithDeviceDefinitionSignAndSacd((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( + ['mintVehicleAndSdSignAndSacd((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( incorrectMintInput, sacdInput ) @@ -4212,7 +2705,7 @@ describe('MultipleMinter', function () { await expect( multipleMinterInstance .connect(minterWithPermission1) - ['mintVehicleAndSdWithDeviceDefinitionSignAndSacd((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( + ['mintVehicleAndSdSignAndSacd((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( incorrectMintInput, sacdInput ) @@ -4233,7 +2726,7 @@ describe('MultipleMinter', function () { await expect( multipleMinterInstance .connect(minterWithPermission1) - ['mintVehicleAndSdWithDeviceDefinitionSignAndSacd((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( + ['mintVehicleAndSdSignAndSacd((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( incorrectMintInput, sacdInput ) @@ -4254,7 +2747,7 @@ describe('MultipleMinter', function () { await expect( multipleMinterInstance .connect(minterWithPermission1) - ['mintVehicleAndSdWithDeviceDefinitionSignAndSacd((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( + ['mintVehicleAndSdSignAndSacd((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( incorrectMintInput, sacdInput ) @@ -4275,7 +2768,7 @@ describe('MultipleMinter', function () { await expect( multipleMinterInstance .connect(minterWithPermission1) - ['mintVehicleAndSdWithDeviceDefinitionSignAndSacd((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( + ['mintVehicleAndSdSignAndSacd((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( incorrectMintInput, sacdInput ) @@ -4295,7 +2788,7 @@ describe('MultipleMinter', function () { await expect( multipleMinterInstance .connect(minterWithPermission1) - ['mintVehicleAndSdWithDeviceDefinitionSignAndSacd((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( + ['mintVehicleAndSdSignAndSacd((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( incorrectMintInput, sacdInput ) @@ -4309,7 +2802,7 @@ describe('MultipleMinter', function () { it('Should correctly set vehicle parent node', async () => { await multipleMinterInstance .connect(minterWithPermission1) - ['mintVehicleAndSdWithDeviceDefinitionSignAndSacd((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( + ['mintVehicleAndSdSignAndSacd((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( correctMintInput, sacdInput ); @@ -4324,7 +2817,7 @@ describe('MultipleMinter', function () { it('Should correctly set vehicle node owner', async () => { await multipleMinterInstance .connect(minterWithPermission1) - ['mintVehicleAndSdWithDeviceDefinitionSignAndSacd((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( + ['mintVehicleAndSdSignAndSacd((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( correctMintInput, sacdInput ); @@ -4334,7 +2827,7 @@ describe('MultipleMinter', function () { it('Should correctly set synthetic device parent node', async () => { await multipleMinterInstance .connect(minterWithPermission1) - ['mintVehicleAndSdWithDeviceDefinitionSignAndSacd((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( + ['mintVehicleAndSdSignAndSacd((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( correctMintInput, sacdInput ); @@ -4349,30 +2842,17 @@ describe('MultipleMinter', function () { it('Should correctly set synthetic device node owner', async () => { await multipleMinterInstance .connect(minterWithPermission1) - ['mintVehicleAndSdWithDeviceDefinitionSignAndSacd((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( + ['mintVehicleAndSdSignAndSacd((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( correctMintInput, sacdInput ); expect(await sdIdInstance.ownerOf(1)).to.be.equal(user1.address); }); - it('Should correctly set Device Definition Id', async () => { - await multipleMinterInstance - .connect(minterWithPermission1) - ['mintVehicleAndSdWithDeviceDefinitionSignAndSacd((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( - correctMintInput, - sacdInput - ); - - expect( - await vehicleInstance - .getDeviceDefinitionIdByVehicleId(3) - ).to.be.equal(C.mockDdId1); - }); it('Should correctly set synthetic device address', async () => { await multipleMinterInstance .connect(minterWithPermission1) - ['mintVehicleAndSdWithDeviceDefinitionSignAndSacd((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( + ['mintVehicleAndSdSignAndSacd((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( correctMintInput, sacdInput ); @@ -4386,7 +2866,7 @@ describe('MultipleMinter', function () { it('Should correctly set vehicle infos', async () => { await multipleMinterInstance .connect(minterWithPermission1) - ['mintVehicleAndSdWithDeviceDefinitionSignAndSacd((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( + ['mintVehicleAndSdSignAndSacd((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( correctMintInput, sacdInput ); @@ -4409,7 +2889,7 @@ describe('MultipleMinter', function () { it('Should correctly set synthetic device infos', async () => { await multipleMinterInstance .connect(minterWithPermission1) - ['mintVehicleAndSdWithDeviceDefinitionSignAndSacd((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( + ['mintVehicleAndSdSignAndSacd((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( correctMintInput, sacdInput ); @@ -4432,7 +2912,7 @@ describe('MultipleMinter', function () { it('Should correctly map the synthetic device to the vehicle', async () => { await multipleMinterInstance .connect(minterWithPermission1) - ['mintVehicleAndSdWithDeviceDefinitionSignAndSacd((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( + ['mintVehicleAndSdSignAndSacd((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( correctMintInput, sacdInput ); @@ -4448,7 +2928,7 @@ describe('MultipleMinter', function () { it('Should correctly map the vehicle to the synthetic device', async () => { await multipleMinterInstance .connect(minterWithPermission1) - ['mintVehicleAndSdWithDeviceDefinitionSignAndSacd((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( + ['mintVehicleAndSdSignAndSacd((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( correctMintInput, sacdInput ); @@ -4465,7 +2945,7 @@ describe('MultipleMinter', function () { await expect(() => multipleMinterInstance .connect(minterWithPermission1) - ['mintVehicleAndSdWithDeviceDefinitionSignAndSacd((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( + ['mintVehicleAndSdSignAndSacd((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( correctMintInput, sacdInput ) @@ -4482,7 +2962,7 @@ describe('MultipleMinter', function () { await multipleMinterInstance .connect(minterWithPermission1) - ['mintVehicleAndSdWithDeviceDefinitionSignAndSacd((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( + ['mintVehicleAndSdSignAndSacd((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( correctMintInput, sacdInput ); @@ -4497,7 +2977,7 @@ describe('MultipleMinter', function () { await multipleMinterInstance .connect(minterWithPermission1) - ['mintVehicleAndSdWithDeviceDefinitionSignAndSacd((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( + ['mintVehicleAndSdSignAndSacd((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( correctMintInput, sacdInput ); @@ -4514,7 +2994,7 @@ describe('MultipleMinter', function () { await multipleMinterInstance .connect(minterWithPermission1) - ['mintVehicleAndSdWithDeviceDefinitionSignAndSacd((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( + ['mintVehicleAndSdSignAndSacd((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( localCorrectInput, sacdInput ); @@ -4525,23 +3005,23 @@ describe('MultipleMinter', function () { }); context('Events', () => { - it('Should emit VehicleNodeMintedWithDeviceDefinition event with correct params', async () => { + it('Should emit VehicleNodeMinted event with correct params', async () => { await expect( multipleMinterInstance .connect(minterWithPermission1) - ['mintVehicleAndSdWithDeviceDefinitionSignAndSacd((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( + ['mintVehicleAndSdSignAndSacd((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( correctMintInput, sacdInput ) ) - .to.emit(multipleMinterInstance, 'VehicleNodeMintedWithDeviceDefinition') - .withArgs(1, 3, user1.address, C.mockDdId1); + .to.emit(multipleMinterInstance, 'VehicleNodeMinted') + .withArgs(1, 3, user1.address); }); it('Should emit VehicleAttributeSet events with correct params', async () => { await expect( multipleMinterInstance .connect(minterWithPermission1) - ['mintVehicleAndSdWithDeviceDefinitionSignAndSacd((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( + ['mintVehicleAndSdSignAndSacd((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( correctMintInput, sacdInput ) @@ -4563,7 +3043,7 @@ describe('MultipleMinter', function () { await expect( multipleMinterInstance .connect(minterWithPermission1) - ['mintVehicleAndSdWithDeviceDefinitionSignAndSacd((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( + ['mintVehicleAndSdSignAndSacd((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( correctMintInput, sacdInput ) @@ -4575,7 +3055,7 @@ describe('MultipleMinter', function () { await expect( multipleMinterInstance .connect(minterWithPermission1) - ['mintVehicleAndSdWithDeviceDefinitionSignAndSacd((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( + ['mintVehicleAndSdSignAndSacd((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( correctMintInput, sacdInput ) @@ -4597,7 +3077,6 @@ describe('MultipleMinter', function () { const localCorrectMintInput = { manufacturerNode: '1', owner: user1.address, - deviceDefinitionId: C.mockDdId1, storageNodeId: C.STORAGE_NODE_ID_1, attrInfoPairsVehicle: C.mockVehicleAttributeInfoPairs, connectionId: C.CONNECTION_ID_1, @@ -4610,7 +3089,7 @@ describe('MultipleMinter', function () { await expect( multipleMinterInstance .connect(minterWithPermission1) - ['mintVehicleAndSdWithDeviceDefinitionSignAndSacd((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( + ['mintVehicleAndSdSignAndSacd((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( localCorrectMintInput, sacdInput ) @@ -4620,7 +3099,7 @@ describe('MultipleMinter', function () { await expect( multipleMinterInstance .connect(minterWithPermission1) - ['mintVehicleAndSdWithDeviceDefinitionSignAndSacd((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( + ['mintVehicleAndSdSignAndSacd((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( correctMintInput, sacdInput ) @@ -4632,15 +3111,15 @@ describe('MultipleMinter', function () { }); }); - describe('mintVehicleAndSdWithDeviceDefinitionSignBatch((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])', () => { + describe('mintVehicleAndSdSignBatch((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])', () => { let mintSyntheticDeviceSig1: string; let mintSyntheticDeviceSig2WithConnection1: string; let mintSyntheticDeviceSig2WithConnection2: string; let mintVehicleOwnerSig1: string; let mintVehicleOwnerSig2: string; - let correctMintInputWithOneConnection: MintVehicleAndSdWithDdInputWithSnIdBatch[]; - let correctMintInputWithDiffConnections: MintVehicleAndSdWithDdInputWithSnIdBatch[]; - let incorrectMintInput: MintVehicleAndSdWithDdInputWithSnIdBatch[]; + let correctMintInputWithOneConnection: MintVehicleAndSdInputWithSnIdBatch[]; + let correctMintInputWithDiffConnections: MintVehicleAndSdInputWithSnIdBatch[]; + let incorrectMintInput: MintVehicleAndSdInputWithSnIdBatch[]; let sacdInput1: SacdInput; let sacdInput2: SacdInput; @@ -4671,24 +3150,22 @@ describe('MultipleMinter', function () { }); mintVehicleOwnerSig1 = await signMessage({ _signer: user1, - _primaryType: 'MintVehicleWithDeviceDefinitionSign', + _primaryType: 'MintVehicleSign', _verifyingContract: await vehicleInstance.getAddress(), message: { manufacturerNode: '1', owner: user1.address, - deviceDefinitionId: C.mockDdId1, attributes: C.mockVehicleAttributes, infos: C.mockVehicleInfos } }); mintVehicleOwnerSig2 = await signMessage({ _signer: user2, - _primaryType: 'MintVehicleWithDeviceDefinitionSign', + _primaryType: 'MintVehicleSign', _verifyingContract: await vehicleInstance.getAddress(), message: { manufacturerNode: '2', owner: user2.address, - deviceDefinitionId: C.mockDdId2, attributes: C.mockVehicleAttributes, infos: C.mockVehicleInfos } @@ -4707,7 +3184,6 @@ describe('MultipleMinter', function () { { manufacturerNode: '1', owner: user1.address, - deviceDefinitionId: C.mockDdId1, storageNodeId: C.STORAGE_NODE_ID_1, attrInfoPairsVehicle: C.mockVehicleAttributeInfoPairs, connectionId: C.CONNECTION_ID_1, @@ -4720,7 +3196,6 @@ describe('MultipleMinter', function () { { manufacturerNode: '2', owner: user2.address, - deviceDefinitionId: C.mockDdId2, storageNodeId: C.STORAGE_NODE_ID_1, attrInfoPairsVehicle: C.mockVehicleAttributeInfoPairs, connectionId: C.CONNECTION_ID_1, @@ -4747,7 +3222,7 @@ describe('MultipleMinter', function () { await expect( multipleMinterInstance .connect(nonAdmin) - ['mintVehicleAndSdWithDeviceDefinitionSignBatch((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( + ['mintVehicleAndSdSignBatch((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( incorrectMintInput ) ).to.be.revertedWithCustomError(multipleMinterInstance, 'InvalidParentNode') @@ -4759,7 +3234,7 @@ describe('MultipleMinter', function () { await expect( multipleMinterInstance .connect(nonAdmin) - ['mintVehicleAndSdWithDeviceDefinitionSignBatch((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( + ['mintVehicleAndSdSignBatch((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( incorrectMintInput ) ).to.be.revertedWithCustomError(multipleMinterInstance, 'InvalidParentNode') @@ -4769,7 +3244,7 @@ describe('MultipleMinter', function () { await expect( multipleMinterInstance .connect(nonAdmin) - ['mintVehicleAndSdWithDeviceDefinitionSignBatch((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( + ['mintVehicleAndSdSignBatch((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( correctMintInputWithOneConnection ) ) @@ -4790,14 +3265,14 @@ describe('MultipleMinter', function () { it('Should revert if device address is already registered', async () => { await multipleMinterInstance .connect(connectionOwner1) - ['mintVehicleAndSdWithDeviceDefinitionSignBatch((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( + ['mintVehicleAndSdSignBatch((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( correctMintInputWithOneConnection ); await expect( multipleMinterInstance .connect(connectionOwner1) - ['mintVehicleAndSdWithDeviceDefinitionSignBatch((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( + ['mintVehicleAndSdSignBatch((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( correctMintInputWithOneConnection ) ).to.be.revertedWithCustomError( @@ -4812,7 +3287,7 @@ describe('MultipleMinter', function () { await expect( multipleMinterInstance .connect(connectionOwner1) - ['mintVehicleAndSdWithDeviceDefinitionSignBatch((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( + ['mintVehicleAndSdSignBatch((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( incorrectMintInput ) ).to.be.revertedWithCustomError( @@ -4827,7 +3302,7 @@ describe('MultipleMinter', function () { await expect( multipleMinterInstance .connect(connectionOwner1) - ['mintVehicleAndSdWithDeviceDefinitionSignBatch((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( + ['mintVehicleAndSdSignBatch((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( incorrectMintInput ) ).to.be.revertedWithCustomError( @@ -4841,7 +3316,7 @@ describe('MultipleMinter', function () { await expect( multipleMinterInstance .connect(connectionOwner1) - ['mintVehicleAndSdWithDeviceDefinitionSignBatch((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( + ['mintVehicleAndSdSignBatch((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( incorrectMintInput ) ).to.be.revertedWithCustomError( @@ -4855,12 +3330,11 @@ describe('MultipleMinter', function () { it('Should revert if signer does not match vehicle owner', async () => { const invalidSignature = await signMessage({ _signer: user2, - _primaryType: 'MintVehicleWithDeviceDefinitionSign', + _primaryType: 'MintVehicleSign', _verifyingContract: await vehicleInstance.getAddress(), message: { manufacturerNode: '1', owner: user1.address, - deviceDefinitionId: C.mockDdId1, attributes: C.mockVehicleAttributes, infos: C.mockVehicleInfos } @@ -4870,7 +3344,7 @@ describe('MultipleMinter', function () { await expect( multipleMinterInstance .connect(connectionOwner1) - ['mintVehicleAndSdWithDeviceDefinitionSignBatch((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( + ['mintVehicleAndSdSignBatch((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( incorrectMintInput ) ).to.be.revertedWithCustomError(multipleMinterInstance, 'InvalidOwnerSignature'); @@ -4879,12 +3353,11 @@ describe('MultipleMinter', function () { const invalidSignature = await signMessage({ _signer: user1, _domainName: 'Wrong domain', - _primaryType: 'MintVehicleWithDeviceDefinitionSign', + _primaryType: 'MintVehicleSign', _verifyingContract: await vehicleInstance.getAddress(), message: { manufacturerNode: '1', owner: user1.address, - deviceDefinitionId: C.mockDdId1, attributes: C.mockVehicleAttributes, infos: C.mockVehicleInfos } @@ -4894,7 +3367,7 @@ describe('MultipleMinter', function () { await expect( multipleMinterInstance .connect(connectionOwner1) - ['mintVehicleAndSdWithDeviceDefinitionSignBatch((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( + ['mintVehicleAndSdSignBatch((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( incorrectMintInput ) ).to.be.revertedWithCustomError(multipleMinterInstance, 'InvalidOwnerSignature'); @@ -4903,12 +3376,11 @@ describe('MultipleMinter', function () { const invalidSignature = await signMessage({ _signer: user1, _domainVersion: '99', - _primaryType: 'MintVehicleWithDeviceDefinitionSign', + _primaryType: 'MintVehicleSign', _verifyingContract: await vehicleInstance.getAddress(), message: { manufacturerNode: '1', owner: user1.address, - deviceDefinitionId: C.mockDdId1, attributes: C.mockVehicleAttributes, infos: C.mockVehicleInfos } @@ -4918,7 +3390,7 @@ describe('MultipleMinter', function () { await expect( multipleMinterInstance .connect(connectionOwner1) - ['mintVehicleAndSdWithDeviceDefinitionSignBatch((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( + ['mintVehicleAndSdSignBatch((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( incorrectMintInput ) ).to.be.revertedWithCustomError(multipleMinterInstance, 'InvalidOwnerSignature'); @@ -4927,12 +3399,11 @@ describe('MultipleMinter', function () { const invalidSignature = await signMessage({ _signer: user1, _chainId: 99, - _primaryType: 'MintVehicleWithDeviceDefinitionSign', + _primaryType: 'MintVehicleSign', _verifyingContract: await vehicleInstance.getAddress(), message: { manufacturerNode: '1', owner: user1.address, - deviceDefinitionId: C.mockDdId1, attributes: C.mockVehicleAttributes, infos: C.mockVehicleInfos } @@ -4942,7 +3413,7 @@ describe('MultipleMinter', function () { await expect( multipleMinterInstance .connect(connectionOwner1) - ['mintVehicleAndSdWithDeviceDefinitionSignBatch((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( + ['mintVehicleAndSdSignBatch((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( incorrectMintInput ) ).to.be.revertedWithCustomError(multipleMinterInstance, 'InvalidOwnerSignature'); @@ -4950,35 +3421,11 @@ describe('MultipleMinter', function () { it('Should revert if manufacturer node is incorrect', async () => { const invalidSignature = await signMessage({ _signer: user1, - _primaryType: 'MintVehicleWithDeviceDefinitionSign', + _primaryType: 'MintVehicleSign', _verifyingContract: await vehicleInstance.getAddress(), message: { manufacturerNode: '99', owner: user1.address, - deviceDefinitionId: C.mockDdId1, - attributes: C.mockVehicleAttributes, - infos: C.mockVehicleInfos - } - }); - incorrectMintInput[0].vehicleOwnerSig = invalidSignature; - - await expect( - multipleMinterInstance - .connect(connectionOwner1) - ['mintVehicleAndSdWithDeviceDefinitionSignBatch((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( - incorrectMintInput - ) - ).to.be.revertedWithCustomError(multipleMinterInstance, 'InvalidOwnerSignature'); - }); - it('Should revert if deviceDefinitionId is incorrect', async () => { - const invalidSignature = await signMessage({ - _signer: user1, - _primaryType: 'MintVehicleWithDeviceDefinitionSign', - _verifyingContract: await vehicleInstance.getAddress(), - message: { - manufacturerNode: '1', - owner: user1.address, - deviceDefinitionId: C.mockDdId2, attributes: C.mockVehicleAttributes, infos: C.mockVehicleInfos } @@ -4988,7 +3435,7 @@ describe('MultipleMinter', function () { await expect( multipleMinterInstance .connect(connectionOwner1) - ['mintVehicleAndSdWithDeviceDefinitionSignBatch((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( + ['mintVehicleAndSdSignBatch((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( incorrectMintInput ) ).to.be.revertedWithCustomError(multipleMinterInstance, 'InvalidOwnerSignature'); @@ -4996,12 +3443,11 @@ describe('MultipleMinter', function () { it('Should revert if vehicle attributes are incorrect', async () => { const invalidSignature = await signMessage({ _signer: user1, - _primaryType: 'MintVehicleWithDeviceDefinitionSign', + _primaryType: 'MintVehicleSign', _verifyingContract: await vehicleInstance.getAddress(), message: { manufacturerNode: '1', owner: user1.address, - deviceDefinitionId: C.mockDdId1, attributes: C.mockVehicleAttributes.slice(1), infos: C.mockVehicleInfos } @@ -5011,7 +3457,7 @@ describe('MultipleMinter', function () { await expect( multipleMinterInstance .connect(connectionOwner1) - ['mintVehicleAndSdWithDeviceDefinitionSignBatch((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( + ['mintVehicleAndSdSignBatch((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( incorrectMintInput ) ).to.be.revertedWithCustomError(multipleMinterInstance, 'InvalidOwnerSignature'); @@ -5019,12 +3465,11 @@ describe('MultipleMinter', function () { it('Should revert if vehicle infos are incorrect', async () => { const invalidSignature = await signMessage({ _signer: user1, - _primaryType: 'MintVehicleWithDeviceDefinitionSign', + _primaryType: 'MintVehicleSign', _verifyingContract: await vehicleInstance.getAddress(), message: { manufacturerNode: '1', owner: user1.address, - deviceDefinitionId: C.mockDdId1, attributes: C.mockVehicleAttributes, infos: C.mockVehicleInfosWrongSize } @@ -5034,7 +3479,7 @@ describe('MultipleMinter', function () { await expect( multipleMinterInstance .connect(connectionOwner1) - ['mintVehicleAndSdWithDeviceDefinitionSignBatch((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( + ['mintVehicleAndSdSignBatch((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( incorrectMintInput ) ).to.be.revertedWithCustomError(multipleMinterInstance, 'InvalidOwnerSignature'); @@ -5042,12 +3487,11 @@ describe('MultipleMinter', function () { it('Should revert if owner does not match signer', async () => { const invalidSignature = await signMessage({ _signer: user1, - _primaryType: 'MintVehicleWithDeviceDefinitionSign', + _primaryType: 'MintVehicleSign', _verifyingContract: await vehicleInstance.getAddress(), message: { manufacturerNode: '1', owner: user2.address, - deviceDefinitionId: C.mockDdId1, attributes: C.mockVehicleAttributes, infos: C.mockVehicleInfos } @@ -5057,7 +3501,7 @@ describe('MultipleMinter', function () { await expect( multipleMinterInstance .connect(connectionOwner1) - ['mintVehicleAndSdWithDeviceDefinitionSignBatch((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( + ['mintVehicleAndSdSignBatch((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( incorrectMintInput ) ).to.be.revertedWithCustomError(multipleMinterInstance, 'InvalidOwnerSignature'); @@ -5079,7 +3523,7 @@ describe('MultipleMinter', function () { await expect( multipleMinterInstance .connect(connectionOwner1) - ['mintVehicleAndSdWithDeviceDefinitionSignBatch((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( + ['mintVehicleAndSdSignBatch((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( incorrectMintInput ) ).to.be.revertedWithCustomError(multipleMinterInstance, 'InvalidSdSignature'); @@ -5099,7 +3543,7 @@ describe('MultipleMinter', function () { await expect( multipleMinterInstance .connect(connectionOwner1) - ['mintVehicleAndSdWithDeviceDefinitionSignBatch((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( + ['mintVehicleAndSdSignBatch((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( incorrectMintInput ) ).to.be.revertedWithCustomError(multipleMinterInstance, 'InvalidSdSignature'); @@ -5119,7 +3563,7 @@ describe('MultipleMinter', function () { await expect( multipleMinterInstance .connect(connectionOwner1) - ['mintVehicleAndSdWithDeviceDefinitionSignBatch((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( + ['mintVehicleAndSdSignBatch((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( incorrectMintInput ) ).to.be.revertedWithCustomError(multipleMinterInstance, 'InvalidSdSignature'); @@ -5139,7 +3583,7 @@ describe('MultipleMinter', function () { await expect( multipleMinterInstance .connect(connectionOwner1) - ['mintVehicleAndSdWithDeviceDefinitionSignBatch((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( + ['mintVehicleAndSdSignBatch((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( incorrectMintInput ) ).to.be.revertedWithCustomError(multipleMinterInstance, 'InvalidSdSignature'); @@ -5158,7 +3602,7 @@ describe('MultipleMinter', function () { await expect( multipleMinterInstance .connect(connectionOwner1) - ['mintVehicleAndSdWithDeviceDefinitionSignBatch((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( + ['mintVehicleAndSdSignBatch((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( incorrectMintInput ) ).to.be.revertedWithCustomError(multipleMinterInstance, 'InvalidSdSignature'); @@ -5171,7 +3615,7 @@ describe('MultipleMinter', function () { it('Should correctly set vehicle parent node', async () => { await multipleMinterInstance .connect(connectionOwner1) - ['mintVehicleAndSdWithDeviceDefinitionSignBatch((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( + ['mintVehicleAndSdSignBatch((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( correctMintInputWithOneConnection ); @@ -5190,7 +3634,7 @@ describe('MultipleMinter', function () { it('Should correctly set vehicle node owner', async () => { await multipleMinterInstance .connect(connectionOwner1) - ['mintVehicleAndSdWithDeviceDefinitionSignBatch((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( + ['mintVehicleAndSdSignBatch((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( correctMintInputWithOneConnection ); @@ -5200,7 +3644,7 @@ describe('MultipleMinter', function () { it('Should correctly set synthetic device parent node', async () => { await multipleMinterInstance .connect(connectionOwner1) - ['mintVehicleAndSdWithDeviceDefinitionSignBatch((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( + ['mintVehicleAndSdSignBatch((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( correctMintInputWithOneConnection ); @@ -5219,33 +3663,17 @@ describe('MultipleMinter', function () { it('Should correctly set synthetic device node owner', async () => { await multipleMinterInstance .connect(connectionOwner1) - ['mintVehicleAndSdWithDeviceDefinitionSignBatch((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( + ['mintVehicleAndSdSignBatch((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( correctMintInputWithOneConnection ); expect(await sdIdInstance.ownerOf(1)).to.be.equal(user1.address); expect(await sdIdInstance.ownerOf(2)).to.be.equal(user2.address); }); - it('Should correctly set Device Definition Id', async () => { - await multipleMinterInstance - .connect(connectionOwner1) - ['mintVehicleAndSdWithDeviceDefinitionSignBatch((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( - correctMintInputWithOneConnection - ); - - expect( - await vehicleInstance - .getDeviceDefinitionIdByVehicleId(3) - ).to.be.equal(C.mockDdId1); - expect( - await vehicleInstance - .getDeviceDefinitionIdByVehicleId(4) - ).to.be.equal(C.mockDdId2); - }); it('Should correctly set synthetic device address', async () => { await multipleMinterInstance .connect(connectionOwner1) - ['mintVehicleAndSdWithDeviceDefinitionSignBatch((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( + ['mintVehicleAndSdSignBatch((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( correctMintInputWithOneConnection ); @@ -5262,7 +3690,7 @@ describe('MultipleMinter', function () { it('Should correctly set vehicle infos', async () => { await multipleMinterInstance .connect(connectionOwner1) - ['mintVehicleAndSdWithDeviceDefinitionSignBatch((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( + ['mintVehicleAndSdSignBatch((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( correctMintInputWithOneConnection ); @@ -5298,7 +3726,7 @@ describe('MultipleMinter', function () { it('Should correctly set synthetic device infos', async () => { await multipleMinterInstance .connect(connectionOwner1) - ['mintVehicleAndSdWithDeviceDefinitionSignBatch((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( + ['mintVehicleAndSdSignBatch((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( correctMintInputWithOneConnection ); @@ -5334,7 +3762,7 @@ describe('MultipleMinter', function () { it('Should correctly map the synthetic device to the vehicle', async () => { await multipleMinterInstance .connect(connectionOwner1) - ['mintVehicleAndSdWithDeviceDefinitionSignBatch((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( + ['mintVehicleAndSdSignBatch((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( correctMintInputWithOneConnection ); @@ -5356,7 +3784,7 @@ describe('MultipleMinter', function () { it('Should correctly map the vehicle to the synthetic device', async () => { await multipleMinterInstance .connect(connectionOwner1) - ['mintVehicleAndSdWithDeviceDefinitionSignBatch((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( + ['mintVehicleAndSdSignBatch((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( correctMintInputWithOneConnection ); @@ -5379,7 +3807,7 @@ describe('MultipleMinter', function () { await expect(() => multipleMinterInstance .connect(connectionOwner1) - ['mintVehicleAndSdWithDeviceDefinitionSignBatch((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( + ['mintVehicleAndSdSignBatch((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( correctMintInputWithOneConnection ) ).changeTokenBalance( @@ -5398,7 +3826,7 @@ describe('MultipleMinter', function () { await multipleMinterInstance .connect(connectionOwner1) - ['mintVehicleAndSdWithDeviceDefinitionSignBatch((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( + ['mintVehicleAndSdSignBatch((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( correctMintInputWithOneConnection ); @@ -5417,7 +3845,7 @@ describe('MultipleMinter', function () { await multipleMinterInstance .connect(connectionOwner1) - ['mintVehicleAndSdWithDeviceDefinitionSignBatch((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( + ['mintVehicleAndSdSignBatch((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( correctMintInputWithOneConnection ); @@ -5438,7 +3866,7 @@ describe('MultipleMinter', function () { await multipleMinterInstance .connect(connectionOwner1) - ['mintVehicleAndSdWithDeviceDefinitionSignBatch((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( + ['mintVehicleAndSdSignBatch((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( localCorrectInput ); @@ -5450,24 +3878,24 @@ describe('MultipleMinter', function () { }); context('Events', () => { - it('Should emit VehicleNodeMintedWithDeviceDefinition event with correct params', async () => { + it('Should emit VehicleNodeMinted event with correct params', async () => { await expect( multipleMinterInstance .connect(connectionOwner1) - ['mintVehicleAndSdWithDeviceDefinitionSignBatch((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( + ['mintVehicleAndSdSignBatch((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( correctMintInputWithOneConnection ) ) - .to.emit(multipleMinterInstance, 'VehicleNodeMintedWithDeviceDefinition') - .withArgs(1, 3, user1.address, C.mockDdId1) - .to.emit(multipleMinterInstance, 'VehicleNodeMintedWithDeviceDefinition') - .withArgs(2, 4, user2.address, C.mockDdId2); + .to.emit(multipleMinterInstance, 'VehicleNodeMinted') + .withArgs(1, 3, user1.address) + .to.emit(multipleMinterInstance, 'VehicleNodeMinted') + .withArgs(2, 4, user2.address); }); it('Should emit VehicleAttributeSet events with correct params', async () => { await expect( multipleMinterInstance .connect(connectionOwner1) - ['mintVehicleAndSdWithDeviceDefinitionSignBatch((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( + ['mintVehicleAndSdSignBatch((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( correctMintInputWithOneConnection ) ) @@ -5500,7 +3928,7 @@ describe('MultipleMinter', function () { await expect( multipleMinterInstance .connect(connectionOwner1) - ['mintVehicleAndSdWithDeviceDefinitionSignBatch((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( + ['mintVehicleAndSdSignBatch((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( correctMintInputWithOneConnection ) ) @@ -5513,7 +3941,7 @@ describe('MultipleMinter', function () { await expect( multipleMinterInstance .connect(connectionOwner1) - ['mintVehicleAndSdWithDeviceDefinitionSignBatch((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( + ['mintVehicleAndSdSignBatch((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( correctMintInputWithOneConnection ) ) @@ -5550,7 +3978,7 @@ describe('MultipleMinter', function () { await expect( multipleMinterInstance .connect(connectionOwner1) - ['mintVehicleAndSdWithDeviceDefinitionSignBatch((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( + ['mintVehicleAndSdSignBatch((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( newCorrectMintInput ) ).to.not.emit(multipleMinterInstance, 'SyntheticDeviceAttributeSet'); @@ -5559,7 +3987,7 @@ describe('MultipleMinter', function () { await expect( multipleMinterInstance .connect(connectionOwner1) - ['mintVehicleAndSdWithDeviceDefinitionSignBatch((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( + ['mintVehicleAndSdSignBatch((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( correctMintInputWithOneConnection ) ) @@ -5580,14 +4008,14 @@ describe('MultipleMinter', function () { it('Should revert if device address is already registered', async () => { await multipleMinterInstance .connect(minterWithPermission1) - ['mintVehicleAndSdWithDeviceDefinitionSignBatch((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( + ['mintVehicleAndSdSignBatch((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( correctMintInputWithDiffConnections ); await expect( multipleMinterInstance .connect(minterWithPermission1) - ['mintVehicleAndSdWithDeviceDefinitionSignBatch((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( + ['mintVehicleAndSdSignBatch((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( correctMintInputWithDiffConnections ) ).to.be.revertedWithCustomError( @@ -5602,7 +4030,7 @@ describe('MultipleMinter', function () { await expect( multipleMinterInstance .connect(minterWithPermission1) - ['mintVehicleAndSdWithDeviceDefinitionSignBatch((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( + ['mintVehicleAndSdSignBatch((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( incorrectMintInput ) ).to.be.revertedWithCustomError( @@ -5617,7 +4045,7 @@ describe('MultipleMinter', function () { await expect( multipleMinterInstance .connect(minterWithPermission1) - ['mintVehicleAndSdWithDeviceDefinitionSignBatch((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( + ['mintVehicleAndSdSignBatch((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( incorrectMintInput ) ).to.be.revertedWithCustomError( @@ -5631,12 +4059,11 @@ describe('MultipleMinter', function () { it('Should revert if signer does not match vehicle owner', async () => { const invalidSignature = await signMessage({ _signer: user2, - _primaryType: 'MintVehicleWithDeviceDefinitionSign', + _primaryType: 'MintVehicleSign', _verifyingContract: await vehicleInstance.getAddress(), message: { manufacturerNode: '1', owner: user1.address, - deviceDefinitionId: C.mockDdId1, attributes: C.mockVehicleAttributes, infos: C.mockVehicleInfos } @@ -5646,7 +4073,7 @@ describe('MultipleMinter', function () { await expect( multipleMinterInstance .connect(minterWithPermission1) - ['mintVehicleAndSdWithDeviceDefinitionSignBatch((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( + ['mintVehicleAndSdSignBatch((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( incorrectMintInput ) ).to.be.revertedWithCustomError(multipleMinterInstance, 'InvalidOwnerSignature'); @@ -5655,12 +4082,11 @@ describe('MultipleMinter', function () { const invalidSignature = await signMessage({ _signer: user1, _domainName: 'Wrong domain', - _primaryType: 'MintVehicleWithDeviceDefinitionSign', + _primaryType: 'MintVehicleSign', _verifyingContract: await vehicleInstance.getAddress(), message: { manufacturerNode: '1', owner: user1.address, - deviceDefinitionId: C.mockDdId1, attributes: C.mockVehicleAttributes, infos: C.mockVehicleInfos } @@ -5670,7 +4096,7 @@ describe('MultipleMinter', function () { await expect( multipleMinterInstance .connect(minterWithPermission1) - ['mintVehicleAndSdWithDeviceDefinitionSignBatch((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( + ['mintVehicleAndSdSignBatch((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( incorrectMintInput ) ).to.be.revertedWithCustomError(multipleMinterInstance, 'InvalidOwnerSignature'); @@ -5679,12 +4105,11 @@ describe('MultipleMinter', function () { const invalidSignature = await signMessage({ _signer: user1, _domainVersion: '99', - _primaryType: 'MintVehicleWithDeviceDefinitionSign', + _primaryType: 'MintVehicleSign', _verifyingContract: await vehicleInstance.getAddress(), message: { manufacturerNode: '1', owner: user1.address, - deviceDefinitionId: C.mockDdId1, attributes: C.mockVehicleAttributes, infos: C.mockVehicleInfos } @@ -5694,7 +4119,7 @@ describe('MultipleMinter', function () { await expect( multipleMinterInstance .connect(minterWithPermission1) - ['mintVehicleAndSdWithDeviceDefinitionSignBatch((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( + ['mintVehicleAndSdSignBatch((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( incorrectMintInput ) ).to.be.revertedWithCustomError(multipleMinterInstance, 'InvalidOwnerSignature'); @@ -5703,12 +4128,11 @@ describe('MultipleMinter', function () { const invalidSignature = await signMessage({ _signer: user1, _chainId: 99, - _primaryType: 'MintVehicleWithDeviceDefinitionSign', + _primaryType: 'MintVehicleSign', _verifyingContract: await vehicleInstance.getAddress(), message: { manufacturerNode: '1', owner: user1.address, - deviceDefinitionId: C.mockDdId1, attributes: C.mockVehicleAttributes, infos: C.mockVehicleInfos } @@ -5718,7 +4142,7 @@ describe('MultipleMinter', function () { await expect( multipleMinterInstance .connect(minterWithPermission1) - ['mintVehicleAndSdWithDeviceDefinitionSignBatch((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( + ['mintVehicleAndSdSignBatch((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( incorrectMintInput ) ).to.be.revertedWithCustomError(multipleMinterInstance, 'InvalidOwnerSignature'); @@ -5726,35 +4150,11 @@ describe('MultipleMinter', function () { it('Should revert if manufacturer node is incorrect', async () => { const invalidSignature = await signMessage({ _signer: user1, - _primaryType: 'MintVehicleWithDeviceDefinitionSign', + _primaryType: 'MintVehicleSign', _verifyingContract: await vehicleInstance.getAddress(), message: { manufacturerNode: '99', owner: user1.address, - deviceDefinitionId: C.mockDdId1, - attributes: C.mockVehicleAttributes, - infos: C.mockVehicleInfos - } - }); - incorrectMintInput[0].vehicleOwnerSig = invalidSignature; - - await expect( - multipleMinterInstance - .connect(minterWithPermission1) - ['mintVehicleAndSdWithDeviceDefinitionSignBatch((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( - incorrectMintInput - ) - ).to.be.revertedWithCustomError(multipleMinterInstance, 'InvalidOwnerSignature'); - }); - it('Should revert if deviceDefinitionId is incorrect', async () => { - const invalidSignature = await signMessage({ - _signer: user1, - _primaryType: 'MintVehicleWithDeviceDefinitionSign', - _verifyingContract: await vehicleInstance.getAddress(), - message: { - manufacturerNode: '1', - owner: user1.address, - deviceDefinitionId: C.mockDdId2, attributes: C.mockVehicleAttributes, infos: C.mockVehicleInfos } @@ -5764,7 +4164,7 @@ describe('MultipleMinter', function () { await expect( multipleMinterInstance .connect(minterWithPermission1) - ['mintVehicleAndSdWithDeviceDefinitionSignBatch((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( + ['mintVehicleAndSdSignBatch((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( incorrectMintInput ) ).to.be.revertedWithCustomError(multipleMinterInstance, 'InvalidOwnerSignature'); @@ -5772,12 +4172,11 @@ describe('MultipleMinter', function () { it('Should revert if vehicle attributes are incorrect', async () => { const invalidSignature = await signMessage({ _signer: user1, - _primaryType: 'MintVehicleWithDeviceDefinitionSign', + _primaryType: 'MintVehicleSign', _verifyingContract: await vehicleInstance.getAddress(), message: { manufacturerNode: '1', owner: user1.address, - deviceDefinitionId: C.mockDdId1, attributes: C.mockVehicleAttributes.slice(1), infos: C.mockVehicleInfos } @@ -5787,7 +4186,7 @@ describe('MultipleMinter', function () { await expect( multipleMinterInstance .connect(minterWithPermission1) - ['mintVehicleAndSdWithDeviceDefinitionSignBatch((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( + ['mintVehicleAndSdSignBatch((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( incorrectMintInput ) ).to.be.revertedWithCustomError(multipleMinterInstance, 'InvalidOwnerSignature'); @@ -5795,12 +4194,11 @@ describe('MultipleMinter', function () { it('Should revert if vehicle infos are incorrect', async () => { const invalidSignature = await signMessage({ _signer: user1, - _primaryType: 'MintVehicleWithDeviceDefinitionSign', + _primaryType: 'MintVehicleSign', _verifyingContract: await vehicleInstance.getAddress(), message: { manufacturerNode: '1', owner: user1.address, - deviceDefinitionId: C.mockDdId1, attributes: C.mockVehicleAttributes, infos: C.mockVehicleInfosWrongSize } @@ -5810,7 +4208,7 @@ describe('MultipleMinter', function () { await expect( multipleMinterInstance .connect(minterWithPermission1) - ['mintVehicleAndSdWithDeviceDefinitionSignBatch((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( + ['mintVehicleAndSdSignBatch((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( incorrectMintInput ) ).to.be.revertedWithCustomError(multipleMinterInstance, 'InvalidOwnerSignature'); @@ -5818,12 +4216,11 @@ describe('MultipleMinter', function () { it('Should revert if owner does not match signer', async () => { const invalidSignature = await signMessage({ _signer: user1, - _primaryType: 'MintVehicleWithDeviceDefinitionSign', + _primaryType: 'MintVehicleSign', _verifyingContract: await vehicleInstance.getAddress(), message: { manufacturerNode: '1', owner: user2.address, - deviceDefinitionId: C.mockDdId1, attributes: C.mockVehicleAttributes, infos: C.mockVehicleInfos } @@ -5833,7 +4230,7 @@ describe('MultipleMinter', function () { await expect( multipleMinterInstance .connect(minterWithPermission1) - ['mintVehicleAndSdWithDeviceDefinitionSignBatch((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( + ['mintVehicleAndSdSignBatch((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( incorrectMintInput ) ).to.be.revertedWithCustomError(multipleMinterInstance, 'InvalidOwnerSignature'); @@ -5855,7 +4252,7 @@ describe('MultipleMinter', function () { await expect( multipleMinterInstance .connect(minterWithPermission1) - ['mintVehicleAndSdWithDeviceDefinitionSignBatch((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( + ['mintVehicleAndSdSignBatch((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( incorrectMintInput ) ).to.be.revertedWithCustomError(multipleMinterInstance, 'InvalidSdSignature'); @@ -5875,7 +4272,7 @@ describe('MultipleMinter', function () { await expect( multipleMinterInstance .connect(minterWithPermission1) - ['mintVehicleAndSdWithDeviceDefinitionSignBatch((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( + ['mintVehicleAndSdSignBatch((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( incorrectMintInput ) ).to.be.revertedWithCustomError(multipleMinterInstance, 'InvalidSdSignature'); @@ -5895,7 +4292,7 @@ describe('MultipleMinter', function () { await expect( multipleMinterInstance .connect(minterWithPermission1) - ['mintVehicleAndSdWithDeviceDefinitionSignBatch((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( + ['mintVehicleAndSdSignBatch((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( incorrectMintInput ) ).to.be.revertedWithCustomError(multipleMinterInstance, 'InvalidSdSignature'); @@ -5915,7 +4312,7 @@ describe('MultipleMinter', function () { await expect( multipleMinterInstance .connect(minterWithPermission1) - ['mintVehicleAndSdWithDeviceDefinitionSignBatch((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( + ['mintVehicleAndSdSignBatch((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( incorrectMintInput ) ).to.be.revertedWithCustomError(multipleMinterInstance, 'InvalidSdSignature'); @@ -5934,7 +4331,7 @@ describe('MultipleMinter', function () { await expect( multipleMinterInstance .connect(minterWithPermission1) - ['mintVehicleAndSdWithDeviceDefinitionSignBatch((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( + ['mintVehicleAndSdSignBatch((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( incorrectMintInput ) ).to.be.revertedWithCustomError(multipleMinterInstance, 'InvalidSdSignature'); @@ -5947,7 +4344,7 @@ describe('MultipleMinter', function () { it('Should correctly set vehicle parent node', async () => { await multipleMinterInstance .connect(minterWithPermission1) - ['mintVehicleAndSdWithDeviceDefinitionSignBatch((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( + ['mintVehicleAndSdSignBatch((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( correctMintInputWithDiffConnections ); @@ -5966,7 +4363,7 @@ describe('MultipleMinter', function () { it('Should correctly set vehicle node owner', async () => { await multipleMinterInstance .connect(minterWithPermission1) - ['mintVehicleAndSdWithDeviceDefinitionSignBatch((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( + ['mintVehicleAndSdSignBatch((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( correctMintInputWithDiffConnections ); @@ -5976,7 +4373,7 @@ describe('MultipleMinter', function () { it('Should correctly set synthetic device parent node', async () => { await multipleMinterInstance .connect(minterWithPermission1) - ['mintVehicleAndSdWithDeviceDefinitionSignBatch((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( + ['mintVehicleAndSdSignBatch((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( correctMintInputWithDiffConnections ); @@ -5995,33 +4392,17 @@ describe('MultipleMinter', function () { it('Should correctly set synthetic device node owner', async () => { await multipleMinterInstance .connect(minterWithPermission1) - ['mintVehicleAndSdWithDeviceDefinitionSignBatch((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( + ['mintVehicleAndSdSignBatch((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( correctMintInputWithDiffConnections ); expect(await sdIdInstance.ownerOf(1)).to.be.equal(user1.address); expect(await sdIdInstance.ownerOf(2)).to.be.equal(user2.address); }); - it('Should correctly set Device Definition Id', async () => { - await multipleMinterInstance - .connect(minterWithPermission1) - ['mintVehicleAndSdWithDeviceDefinitionSignBatch((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( - correctMintInputWithDiffConnections - ); - - expect( - await vehicleInstance - .getDeviceDefinitionIdByVehicleId(3) - ).to.be.equal(C.mockDdId1); - expect( - await vehicleInstance - .getDeviceDefinitionIdByVehicleId(4) - ).to.be.equal(C.mockDdId2); - }); it('Should correctly set synthetic device address', async () => { await multipleMinterInstance .connect(minterWithPermission1) - ['mintVehicleAndSdWithDeviceDefinitionSignBatch((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( + ['mintVehicleAndSdSignBatch((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( correctMintInputWithDiffConnections ); @@ -6038,7 +4419,7 @@ describe('MultipleMinter', function () { it('Should correctly set vehicle infos', async () => { await multipleMinterInstance .connect(minterWithPermission1) - ['mintVehicleAndSdWithDeviceDefinitionSignBatch((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( + ['mintVehicleAndSdSignBatch((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( correctMintInputWithDiffConnections ); @@ -6074,7 +4455,7 @@ describe('MultipleMinter', function () { it('Should correctly set synthetic device infos', async () => { await multipleMinterInstance .connect(minterWithPermission1) - ['mintVehicleAndSdWithDeviceDefinitionSignBatch((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( + ['mintVehicleAndSdSignBatch((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( correctMintInputWithDiffConnections ); @@ -6110,7 +4491,7 @@ describe('MultipleMinter', function () { it('Should correctly map the synthetic device to the vehicle', async () => { await multipleMinterInstance .connect(minterWithPermission1) - ['mintVehicleAndSdWithDeviceDefinitionSignBatch((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( + ['mintVehicleAndSdSignBatch((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( correctMintInputWithDiffConnections ); @@ -6132,7 +4513,7 @@ describe('MultipleMinter', function () { it('Should correctly map the vehicle to the synthetic device', async () => { await multipleMinterInstance .connect(minterWithPermission1) - ['mintVehicleAndSdWithDeviceDefinitionSignBatch((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( + ['mintVehicleAndSdSignBatch((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( correctMintInputWithDiffConnections ); @@ -6155,7 +4536,7 @@ describe('MultipleMinter', function () { await expect(() => multipleMinterInstance .connect(minterWithPermission1) - ['mintVehicleAndSdWithDeviceDefinitionSignBatch((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( + ['mintVehicleAndSdSignBatch((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( correctMintInputWithDiffConnections ) ).changeTokenBalance( @@ -6174,7 +4555,7 @@ describe('MultipleMinter', function () { await multipleMinterInstance .connect(minterWithPermission1) - ['mintVehicleAndSdWithDeviceDefinitionSignBatch((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( + ['mintVehicleAndSdSignBatch((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( correctMintInputWithDiffConnections ); @@ -6193,7 +4574,7 @@ describe('MultipleMinter', function () { await multipleMinterInstance .connect(minterWithPermission1) - ['mintVehicleAndSdWithDeviceDefinitionSignBatch((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( + ['mintVehicleAndSdSignBatch((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( correctMintInputWithDiffConnections ); @@ -6214,7 +4595,7 @@ describe('MultipleMinter', function () { await multipleMinterInstance .connect(minterWithPermission1) - ['mintVehicleAndSdWithDeviceDefinitionSignBatch((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( + ['mintVehicleAndSdSignBatch((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( localCorrectInput ); @@ -6226,24 +4607,24 @@ describe('MultipleMinter', function () { }); context('Events', () => { - it('Should emit VehicleNodeMintedWithDeviceDefinition event with correct params', async () => { + it('Should emit VehicleNodeMinted event with correct params', async () => { await expect( multipleMinterInstance .connect(minterWithPermission1) - ['mintVehicleAndSdWithDeviceDefinitionSignBatch((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( + ['mintVehicleAndSdSignBatch((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( correctMintInputWithDiffConnections ) ) - .to.emit(multipleMinterInstance, 'VehicleNodeMintedWithDeviceDefinition') - .withArgs(1, 3, user1.address, C.mockDdId1) - .to.emit(multipleMinterInstance, 'VehicleNodeMintedWithDeviceDefinition') - .withArgs(2, 4, user2.address, C.mockDdId2); + .to.emit(multipleMinterInstance, 'VehicleNodeMinted') + .withArgs(1, 3, user1.address) + .to.emit(multipleMinterInstance, 'VehicleNodeMinted') + .withArgs(2, 4, user2.address); }); it('Should emit VehicleAttributeSet events with correct params', async () => { await expect( multipleMinterInstance .connect(minterWithPermission1) - ['mintVehicleAndSdWithDeviceDefinitionSignBatch((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( + ['mintVehicleAndSdSignBatch((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( correctMintInputWithDiffConnections ) ) @@ -6276,7 +4657,7 @@ describe('MultipleMinter', function () { await expect( multipleMinterInstance .connect(minterWithPermission1) - ['mintVehicleAndSdWithDeviceDefinitionSignBatch((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( + ['mintVehicleAndSdSignBatch((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( correctMintInputWithDiffConnections ) ) @@ -6289,7 +4670,7 @@ describe('MultipleMinter', function () { await expect( multipleMinterInstance .connect(minterWithPermission1) - ['mintVehicleAndSdWithDeviceDefinitionSignBatch((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( + ['mintVehicleAndSdSignBatch((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( correctMintInputWithDiffConnections ) ) @@ -6326,7 +4707,7 @@ describe('MultipleMinter', function () { await expect( multipleMinterInstance .connect(minterWithPermission1) - ['mintVehicleAndSdWithDeviceDefinitionSignBatch((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( + ['mintVehicleAndSdSignBatch((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( newCorrectMintInput ) ).to.not.emit(multipleMinterInstance, 'SyntheticDeviceAttributeSet'); @@ -6335,7 +4716,7 @@ describe('MultipleMinter', function () { await expect( multipleMinterInstance .connect(minterWithPermission1) - ['mintVehicleAndSdWithDeviceDefinitionSignBatch((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( + ['mintVehicleAndSdSignBatch((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( correctMintInputWithOneConnection ) ) diff --git a/test/NFTs/AftermarketDeviceId.test.ts b/test/NFTs/AftermarketDeviceId.test.ts index e0dba53d..b589c845 100644 --- a/test/NFTs/AftermarketDeviceId.test.ts +++ b/test/NFTs/AftermarketDeviceId.test.ts @@ -335,7 +335,7 @@ describe('AftermarketDeviceId', async function () { await vehicleInstance .connect(admin) - ['mintVehicleWithDeviceDefinition(uint256,address,uint256,string,(string,string)[])'](1, user1.address, C.STORAGE_NODE_ID_1, C.mockDdId1, C.mockVehicleAttributeInfoPairs); + ['mintVehicle(uint256,address,uint256,(string,string)[])'](1, user1.address, C.STORAGE_NODE_ID_1, C.mockVehicleAttributeInfoPairs); await aftermarketDeviceInstance .connect(admin) .claimAftermarketDeviceSign( diff --git a/test/NFTs/SyntheticDeviceId.test.ts b/test/NFTs/SyntheticDeviceId.test.ts index 46a35699..ef16db2b 100644 --- a/test/NFTs/SyntheticDeviceId.test.ts +++ b/test/NFTs/SyntheticDeviceId.test.ts @@ -321,7 +321,7 @@ describe('SyntheticDeviceId', async function () { await vehicleInstance .connect(admin) - ['mintVehicleWithDeviceDefinition(uint256,address,uint256,string,(string,string)[])'](1, user1.address, C.STORAGE_NODE_ID_1, C.mockDdId1, C.mockVehicleAttributeInfoPairs); + ['mintVehicle(uint256,address,uint256,(string,string)[])'](1, user1.address, C.STORAGE_NODE_ID_1, C.mockVehicleAttributeInfoPairs); await syntheticDeviceInstance .connect(connectionOwner1) .mintSyntheticDeviceSign(correctMintInput1); diff --git a/test/NFTs/VehicleId.test.ts b/test/NFTs/VehicleId.test.ts index 9c9a0a57..a1b6b04f 100644 --- a/test/NFTs/VehicleId.test.ts +++ b/test/NFTs/VehicleId.test.ts @@ -377,7 +377,7 @@ describe('VehicleId', async function () { await vehicleInstance .connect(admin) - ['mintVehicleWithDeviceDefinition(uint256,address,uint256,string,(string,string)[])'](1, user1.address, C.STORAGE_NODE_ID_1, C.mockDdId1, C.mockVehicleAttributeInfoPairs); + ['mintVehicle(uint256,address,uint256,(string,string)[])'](1, user1.address, C.STORAGE_NODE_ID_1, C.mockVehicleAttributeInfoPairs); await aftermarketDeviceInstance .connect(admin) .claimAftermarketDeviceSign( @@ -685,7 +685,7 @@ describe('VehicleId', async function () { it('Should revert if caller is not the token owner', async () => { await vehicleInstance .connect(admin) - ['mintVehicleWithDeviceDefinition(uint256,address,uint256,string,(string,string)[])'](1, user2.address, C.STORAGE_NODE_ID_1, C.mockDdId1, C.mockVehicleAttributeInfoPairs); + ['mintVehicle(uint256,address,uint256,(string,string)[])'](1, user2.address, C.STORAGE_NODE_ID_1, C.mockVehicleAttributeInfoPairs); await expect( vehicleIdInstance.connect(user1).burn(2), @@ -769,31 +769,13 @@ describe('VehicleId', async function () { 'ERC721: invalid token ID', ); }); - it('Should correctly reset device definition Id to empty if it was minted with DD', async () => { - await vehicleInstance - .connect(admin) - ['mintVehicleWithDeviceDefinition(uint256,address,uint256,string,(string,string)[])']( - 1, - user1.address, - C.STORAGE_NODE_ID_1, - C.mockDdId2, - C.mockVehicleAttributeInfoPairs - ); - - expect(await vehicleInstance.getDeviceDefinitionIdByVehicleId(2)).to.be.equal(C.mockDdId2); - - await vehicleIdInstance.connect(user1).burn(2); - - expect(await vehicleInstance.getDeviceDefinitionIdByVehicleId(2)).to.be.empty; - }); it('Should correctly reset storage node ID to 0', async () => { await vehicleInstance .connect(admin) - ['mintVehicleWithDeviceDefinition(uint256,address,uint256,string,(string,string)[])']( + ['mintVehicle(uint256,address,uint256,(string,string)[])']( 1, user1.address, C.STORAGE_NODE_ID_1, - C.mockDdId2, C.mockVehicleAttributeInfoPairs ); diff --git a/test/nodes/AftermarketDevice.test.ts b/test/nodes/AftermarketDevice.test.ts index 341c7cb3..c7a3be79 100644 --- a/test/nodes/AftermarketDevice.test.ts +++ b/test/nodes/AftermarketDevice.test.ts @@ -2147,7 +2147,7 @@ describe('AftermarketDevice', function () { ); await vehicleInstance .connect(admin) - ['mintVehicleWithDeviceDefinition(uint256,address,uint256,string,(string,string)[])'](1, user1.address, C.STORAGE_NODE_ID_1, C.mockDdId1, C.mockVehicleAttributeInfoPairs); + ['mintVehicle(uint256,address,uint256,(string,string)[])'](1, user1.address, C.STORAGE_NODE_ID_1, C.mockVehicleAttributeInfoPairs); await aftermarketDeviceInstance .connect(admin) .claimAftermarketDeviceSign( @@ -2263,7 +2263,7 @@ describe('AftermarketDevice', function () { await vehicleInstance .connect(admin) - ['mintVehicleWithDeviceDefinition(uint256,address,uint256,string,(string,string)[])'](1, user1.address, C.STORAGE_NODE_ID_1, C.mockDdId1, C.mockVehicleAttributeInfoPairs); + ['mintVehicle(uint256,address,uint256,(string,string)[])'](1, user1.address, C.STORAGE_NODE_ID_1, C.mockVehicleAttributeInfoPairs); await expect( aftermarketDeviceInstance @@ -2659,7 +2659,7 @@ describe('AftermarketDevice', function () { ); await vehicleInstance .connect(admin) - ['mintVehicleWithDeviceDefinition(uint256,address,uint256,string,(string,string)[])'](1, user1.address, C.STORAGE_NODE_ID_1, C.mockDdId1, C.mockVehicleAttributeInfoPairs); + ['mintVehicle(uint256,address,uint256,(string,string)[])'](1, user1.address, C.STORAGE_NODE_ID_1, C.mockVehicleAttributeInfoPairs); await aftermarketDeviceInstance .connect(admin) .claimAftermarketDeviceSign( @@ -2736,7 +2736,7 @@ describe('AftermarketDevice', function () { it('Should revert if owner is not the vehicle node owner', async () => { await vehicleInstance .connect(admin) - ['mintVehicleWithDeviceDefinition(uint256,address,uint256,string,(string,string)[])'](1, user2.address, C.STORAGE_NODE_ID_1, C.mockDdId1, C.mockVehicleAttributeInfoPairs); + ['mintVehicle(uint256,address,uint256,(string,string)[])'](1, user2.address, C.STORAGE_NODE_ID_1, C.mockVehicleAttributeInfoPairs); await expect( aftermarketDeviceInstance @@ -2809,7 +2809,7 @@ describe('AftermarketDevice', function () { await vehicleInstance .connect(admin) - ['mintVehicleWithDeviceDefinition(uint256,address,uint256,string,(string,string)[])'](1, user1.address, C.STORAGE_NODE_ID_1, C.mockDdId1, C.mockVehicleAttributeInfoPairs); + ['mintVehicle(uint256,address,uint256,(string,string)[])'](1, user1.address, C.STORAGE_NODE_ID_1, C.mockVehicleAttributeInfoPairs); await expect( aftermarketDeviceInstance @@ -3043,7 +3043,7 @@ describe('AftermarketDevice', function () { ); await vehicleInstance .connect(admin) - ['mintVehicleWithDeviceDefinition(uint256,address,uint256,string,(string,string)[])'](1, user1.address, C.STORAGE_NODE_ID_1, C.mockDdId1, C.mockVehicleAttributeInfoPairs); + ['mintVehicle(uint256,address,uint256,(string,string)[])'](1, user1.address, C.STORAGE_NODE_ID_1, C.mockVehicleAttributeInfoPairs); await aftermarketDeviceInstance .connect(admin) .claimAftermarketDeviceSign( @@ -3106,7 +3106,7 @@ describe('AftermarketDevice', function () { it('Should revert if owner is not the vehicle node owner', async () => { await vehicleInstance .connect(admin) - ['mintVehicleWithDeviceDefinition(uint256,address,uint256,string,(string,string)[])'](1, user2.address, C.STORAGE_NODE_ID_1, C.mockDdId1, C.mockVehicleAttributeInfoPairs); + ['mintVehicle(uint256,address,uint256,(string,string)[])'](1, user2.address, C.STORAGE_NODE_ID_1, C.mockVehicleAttributeInfoPairs); await expect( aftermarketDeviceInstance @@ -3156,7 +3156,7 @@ describe('AftermarketDevice', function () { await vehicleInstance .connect(admin) - ['mintVehicleWithDeviceDefinition(uint256,address,uint256,string,(string,string)[])'](1, user1.address, C.STORAGE_NODE_ID_1, C.mockDdId1, C.mockVehicleAttributeInfoPairs); + ['mintVehicle(uint256,address,uint256,(string,string)[])'](1, user1.address, C.STORAGE_NODE_ID_1, C.mockVehicleAttributeInfoPairs); await expect( aftermarketDeviceInstance @@ -3380,7 +3380,7 @@ describe('AftermarketDevice', function () { ); await vehicleInstance .connect(admin) - ['mintVehicleWithDeviceDefinition(uint256,address,uint256,string,(string,string)[])'](1, user1.address, C.STORAGE_NODE_ID_1, C.mockDdId1, C.mockVehicleAttributeInfoPairs); + ['mintVehicle(uint256,address,uint256,(string,string)[])'](1, user1.address, C.STORAGE_NODE_ID_1, C.mockVehicleAttributeInfoPairs); await aftermarketDeviceInstance .connect(user1) .claimAftermarketDevice(1, claimAdSig1); @@ -3426,7 +3426,7 @@ describe('AftermarketDevice', function () { it('Should revert if owner is not the vehicle node owner', async () => { await vehicleInstance .connect(admin) - ['mintVehicleWithDeviceDefinition(uint256,address,uint256,string,(string,string)[])'](1, user2.address, C.STORAGE_NODE_ID_1, C.mockDdId1, C.mockVehicleAttributeInfoPairs); + ['mintVehicle(uint256,address,uint256,(string,string)[])'](1, user2.address, C.STORAGE_NODE_ID_1, C.mockVehicleAttributeInfoPairs); await expect( aftermarketDeviceInstance @@ -3476,7 +3476,7 @@ describe('AftermarketDevice', function () { await vehicleInstance .connect(admin) - ['mintVehicleWithDeviceDefinition(uint256,address,uint256,string,(string,string)[])'](1, user1.address, C.STORAGE_NODE_ID_1, C.mockDdId1, C.mockVehicleAttributeInfoPairs); + ['mintVehicle(uint256,address,uint256,(string,string)[])'](1, user1.address, C.STORAGE_NODE_ID_1, C.mockVehicleAttributeInfoPairs); await expect( aftermarketDeviceInstance @@ -3585,7 +3585,7 @@ describe('AftermarketDevice', function () { it('Should revert if node is not a Vehicle', async () => { await vehicleInstance .connect(admin) - ['mintVehicleWithDeviceDefinition(uint256,address,uint256,string,(string,string)[])'](1, user1.address, C.STORAGE_NODE_ID_1, C.mockDdId1, C.mockVehicleAttributeInfoPairs); + ['mintVehicle(uint256,address,uint256,(string,string)[])'](1, user1.address, C.STORAGE_NODE_ID_1, C.mockVehicleAttributeInfoPairs); await expect( aftermarketDeviceInstance @@ -3601,7 +3601,7 @@ describe('AftermarketDevice', function () { it('Should revert if vehicle is not paired', async () => { await vehicleInstance .connect(admin) - ['mintVehicleWithDeviceDefinition(uint256,address,uint256,string,(string,string)[])'](1, user1.address, C.STORAGE_NODE_ID_1, C.mockDdId1, C.mockVehicleAttributeInfoPairs); + ['mintVehicle(uint256,address,uint256,(string,string)[])'](1, user1.address, C.STORAGE_NODE_ID_1, C.mockVehicleAttributeInfoPairs); await aftermarketDeviceInstance .connect(admin) @@ -3625,7 +3625,7 @@ describe('AftermarketDevice', function () { it('Should revert if caller does the vehicle or aftermarket device owner', async () => { await vehicleInstance .connect(admin) - ['mintVehicleWithDeviceDefinition(uint256,address,uint256,string,(string,string)[])'](1, user1.address, C.STORAGE_NODE_ID_1, C.mockDdId1, C.mockVehicleAttributeInfoPairs); + ['mintVehicle(uint256,address,uint256,(string,string)[])'](1, user1.address, C.STORAGE_NODE_ID_1, C.mockVehicleAttributeInfoPairs); await aftermarketDeviceInstance .connect(admin) @@ -3661,7 +3661,7 @@ describe('AftermarketDevice', function () { beforeEach(async () => { await vehicleInstance .connect(admin) - ['mintVehicleWithDeviceDefinition(uint256,address,uint256,string,(string,string)[])'](1, user1.address, C.STORAGE_NODE_ID_1, C.mockDdId1, C.mockVehicleAttributeInfoPairs); + ['mintVehicle(uint256,address,uint256,(string,string)[])'](1, user1.address, C.STORAGE_NODE_ID_1, C.mockVehicleAttributeInfoPairs); await aftermarketDeviceInstance .connect(admin) @@ -3787,7 +3787,7 @@ describe('AftermarketDevice', function () { it('Should emit AftermarketDeviceUnPaired event with correct params', async () => { await vehicleInstance .connect(admin) - ['mintVehicleWithDeviceDefinition(uint256,address,uint256,string,(string,string)[])'](1, user1.address, C.STORAGE_NODE_ID_1, C.mockDdId1, C.mockVehicleAttributeInfoPairs); + ['mintVehicle(uint256,address,uint256,(string,string)[])'](1, user1.address, C.STORAGE_NODE_ID_1, C.mockVehicleAttributeInfoPairs); await aftermarketDeviceInstance .connect(admin) @@ -3821,7 +3821,7 @@ describe('AftermarketDevice', function () { it('Should emit AftermarketDeviceUnPaired event with correct params', async () => { await vehicleInstance .connect(admin) - ['mintVehicleWithDeviceDefinition(uint256,address,uint256,string,(string,string)[])'](1, user1.address, C.STORAGE_NODE_ID_1, C.mockDdId1, C.mockVehicleAttributeInfoPairs); + ['mintVehicle(uint256,address,uint256,(string,string)[])'](1, user1.address, C.STORAGE_NODE_ID_1, C.mockVehicleAttributeInfoPairs); await aftermarketDeviceInstance .connect(admin) @@ -3862,7 +3862,7 @@ describe('AftermarketDevice', function () { it('Should emit AftermarketDeviceUnPaired event with correct params', async () => { await vehicleInstance .connect(admin) - ['mintVehicleWithDeviceDefinition(uint256,address,uint256,string,(string,string)[])'](1, user1.address, C.STORAGE_NODE_ID_1, C.mockDdId1, C.mockVehicleAttributeInfoPairs); + ['mintVehicle(uint256,address,uint256,(string,string)[])'](1, user1.address, C.STORAGE_NODE_ID_1, C.mockVehicleAttributeInfoPairs); await aftermarketDeviceInstance .connect(admin) @@ -3983,7 +3983,7 @@ describe('AftermarketDevice', function () { it('Should revert if node is not a Vehicle', async () => { await vehicleInstance .connect(admin) - ['mintVehicleWithDeviceDefinition(uint256,address,uint256,string,(string,string)[])'](1, user1.address, C.STORAGE_NODE_ID_1, C.mockDdId1, C.mockVehicleAttributeInfoPairs); + ['mintVehicle(uint256,address,uint256,(string,string)[])'](1, user1.address, C.STORAGE_NODE_ID_1, C.mockVehicleAttributeInfoPairs); await expect( aftermarketDeviceInstance @@ -3999,7 +3999,7 @@ describe('AftermarketDevice', function () { it('Should revert if vehicle is not paired', async () => { await vehicleInstance .connect(admin) - ['mintVehicleWithDeviceDefinition(uint256,address,uint256,string,(string,string)[])'](1, user1.address, C.STORAGE_NODE_ID_1, C.mockDdId1, C.mockVehicleAttributeInfoPairs); + ['mintVehicle(uint256,address,uint256,(string,string)[])'](1, user1.address, C.STORAGE_NODE_ID_1, C.mockVehicleAttributeInfoPairs); await aftermarketDeviceInstance .connect(admin) @@ -4025,7 +4025,7 @@ describe('AftermarketDevice', function () { beforeEach(async () => { await vehicleInstance .connect(admin) - ['mintVehicleWithDeviceDefinition(uint256,address,uint256,string,(string,string)[])'](1, user1.address, C.STORAGE_NODE_ID_1, C.mockDdId1, C.mockVehicleAttributeInfoPairs); + ['mintVehicle(uint256,address,uint256,(string,string)[])'](1, user1.address, C.STORAGE_NODE_ID_1, C.mockVehicleAttributeInfoPairs); await aftermarketDeviceInstance .connect(admin) @@ -4175,7 +4175,7 @@ describe('AftermarketDevice', function () { beforeEach(async () => { await vehicleInstance .connect(admin) - ['mintVehicleWithDeviceDefinition(uint256,address,uint256,string,(string,string)[])'](1, user1.address, C.STORAGE_NODE_ID_1, C.mockDdId1, C.mockVehicleAttributeInfoPairs); + ['mintVehicle(uint256,address,uint256,(string,string)[])'](1, user1.address, C.STORAGE_NODE_ID_1, C.mockVehicleAttributeInfoPairs); await aftermarketDeviceInstance .connect(admin) @@ -4220,7 +4220,7 @@ describe('AftermarketDevice', function () { it('Should emit AftermarketDeviceUnPaired event with correct params', async () => { await vehicleInstance .connect(admin) - ['mintVehicleWithDeviceDefinition(uint256,address,uint256,string,(string,string)[])'](1, user1.address, C.STORAGE_NODE_ID_1, C.mockDdId1, C.mockVehicleAttributeInfoPairs); + ['mintVehicle(uint256,address,uint256,(string,string)[])'](1, user1.address, C.STORAGE_NODE_ID_1, C.mockVehicleAttributeInfoPairs); await aftermarketDeviceInstance .connect(admin) @@ -4807,10 +4807,10 @@ describe('AftermarketDevice', function () { await vehicleInstance .connect(admin) - ['mintVehicleWithDeviceDefinition(uint256,address,uint256,string,(string,string)[])'](1, user1.address, C.STORAGE_NODE_ID_1, C.mockDdId1, C.mockVehicleAttributeInfoPairs); + ['mintVehicle(uint256,address,uint256,(string,string)[])'](1, user1.address, C.STORAGE_NODE_ID_1, C.mockVehicleAttributeInfoPairs); await vehicleInstance .connect(admin) - ['mintVehicleWithDeviceDefinition(uint256,address,uint256,string,(string,string)[])'](1, user2.address, C.STORAGE_NODE_ID_1, C.mockDdId1, C.mockVehicleAttributeInfoPairs); + ['mintVehicle(uint256,address,uint256,(string,string)[])'](1, user2.address, C.STORAGE_NODE_ID_1, C.mockVehicleAttributeInfoPairs); await aftermarketDeviceInstance .connect(admin) .claimAftermarketDeviceBatch(localAdOwnerPairs); @@ -4894,10 +4894,10 @@ describe('AftermarketDevice', function () { await vehicleInstance .connect(admin) - ['mintVehicleWithDeviceDefinition(uint256,address,uint256,string,(string,string)[])'](1, user1.address, C.STORAGE_NODE_ID_1, C.mockDdId1, C.mockVehicleAttributeInfoPairs); + ['mintVehicle(uint256,address,uint256,(string,string)[])'](1, user1.address, C.STORAGE_NODE_ID_1, C.mockVehicleAttributeInfoPairs); await vehicleInstance .connect(admin) - ['mintVehicleWithDeviceDefinition(uint256,address,uint256,string,(string,string)[])'](1, user2.address, C.STORAGE_NODE_ID_1, C.mockDdId1, C.mockVehicleAttributeInfoPairs); + ['mintVehicle(uint256,address,uint256,(string,string)[])'](1, user2.address, C.STORAGE_NODE_ID_1, C.mockVehicleAttributeInfoPairs); await aftermarketDeviceInstance .connect(admin) .claimAftermarketDeviceBatch(localAdOwnerPairs); @@ -5249,10 +5249,10 @@ describe('AftermarketDevice', function () { await vehicleInstance .connect(admin) - ['mintVehicleWithDeviceDefinition(uint256,address,uint256,string,(string,string)[])'](1, user1.address, C.STORAGE_NODE_ID_1, C.mockDdId1, C.mockVehicleAttributeInfoPairs); + ['mintVehicle(uint256,address,uint256,(string,string)[])'](1, user1.address, C.STORAGE_NODE_ID_1, C.mockVehicleAttributeInfoPairs); await vehicleInstance .connect(admin) - ['mintVehicleWithDeviceDefinition(uint256,address,uint256,string,(string,string)[])'](1, user2.address, C.STORAGE_NODE_ID_1, C.mockDdId1, C.mockVehicleAttributeInfoPairs); + ['mintVehicle(uint256,address,uint256,(string,string)[])'](1, user2.address, C.STORAGE_NODE_ID_1, C.mockVehicleAttributeInfoPairs); await aftermarketDeviceInstance .connect(admin) .claimAftermarketDeviceBatch(localAdOwnerPairs); @@ -5336,10 +5336,10 @@ describe('AftermarketDevice', function () { await vehicleInstance .connect(admin) - ['mintVehicleWithDeviceDefinition(uint256,address,uint256,string,(string,string)[])'](1, user1.address, C.STORAGE_NODE_ID_1, C.mockDdId1, C.mockVehicleAttributeInfoPairs); + ['mintVehicle(uint256,address,uint256,(string,string)[])'](1, user1.address, C.STORAGE_NODE_ID_1, C.mockVehicleAttributeInfoPairs); await vehicleInstance .connect(admin) - ['mintVehicleWithDeviceDefinition(uint256,address,uint256,string,(string,string)[])'](1, user2.address, C.STORAGE_NODE_ID_1, C.mockDdId1, C.mockVehicleAttributeInfoPairs); + ['mintVehicle(uint256,address,uint256,(string,string)[])'](1, user2.address, C.STORAGE_NODE_ID_1, C.mockVehicleAttributeInfoPairs); await aftermarketDeviceInstance .connect(admin) .claimAftermarketDeviceBatch(localAdOwnerPairs); @@ -5691,10 +5691,10 @@ describe('AftermarketDevice', function () { await vehicleInstance .connect(admin) - ['mintVehicleWithDeviceDefinition(uint256,address,uint256,string,(string,string)[])'](1, user1.address, C.STORAGE_NODE_ID_1, C.mockDdId1, C.mockVehicleAttributeInfoPairs); + ['mintVehicle(uint256,address,uint256,(string,string)[])'](1, user1.address, C.STORAGE_NODE_ID_1, C.mockVehicleAttributeInfoPairs); await vehicleInstance .connect(admin) - ['mintVehicleWithDeviceDefinition(uint256,address,uint256,string,(string,string)[])'](1, user2.address, C.STORAGE_NODE_ID_1, C.mockDdId1, C.mockVehicleAttributeInfoPairs); + ['mintVehicle(uint256,address,uint256,(string,string)[])'](1, user2.address, C.STORAGE_NODE_ID_1, C.mockVehicleAttributeInfoPairs); await aftermarketDeviceInstance .connect(admin) .claimAftermarketDeviceBatch(localAdOwnerPairs); @@ -5778,10 +5778,10 @@ describe('AftermarketDevice', function () { await vehicleInstance .connect(admin) - ['mintVehicleWithDeviceDefinition(uint256,address,uint256,string,(string,string)[])'](1, user1.address, C.STORAGE_NODE_ID_1, C.mockDdId1, C.mockVehicleAttributeInfoPairs); + ['mintVehicle(uint256,address,uint256,(string,string)[])'](1, user1.address, C.STORAGE_NODE_ID_1, C.mockVehicleAttributeInfoPairs); await vehicleInstance .connect(admin) - ['mintVehicleWithDeviceDefinition(uint256,address,uint256,string,(string,string)[])'](1, user2.address, C.STORAGE_NODE_ID_1, C.mockDdId1, C.mockVehicleAttributeInfoPairs); + ['mintVehicle(uint256,address,uint256,(string,string)[])'](1, user2.address, C.STORAGE_NODE_ID_1, C.mockVehicleAttributeInfoPairs); await aftermarketDeviceInstance .connect(admin) .claimAftermarketDeviceBatch(localAdOwnerPairs); diff --git a/test/nodes/SyntheticDevice.test.ts b/test/nodes/SyntheticDevice.test.ts index 4b7f2147..f5b2593d 100644 --- a/test/nodes/SyntheticDevice.test.ts +++ b/test/nodes/SyntheticDevice.test.ts @@ -302,10 +302,10 @@ describe('SyntheticDevice', function () { await vehicleInstance .connect(admin) - ['mintVehicleWithDeviceDefinition(uint256,address,uint256,string,(string,string)[])'](1, user1.address, C.STORAGE_NODE_ID_1, C.mockDdId1, C.mockVehicleAttributeInfoPairs); + ['mintVehicle(uint256,address,uint256,(string,string)[])'](1, user1.address, C.STORAGE_NODE_ID_1, C.mockVehicleAttributeInfoPairs); await vehicleInstance .connect(admin) - ['mintVehicleWithDeviceDefinition(uint256,address,uint256,string,(string,string)[])'](1, user1.address, C.STORAGE_NODE_ID_1, C.mockDdId2, C.mockVehicleAttributeInfoPairs); + ['mintVehicle(uint256,address,uint256,(string,string)[])'](1, user1.address, C.STORAGE_NODE_ID_1, C.mockVehicleAttributeInfoPairs); }); beforeEach(async () => { @@ -470,7 +470,7 @@ describe('SyntheticDevice', function () { await vehicleInstance .connect(admin) - ['mintVehicleWithDeviceDefinition(uint256,address,uint256,string,(string,string)[])'](1, user1.address, C.STORAGE_NODE_ID_1, C.mockDdId1, C.mockVehicleAttributeInfoPairs); + ['mintVehicle(uint256,address,uint256,(string,string)[])'](1, user1.address, C.STORAGE_NODE_ID_1, C.mockVehicleAttributeInfoPairs); await syntheticDeviceInstance .connect(admin) .mintSyntheticDeviceBatch(C.CONNECTION_ID_1, correctMintInput); @@ -738,7 +738,7 @@ describe('SyntheticDevice', function () { await vehicleInstance .connect(admin) - ['mintVehicleWithDeviceDefinition(uint256,address,uint256,string,(string,string)[])'](1, user1.address, C.STORAGE_NODE_ID_1, C.mockDdId1, C.mockVehicleAttributeInfoPairs); + ['mintVehicle(uint256,address,uint256,(string,string)[])'](1, user1.address, C.STORAGE_NODE_ID_1, C.mockVehicleAttributeInfoPairs); await syntheticDeviceInstance .connect(connectionOwner1) .mintSyntheticDeviceSign(correctMintInput); @@ -759,7 +759,7 @@ describe('SyntheticDevice', function () { await vehicleInstance .connect(admin) - ['mintVehicleWithDeviceDefinition(uint256,address,uint256,string,(string,string)[])'](1, user2.address, C.STORAGE_NODE_ID_1, C.mockDdId1, C.mockVehicleAttributeInfoPairs); + ['mintVehicle(uint256,address,uint256,(string,string)[])'](1, user2.address, C.STORAGE_NODE_ID_1, C.mockVehicleAttributeInfoPairs); await expect( syntheticDeviceInstance @@ -1218,7 +1218,7 @@ describe('SyntheticDevice', function () { await vehicleInstance .connect(admin) - ['mintVehicleWithDeviceDefinition(uint256,address,uint256,string,(string,string)[])'](1, user1.address, C.STORAGE_NODE_ID_1, C.mockDdId1, C.mockVehicleAttributeInfoPairs); + ['mintVehicle(uint256,address,uint256,(string,string)[])'](1, user1.address, C.STORAGE_NODE_ID_1, C.mockVehicleAttributeInfoPairs); await syntheticDeviceInstance .connect(minterWithPermission1) .mintSyntheticDeviceSign(correctMintInput); @@ -1239,7 +1239,7 @@ describe('SyntheticDevice', function () { await vehicleInstance .connect(admin) - ['mintVehicleWithDeviceDefinition(uint256,address,uint256,string,(string,string)[])'](1, user2.address, C.STORAGE_NODE_ID_1, C.mockDdId1, C.mockVehicleAttributeInfoPairs); + ['mintVehicle(uint256,address,uint256,(string,string)[])'](1, user2.address, C.STORAGE_NODE_ID_1, C.mockVehicleAttributeInfoPairs); await expect( syntheticDeviceInstance @@ -1798,7 +1798,7 @@ describe('SyntheticDevice', function () { await vehicleInstance .connect(admin) - ['mintVehicleWithDeviceDefinition(uint256,address,uint256,string,(string,string)[])'](1, user1.address, C.STORAGE_NODE_ID_1, C.mockDdId1, C.mockVehicleAttributeInfoPairs); + ['mintVehicle(uint256,address,uint256,(string,string)[])'](1, user1.address, C.STORAGE_NODE_ID_1, C.mockVehicleAttributeInfoPairs); await syntheticDeviceInstance .connect(connectionOwner1) .mintSyntheticDeviceSign(mintInput2); @@ -1827,7 +1827,7 @@ describe('SyntheticDevice', function () { await vehicleInstance .connect(admin) - ['mintVehicleWithDeviceDefinition(uint256,address,uint256,string,(string,string)[])'](1, user1.address, C.STORAGE_NODE_ID_1, C.mockDdId1, C.mockVehicleAttributeInfoPairs); + ['mintVehicle(uint256,address,uint256,(string,string)[])'](1, user1.address, C.STORAGE_NODE_ID_1, C.mockVehicleAttributeInfoPairs); await syntheticDeviceInstance .connect(connectionOwner1) .mintSyntheticDeviceSign(mintInput2); diff --git a/test/nodes/Vehicle.test.ts b/test/nodes/Vehicle.test.ts index 7432b567..bba03ace 100644 --- a/test/nodes/Vehicle.test.ts +++ b/test/nodes/Vehicle.test.ts @@ -441,17 +441,16 @@ describe('Vehicle', function () { }); }); - describe('mintVehicleWithDeviceDefinition(uint256,address,uint256,string,(string,string)[])', () => { + describe('mintVehicle(uint256,address,uint256,(string,string)[])', () => { context('Error handling', () => { it('Should revert if parent node is not a manufacturer node', async () => { await expect( vehicleInstance .connect(admin) - ['mintVehicleWithDeviceDefinition(uint256,address,uint256,string,(string,string)[])']( + ['mintVehicle(uint256,address,uint256,(string,string)[])']( 99, user1.address, C.STORAGE_NODE_ID_1, - C.mockDdId1, C.mockVehicleAttributeInfoPairs, ) ).to.be.revertedWithCustomError(vehicleInstance, 'InvalidParentNode') @@ -461,11 +460,10 @@ describe('Vehicle', function () { await expect( vehicleInstance .connect(admin) - ['mintVehicleWithDeviceDefinition(uint256,address,uint256,string,(string,string)[])']( + ['mintVehicle(uint256,address,uint256,(string,string)[])']( 1, user1.address, C.STORAGE_NODE_ID_1, - C.mockDdId1, C.mockVehicleAttributeInfoPairsNotWhitelisted ) ).to.be.revertedWithCustomError( @@ -477,11 +475,10 @@ describe('Vehicle', function () { await expect( vehicleInstance .connect(admin) - ['mintVehicleWithDeviceDefinition(uint256,address,uint256,string,(string,string)[])']( + ['mintVehicle(uint256,address,uint256,(string,string)[])']( 1, user1.address, 99, - C.mockDdId1, C.mockVehicleAttributeInfoPairs ) ).to.be.revertedWithCustomError( @@ -495,11 +492,10 @@ describe('Vehicle', function () { it('Should correctly set parent node', async () => { await vehicleInstance .connect(admin) - ['mintVehicleWithDeviceDefinition(uint256,address,uint256,string,(string,string)[])']( + ['mintVehicle(uint256,address,uint256,(string,string)[])']( 1, user1.address, C.STORAGE_NODE_ID_1, - C.mockDdId1, C.mockVehicleAttributeInfoPairs ); @@ -512,40 +508,37 @@ describe('Vehicle', function () { it('Should correctly set node owner', async () => { await vehicleInstance .connect(admin) - ['mintVehicleWithDeviceDefinition(uint256,address,uint256,string,(string,string)[])']( + ['mintVehicle(uint256,address,uint256,(string,string)[])']( 1, user1.address, C.STORAGE_NODE_ID_1, - C.mockDdId1, C.mockVehicleAttributeInfoPairs ); expect(await vehicleIdInstance.ownerOf(1)).to.be.equal(user1.address); }); - it('Should correctly set Device Definition Id', async () => { + it('Should not write to the deprecated Device Definition Id slot on mint', async () => { await vehicleInstance .connect(admin) - ['mintVehicleWithDeviceDefinition(uint256,address,uint256,string,(string,string)[])']( + ['mintVehicle(uint256,address,uint256,(string,string)[])']( 1, user1.address, C.STORAGE_NODE_ID_1, - C.mockDdId1, C.mockVehicleAttributeInfoPairs ); expect( await vehicleInstance .getDeviceDefinitionIdByVehicleId(1) - ).to.be.equal(C.mockDdId1); + ).to.be.empty; }); it('Should correctly set infos', async () => { await vehicleInstance .connect(admin) - ['mintVehicleWithDeviceDefinition(uint256,address,uint256,string,(string,string)[])']( + ['mintVehicle(uint256,address,uint256,(string,string)[])']( 1, user1.address, C.STORAGE_NODE_ID_1, - C.mockDdId1, C.mockVehicleAttributeInfoPairs ); @@ -568,11 +561,10 @@ describe('Vehicle', function () { await expect(() => vehicleInstance .connect(admin) - ['mintVehicleWithDeviceDefinition(uint256,address,uint256,string,(string,string)[])']( + ['mintVehicle(uint256,address,uint256,(string,string)[])']( 1, user1.address, C.STORAGE_NODE_ID_1, - C.mockDdId1, C.mockVehicleAttributeInfoPairs ) ).changeTokenBalance( @@ -587,11 +579,10 @@ describe('Vehicle', function () { await vehicleInstance .connect(admin) - ['mintVehicleWithDeviceDefinition(uint256,address,uint256,string,(string,string)[])']( + ['mintVehicle(uint256,address,uint256,(string,string)[])']( 1, user1.address, C.STORAGE_NODE_ID_1, - C.mockDdId1, C.mockVehicleAttributeInfoPairs ) @@ -604,11 +595,10 @@ describe('Vehicle', function () { await vehicleInstance .connect(admin) - ['mintVehicleWithDeviceDefinition(uint256,address,uint256,string,(string,string)[])']( + ['mintVehicle(uint256,address,uint256,(string,string)[])']( 1, user1.address, 0, - C.mockDdId1, C.mockVehicleAttributeInfoPairs ) @@ -618,30 +608,28 @@ describe('Vehicle', function () { }); context('Events', () => { - it('Should emit VehicleNodeMintedWithDeviceDefinition event with correct params', async () => { + it('Should emit VehicleNodeMinted event with correct params', async () => { await expect( vehicleInstance .connect(admin) - ['mintVehicleWithDeviceDefinition(uint256,address,uint256,string,(string,string)[])']( + ['mintVehicle(uint256,address,uint256,(string,string)[])']( 1, user1.address, C.STORAGE_NODE_ID_1, - C.mockDdId1, C.mockVehicleAttributeInfoPairs ) ) - .to.emit(vehicleInstance, 'VehicleNodeMintedWithDeviceDefinition') - .withArgs(1, 1, user1.address, C.mockDdId1); + .to.emit(vehicleInstance, 'VehicleNodeMinted') + .withArgs(1, 1, user1.address); }); it('Should emit VehicleAttributeSet events with correct params', async () => { await expect( vehicleInstance .connect(admin) - ['mintVehicleWithDeviceDefinition(uint256,address,uint256,string,(string,string)[])']( + ['mintVehicle(uint256,address,uint256,(string,string)[])']( 1, user1.address, C.STORAGE_NODE_ID_1, - C.mockDdId1, C.mockVehicleAttributeInfoPairs ) ) @@ -662,11 +650,10 @@ describe('Vehicle', function () { await expect( vehicleInstance .connect(admin) - ['mintVehicleWithDeviceDefinition(uint256,address,uint256,string,(string,string)[])']( + ['mintVehicle(uint256,address,uint256,(string,string)[])']( 1, user1.address, C.STORAGE_NODE_ID_1, - C.mockDdId1, [] ) ).to.not.emit(vehicleInstance, 'VehicleAttributeSet'); @@ -675,11 +662,10 @@ describe('Vehicle', function () { await expect( vehicleInstance .connect(admin) - ['mintVehicleWithDeviceDefinition(uint256,address,uint256,string,(string,string)[])']( + ['mintVehicle(uint256,address,uint256,(string,string)[])']( 1, user1.address, C.STORAGE_NODE_ID_1, - C.mockDdId1, C.mockVehicleAttributeInfoPairs ) ) @@ -689,7 +675,7 @@ describe('Vehicle', function () { }); }); - describe('mintVehicleWithDeviceDefinition(uint256,address,uint256,string,(string,string)[],(address,uint256,uint256,string))', () => { + describe('mintVehicle(uint256,address,uint256,(string,string)[],(address,uint256,uint256,string))', () => { let sacdInput: SacdInput; before(() => { sacdInput = { @@ -704,11 +690,10 @@ describe('Vehicle', function () { await expect( vehicleInstance .connect(admin) - ['mintVehicleWithDeviceDefinition(uint256,address,uint256,string,(string,string)[],(address,uint256,uint256,string))']( + ['mintVehicle(uint256,address,uint256,(string,string)[],(address,uint256,uint256,string))']( 99, user1.address, C.STORAGE_NODE_ID_1, - C.mockDdId1, C.mockVehicleAttributeInfoPairs, sacdInput ) @@ -719,11 +704,10 @@ describe('Vehicle', function () { await expect( vehicleInstance .connect(admin) - ['mintVehicleWithDeviceDefinition(uint256,address,uint256,string,(string,string)[],(address,uint256,uint256,string))']( + ['mintVehicle(uint256,address,uint256,(string,string)[],(address,uint256,uint256,string))']( 1, user1.address, C.STORAGE_NODE_ID_1, - C.mockDdId1, C.mockVehicleAttributeInfoPairsNotWhitelisted, sacdInput ) @@ -736,11 +720,10 @@ describe('Vehicle', function () { await expect( vehicleInstance .connect(admin) - ['mintVehicleWithDeviceDefinition(uint256,address,uint256,string,(string,string)[],(address,uint256,uint256,string))']( + ['mintVehicle(uint256,address,uint256,(string,string)[],(address,uint256,uint256,string))']( 1, user1.address, 99, - C.mockDdId1, C.mockVehicleAttributeInfoPairs, sacdInput ) @@ -755,11 +738,10 @@ describe('Vehicle', function () { it('Should correctly set parent node', async () => { await vehicleInstance .connect(admin) - ['mintVehicleWithDeviceDefinition(uint256,address,uint256,string,(string,string)[],(address,uint256,uint256,string))']( + ['mintVehicle(uint256,address,uint256,(string,string)[],(address,uint256,uint256,string))']( 1, user1.address, C.STORAGE_NODE_ID_1, - C.mockDdId1, C.mockVehicleAttributeInfoPairs, sacdInput ); @@ -773,25 +755,23 @@ describe('Vehicle', function () { it('Should correctly set node owner', async () => { await vehicleInstance .connect(admin) - ['mintVehicleWithDeviceDefinition(uint256,address,uint256,string,(string,string)[],(address,uint256,uint256,string))']( + ['mintVehicle(uint256,address,uint256,(string,string)[],(address,uint256,uint256,string))']( 1, user1.address, C.STORAGE_NODE_ID_1, - C.mockDdId1, C.mockVehicleAttributeInfoPairs, sacdInput ); expect(await vehicleIdInstance.ownerOf(1)).to.be.equal(user1.address); }); - it('Should correctly set Device Definition Id', async () => { + it('Should not write to the deprecated Device Definition Id slot on mint', async () => { await vehicleInstance .connect(admin) - ['mintVehicleWithDeviceDefinition(uint256,address,uint256,string,(string,string)[],(address,uint256,uint256,string))']( + ['mintVehicle(uint256,address,uint256,(string,string)[],(address,uint256,uint256,string))']( 1, user1.address, C.STORAGE_NODE_ID_1, - C.mockDdId1, C.mockVehicleAttributeInfoPairs, sacdInput ); @@ -799,16 +779,15 @@ describe('Vehicle', function () { expect( await vehicleInstance .getDeviceDefinitionIdByVehicleId(1) - ).to.be.equal(C.mockDdId1); + ).to.be.empty; }); it('Should correctly set infos', async () => { await vehicleInstance .connect(admin) - ['mintVehicleWithDeviceDefinition(uint256,address,uint256,string,(string,string)[],(address,uint256,uint256,string))']( + ['mintVehicle(uint256,address,uint256,(string,string)[],(address,uint256,uint256,string))']( 1, user1.address, C.STORAGE_NODE_ID_1, - C.mockDdId1, C.mockVehicleAttributeInfoPairs, sacdInput ); @@ -832,11 +811,10 @@ describe('Vehicle', function () { await expect(() => vehicleInstance .connect(admin) - ['mintVehicleWithDeviceDefinition(uint256,address,uint256,string,(string,string)[],(address,uint256,uint256,string))']( + ['mintVehicle(uint256,address,uint256,(string,string)[],(address,uint256,uint256,string))']( 1, user1.address, C.STORAGE_NODE_ID_1, - C.mockDdId1, C.mockVehicleAttributeInfoPairs, sacdInput ) @@ -853,11 +831,10 @@ describe('Vehicle', function () { await vehicleInstance .connect(admin) - ['mintVehicleWithDeviceDefinition(uint256,address,uint256,string,(string,string)[],(address,uint256,uint256,string))']( + ['mintVehicle(uint256,address,uint256,(string,string)[],(address,uint256,uint256,string))']( 1, user1.address, C.STORAGE_NODE_ID_1, - C.mockDdId1, C.mockVehicleAttributeInfoPairs, sacdInput ) @@ -872,11 +849,10 @@ describe('Vehicle', function () { await vehicleInstance .connect(admin) - ['mintVehicleWithDeviceDefinition(uint256,address,uint256,string,(string,string)[],(address,uint256,uint256,string))']( + ['mintVehicle(uint256,address,uint256,(string,string)[],(address,uint256,uint256,string))']( 1, user1.address, C.STORAGE_NODE_ID_1, - C.mockDdId1, C.mockVehicleAttributeInfoPairs, sacdInput ) @@ -890,11 +866,10 @@ describe('Vehicle', function () { await vehicleInstance .connect(admin) - ['mintVehicleWithDeviceDefinition(uint256,address,uint256,string,(string,string)[],(address,uint256,uint256,string))']( + ['mintVehicle(uint256,address,uint256,(string,string)[],(address,uint256,uint256,string))']( 1, user1.address, 0, - C.mockDdId1, C.mockVehicleAttributeInfoPairs, sacdInput ) @@ -905,31 +880,29 @@ describe('Vehicle', function () { }); context('Events', () => { - it('Should emit VehicleNodeMintedWithDeviceDefinition event with correct params', async () => { + it('Should emit VehicleNodeMinted event with correct params', async () => { await expect( vehicleInstance .connect(admin) - ['mintVehicleWithDeviceDefinition(uint256,address,uint256,string,(string,string)[],(address,uint256,uint256,string))']( + ['mintVehicle(uint256,address,uint256,(string,string)[],(address,uint256,uint256,string))']( 1, user1.address, C.STORAGE_NODE_ID_1, - C.mockDdId1, C.mockVehicleAttributeInfoPairs, sacdInput ) ) - .to.emit(vehicleInstance, 'VehicleNodeMintedWithDeviceDefinition') - .withArgs(1, 1, user1.address, C.mockDdId1); + .to.emit(vehicleInstance, 'VehicleNodeMinted') + .withArgs(1, 1, user1.address); }); it('Should emit VehicleAttributeSet events with correct params', async () => { await expect( vehicleInstance .connect(admin) - ['mintVehicleWithDeviceDefinition(uint256,address,uint256,string,(string,string)[],(address,uint256,uint256,string))']( + ['mintVehicle(uint256,address,uint256,(string,string)[],(address,uint256,uint256,string))']( 1, user1.address, C.STORAGE_NODE_ID_1, - C.mockDdId1, C.mockVehicleAttributeInfoPairs, sacdInput ) @@ -951,11 +924,10 @@ describe('Vehicle', function () { await expect( vehicleInstance .connect(admin) - ['mintVehicleWithDeviceDefinition(uint256,address,uint256,string,(string,string)[],(address,uint256,uint256,string))']( + ['mintVehicle(uint256,address,uint256,(string,string)[],(address,uint256,uint256,string))']( 1, user1.address, C.STORAGE_NODE_ID_1, - C.mockDdId1, [], sacdInput ) @@ -965,11 +937,10 @@ describe('Vehicle', function () { await expect( vehicleInstance .connect(admin) - ['mintVehicleWithDeviceDefinition(uint256,address,uint256,string,(string,string)[],(address,uint256,uint256,string))']( + ['mintVehicle(uint256,address,uint256,(string,string)[],(address,uint256,uint256,string))']( 1, user1.address, C.STORAGE_NODE_ID_1, - C.mockDdId1, C.mockVehicleAttributeInfoPairs, sacdInput ) @@ -980,17 +951,16 @@ describe('Vehicle', function () { }); }); - describe('mintVehicleWithDeviceDefinitionSign(uint256,address,uint256,string,(string,string)[],bytes)', () => { + describe('mintVehicleSign(uint256,address,uint256,(string,string)[],bytes)', () => { let signature: string; before(async () => { signature = await signMessage({ _signer: user1, - _primaryType: 'MintVehicleWithDeviceDefinitionSign', + _primaryType: 'MintVehicleSign', _verifyingContract: await vehicleInstance.getAddress(), message: { manufacturerNode: '1', owner: user1.address, - deviceDefinitionId: C.mockDdId1, attributes: C.mockVehicleAttributes, infos: C.mockVehicleInfos } @@ -1002,11 +972,10 @@ describe('Vehicle', function () { await expect( vehicleInstance .connect(nonAdmin) - ['mintVehicleWithDeviceDefinitionSign(uint256,address,uint256,string,(string,string)[],bytes)']( + ['mintVehicleSign(uint256,address,uint256,(string,string)[],bytes)']( 99, user1.address, C.STORAGE_NODE_ID_1, - C.mockDdId1, C.mockVehicleAttributeInfoPairs, signature ) @@ -1019,11 +988,10 @@ describe('Vehicle', function () { await expect( vehicleInstance .connect(admin) - ['mintVehicleWithDeviceDefinitionSign(uint256,address,uint256,string,(string,string)[],bytes)']( + ['mintVehicleSign(uint256,address,uint256,(string,string)[],bytes)']( 99, user1.address, C.STORAGE_NODE_ID_1, - C.mockDdId1, C.mockVehicleAttributeInfoPairs, signature ) @@ -1034,11 +1002,10 @@ describe('Vehicle', function () { await expect( vehicleInstance .connect(admin) - ['mintVehicleWithDeviceDefinitionSign(uint256,address,uint256,string,(string,string)[],bytes)']( + ['mintVehicleSign(uint256,address,uint256,(string,string)[],bytes)']( 1, user1.address, C.STORAGE_NODE_ID_1, - C.mockDdId1, C.mockVehicleAttributeInfoPairsNotWhitelisted, signature ) @@ -1051,11 +1018,10 @@ describe('Vehicle', function () { await expect( vehicleInstance .connect(admin) - ['mintVehicleWithDeviceDefinitionSign(uint256,address,uint256,string,(string,string)[],bytes)']( + ['mintVehicleSign(uint256,address,uint256,(string,string)[],bytes)']( 1, user1.address, 99, - C.mockDdId1, C.mockVehicleAttributeInfoPairs, signature ) @@ -1070,12 +1036,11 @@ describe('Vehicle', function () { const invalidSignature = await signMessage({ _signer: user1, _domainName: 'Wrong domain', - _primaryType: 'MintVehicleWithDeviceDefinitionSign', + _primaryType: 'MintVehicleSign', _verifyingContract: await vehicleInstance.getAddress(), message: { manufacturerNode: '1', owner: user1.address, - deviceDefinitionId: C.mockDdId1, attributes: C.mockVehicleAttributes, infos: C.mockVehicleInfos } @@ -1084,11 +1049,10 @@ describe('Vehicle', function () { await expect( vehicleInstance .connect(admin) - ['mintVehicleWithDeviceDefinitionSign(uint256,address,uint256,string,(string,string)[],bytes)']( + ['mintVehicleSign(uint256,address,uint256,(string,string)[],bytes)']( 1, user1.address, C.STORAGE_NODE_ID_1, - C.mockDdId1, C.mockVehicleAttributeInfoPairs, invalidSignature ) @@ -1098,12 +1062,11 @@ describe('Vehicle', function () { const invalidSignature = await signMessage({ _signer: user1, _domainVersion: '99', - _primaryType: 'MintVehicleWithDeviceDefinitionSign', + _primaryType: 'MintVehicleSign', _verifyingContract: await vehicleInstance.getAddress(), message: { manufacturerNode: '1', owner: user1.address, - deviceDefinitionId: C.mockDdId1, attributes: C.mockVehicleAttributes, infos: C.mockVehicleInfos } @@ -1112,11 +1075,10 @@ describe('Vehicle', function () { await expect( vehicleInstance .connect(admin) - ['mintVehicleWithDeviceDefinitionSign(uint256,address,uint256,string,(string,string)[],bytes)']( + ['mintVehicleSign(uint256,address,uint256,(string,string)[],bytes)']( 1, user1.address, C.STORAGE_NODE_ID_1, - C.mockDdId1, C.mockVehicleAttributeInfoPairs, invalidSignature ) @@ -1126,12 +1088,11 @@ describe('Vehicle', function () { const invalidSignature = await signMessage({ _signer: user1, _chainId: 99, - _primaryType: 'MintVehicleWithDeviceDefinitionSign', + _primaryType: 'MintVehicleSign', _verifyingContract: await vehicleInstance.getAddress(), message: { manufacturerNode: '1', owner: user1.address, - deviceDefinitionId: C.mockDdId1, attributes: C.mockVehicleAttributes, infos: C.mockVehicleInfos } @@ -1140,11 +1101,10 @@ describe('Vehicle', function () { await expect( vehicleInstance .connect(admin) - ['mintVehicleWithDeviceDefinitionSign(uint256,address,uint256,string,(string,string)[],bytes)']( + ['mintVehicleSign(uint256,address,uint256,(string,string)[],bytes)']( 1, user1.address, C.STORAGE_NODE_ID_1, - C.mockDdId1, C.mockVehicleAttributeInfoPairs, invalidSignature ) @@ -1153,12 +1113,11 @@ describe('Vehicle', function () { it('Should revert if manufactuer node is incorrect', async () => { const invalidSignature = await signMessage({ _signer: user1, - _primaryType: 'MintVehicleWithDeviceDefinitionSign', + _primaryType: 'MintVehicleSign', _verifyingContract: await vehicleInstance.getAddress(), message: { manufacturerNode: '99', owner: user1.address, - deviceDefinitionId: C.mockDdId1, attributes: C.mockVehicleAttributes, infos: C.mockVehicleInfos } @@ -1167,38 +1126,10 @@ describe('Vehicle', function () { await expect( vehicleInstance .connect(admin) - ['mintVehicleWithDeviceDefinitionSign(uint256,address,uint256,string,(string,string)[],bytes)']( + ['mintVehicleSign(uint256,address,uint256,(string,string)[],bytes)']( 1, user1.address, C.STORAGE_NODE_ID_1, - C.mockDdId1, - C.mockVehicleAttributeInfoPairs, - invalidSignature - ) - ).to.be.revertedWithCustomError(vehicleInstance, 'InvalidOwnerSignature'); - }); - it('Should revert if deviceDefinitionId is incorrect', async () => { - const invalidSignature = await signMessage({ - _signer: user1, - _primaryType: 'MintVehicleWithDeviceDefinitionSign', - _verifyingContract: await vehicleInstance.getAddress(), - message: { - manufacturerNode: '1', - owner: user1.address, - deviceDefinitionId: C.mockDdId2, - attributes: C.mockVehicleAttributes, - infos: C.mockVehicleInfos - } - }); - - await expect( - vehicleInstance - .connect(admin) - ['mintVehicleWithDeviceDefinitionSign(uint256,address,uint256,string,(string,string)[],bytes)']( - 1, - user1.address, - C.STORAGE_NODE_ID_1, - C.mockDdId1, C.mockVehicleAttributeInfoPairs, invalidSignature ) @@ -1207,12 +1138,11 @@ describe('Vehicle', function () { it('Should revert if attributes are incorrect', async () => { const invalidSignature = await signMessage({ _signer: user1, - _primaryType: 'MintVehicleWithDeviceDefinitionSign', + _primaryType: 'MintVehicleSign', _verifyingContract: await vehicleInstance.getAddress(), message: { manufacturerNode: '1', owner: user1.address, - deviceDefinitionId: C.mockDdId1, attributes: C.mockVehicleAttributes.slice(1), infos: C.mockVehicleInfos } @@ -1221,11 +1151,10 @@ describe('Vehicle', function () { await expect( vehicleInstance .connect(admin) - ['mintVehicleWithDeviceDefinitionSign(uint256,address,uint256,string,(string,string)[],bytes)']( + ['mintVehicleSign(uint256,address,uint256,(string,string)[],bytes)']( 1, user1.address, C.STORAGE_NODE_ID_1, - C.mockDdId1, C.mockVehicleAttributeInfoPairs, invalidSignature ) @@ -1234,12 +1163,11 @@ describe('Vehicle', function () { it('Should revert if infos are incorrect', async () => { const invalidSignature = await signMessage({ _signer: user1, - _primaryType: 'MintVehicleWithDeviceDefinitionSign', + _primaryType: 'MintVehicleSign', _verifyingContract: await vehicleInstance.getAddress(), message: { manufacturerNode: '1', owner: user1.address, - deviceDefinitionId: C.mockDdId1, attributes: C.mockVehicleAttributes, infos: C.mockVehicleInfosWrongSize } @@ -1248,11 +1176,10 @@ describe('Vehicle', function () { await expect( vehicleInstance .connect(admin) - ['mintVehicleWithDeviceDefinitionSign(uint256,address,uint256,string,(string,string)[],bytes)']( + ['mintVehicleSign(uint256,address,uint256,(string,string)[],bytes)']( 1, user1.address, C.STORAGE_NODE_ID_1, - C.mockDdId1, C.mockVehicleAttributeInfoPairs, invalidSignature ) @@ -1261,12 +1188,11 @@ describe('Vehicle', function () { it('Should revert if owner does not match signer', async () => { const invalidSignature = await signMessage({ _signer: user1, - _primaryType: 'MintVehicleWithDeviceDefinitionSign', + _primaryType: 'MintVehicleSign', _verifyingContract: await vehicleInstance.getAddress(), message: { manufacturerNode: '1', owner: user2.address, - deviceDefinitionId: C.mockDdId1, attributes: C.mockVehicleAttributes, infos: C.mockVehicleInfos } @@ -1275,11 +1201,10 @@ describe('Vehicle', function () { await expect( vehicleInstance .connect(admin) - ['mintVehicleWithDeviceDefinitionSign(uint256,address,uint256,string,(string,string)[],bytes)']( + ['mintVehicleSign(uint256,address,uint256,(string,string)[],bytes)']( 1, user1.address, C.STORAGE_NODE_ID_1, - C.mockDdId1, C.mockVehicleAttributeInfoPairs, invalidSignature ) @@ -1292,11 +1217,10 @@ describe('Vehicle', function () { it('Should correctly set parent node', async () => { await vehicleInstance .connect(admin) - ['mintVehicleWithDeviceDefinitionSign(uint256,address,uint256,string,(string,string)[],bytes)']( + ['mintVehicleSign(uint256,address,uint256,(string,string)[],bytes)']( 1, user1.address, C.STORAGE_NODE_ID_1, - C.mockDdId1, C.mockVehicleAttributeInfoPairs, signature ); @@ -1310,25 +1234,23 @@ describe('Vehicle', function () { it('Should correctly set node owner', async () => { await vehicleInstance .connect(admin) - ['mintVehicleWithDeviceDefinitionSign(uint256,address,uint256,string,(string,string)[],bytes)']( + ['mintVehicleSign(uint256,address,uint256,(string,string)[],bytes)']( 1, user1.address, C.STORAGE_NODE_ID_1, - C.mockDdId1, C.mockVehicleAttributeInfoPairs, signature ); expect(await vehicleIdInstance.ownerOf(1)).to.be.equal(user1.address); }); - it('Should correctly set Device Definition Id', async () => { + it('Should not write to the deprecated Device Definition Id slot on mint', async () => { await vehicleInstance .connect(admin) - ['mintVehicleWithDeviceDefinitionSign(uint256,address,uint256,string,(string,string)[],bytes)']( + ['mintVehicleSign(uint256,address,uint256,(string,string)[],bytes)']( 1, user1.address, C.STORAGE_NODE_ID_1, - C.mockDdId1, C.mockVehicleAttributeInfoPairs, signature ); @@ -1336,16 +1258,15 @@ describe('Vehicle', function () { expect( await vehicleInstance .getDeviceDefinitionIdByVehicleId(1) - ).to.be.equal(C.mockDdId1); + ).to.be.empty; }); it('Should correctly set infos', async () => { await vehicleInstance .connect(admin) - ['mintVehicleWithDeviceDefinitionSign(uint256,address,uint256,string,(string,string)[],bytes)']( + ['mintVehicleSign(uint256,address,uint256,(string,string)[],bytes)']( 1, user1.address, C.STORAGE_NODE_ID_1, - C.mockDdId1, C.mockVehicleAttributeInfoPairs, signature ); @@ -1369,11 +1290,10 @@ describe('Vehicle', function () { await expect(() => vehicleInstance .connect(admin) - ['mintVehicleWithDeviceDefinitionSign(uint256,address,uint256,string,(string,string)[],bytes)']( + ['mintVehicleSign(uint256,address,uint256,(string,string)[],bytes)']( 1, user1.address, C.STORAGE_NODE_ID_1, - C.mockDdId1, C.mockVehicleAttributeInfoPairs, signature ) @@ -1389,11 +1309,10 @@ describe('Vehicle', function () { await vehicleInstance .connect(admin) - ['mintVehicleWithDeviceDefinitionSign(uint256,address,uint256,string,(string,string)[],bytes)']( + ['mintVehicleSign(uint256,address,uint256,(string,string)[],bytes)']( 1, user1.address, C.STORAGE_NODE_ID_1, - C.mockDdId1, C.mockVehicleAttributeInfoPairs, signature ) @@ -1407,11 +1326,10 @@ describe('Vehicle', function () { await vehicleInstance .connect(admin) - ['mintVehicleWithDeviceDefinitionSign(uint256,address,uint256,string,(string,string)[],bytes)']( + ['mintVehicleSign(uint256,address,uint256,(string,string)[],bytes)']( 1, user1.address, 0, - C.mockDdId1, C.mockVehicleAttributeInfoPairs, signature ) @@ -1422,31 +1340,29 @@ describe('Vehicle', function () { }); context('Events', () => { - it('Should emit VehicleNodeMintedWithDeviceDefinition event with correct params', async () => { + it('Should emit VehicleNodeMinted event with correct params', async () => { await expect( vehicleInstance .connect(admin) - ['mintVehicleWithDeviceDefinitionSign(uint256,address,uint256,string,(string,string)[],bytes)']( + ['mintVehicleSign(uint256,address,uint256,(string,string)[],bytes)']( 1, user1.address, C.STORAGE_NODE_ID_1, - C.mockDdId1, C.mockVehicleAttributeInfoPairs, signature ) ) - .to.emit(vehicleInstance, 'VehicleNodeMintedWithDeviceDefinition') - .withArgs(1, 1, user1.address, C.mockDdId1); + .to.emit(vehicleInstance, 'VehicleNodeMinted') + .withArgs(1, 1, user1.address); }); it('Should emit VehicleAttributeSet events with correct params', async () => { await expect( vehicleInstance .connect(admin) - ['mintVehicleWithDeviceDefinitionSign(uint256,address,uint256,string,(string,string)[],bytes)']( + ['mintVehicleSign(uint256,address,uint256,(string,string)[],bytes)']( 1, user1.address, C.STORAGE_NODE_ID_1, - C.mockDdId1, C.mockVehicleAttributeInfoPairs, signature ) @@ -1468,11 +1384,10 @@ describe('Vehicle', function () { await expect( vehicleInstance .connect(admin) - ['mintVehicleWithDeviceDefinitionSign(uint256,address,uint256,string,(string,string)[],bytes)']( + ['mintVehicleSign(uint256,address,uint256,(string,string)[],bytes)']( 1, user1.address, C.STORAGE_NODE_ID_1, - C.mockDdId1, C.mockVehicleAttributeInfoPairs, signature ) @@ -1509,11 +1424,10 @@ describe('Vehicle', function () { beforeEach(async () => { await vehicleInstance .connect(admin) - ['mintVehicleWithDeviceDefinition(uint256,address,uint256,string,(string,string)[])']( + ['mintVehicle(uint256,address,uint256,(string,string)[])']( 1, user1.address, C.STORAGE_NODE_ID_1, - C.mockDdId1, C.mockVehicleAttributeInfoPairs ); }); @@ -1726,23 +1640,6 @@ describe('Vehicle', function () { 'ERC721: invalid token ID' ); }); - it('Should correctly reset device definition Id to empty if it was minted with DD', async () => { - await vehicleInstance - .connect(admin) - ['mintVehicleWithDeviceDefinition(uint256,address,uint256,string,(string,string)[])']( - 1, - user1.address, - C.STORAGE_NODE_ID_1, - C.mockDdId2, - C.mockVehicleAttributeInfoPairs - ); - - expect(await vehicleInstance.getDeviceDefinitionIdByVehicleId(2)).to.be.equal(C.mockDdId2); - - await vehicleInstance.connect(admin).burnVehicleSign(2, burnVehicleSig2); - - expect(await vehicleInstance.getDeviceDefinitionIdByVehicleId(2)).to.be.empty; - }); it('Should correctly reset infos to blank', async () => { await vehicleInstance.connect(admin).burnVehicleSign(1, burnVehicleSig1); @@ -1787,11 +1684,10 @@ describe('Vehicle', function () { beforeEach(async () => { await vehicleInstance .connect(admin) - ['mintVehicleWithDeviceDefinition(uint256,address,uint256,string,(string,string)[])']( + ['mintVehicle(uint256,address,uint256,(string,string)[])']( 1, user1.address, C.STORAGE_NODE_ID_1, - C.mockDdId1, C.mockVehicleAttributeInfoPairs ); }); diff --git a/test/storageNode/StorageNodeRegistry.test.ts b/test/storageNode/StorageNodeRegistry.test.ts index 7f8a03b9..8d7f8584 100644 --- a/test/storageNode/StorageNodeRegistry.test.ts +++ b/test/storageNode/StorageNodeRegistry.test.ts @@ -350,11 +350,10 @@ describe('StorageNode', function () { before(async () => { await vehicleInstance .connect(admin) - ['mintVehicleWithDeviceDefinition(uint256,address,uint256,string,(string,string)[])']( + ['mintVehicle(uint256,address,uint256,(string,string)[])']( 1, user1.address, 0, - C.mockDdId1, C.mockVehicleAttributeInfoPairs, ) }) diff --git a/test/streamr/VehicleStream.test.ts b/test/streamr/VehicleStream.test.ts index 37f64c2a..604cdaf8 100644 --- a/test/streamr/VehicleStream.test.ts +++ b/test/streamr/VehicleStream.test.ts @@ -278,7 +278,7 @@ describe('VehicleStream', async function () { await vehicleInstance .connect(admin) - ['mintVehicleWithDeviceDefinition(uint256,address,uint256,string,(string,string)[])'](1, user1.address, C.STORAGE_NODE_ID_1, C.mockDdId1, C.mockVehicleAttributeInfoPairs); + ['mintVehicle(uint256,address,uint256,(string,string)[])'](1, user1.address, C.STORAGE_NODE_ID_1, C.mockVehicleAttributeInfoPairs); await setupStreamr(DIMO_REGISTRY_ADDRESS); @@ -615,7 +615,7 @@ describe('VehicleStream', async function () { it('Should revert if there is no stream ID associated to the vehicle ID', async () => { await vehicleInstance .connect(admin) - ['mintVehicleWithDeviceDefinition(uint256,address,uint256,string,(string,string)[])'](1, user2.address, C.STORAGE_NODE_ID_1, C.mockDdId1, C.mockVehicleAttributeInfoPairs); + ['mintVehicle(uint256,address,uint256,(string,string)[])'](1, user2.address, C.STORAGE_NODE_ID_1, C.mockVehicleAttributeInfoPairs); await expect( vehicleStreamInstance @@ -819,7 +819,7 @@ describe('VehicleStream', async function () { it('Should revert if there is no stream ID associated to the vehicle ID', async () => { await vehicleInstance .connect(admin) - ['mintVehicleWithDeviceDefinition(uint256,address,uint256,string,(string,string)[])'](1, user2.address, C.STORAGE_NODE_ID_1, C.mockDdId1, C.mockVehicleAttributeInfoPairs); + ['mintVehicle(uint256,address,uint256,(string,string)[])'](1, user2.address, C.STORAGE_NODE_ID_1, C.mockVehicleAttributeInfoPairs); await expect( vehicleStreamInstance diff --git a/utils/constants/Eip712Types.json b/utils/constants/Eip712Types.json index 0c220998..c5e91add 100644 --- a/utils/constants/Eip712Types.json +++ b/utils/constants/Eip712Types.json @@ -63,28 +63,6 @@ "type": "uint256" } ], - "MintVehicleWithDeviceDefinitionSign": [ - { - "name": "manufacturerNode", - "type": "uint256" - }, - { - "name": "owner", - "type": "address" - }, - { - "name": "deviceDefinitionId", - "type": "string" - }, - { - "name": "attributes", - "type": "string[]" - }, - { - "name": "infos", - "type": "string[]" - } - ], "BurnSyntheticDeviceSign": [ { "name": "vehicleNode", diff --git a/utils/types.ts b/utils/types.ts index 9444fdea..f8b943ed 100644 --- a/utils/types.ts +++ b/utils/types.ts @@ -87,36 +87,11 @@ export type DeviceDefinitionUpdateInput = { imageURI: string; }; -export type MintVehicleAndSdWithDdInput = { - manufacturerNode: string, - owner: string, - deviceDefinitionId: string, - attrInfoPairsVehicle: AttributeInfoPair[], - connectionId: string, - vehicleOwnerSig: string, - syntheticDeviceSig: string, - syntheticDeviceAddr: string, - attrInfoPairsDevice: AttributeInfoPair[] -}; - -export type MintVehicleAndSdWithDdInputWithSnId = { - manufacturerNode: string, - owner: string, - deviceDefinitionId: string, - storageNodeId: string, - attrInfoPairsVehicle: AttributeInfoPair[], - connectionId: string, - vehicleOwnerSig: string, - syntheticDeviceSig: string, - syntheticDeviceAddr: string, - attrInfoPairsDevice: AttributeInfoPair[] -}; - -export type MintVehicleAndSdWithDdInputBatch = MintVehicleAndSdWithDdInput & { +export type MintVehicleAndSdInputBatch = MintVehicleAndSdInput & { sacdInput: SacdInput } -export type MintVehicleAndSdWithDdInputWithSnIdBatch = MintVehicleAndSdWithDdInputWithSnId & { +export type MintVehicleAndSdInputWithSnIdBatch = MintVehicleAndSdInputWithSdId & { sacdInput: SacdInput } From 7155792755499c3ffbd606e054a44c8ce119713a Mon Sep 17 00:00:00 2001 From: Dylan Moreland Date: Fri, 1 May 2026 15:50:14 -0400 Subject: [PATCH 2/9] Override ensdomains/buffer to v0.1.3 The version we picked up from the Streamr package seems to have been unpublished, maybe due to Shai-Hulud. --- package-lock.json | 9 +++++---- package.json | 3 +++ 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index 36f7eeba..f30af103 100644 --- a/package-lock.json +++ b/package-lock.json @@ -284,10 +284,11 @@ } }, "node_modules/@ensdomains/buffer": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/@ensdomains/buffer/-/buffer-0.1.1.tgz", - "integrity": "sha512-92SfSiNS8XorgU7OUBHo/i1ZU7JV7iz/6bKuLPNVsMxV79/eI7fJR6jfJJc40zAHjs3ha+Xo965Idomlq3rqnw==", - "dev": true + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/@ensdomains/buffer/-/buffer-0.1.3.tgz", + "integrity": "sha512-L/GoCkQFePjSn4DeVnBNfkGdm2CI8UxTxwgQztcZ1L9aHaFefRD+mTUXxtikk946KwwMHRQJDn38wo1IWtEpSg==", + "dev": true, + "license": "BSD-2-Clause" }, "node_modules/@ensdomains/ens-contracts": { "version": "0.0.22", diff --git a/package.json b/package.json index 5048a66a..553da91f 100644 --- a/package.json +++ b/package.json @@ -66,5 +66,8 @@ "dotenv": "^16.3.1", "ethereum-multicall": "^2.26.0", "ethers-v5": "npm:ethers@^5.0.15" + }, + "overrides": { + "@ensdomains/buffer": "0.1.3" } } From d5c58aff0fdde7fa4673171863d4f1bf8c958a2e Mon Sep 17 00:00:00 2001 From: Dylan Moreland Date: Fri, 1 May 2026 16:17:35 -0400 Subject: [PATCH 3/9] Increase mocha timeout for these Tableland tests --- hardhat.config.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hardhat.config.ts b/hardhat.config.ts index f06fbe1e..89c971c1 100644 --- a/hardhat.config.ts +++ b/hardhat.config.ts @@ -58,6 +58,9 @@ const config: HardhatUserConfig = { silent: false, verbose: false, }, + mocha: { + timeout: 180000, + }, tenderly: { username: process.env.TENDERLY_USERNAME || '', // tenderly username (or organization name) project: process.env.TENDERLY_PROJECT_NAME || '', // project name From b8115008d1f9e0dcc0a71f3cc3a8df6d9f8e1fd0 Mon Sep 17 00:00:00 2001 From: Dylan Moreland Date: Fri, 1 May 2026 16:18:59 -0400 Subject: [PATCH 4/9] Use self-hosted runners --- .github/workflows/solidity_ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/solidity_ci.yml b/.github/workflows/solidity_ci.yml index 438c9ef6..b5e4b695 100644 --- a/.github/workflows/solidity_ci.yml +++ b/.github/workflows/solidity_ci.yml @@ -4,7 +4,7 @@ on: [push] jobs: test-parallel: - runs-on: ubuntu-latest + runs-on: self-hosted steps: - uses: actions/checkout@v3 From 5b9b4b61360bd0e669eddb5d815aa8c70e16ffcc Mon Sep 17 00:00:00 2001 From: Dylan Moreland Date: Fri, 1 May 2026 16:27:47 -0400 Subject: [PATCH 5/9] Use long-duration Tableland poller --- test/tableland/DeviceDefinitionTable.test.ts | 110 ++++++++++--------- 1 file changed, 57 insertions(+), 53 deletions(-) diff --git a/test/tableland/DeviceDefinitionTable.test.ts b/test/tableland/DeviceDefinitionTable.test.ts index e354eed4..62885b88 100644 --- a/test/tableland/DeviceDefinitionTable.test.ts +++ b/test/tableland/DeviceDefinitionTable.test.ts @@ -4,7 +4,7 @@ import { HardhatEthersSigner } from '@nomicfoundation/hardhat-ethers/signers'; import { time } from '@nomicfoundation/hardhat-network-helpers'; import { LocalTableland, getAccounts, getDatabase, getValidator, getRegistry } from '@tableland/local'; -import { Database, Validator, Registry } from '@tableland/sdk'; +import { Database, Validator, Registry, helpers } from '@tableland/sdk'; import { DimoAccessControl, @@ -16,6 +16,10 @@ import { setup, createSnapshot, revertToSnapshot, grantAdminRoles, C } from '../ const { expect } = chai; +// Local validator restarts between tests can leave the first poll racing the +// 5s default timeout; bump it. +const longPoll = () => helpers.createPollingController(60_000, 1_500); + const lt = new LocalTableland({ silent: true, }); @@ -518,7 +522,7 @@ describe('DeviceDefinitionTable', async function () { await tablelandValidator.pollForReceiptByTransactionHash({ chainId: CURRENT_CHAIN_ID, transactionHash: (await tx.wait())?.hash as string, - }); + }, longPoll()); }); context('Error handling', () => { @@ -560,9 +564,9 @@ describe('DeviceDefinitionTable', async function () { .connect(admin) .createDeviceDefinitionTable(manufacturer2.address, 2); await tablelandValidator.pollForReceiptByTransactionHash({ - chainId: CURRENT_CHAIN_ID, - transactionHash: (await tx.wait())?.hash as string, - }); + chainId: CURRENT_CHAIN_ID, + transactionHash: (await tx.wait())?.hash as string, + }, longPoll()); expect(await ddTableInstance.getDeviceDefinitionTableId(1)).to.be.equal(2); @@ -580,9 +584,9 @@ describe('DeviceDefinitionTable', async function () { .connect(admin) .createDeviceDefinitionTable(manufacturer2.address, 2); await tablelandValidator.pollForReceiptByTransactionHash({ - chainId: CURRENT_CHAIN_ID, - transactionHash: (await tx.wait())?.hash as string, - }); + chainId: CURRENT_CHAIN_ID, + transactionHash: (await tx.wait())?.hash as string, + }, longPoll()); await expect( await ddTableInstance @@ -604,7 +608,7 @@ describe('DeviceDefinitionTable', async function () { await tablelandValidator.pollForReceiptByTransactionHash({ chainId: CURRENT_CHAIN_ID, transactionHash: (await tx.wait())?.hash as string, - }); + }, longPoll()); }); context('Error handling', () => { @@ -634,18 +638,18 @@ describe('DeviceDefinitionTable', async function () { .insertDeviceDefinition(1, C.mockDdInput1); await tablelandValidator.pollForReceiptByTransactionHash({ - chainId: CURRENT_CHAIN_ID, - transactionHash: (await tx.wait())?.hash as string, - }); + chainId: CURRENT_CHAIN_ID, + transactionHash: (await tx.wait())?.hash as string, + }, longPoll()); tx = await ddTableInstance .connect(manufacturer1) .insertDeviceDefinition(1, C.mockDdInput1); const validatorResponse = await tablelandValidator.pollForReceiptByTransactionHash({ - chainId: CURRENT_CHAIN_ID, - transactionHash: (await tx.wait())?.hash as string, - }); + chainId: CURRENT_CHAIN_ID, + transactionHash: (await tx.wait())?.hash as string, + }, longPoll()); const tableId = await ddTableInstance.getDeviceDefinitionTableId(1); @@ -663,9 +667,9 @@ describe('DeviceDefinitionTable', async function () { .insertDeviceDefinition(1, C.mockDdInput1); await tablelandValidator.pollForReceiptByTransactionHash({ - chainId: CURRENT_CHAIN_ID, - transactionHash: (await tx.wait())?.hash as string, - }); + chainId: CURRENT_CHAIN_ID, + transactionHash: (await tx.wait())?.hash as string, + }, longPoll()); const count = await tablelandDb.prepare( `SELECT COUNT(*) AS total FROM ${await ddTableInstance.getDeviceDefinitionTableName(1)}` @@ -710,9 +714,9 @@ describe('DeviceDefinitionTable', async function () { .insertDeviceDefinition(1, C.mockDdInput1); await tablelandValidator.pollForReceiptByTransactionHash({ - chainId: CURRENT_CHAIN_ID, - transactionHash: (await tx.wait())?.hash as string, - }); + chainId: CURRENT_CHAIN_ID, + transactionHash: (await tx.wait())?.hash as string, + }, longPoll()); const count = await tablelandDb.prepare( `SELECT COUNT(*) AS total FROM ${await ddTableInstance.getDeviceDefinitionTableName(1)}` @@ -759,7 +763,7 @@ describe('DeviceDefinitionTable', async function () { await tablelandValidator.pollForReceiptByTransactionHash({ chainId: CURRENT_CHAIN_ID, transactionHash: (await tx.wait())?.hash as string, - }); + }, longPoll()); }); context('Error handling', () => { @@ -789,18 +793,18 @@ describe('DeviceDefinitionTable', async function () { .insertDeviceDefinitionBatch(1, C.mockDdInputBatch); await tablelandValidator.pollForReceiptByTransactionHash({ - chainId: CURRENT_CHAIN_ID, - transactionHash: (await tx.wait())?.hash as string, - }); + chainId: CURRENT_CHAIN_ID, + transactionHash: (await tx.wait())?.hash as string, + }, longPoll()); tx = await ddTableInstance .connect(manufacturer1) .insertDeviceDefinitionBatch(1, C.mockDdInputBatch); const validatorResponse = await tablelandValidator.pollForReceiptByTransactionHash({ - chainId: CURRENT_CHAIN_ID, - transactionHash: (await tx.wait())?.hash as string, - }); + chainId: CURRENT_CHAIN_ID, + transactionHash: (await tx.wait())?.hash as string, + }, longPoll()); const tableId = await ddTableInstance.getDeviceDefinitionTableId(1); @@ -814,9 +818,9 @@ describe('DeviceDefinitionTable', async function () { .insertDeviceDefinitionBatch(1, C.mockDdInvalidInputBatch); const validatorResponse = await tablelandValidator.pollForReceiptByTransactionHash({ - chainId: CURRENT_CHAIN_ID, - transactionHash: (await tx.wait())?.hash as string, - }); + chainId: CURRENT_CHAIN_ID, + transactionHash: (await tx.wait())?.hash as string, + }, longPoll()); const tableId = await ddTableInstance.getDeviceDefinitionTableId(1); @@ -834,9 +838,9 @@ describe('DeviceDefinitionTable', async function () { .insertDeviceDefinitionBatch(1, C.mockDdInputBatch); await tablelandValidator.pollForReceiptByTransactionHash({ - chainId: CURRENT_CHAIN_ID, - transactionHash: (await tx.wait())?.hash as string, - }); + chainId: CURRENT_CHAIN_ID, + transactionHash: (await tx.wait())?.hash as string, + }, longPoll()); const count = await tablelandDb.prepare( `SELECT COUNT(*) AS total FROM ${await ddTableInstance.getDeviceDefinitionTableName(1)}` @@ -909,9 +913,9 @@ describe('DeviceDefinitionTable', async function () { .insertDeviceDefinitionBatch(1, C.mockDdInputBatch); await tablelandValidator.pollForReceiptByTransactionHash({ - chainId: CURRENT_CHAIN_ID, - transactionHash: (await tx.wait())?.hash as string, - }); + chainId: CURRENT_CHAIN_ID, + transactionHash: (await tx.wait())?.hash as string, + }, longPoll()); const count = await tablelandDb.prepare( `SELECT COUNT(*) AS total FROM ${await ddTableInstance.getDeviceDefinitionTableName(1)}` @@ -1002,7 +1006,7 @@ describe('DeviceDefinitionTable', async function () { await tablelandValidator.pollForReceiptByTransactionHash({ chainId: CURRENT_CHAIN_ID, transactionHash: (await tx.wait())?.hash as string, - }); + }, longPoll()); const txInsert = await ddTableInstance .connect(manufacturer1) @@ -1011,7 +1015,7 @@ describe('DeviceDefinitionTable', async function () { await tablelandValidator.pollForReceiptByTransactionHash({ chainId: CURRENT_CHAIN_ID, transactionHash: (await txInsert.wait())?.hash as string, - }); + }, longPoll()); }); @@ -1047,9 +1051,9 @@ describe('DeviceDefinitionTable', async function () { .updateDeviceDefinition(1, C.mockDdUpdate1); await tablelandValidator.pollForReceiptByTransactionHash({ - chainId: CURRENT_CHAIN_ID, - transactionHash: (await tx.wait())?.hash as string, - }); + chainId: CURRENT_CHAIN_ID, + transactionHash: (await tx.wait())?.hash as string, + }, longPoll()); const count = await tablelandDb.prepare( `SELECT COUNT(*) AS total FROM ${await ddTableInstance.getDeviceDefinitionTableName(1)}` @@ -1094,9 +1098,9 @@ describe('DeviceDefinitionTable', async function () { .updateDeviceDefinition(1, C.mockDdUpdate1); await tablelandValidator.pollForReceiptByTransactionHash({ - chainId: CURRENT_CHAIN_ID, - transactionHash: (await tx.wait())?.hash as string, - }); + chainId: CURRENT_CHAIN_ID, + transactionHash: (await tx.wait())?.hash as string, + }, longPoll()); const count = await tablelandDb.prepare( `SELECT COUNT(*) AS total FROM ${await ddTableInstance.getDeviceDefinitionTableName(1)}` @@ -1143,7 +1147,7 @@ describe('DeviceDefinitionTable', async function () { await tablelandValidator.pollForReceiptByTransactionHash({ chainId: CURRENT_CHAIN_ID, transactionHash: (await tx.wait())?.hash as string, - }); + }, longPoll()); const txInsert = await ddTableInstance .connect(manufacturer1) @@ -1152,7 +1156,7 @@ describe('DeviceDefinitionTable', async function () { await tablelandValidator.pollForReceiptByTransactionHash({ chainId: CURRENT_CHAIN_ID, transactionHash: (await txInsert.wait())?.hash as string, - }); + }, longPoll()); }); @@ -1188,9 +1192,9 @@ describe('DeviceDefinitionTable', async function () { .deleteDeviceDefinition(1, C.mockDdInput1.id); await tablelandValidator.pollForReceiptByTransactionHash({ - chainId: CURRENT_CHAIN_ID, - transactionHash: (await tx.wait())?.hash as string, - }); + chainId: CURRENT_CHAIN_ID, + transactionHash: (await tx.wait())?.hash as string, + }, longPoll()); const count = await tablelandDb.prepare( `SELECT COUNT(*) AS total FROM ${await ddTableInstance.getDeviceDefinitionTableName(1)}` @@ -1221,9 +1225,9 @@ describe('DeviceDefinitionTable', async function () { .deleteDeviceDefinition(1, C.mockDdInput1.id); await tablelandValidator.pollForReceiptByTransactionHash({ - chainId: CURRENT_CHAIN_ID, - transactionHash: (await tx.wait())?.hash as string, - }); + chainId: CURRENT_CHAIN_ID, + transactionHash: (await tx.wait())?.hash as string, + }, longPoll()); const count = await tablelandDb.prepare( `SELECT COUNT(*) AS total FROM ${await ddTableInstance.getDeviceDefinitionTableName(1)}` From e1d2b59cc0c566960e8b953b4d0cabbda9a10ad8 Mon Sep 17 00:00:00 2001 From: Dylan Moreland Date: Fri, 1 May 2026 16:40:43 -0400 Subject: [PATCH 6/9] Try dropping the Mocha timeout back to normal --- hardhat.config.ts | 3 --- 1 file changed, 3 deletions(-) diff --git a/hardhat.config.ts b/hardhat.config.ts index 89c971c1..f06fbe1e 100644 --- a/hardhat.config.ts +++ b/hardhat.config.ts @@ -58,9 +58,6 @@ const config: HardhatUserConfig = { silent: false, verbose: false, }, - mocha: { - timeout: 180000, - }, tenderly: { username: process.env.TENDERLY_USERNAME || '', // tenderly username (or organization name) project: process.env.TENDERLY_PROJECT_NAME || '', // project name From 1506c79b9b38a2b4f6c00391d7b4503d2a3c8e8c Mon Sep 17 00:00:00 2001 From: Dylan Moreland Date: Sat, 2 May 2026 12:02:36 -0400 Subject: [PATCH 7/9] Regenerate ABI, selectors, and abigen files Remove registry.go in favor of the bindings/ directory. --- Selectors.md | 25 +- abis/DimoRegistry.json | 300 +- .../aftermarketDeviceId.go | 2244 ++++++ bindings/dimoForwarder/dimoForwarder.go | 1063 +++ bindings/integrationId/integrationId.go | 2161 ++++++ bindings/manufacturerId/manufacturerId.go | 2104 +++++ bindings/registry/registry.go | 6777 +++++++++++++++++ .../syntheticDeviceId/syntheticDeviceId.go | 2187 ++++++ bindings/vehicleId/vehicleId.go | 2430 ++++++ 9 files changed, 18999 insertions(+), 292 deletions(-) create mode 100644 bindings/aftermarketDeviceId/aftermarketDeviceId.go create mode 100644 bindings/dimoForwarder/dimoForwarder.go create mode 100644 bindings/integrationId/integrationId.go create mode 100644 bindings/manufacturerId/manufacturerId.go create mode 100644 bindings/registry/registry.go create mode 100644 bindings/syntheticDeviceId/syntheticDeviceId.go create mode 100644 bindings/vehicleId/vehicleId.go diff --git a/Selectors.md b/Selectors.md index c2cd858f..be311fc3 100644 --- a/Selectors.md +++ b/Selectors.md @@ -250,7 +250,6 @@ | 0x5a560c1a | SyntheticDeviceNodeMinted(uint256,uint256,uint256,address,address) | | 0x3a259e5d | VehicleAttributeSet(uint256,string,string) | | 0xd471ae8a | VehicleNodeMinted(uint256,uint256,address) | -| 0xc7c7d9ac | VehicleNodeMintedWithDeviceDefinition(uint256,uint256,address,string) | #### Errors | Selector | Signature | @@ -276,12 +275,12 @@ | 0xf0d1a557 | addVehicleAttribute(string) | | 0xd0b61156 | burnVehicleSign(uint256,bytes) | | 0xb7bded95 | getDeviceDefinitionIdByVehicleId(uint256) | -| 0x8b04a18b | mintVehicleWithDeviceDefinition(uint256,address,uint256,string,(string,string)[]) | -| 0x8bf71ebc | mintVehicleWithDeviceDefinition(uint256,address,uint256,string,(string,string)[],(address,uint256,uint256,string)) | -| 0x97c95b2a | mintVehicleWithDeviceDefinition(uint256,address,string,(string,string)[],(address,uint256,uint256,string)) | -| 0xd84baff1 | mintVehicleWithDeviceDefinition(uint256,address,string,(string,string)[]) | -| 0x592c0889 | mintVehicleWithDeviceDefinitionSign(uint256,address,uint256,string,(string,string)[],bytes) | -| 0x8dca2b8e | mintVehicleWithDeviceDefinitionSign(uint256,address,string,(string,string)[],bytes) | +| 0x3da44e56 | mintVehicle(uint256,address,(string,string)[]) | +| 0x5d9bc6a4 | mintVehicle(uint256,address,(string,string)[],(address,uint256,uint256,string)) | +| 0xab36bfb2 | mintVehicle(uint256,address,uint256,(string,string)[],(address,uint256,uint256,string)) | +| 0xf50373f8 | mintVehicle(uint256,address,uint256,(string,string)[]) | +| 0x1b1a82c8 | mintVehicleSign(uint256,address,(string,string)[],bytes) | +| 0x561fa048 | mintVehicleSign(uint256,address,uint256,(string,string)[],bytes) | | 0x9bfae6da | setVehicleIdProxyAddress(address) | | 0xd9c3ae61 | setVehicleInfo(uint256,(string,string)[]) | | 0xea0e7d3a | validateBurnAndResetNode(uint256) | @@ -297,7 +296,6 @@ | 0x3e7484c4 | VehicleIdProxySet(address) | | 0x7b36384f | VehicleNodeBurned(uint256,address) | | 0xd471ae8a | VehicleNodeMinted(uint256,uint256,address) | -| 0xc7c7d9ac | VehicleNodeMintedWithDeviceDefinition(uint256,uint256,address,string) | | 0x9197060b | VehicleStorageNodeIdSet(uint256,uint256) | #### Errors @@ -424,12 +422,10 @@ |-|-| | 0x688ecea4 | mintVehicleAndSdSign((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[])) | | 0xfb1a28e8 | mintVehicleAndSdSign((uint256,address,(string,string)[],uint256,bytes,bytes,address,(string,string)[])) | -| 0x484db0b3 | mintVehicleAndSdWithDeviceDefinitionSign((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[])) | -| 0xd23965e3 | mintVehicleAndSdWithDeviceDefinitionSign((uint256,address,string,(string,string)[],uint256,bytes,bytes,address,(string,string)[])) | -| 0x58657dcc | mintVehicleAndSdWithDeviceDefinitionSignAndSacd((uint256,address,string,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string)) | -| 0x788a2f48 | mintVehicleAndSdWithDeviceDefinitionSignAndSacd((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string)) | -| 0x1a5d15a1 | mintVehicleAndSdWithDeviceDefinitionSignBatch((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[]) | -| 0x7ae7fe4e | mintVehicleAndSdWithDeviceDefinitionSignBatch((uint256,address,string,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[]) | +| 0x2caa687e | mintVehicleAndSdSignAndSacd((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string)) | +| 0x8a55bfbe | mintVehicleAndSdSignAndSacd((uint256,address,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string)) | +| 0x7b36d2d3 | mintVehicleAndSdSignBatch((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[]) | +| 0xd44a15ee | mintVehicleAndSdSignBatch((uint256,address,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[]) | #### Events | Selector | Signature | @@ -438,7 +434,6 @@ | 0x5a560c1a | SyntheticDeviceNodeMinted(uint256,uint256,uint256,address,address) | | 0x3a259e5d | VehicleAttributeSet(uint256,string,string) | | 0xd471ae8a | VehicleNodeMinted(uint256,uint256,address) | -| 0xc7c7d9ac | VehicleNodeMintedWithDeviceDefinition(uint256,uint256,address,string) | | 0x9197060b | VehicleStorageNodeIdSet(uint256,uint256) | #### Errors diff --git a/abis/DimoRegistry.json b/abis/DimoRegistry.json index 87739d09..5a951c47 100644 --- a/abis/DimoRegistry.json +++ b/abis/DimoRegistry.json @@ -2072,37 +2072,6 @@ "name": "VehicleNodeMinted", "type": "event" }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "manufacturerId", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "vehicleId", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": false, - "internalType": "string", - "name": "deviceDefinitionId", - "type": "string" - } - ], - "name": "VehicleNodeMintedWithDeviceDefinition", - "type": "event" - }, { "inputs": [ { @@ -2425,16 +2394,6 @@ "name": "owner", "type": "address" }, - { - "internalType": "uint256", - "name": "storageNodeId", - "type": "uint256" - }, - { - "internalType": "string", - "name": "deviceDefinitionId", - "type": "string" - }, { "components": [ { @@ -2453,7 +2412,7 @@ "type": "tuple[]" } ], - "name": "mintVehicleWithDeviceDefinition", + "name": "mintVehicle", "outputs": [], "stateMutability": "nonpayable", "type": "function" @@ -2470,16 +2429,6 @@ "name": "owner", "type": "address" }, - { - "internalType": "uint256", - "name": "storageNodeId", - "type": "uint256" - }, - { - "internalType": "string", - "name": "deviceDefinitionId", - "type": "string" - }, { "components": [ { @@ -2525,7 +2474,7 @@ "type": "tuple" } ], - "name": "mintVehicleWithDeviceDefinition", + "name": "mintVehicle", "outputs": [], "stateMutability": "nonpayable", "type": "function" @@ -2543,9 +2492,9 @@ "type": "address" }, { - "internalType": "string", - "name": "deviceDefinitionId", - "type": "string" + "internalType": "uint256", + "name": "storageNodeId", + "type": "uint256" }, { "components": [ @@ -2592,7 +2541,7 @@ "type": "tuple" } ], - "name": "mintVehicleWithDeviceDefinition", + "name": "mintVehicle", "outputs": [], "stateMutability": "nonpayable", "type": "function" @@ -2610,9 +2559,9 @@ "type": "address" }, { - "internalType": "string", - "name": "deviceDefinitionId", - "type": "string" + "internalType": "uint256", + "name": "storageNodeId", + "type": "uint256" }, { "components": [ @@ -2632,7 +2581,7 @@ "type": "tuple[]" } ], - "name": "mintVehicleWithDeviceDefinition", + "name": "mintVehicle", "outputs": [], "stateMutability": "nonpayable", "type": "function" @@ -2649,16 +2598,6 @@ "name": "owner", "type": "address" }, - { - "internalType": "uint256", - "name": "storageNodeId", - "type": "uint256" - }, - { - "internalType": "string", - "name": "deviceDefinitionId", - "type": "string" - }, { "components": [ { @@ -2682,7 +2621,7 @@ "type": "bytes" } ], - "name": "mintVehicleWithDeviceDefinitionSign", + "name": "mintVehicleSign", "outputs": [], "stateMutability": "nonpayable", "type": "function" @@ -2700,9 +2639,9 @@ "type": "address" }, { - "internalType": "string", - "name": "deviceDefinitionId", - "type": "string" + "internalType": "uint256", + "name": "storageNodeId", + "type": "uint256" }, { "components": [ @@ -2727,7 +2666,7 @@ "type": "bytes" } ], - "name": "mintVehicleWithDeviceDefinitionSign", + "name": "mintVehicleSign", "outputs": [], "stateMutability": "nonpayable", "type": "function" @@ -3138,11 +3077,6 @@ "name": "owner", "type": "address" }, - { - "internalType": "string", - "name": "deviceDefinitionId", - "type": "string" - }, { "internalType": "uint256", "name": "storageNodeId", @@ -3203,175 +3137,7 @@ "type": "tuple[]" } ], - "internalType": "struct MintVehicleAndSdWithDdInputWithSnId", - "name": "data", - "type": "tuple" - } - ], - "name": "mintVehicleAndSdWithDeviceDefinitionSign", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "manufacturerNode", - "type": "uint256" - }, - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "string", - "name": "deviceDefinitionId", - "type": "string" - }, - { - "components": [ - { - "internalType": "string", - "name": "attribute", - "type": "string" - }, - { - "internalType": "string", - "name": "info", - "type": "string" - } - ], - "internalType": "struct AttributeInfoPair[]", - "name": "attrInfoPairsVehicle", - "type": "tuple[]" - }, - { - "internalType": "uint256", - "name": "connectionId", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "vehicleOwnerSig", - "type": "bytes" - }, - { - "internalType": "bytes", - "name": "syntheticDeviceSig", - "type": "bytes" - }, - { - "internalType": "address", - "name": "syntheticDeviceAddr", - "type": "address" - }, - { - "components": [ - { - "internalType": "string", - "name": "attribute", - "type": "string" - }, - { - "internalType": "string", - "name": "info", - "type": "string" - } - ], - "internalType": "struct AttributeInfoPair[]", - "name": "attrInfoPairsDevice", - "type": "tuple[]" - } - ], - "internalType": "struct MintVehicleAndSdWithDdInput", - "name": "data", - "type": "tuple" - } - ], - "name": "mintVehicleAndSdWithDeviceDefinitionSign", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "manufacturerNode", - "type": "uint256" - }, - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "string", - "name": "deviceDefinitionId", - "type": "string" - }, - { - "components": [ - { - "internalType": "string", - "name": "attribute", - "type": "string" - }, - { - "internalType": "string", - "name": "info", - "type": "string" - } - ], - "internalType": "struct AttributeInfoPair[]", - "name": "attrInfoPairsVehicle", - "type": "tuple[]" - }, - { - "internalType": "uint256", - "name": "connectionId", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "vehicleOwnerSig", - "type": "bytes" - }, - { - "internalType": "bytes", - "name": "syntheticDeviceSig", - "type": "bytes" - }, - { - "internalType": "address", - "name": "syntheticDeviceAddr", - "type": "address" - }, - { - "components": [ - { - "internalType": "string", - "name": "attribute", - "type": "string" - }, - { - "internalType": "string", - "name": "info", - "type": "string" - } - ], - "internalType": "struct AttributeInfoPair[]", - "name": "attrInfoPairsDevice", - "type": "tuple[]" - } - ], - "internalType": "struct MintVehicleAndSdWithDdInput", + "internalType": "struct MintVehicleAndSdInputWithSnId", "name": "data", "type": "tuple" }, @@ -3403,7 +3169,7 @@ "type": "tuple" } ], - "name": "mintVehicleAndSdWithDeviceDefinitionSignAndSacd", + "name": "mintVehicleAndSdSignAndSacd", "outputs": [], "stateMutability": "nonpayable", "type": "function" @@ -3422,16 +3188,6 @@ "name": "owner", "type": "address" }, - { - "internalType": "string", - "name": "deviceDefinitionId", - "type": "string" - }, - { - "internalType": "uint256", - "name": "storageNodeId", - "type": "uint256" - }, { "components": [ { @@ -3487,7 +3243,7 @@ "type": "tuple[]" } ], - "internalType": "struct MintVehicleAndSdWithDdInputWithSnId", + "internalType": "struct MintVehicleAndSdInput", "name": "data", "type": "tuple" }, @@ -3519,7 +3275,7 @@ "type": "tuple" } ], - "name": "mintVehicleAndSdWithDeviceDefinitionSignAndSacd", + "name": "mintVehicleAndSdSignAndSacd", "outputs": [], "stateMutability": "nonpayable", "type": "function" @@ -3538,11 +3294,6 @@ "name": "owner", "type": "address" }, - { - "internalType": "string", - "name": "deviceDefinitionId", - "type": "string" - }, { "internalType": "uint256", "name": "storageNodeId", @@ -3630,12 +3381,12 @@ "type": "tuple" } ], - "internalType": "struct MintVehicleAndSdWithDdInputWithSnIdBatch[]", + "internalType": "struct MintVehicleAndSdInputWithSnIdBatch[]", "name": "data", "type": "tuple[]" } ], - "name": "mintVehicleAndSdWithDeviceDefinitionSignBatch", + "name": "mintVehicleAndSdSignBatch", "outputs": [], "stateMutability": "nonpayable", "type": "function" @@ -3654,11 +3405,6 @@ "name": "owner", "type": "address" }, - { - "internalType": "string", - "name": "deviceDefinitionId", - "type": "string" - }, { "components": [ { @@ -3741,12 +3487,12 @@ "type": "tuple" } ], - "internalType": "struct MintVehicleAndSdWithDdInputBatch[]", + "internalType": "struct MintVehicleAndSdInputBatch[]", "name": "data", "type": "tuple[]" } ], - "name": "mintVehicleAndSdWithDeviceDefinitionSignBatch", + "name": "mintVehicleAndSdSignBatch", "outputs": [], "stateMutability": "nonpayable", "type": "function" diff --git a/bindings/aftermarketDeviceId/aftermarketDeviceId.go b/bindings/aftermarketDeviceId/aftermarketDeviceId.go new file mode 100644 index 00000000..03b8f748 --- /dev/null +++ b/bindings/aftermarketDeviceId/aftermarketDeviceId.go @@ -0,0 +1,2244 @@ +// Code generated via abigen V2 - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package aftermarketDeviceId + +import ( + "bytes" + "errors" + "math/big" + + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/accounts/abi/bind/v2" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" +) + +// Reference imports to suppress errors if they are not otherwise used. +var ( + _ = bytes.Equal + _ = errors.New + _ = big.NewInt + _ = common.Big1 + _ = types.BloomLookup + _ = abi.ConvertType +) + +// MultiPrivilegeSetPrivilegeData is an auto generated low-level Go binding around an user-defined struct. +type MultiPrivilegeSetPrivilegeData struct { + TokenId *big.Int + PrivId *big.Int + User common.Address + Expires *big.Int +} + +// AftermarketDeviceIdMetaData contains all meta data concerning the AftermarketDeviceId contract. +var AftermarketDeviceIdMetaData = bind.MetaData{ + ABI: "[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"Unauthorized\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroAddress\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AdminChanged\",\"type\":\"event\"},{\"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\":false,\"internalType\":\"uint256\",\"name\":\"_fromTokenId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_toTokenId\",\"type\":\"uint256\"}],\"name\":\"BatchMetadataUpdate\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"beacon\",\"type\":\"address\"}],\"name\":\"BeaconUpgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_tokenId\",\"type\":\"uint256\"}],\"name\":\"MetadataUpdate\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"privilegeId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"enabled\",\"type\":\"bool\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"description\",\"type\":\"string\"}],\"name\":\"PrivilegeCreated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"privilegeId\",\"type\":\"uint256\"}],\"name\":\"PrivilegeDisabled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"privilegeId\",\"type\":\"uint256\"}],\"name\":\"PrivilegeEnabled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"version\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"privId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"expires\",\"type\":\"uint256\"}],\"name\":\"PrivilegeSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"previousAdminRole\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"newAdminRole\",\"type\":\"bytes32\"}],\"name\":\"RoleAdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleGranted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleRevoked\",\"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\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"BURNER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MINTER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"TRANSFERER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"UPGRADER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"_dimoRegistry\",\"outputs\":[{\"internalType\":\"contractIDimoRegistry\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"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\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"burn\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"enabled\",\"type\":\"bool\"},{\"internalType\":\"string\",\"name\":\"description\",\"type\":\"string\"}],\"name\":\"createPrivilege\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"privId\",\"type\":\"uint256\"}],\"name\":\"disablePrivilege\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"privId\",\"type\":\"uint256\"}],\"name\":\"enablePrivilege\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"exists\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"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\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"getDefinitionURI\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"definitionURI\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleAdmin\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"grantRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"privId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"}],\"name\":\"hasPrivilege\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"hasRole\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"name_\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"symbol_\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"baseUri_\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"dimoRegistry_\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"trustedForwarders_\",\"type\":\"address[]\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"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\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"privilegeEntry\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"privId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"}],\"name\":\"privilegeExpiresAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"privilegeRecord\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"enabled\",\"type\":\"bool\"},{\"internalType\":\"string\",\"name\":\"description\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"proxiableUUID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"renounceRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"returnToManufacturer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"revokeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"safeMint\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"uri\",\"type\":\"string\"}],\"name\":\"safeMint\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"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\":\"string\",\"name\":\"baseURI_\",\"type\":\"string\"}],\"name\":\"setBaseURI\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"setDimoRegistryAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"privId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"expires\",\"type\":\"uint256\"}],\"name\":\"setPrivilege\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"privId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"expires\",\"type\":\"uint256\"}],\"internalType\":\"structMultiPrivilege.SetPrivilegeData[]\",\"name\":\"privData\",\"type\":\"tuple[]\"}],\"name\":\"setPrivileges\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"trusted\",\"type\":\"bool\"}],\"name\":\"setTrustedForwarder\",\"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\":\"\",\"type\":\"uint256\"}],\"name\":\"tokenIdToVersion\",\"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\":[{\"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\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"trustedForwarders\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"}]", + ID: "AftermarketDeviceId", +} + +// AftermarketDeviceId is an auto generated Go binding around an Ethereum contract. +type AftermarketDeviceId struct { + abi abi.ABI +} + +// NewAftermarketDeviceId creates a new instance of AftermarketDeviceId. +func NewAftermarketDeviceId() *AftermarketDeviceId { + parsed, err := AftermarketDeviceIdMetaData.ParseABI() + if err != nil { + panic(errors.New("invalid ABI: " + err.Error())) + } + return &AftermarketDeviceId{abi: *parsed} +} + +// Instance creates a wrapper for a deployed contract instance at the given address. +// Use this to create the instance object passed to abigen v2 library functions Call, Transact, etc. +func (c *AftermarketDeviceId) Instance(backend bind.ContractBackend, addr common.Address) *bind.BoundContract { + return bind.NewBoundContract(addr, c.abi, backend, backend, backend) +} + +// PackADMINROLE is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x75b238fc. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function ADMIN_ROLE() view returns(bytes32) +func (aftermarketDeviceId *AftermarketDeviceId) PackADMINROLE() []byte { + enc, err := aftermarketDeviceId.abi.Pack("ADMIN_ROLE") + if err != nil { + panic(err) + } + return enc +} + +// TryPackADMINROLE is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x75b238fc. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function ADMIN_ROLE() view returns(bytes32) +func (aftermarketDeviceId *AftermarketDeviceId) TryPackADMINROLE() ([]byte, error) { + return aftermarketDeviceId.abi.Pack("ADMIN_ROLE") +} + +// UnpackADMINROLE is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0x75b238fc. +// +// Solidity: function ADMIN_ROLE() view returns(bytes32) +func (aftermarketDeviceId *AftermarketDeviceId) UnpackADMINROLE(data []byte) ([32]byte, error) { + out, err := aftermarketDeviceId.abi.Unpack("ADMIN_ROLE", data) + if err != nil { + return *new([32]byte), err + } + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + return out0, nil +} + +// PackBURNERROLE is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x282c51f3. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function BURNER_ROLE() view returns(bytes32) +func (aftermarketDeviceId *AftermarketDeviceId) PackBURNERROLE() []byte { + enc, err := aftermarketDeviceId.abi.Pack("BURNER_ROLE") + if err != nil { + panic(err) + } + return enc +} + +// TryPackBURNERROLE is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x282c51f3. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function BURNER_ROLE() view returns(bytes32) +func (aftermarketDeviceId *AftermarketDeviceId) TryPackBURNERROLE() ([]byte, error) { + return aftermarketDeviceId.abi.Pack("BURNER_ROLE") +} + +// UnpackBURNERROLE is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0x282c51f3. +// +// Solidity: function BURNER_ROLE() view returns(bytes32) +func (aftermarketDeviceId *AftermarketDeviceId) UnpackBURNERROLE(data []byte) ([32]byte, error) { + out, err := aftermarketDeviceId.abi.Unpack("BURNER_ROLE", data) + if err != nil { + return *new([32]byte), err + } + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + return out0, nil +} + +// PackDEFAULTADMINROLE is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xa217fddf. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function DEFAULT_ADMIN_ROLE() view returns(bytes32) +func (aftermarketDeviceId *AftermarketDeviceId) PackDEFAULTADMINROLE() []byte { + enc, err := aftermarketDeviceId.abi.Pack("DEFAULT_ADMIN_ROLE") + if err != nil { + panic(err) + } + return enc +} + +// TryPackDEFAULTADMINROLE is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xa217fddf. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function DEFAULT_ADMIN_ROLE() view returns(bytes32) +func (aftermarketDeviceId *AftermarketDeviceId) TryPackDEFAULTADMINROLE() ([]byte, error) { + return aftermarketDeviceId.abi.Pack("DEFAULT_ADMIN_ROLE") +} + +// UnpackDEFAULTADMINROLE is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0xa217fddf. +// +// Solidity: function DEFAULT_ADMIN_ROLE() view returns(bytes32) +func (aftermarketDeviceId *AftermarketDeviceId) UnpackDEFAULTADMINROLE(data []byte) ([32]byte, error) { + out, err := aftermarketDeviceId.abi.Unpack("DEFAULT_ADMIN_ROLE", data) + if err != nil { + return *new([32]byte), err + } + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + return out0, nil +} + +// PackMINTERROLE is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xd5391393. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function MINTER_ROLE() view returns(bytes32) +func (aftermarketDeviceId *AftermarketDeviceId) PackMINTERROLE() []byte { + enc, err := aftermarketDeviceId.abi.Pack("MINTER_ROLE") + if err != nil { + panic(err) + } + return enc +} + +// TryPackMINTERROLE is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xd5391393. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function MINTER_ROLE() view returns(bytes32) +func (aftermarketDeviceId *AftermarketDeviceId) TryPackMINTERROLE() ([]byte, error) { + return aftermarketDeviceId.abi.Pack("MINTER_ROLE") +} + +// UnpackMINTERROLE is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0xd5391393. +// +// Solidity: function MINTER_ROLE() view returns(bytes32) +func (aftermarketDeviceId *AftermarketDeviceId) UnpackMINTERROLE(data []byte) ([32]byte, error) { + out, err := aftermarketDeviceId.abi.Unpack("MINTER_ROLE", data) + if err != nil { + return *new([32]byte), err + } + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + return out0, nil +} + +// PackTRANSFERERROLE is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x0ade7dc1. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function TRANSFERER_ROLE() view returns(bytes32) +func (aftermarketDeviceId *AftermarketDeviceId) PackTRANSFERERROLE() []byte { + enc, err := aftermarketDeviceId.abi.Pack("TRANSFERER_ROLE") + if err != nil { + panic(err) + } + return enc +} + +// TryPackTRANSFERERROLE is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x0ade7dc1. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function TRANSFERER_ROLE() view returns(bytes32) +func (aftermarketDeviceId *AftermarketDeviceId) TryPackTRANSFERERROLE() ([]byte, error) { + return aftermarketDeviceId.abi.Pack("TRANSFERER_ROLE") +} + +// UnpackTRANSFERERROLE is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0x0ade7dc1. +// +// Solidity: function TRANSFERER_ROLE() view returns(bytes32) +func (aftermarketDeviceId *AftermarketDeviceId) UnpackTRANSFERERROLE(data []byte) ([32]byte, error) { + out, err := aftermarketDeviceId.abi.Unpack("TRANSFERER_ROLE", data) + if err != nil { + return *new([32]byte), err + } + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + return out0, nil +} + +// PackUPGRADERROLE is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xf72c0d8b. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function UPGRADER_ROLE() view returns(bytes32) +func (aftermarketDeviceId *AftermarketDeviceId) PackUPGRADERROLE() []byte { + enc, err := aftermarketDeviceId.abi.Pack("UPGRADER_ROLE") + if err != nil { + panic(err) + } + return enc +} + +// TryPackUPGRADERROLE is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xf72c0d8b. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function UPGRADER_ROLE() view returns(bytes32) +func (aftermarketDeviceId *AftermarketDeviceId) TryPackUPGRADERROLE() ([]byte, error) { + return aftermarketDeviceId.abi.Pack("UPGRADER_ROLE") +} + +// UnpackUPGRADERROLE is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0xf72c0d8b. +// +// Solidity: function UPGRADER_ROLE() view returns(bytes32) +func (aftermarketDeviceId *AftermarketDeviceId) UnpackUPGRADERROLE(data []byte) ([32]byte, error) { + out, err := aftermarketDeviceId.abi.Unpack("UPGRADER_ROLE", data) + if err != nil { + return *new([32]byte), err + } + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + return out0, nil +} + +// PackDimoRegistry is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x7625c605. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function _dimoRegistry() view returns(address) +func (aftermarketDeviceId *AftermarketDeviceId) PackDimoRegistry() []byte { + enc, err := aftermarketDeviceId.abi.Pack("_dimoRegistry") + if err != nil { + panic(err) + } + return enc +} + +// TryPackDimoRegistry is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x7625c605. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function _dimoRegistry() view returns(address) +func (aftermarketDeviceId *AftermarketDeviceId) TryPackDimoRegistry() ([]byte, error) { + return aftermarketDeviceId.abi.Pack("_dimoRegistry") +} + +// UnpackDimoRegistry is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0x7625c605. +// +// Solidity: function _dimoRegistry() view returns(address) +func (aftermarketDeviceId *AftermarketDeviceId) UnpackDimoRegistry(data []byte) (common.Address, error) { + out, err := aftermarketDeviceId.abi.Unpack("_dimoRegistry", data) + if err != nil { + return *new(common.Address), err + } + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + return out0, nil +} + +// PackApprove is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x095ea7b3. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function approve(address to, uint256 tokenId) returns() +func (aftermarketDeviceId *AftermarketDeviceId) PackApprove(to common.Address, tokenId *big.Int) []byte { + enc, err := aftermarketDeviceId.abi.Pack("approve", to, tokenId) + if err != nil { + panic(err) + } + return enc +} + +// TryPackApprove is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x095ea7b3. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function approve(address to, uint256 tokenId) returns() +func (aftermarketDeviceId *AftermarketDeviceId) TryPackApprove(to common.Address, tokenId *big.Int) ([]byte, error) { + return aftermarketDeviceId.abi.Pack("approve", to, tokenId) +} + +// PackBalanceOf is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x70a08231. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function balanceOf(address owner) view returns(uint256) +func (aftermarketDeviceId *AftermarketDeviceId) PackBalanceOf(owner common.Address) []byte { + enc, err := aftermarketDeviceId.abi.Pack("balanceOf", owner) + if err != nil { + panic(err) + } + return enc +} + +// TryPackBalanceOf is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x70a08231. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function balanceOf(address owner) view returns(uint256) +func (aftermarketDeviceId *AftermarketDeviceId) TryPackBalanceOf(owner common.Address) ([]byte, error) { + return aftermarketDeviceId.abi.Pack("balanceOf", owner) +} + +// UnpackBalanceOf is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0x70a08231. +// +// Solidity: function balanceOf(address owner) view returns(uint256) +func (aftermarketDeviceId *AftermarketDeviceId) UnpackBalanceOf(data []byte) (*big.Int, error) { + out, err := aftermarketDeviceId.abi.Unpack("balanceOf", data) + if err != nil { + return new(big.Int), err + } + out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int) + return out0, nil +} + +// PackBurn is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x42966c68. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function burn(uint256 tokenId) returns() +func (aftermarketDeviceId *AftermarketDeviceId) PackBurn(tokenId *big.Int) []byte { + enc, err := aftermarketDeviceId.abi.Pack("burn", tokenId) + if err != nil { + panic(err) + } + return enc +} + +// TryPackBurn is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x42966c68. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function burn(uint256 tokenId) returns() +func (aftermarketDeviceId *AftermarketDeviceId) TryPackBurn(tokenId *big.Int) ([]byte, error) { + return aftermarketDeviceId.abi.Pack("burn", tokenId) +} + +// PackCreatePrivilege is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xc1d58b3b. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function createPrivilege(bool enabled, string description) returns() +func (aftermarketDeviceId *AftermarketDeviceId) PackCreatePrivilege(enabled bool, description string) []byte { + enc, err := aftermarketDeviceId.abi.Pack("createPrivilege", enabled, description) + if err != nil { + panic(err) + } + return enc +} + +// TryPackCreatePrivilege is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xc1d58b3b. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function createPrivilege(bool enabled, string description) returns() +func (aftermarketDeviceId *AftermarketDeviceId) TryPackCreatePrivilege(enabled bool, description string) ([]byte, error) { + return aftermarketDeviceId.abi.Pack("createPrivilege", enabled, description) +} + +// PackDisablePrivilege is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x1a153ed0. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function disablePrivilege(uint256 privId) returns() +func (aftermarketDeviceId *AftermarketDeviceId) PackDisablePrivilege(privId *big.Int) []byte { + enc, err := aftermarketDeviceId.abi.Pack("disablePrivilege", privId) + if err != nil { + panic(err) + } + return enc +} + +// TryPackDisablePrivilege is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x1a153ed0. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function disablePrivilege(uint256 privId) returns() +func (aftermarketDeviceId *AftermarketDeviceId) TryPackDisablePrivilege(privId *big.Int) ([]byte, error) { + return aftermarketDeviceId.abi.Pack("disablePrivilege", privId) +} + +// PackEnablePrivilege is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x831ba696. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function enablePrivilege(uint256 privId) returns() +func (aftermarketDeviceId *AftermarketDeviceId) PackEnablePrivilege(privId *big.Int) []byte { + enc, err := aftermarketDeviceId.abi.Pack("enablePrivilege", privId) + if err != nil { + panic(err) + } + return enc +} + +// TryPackEnablePrivilege is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x831ba696. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function enablePrivilege(uint256 privId) returns() +func (aftermarketDeviceId *AftermarketDeviceId) TryPackEnablePrivilege(privId *big.Int) ([]byte, error) { + return aftermarketDeviceId.abi.Pack("enablePrivilege", privId) +} + +// PackExists is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x4f558e79. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function exists(uint256 tokenId) view returns(bool) +func (aftermarketDeviceId *AftermarketDeviceId) PackExists(tokenId *big.Int) []byte { + enc, err := aftermarketDeviceId.abi.Pack("exists", tokenId) + if err != nil { + panic(err) + } + return enc +} + +// TryPackExists is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x4f558e79. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function exists(uint256 tokenId) view returns(bool) +func (aftermarketDeviceId *AftermarketDeviceId) TryPackExists(tokenId *big.Int) ([]byte, error) { + return aftermarketDeviceId.abi.Pack("exists", tokenId) +} + +// UnpackExists is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0x4f558e79. +// +// Solidity: function exists(uint256 tokenId) view returns(bool) +func (aftermarketDeviceId *AftermarketDeviceId) UnpackExists(data []byte) (bool, error) { + out, err := aftermarketDeviceId.abi.Unpack("exists", data) + if err != nil { + return *new(bool), err + } + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + return out0, nil +} + +// PackGetApproved is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x081812fc. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function getApproved(uint256 tokenId) view returns(address) +func (aftermarketDeviceId *AftermarketDeviceId) PackGetApproved(tokenId *big.Int) []byte { + enc, err := aftermarketDeviceId.abi.Pack("getApproved", tokenId) + if err != nil { + panic(err) + } + return enc +} + +// TryPackGetApproved is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x081812fc. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function getApproved(uint256 tokenId) view returns(address) +func (aftermarketDeviceId *AftermarketDeviceId) TryPackGetApproved(tokenId *big.Int) ([]byte, error) { + return aftermarketDeviceId.abi.Pack("getApproved", tokenId) +} + +// UnpackGetApproved is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0x081812fc. +// +// Solidity: function getApproved(uint256 tokenId) view returns(address) +func (aftermarketDeviceId *AftermarketDeviceId) UnpackGetApproved(data []byte) (common.Address, error) { + out, err := aftermarketDeviceId.abi.Unpack("getApproved", data) + if err != nil { + return *new(common.Address), err + } + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + return out0, nil +} + +// PackGetDefinitionURI is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x9b12f1c9. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function getDefinitionURI(uint256 tokenId) view returns(string definitionURI) +func (aftermarketDeviceId *AftermarketDeviceId) PackGetDefinitionURI(tokenId *big.Int) []byte { + enc, err := aftermarketDeviceId.abi.Pack("getDefinitionURI", tokenId) + if err != nil { + panic(err) + } + return enc +} + +// TryPackGetDefinitionURI is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x9b12f1c9. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function getDefinitionURI(uint256 tokenId) view returns(string definitionURI) +func (aftermarketDeviceId *AftermarketDeviceId) TryPackGetDefinitionURI(tokenId *big.Int) ([]byte, error) { + return aftermarketDeviceId.abi.Pack("getDefinitionURI", tokenId) +} + +// UnpackGetDefinitionURI is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0x9b12f1c9. +// +// Solidity: function getDefinitionURI(uint256 tokenId) view returns(string definitionURI) +func (aftermarketDeviceId *AftermarketDeviceId) UnpackGetDefinitionURI(data []byte) (string, error) { + out, err := aftermarketDeviceId.abi.Unpack("getDefinitionURI", data) + if err != nil { + return *new(string), err + } + out0 := *abi.ConvertType(out[0], new(string)).(*string) + return out0, nil +} + +// PackGetRoleAdmin is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x248a9ca3. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function getRoleAdmin(bytes32 role) view returns(bytes32) +func (aftermarketDeviceId *AftermarketDeviceId) PackGetRoleAdmin(role [32]byte) []byte { + enc, err := aftermarketDeviceId.abi.Pack("getRoleAdmin", role) + if err != nil { + panic(err) + } + return enc +} + +// TryPackGetRoleAdmin is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x248a9ca3. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function getRoleAdmin(bytes32 role) view returns(bytes32) +func (aftermarketDeviceId *AftermarketDeviceId) TryPackGetRoleAdmin(role [32]byte) ([]byte, error) { + return aftermarketDeviceId.abi.Pack("getRoleAdmin", role) +} + +// UnpackGetRoleAdmin is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0x248a9ca3. +// +// Solidity: function getRoleAdmin(bytes32 role) view returns(bytes32) +func (aftermarketDeviceId *AftermarketDeviceId) UnpackGetRoleAdmin(data []byte) ([32]byte, error) { + out, err := aftermarketDeviceId.abi.Unpack("getRoleAdmin", data) + if err != nil { + return *new([32]byte), err + } + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + return out0, nil +} + +// PackGrantRole is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x2f2ff15d. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function grantRole(bytes32 role, address account) returns() +func (aftermarketDeviceId *AftermarketDeviceId) PackGrantRole(role [32]byte, account common.Address) []byte { + enc, err := aftermarketDeviceId.abi.Pack("grantRole", role, account) + if err != nil { + panic(err) + } + return enc +} + +// TryPackGrantRole is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x2f2ff15d. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function grantRole(bytes32 role, address account) returns() +func (aftermarketDeviceId *AftermarketDeviceId) TryPackGrantRole(role [32]byte, account common.Address) ([]byte, error) { + return aftermarketDeviceId.abi.Pack("grantRole", role, account) +} + +// PackHasPrivilege is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x05d80b00. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function hasPrivilege(uint256 tokenId, uint256 privId, address user) view returns(bool) +func (aftermarketDeviceId *AftermarketDeviceId) PackHasPrivilege(tokenId *big.Int, privId *big.Int, user common.Address) []byte { + enc, err := aftermarketDeviceId.abi.Pack("hasPrivilege", tokenId, privId, user) + if err != nil { + panic(err) + } + return enc +} + +// TryPackHasPrivilege is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x05d80b00. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function hasPrivilege(uint256 tokenId, uint256 privId, address user) view returns(bool) +func (aftermarketDeviceId *AftermarketDeviceId) TryPackHasPrivilege(tokenId *big.Int, privId *big.Int, user common.Address) ([]byte, error) { + return aftermarketDeviceId.abi.Pack("hasPrivilege", tokenId, privId, user) +} + +// UnpackHasPrivilege is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0x05d80b00. +// +// Solidity: function hasPrivilege(uint256 tokenId, uint256 privId, address user) view returns(bool) +func (aftermarketDeviceId *AftermarketDeviceId) UnpackHasPrivilege(data []byte) (bool, error) { + out, err := aftermarketDeviceId.abi.Unpack("hasPrivilege", data) + if err != nil { + return *new(bool), err + } + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + return out0, nil +} + +// PackHasRole is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x91d14854. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function hasRole(bytes32 role, address account) view returns(bool) +func (aftermarketDeviceId *AftermarketDeviceId) PackHasRole(role [32]byte, account common.Address) []byte { + enc, err := aftermarketDeviceId.abi.Pack("hasRole", role, account) + if err != nil { + panic(err) + } + return enc +} + +// TryPackHasRole is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x91d14854. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function hasRole(bytes32 role, address account) view returns(bool) +func (aftermarketDeviceId *AftermarketDeviceId) TryPackHasRole(role [32]byte, account common.Address) ([]byte, error) { + return aftermarketDeviceId.abi.Pack("hasRole", role, account) +} + +// UnpackHasRole is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0x91d14854. +// +// Solidity: function hasRole(bytes32 role, address account) view returns(bool) +func (aftermarketDeviceId *AftermarketDeviceId) UnpackHasRole(data []byte) (bool, error) { + out, err := aftermarketDeviceId.abi.Unpack("hasRole", data) + if err != nil { + return *new(bool), err + } + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + return out0, nil +} + +// PackInitialize is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x2cd0213f. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function initialize(string name_, string symbol_, string baseUri_, address dimoRegistry_, address[] trustedForwarders_) returns() +func (aftermarketDeviceId *AftermarketDeviceId) PackInitialize(name string, symbol string, baseUri string, dimoRegistry common.Address, trustedForwarders []common.Address) []byte { + enc, err := aftermarketDeviceId.abi.Pack("initialize", name, symbol, baseUri, dimoRegistry, trustedForwarders) + if err != nil { + panic(err) + } + return enc +} + +// TryPackInitialize is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x2cd0213f. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function initialize(string name_, string symbol_, string baseUri_, address dimoRegistry_, address[] trustedForwarders_) returns() +func (aftermarketDeviceId *AftermarketDeviceId) TryPackInitialize(name string, symbol string, baseUri string, dimoRegistry common.Address, trustedForwarders []common.Address) ([]byte, error) { + return aftermarketDeviceId.abi.Pack("initialize", name, symbol, baseUri, dimoRegistry, trustedForwarders) +} + +// PackIsApprovedForAll is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xe985e9c5. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function isApprovedForAll(address owner, address operator) view returns(bool) +func (aftermarketDeviceId *AftermarketDeviceId) PackIsApprovedForAll(owner common.Address, operator common.Address) []byte { + enc, err := aftermarketDeviceId.abi.Pack("isApprovedForAll", owner, operator) + if err != nil { + panic(err) + } + return enc +} + +// TryPackIsApprovedForAll is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xe985e9c5. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function isApprovedForAll(address owner, address operator) view returns(bool) +func (aftermarketDeviceId *AftermarketDeviceId) TryPackIsApprovedForAll(owner common.Address, operator common.Address) ([]byte, error) { + return aftermarketDeviceId.abi.Pack("isApprovedForAll", owner, operator) +} + +// UnpackIsApprovedForAll is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0xe985e9c5. +// +// Solidity: function isApprovedForAll(address owner, address operator) view returns(bool) +func (aftermarketDeviceId *AftermarketDeviceId) UnpackIsApprovedForAll(data []byte) (bool, error) { + out, err := aftermarketDeviceId.abi.Unpack("isApprovedForAll", data) + if err != nil { + return *new(bool), err + } + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + return out0, nil +} + +// PackName is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x06fdde03. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function name() view returns(string) +func (aftermarketDeviceId *AftermarketDeviceId) PackName() []byte { + enc, err := aftermarketDeviceId.abi.Pack("name") + if err != nil { + panic(err) + } + return enc +} + +// TryPackName is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x06fdde03. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function name() view returns(string) +func (aftermarketDeviceId *AftermarketDeviceId) TryPackName() ([]byte, error) { + return aftermarketDeviceId.abi.Pack("name") +} + +// UnpackName is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0x06fdde03. +// +// Solidity: function name() view returns(string) +func (aftermarketDeviceId *AftermarketDeviceId) UnpackName(data []byte) (string, error) { + out, err := aftermarketDeviceId.abi.Unpack("name", data) + if err != nil { + return *new(string), err + } + out0 := *abi.ConvertType(out[0], new(string)).(*string) + return out0, nil +} + +// PackOwnerOf is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x6352211e. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function ownerOf(uint256 tokenId) view returns(address) +func (aftermarketDeviceId *AftermarketDeviceId) PackOwnerOf(tokenId *big.Int) []byte { + enc, err := aftermarketDeviceId.abi.Pack("ownerOf", tokenId) + if err != nil { + panic(err) + } + return enc +} + +// TryPackOwnerOf is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x6352211e. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function ownerOf(uint256 tokenId) view returns(address) +func (aftermarketDeviceId *AftermarketDeviceId) TryPackOwnerOf(tokenId *big.Int) ([]byte, error) { + return aftermarketDeviceId.abi.Pack("ownerOf", tokenId) +} + +// UnpackOwnerOf is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0x6352211e. +// +// Solidity: function ownerOf(uint256 tokenId) view returns(address) +func (aftermarketDeviceId *AftermarketDeviceId) UnpackOwnerOf(data []byte) (common.Address, error) { + out, err := aftermarketDeviceId.abi.Unpack("ownerOf", data) + if err != nil { + return *new(common.Address), err + } + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + return out0, nil +} + +// PackPrivilegeEntry is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x48db4640. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function privilegeEntry(uint256 , uint256 , uint256 , address ) view returns(uint256) +func (aftermarketDeviceId *AftermarketDeviceId) PackPrivilegeEntry(arg0 *big.Int, arg1 *big.Int, arg2 *big.Int, arg3 common.Address) []byte { + enc, err := aftermarketDeviceId.abi.Pack("privilegeEntry", arg0, arg1, arg2, arg3) + if err != nil { + panic(err) + } + return enc +} + +// TryPackPrivilegeEntry is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x48db4640. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function privilegeEntry(uint256 , uint256 , uint256 , address ) view returns(uint256) +func (aftermarketDeviceId *AftermarketDeviceId) TryPackPrivilegeEntry(arg0 *big.Int, arg1 *big.Int, arg2 *big.Int, arg3 common.Address) ([]byte, error) { + return aftermarketDeviceId.abi.Pack("privilegeEntry", arg0, arg1, arg2, arg3) +} + +// UnpackPrivilegeEntry is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0x48db4640. +// +// Solidity: function privilegeEntry(uint256 , uint256 , uint256 , address ) view returns(uint256) +func (aftermarketDeviceId *AftermarketDeviceId) UnpackPrivilegeEntry(data []byte) (*big.Int, error) { + out, err := aftermarketDeviceId.abi.Unpack("privilegeEntry", data) + if err != nil { + return new(big.Int), err + } + out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int) + return out0, nil +} + +// PackPrivilegeExpiresAt is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xd0f8f5f6. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function privilegeExpiresAt(uint256 tokenId, uint256 privId, address user) view returns(uint256) +func (aftermarketDeviceId *AftermarketDeviceId) PackPrivilegeExpiresAt(tokenId *big.Int, privId *big.Int, user common.Address) []byte { + enc, err := aftermarketDeviceId.abi.Pack("privilegeExpiresAt", tokenId, privId, user) + if err != nil { + panic(err) + } + return enc +} + +// TryPackPrivilegeExpiresAt is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xd0f8f5f6. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function privilegeExpiresAt(uint256 tokenId, uint256 privId, address user) view returns(uint256) +func (aftermarketDeviceId *AftermarketDeviceId) TryPackPrivilegeExpiresAt(tokenId *big.Int, privId *big.Int, user common.Address) ([]byte, error) { + return aftermarketDeviceId.abi.Pack("privilegeExpiresAt", tokenId, privId, user) +} + +// UnpackPrivilegeExpiresAt is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0xd0f8f5f6. +// +// Solidity: function privilegeExpiresAt(uint256 tokenId, uint256 privId, address user) view returns(uint256) +func (aftermarketDeviceId *AftermarketDeviceId) UnpackPrivilegeExpiresAt(data []byte) (*big.Int, error) { + out, err := aftermarketDeviceId.abi.Unpack("privilegeExpiresAt", data) + if err != nil { + return new(big.Int), err + } + out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int) + return out0, nil +} + +// PackPrivilegeRecord is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xf9ad3efe. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function privilegeRecord(uint256 ) view returns(bool enabled, string description) +func (aftermarketDeviceId *AftermarketDeviceId) PackPrivilegeRecord(arg0 *big.Int) []byte { + enc, err := aftermarketDeviceId.abi.Pack("privilegeRecord", arg0) + if err != nil { + panic(err) + } + return enc +} + +// TryPackPrivilegeRecord is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xf9ad3efe. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function privilegeRecord(uint256 ) view returns(bool enabled, string description) +func (aftermarketDeviceId *AftermarketDeviceId) TryPackPrivilegeRecord(arg0 *big.Int) ([]byte, error) { + return aftermarketDeviceId.abi.Pack("privilegeRecord", arg0) +} + +// PrivilegeRecordOutput serves as a container for the return parameters of contract +// method PrivilegeRecord. +type PrivilegeRecordOutput struct { + Enabled bool + Description string +} + +// UnpackPrivilegeRecord is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0xf9ad3efe. +// +// Solidity: function privilegeRecord(uint256 ) view returns(bool enabled, string description) +func (aftermarketDeviceId *AftermarketDeviceId) UnpackPrivilegeRecord(data []byte) (PrivilegeRecordOutput, error) { + out, err := aftermarketDeviceId.abi.Unpack("privilegeRecord", data) + outstruct := new(PrivilegeRecordOutput) + if err != nil { + return *outstruct, err + } + outstruct.Enabled = *abi.ConvertType(out[0], new(bool)).(*bool) + outstruct.Description = *abi.ConvertType(out[1], new(string)).(*string) + return *outstruct, nil +} + +// PackProxiableUUID is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x52d1902d. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function proxiableUUID() view returns(bytes32) +func (aftermarketDeviceId *AftermarketDeviceId) PackProxiableUUID() []byte { + enc, err := aftermarketDeviceId.abi.Pack("proxiableUUID") + if err != nil { + panic(err) + } + return enc +} + +// TryPackProxiableUUID is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x52d1902d. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function proxiableUUID() view returns(bytes32) +func (aftermarketDeviceId *AftermarketDeviceId) TryPackProxiableUUID() ([]byte, error) { + return aftermarketDeviceId.abi.Pack("proxiableUUID") +} + +// UnpackProxiableUUID is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0x52d1902d. +// +// Solidity: function proxiableUUID() view returns(bytes32) +func (aftermarketDeviceId *AftermarketDeviceId) UnpackProxiableUUID(data []byte) ([32]byte, error) { + out, err := aftermarketDeviceId.abi.Unpack("proxiableUUID", data) + if err != nil { + return *new([32]byte), err + } + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + return out0, nil +} + +// PackRenounceRole is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x36568abe. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function renounceRole(bytes32 role, address account) returns() +func (aftermarketDeviceId *AftermarketDeviceId) PackRenounceRole(role [32]byte, account common.Address) []byte { + enc, err := aftermarketDeviceId.abi.Pack("renounceRole", role, account) + if err != nil { + panic(err) + } + return enc +} + +// TryPackRenounceRole is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x36568abe. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function renounceRole(bytes32 role, address account) returns() +func (aftermarketDeviceId *AftermarketDeviceId) TryPackRenounceRole(role [32]byte, account common.Address) ([]byte, error) { + return aftermarketDeviceId.abi.Pack("renounceRole", role, account) +} + +// PackReturnToManufacturer is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x717fc288. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function returnToManufacturer(uint256 tokenId) returns() +func (aftermarketDeviceId *AftermarketDeviceId) PackReturnToManufacturer(tokenId *big.Int) []byte { + enc, err := aftermarketDeviceId.abi.Pack("returnToManufacturer", tokenId) + if err != nil { + panic(err) + } + return enc +} + +// TryPackReturnToManufacturer is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x717fc288. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function returnToManufacturer(uint256 tokenId) returns() +func (aftermarketDeviceId *AftermarketDeviceId) TryPackReturnToManufacturer(tokenId *big.Int) ([]byte, error) { + return aftermarketDeviceId.abi.Pack("returnToManufacturer", tokenId) +} + +// PackRevokeRole is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xd547741f. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function revokeRole(bytes32 role, address account) returns() +func (aftermarketDeviceId *AftermarketDeviceId) PackRevokeRole(role [32]byte, account common.Address) []byte { + enc, err := aftermarketDeviceId.abi.Pack("revokeRole", role, account) + if err != nil { + panic(err) + } + return enc +} + +// TryPackRevokeRole is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xd547741f. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function revokeRole(bytes32 role, address account) returns() +func (aftermarketDeviceId *AftermarketDeviceId) TryPackRevokeRole(role [32]byte, account common.Address) ([]byte, error) { + return aftermarketDeviceId.abi.Pack("revokeRole", role, account) +} + +// PackSafeMint is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x40d097c3. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function safeMint(address to) returns(uint256 tokenId) +func (aftermarketDeviceId *AftermarketDeviceId) PackSafeMint(to common.Address) []byte { + enc, err := aftermarketDeviceId.abi.Pack("safeMint", to) + if err != nil { + panic(err) + } + return enc +} + +// TryPackSafeMint is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x40d097c3. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function safeMint(address to) returns(uint256 tokenId) +func (aftermarketDeviceId *AftermarketDeviceId) TryPackSafeMint(to common.Address) ([]byte, error) { + return aftermarketDeviceId.abi.Pack("safeMint", to) +} + +// UnpackSafeMint is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0x40d097c3. +// +// Solidity: function safeMint(address to) returns(uint256 tokenId) +func (aftermarketDeviceId *AftermarketDeviceId) UnpackSafeMint(data []byte) (*big.Int, error) { + out, err := aftermarketDeviceId.abi.Unpack("safeMint", data) + if err != nil { + return new(big.Int), err + } + out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int) + return out0, nil +} + +// PackSafeMint0 is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xd204c45e. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function safeMint(address to, string uri) returns(uint256 tokenId) +func (aftermarketDeviceId *AftermarketDeviceId) PackSafeMint0(to common.Address, uri string) []byte { + enc, err := aftermarketDeviceId.abi.Pack("safeMint0", to, uri) + if err != nil { + panic(err) + } + return enc +} + +// TryPackSafeMint0 is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xd204c45e. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function safeMint(address to, string uri) returns(uint256 tokenId) +func (aftermarketDeviceId *AftermarketDeviceId) TryPackSafeMint0(to common.Address, uri string) ([]byte, error) { + return aftermarketDeviceId.abi.Pack("safeMint0", to, uri) +} + +// UnpackSafeMint0 is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0xd204c45e. +// +// Solidity: function safeMint(address to, string uri) returns(uint256 tokenId) +func (aftermarketDeviceId *AftermarketDeviceId) UnpackSafeMint0(data []byte) (*big.Int, error) { + out, err := aftermarketDeviceId.abi.Unpack("safeMint0", data) + if err != nil { + return new(big.Int), err + } + out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int) + return out0, nil +} + +// PackSafeTransferFrom is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x42842e0e. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function safeTransferFrom(address from, address to, uint256 tokenId) returns() +func (aftermarketDeviceId *AftermarketDeviceId) PackSafeTransferFrom(from common.Address, to common.Address, tokenId *big.Int) []byte { + enc, err := aftermarketDeviceId.abi.Pack("safeTransferFrom", from, to, tokenId) + if err != nil { + panic(err) + } + return enc +} + +// TryPackSafeTransferFrom is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x42842e0e. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function safeTransferFrom(address from, address to, uint256 tokenId) returns() +func (aftermarketDeviceId *AftermarketDeviceId) TryPackSafeTransferFrom(from common.Address, to common.Address, tokenId *big.Int) ([]byte, error) { + return aftermarketDeviceId.abi.Pack("safeTransferFrom", from, to, tokenId) +} + +// PackSafeTransferFrom0 is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xb88d4fde. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function safeTransferFrom(address from, address to, uint256 tokenId, bytes data) returns() +func (aftermarketDeviceId *AftermarketDeviceId) PackSafeTransferFrom0(from common.Address, to common.Address, tokenId *big.Int, data []byte) []byte { + enc, err := aftermarketDeviceId.abi.Pack("safeTransferFrom0", from, to, tokenId, data) + if err != nil { + panic(err) + } + return enc +} + +// TryPackSafeTransferFrom0 is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xb88d4fde. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function safeTransferFrom(address from, address to, uint256 tokenId, bytes data) returns() +func (aftermarketDeviceId *AftermarketDeviceId) TryPackSafeTransferFrom0(from common.Address, to common.Address, tokenId *big.Int, data []byte) ([]byte, error) { + return aftermarketDeviceId.abi.Pack("safeTransferFrom0", from, to, tokenId, data) +} + +// PackSetApprovalForAll is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xa22cb465. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function setApprovalForAll(address operator, bool approved) returns() +func (aftermarketDeviceId *AftermarketDeviceId) PackSetApprovalForAll(operator common.Address, approved bool) []byte { + enc, err := aftermarketDeviceId.abi.Pack("setApprovalForAll", operator, approved) + if err != nil { + panic(err) + } + return enc +} + +// TryPackSetApprovalForAll is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xa22cb465. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function setApprovalForAll(address operator, bool approved) returns() +func (aftermarketDeviceId *AftermarketDeviceId) TryPackSetApprovalForAll(operator common.Address, approved bool) ([]byte, error) { + return aftermarketDeviceId.abi.Pack("setApprovalForAll", operator, approved) +} + +// PackSetBaseURI is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x55f804b3. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function setBaseURI(string baseURI_) returns() +func (aftermarketDeviceId *AftermarketDeviceId) PackSetBaseURI(baseURI string) []byte { + enc, err := aftermarketDeviceId.abi.Pack("setBaseURI", baseURI) + if err != nil { + panic(err) + } + return enc +} + +// TryPackSetBaseURI is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x55f804b3. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function setBaseURI(string baseURI_) returns() +func (aftermarketDeviceId *AftermarketDeviceId) TryPackSetBaseURI(baseURI string) ([]byte, error) { + return aftermarketDeviceId.abi.Pack("setBaseURI", baseURI) +} + +// PackSetDimoRegistryAddress is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x0db857ea. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function setDimoRegistryAddress(address addr) returns() +func (aftermarketDeviceId *AftermarketDeviceId) PackSetDimoRegistryAddress(addr common.Address) []byte { + enc, err := aftermarketDeviceId.abi.Pack("setDimoRegistryAddress", addr) + if err != nil { + panic(err) + } + return enc +} + +// TryPackSetDimoRegistryAddress is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x0db857ea. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function setDimoRegistryAddress(address addr) returns() +func (aftermarketDeviceId *AftermarketDeviceId) TryPackSetDimoRegistryAddress(addr common.Address) ([]byte, error) { + return aftermarketDeviceId.abi.Pack("setDimoRegistryAddress", addr) +} + +// PackSetPrivilege is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xeca3221a. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function setPrivilege(uint256 tokenId, uint256 privId, address user, uint256 expires) returns() +func (aftermarketDeviceId *AftermarketDeviceId) PackSetPrivilege(tokenId *big.Int, privId *big.Int, user common.Address, expires *big.Int) []byte { + enc, err := aftermarketDeviceId.abi.Pack("setPrivilege", tokenId, privId, user, expires) + if err != nil { + panic(err) + } + return enc +} + +// TryPackSetPrivilege is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xeca3221a. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function setPrivilege(uint256 tokenId, uint256 privId, address user, uint256 expires) returns() +func (aftermarketDeviceId *AftermarketDeviceId) TryPackSetPrivilege(tokenId *big.Int, privId *big.Int, user common.Address, expires *big.Int) ([]byte, error) { + return aftermarketDeviceId.abi.Pack("setPrivilege", tokenId, privId, user, expires) +} + +// PackSetPrivileges is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x57ae9754. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function setPrivileges((uint256,uint256,address,uint256)[] privData) returns() +func (aftermarketDeviceId *AftermarketDeviceId) PackSetPrivileges(privData []MultiPrivilegeSetPrivilegeData) []byte { + enc, err := aftermarketDeviceId.abi.Pack("setPrivileges", privData) + if err != nil { + panic(err) + } + return enc +} + +// TryPackSetPrivileges is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x57ae9754. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function setPrivileges((uint256,uint256,address,uint256)[] privData) returns() +func (aftermarketDeviceId *AftermarketDeviceId) TryPackSetPrivileges(privData []MultiPrivilegeSetPrivilegeData) ([]byte, error) { + return aftermarketDeviceId.abi.Pack("setPrivileges", privData) +} + +// PackSetTrustedForwarder is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xe691d03b. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function setTrustedForwarder(address addr, bool trusted) returns() +func (aftermarketDeviceId *AftermarketDeviceId) PackSetTrustedForwarder(addr common.Address, trusted bool) []byte { + enc, err := aftermarketDeviceId.abi.Pack("setTrustedForwarder", addr, trusted) + if err != nil { + panic(err) + } + return enc +} + +// TryPackSetTrustedForwarder is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xe691d03b. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function setTrustedForwarder(address addr, bool trusted) returns() +func (aftermarketDeviceId *AftermarketDeviceId) TryPackSetTrustedForwarder(addr common.Address, trusted bool) ([]byte, error) { + return aftermarketDeviceId.abi.Pack("setTrustedForwarder", addr, trusted) +} + +// PackSupportsInterface is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x01ffc9a7. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function supportsInterface(bytes4 interfaceId) view returns(bool) +func (aftermarketDeviceId *AftermarketDeviceId) PackSupportsInterface(interfaceId [4]byte) []byte { + enc, err := aftermarketDeviceId.abi.Pack("supportsInterface", interfaceId) + if err != nil { + panic(err) + } + return enc +} + +// TryPackSupportsInterface is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x01ffc9a7. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function supportsInterface(bytes4 interfaceId) view returns(bool) +func (aftermarketDeviceId *AftermarketDeviceId) TryPackSupportsInterface(interfaceId [4]byte) ([]byte, error) { + return aftermarketDeviceId.abi.Pack("supportsInterface", interfaceId) +} + +// UnpackSupportsInterface is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0x01ffc9a7. +// +// Solidity: function supportsInterface(bytes4 interfaceId) view returns(bool) +func (aftermarketDeviceId *AftermarketDeviceId) UnpackSupportsInterface(data []byte) (bool, error) { + out, err := aftermarketDeviceId.abi.Unpack("supportsInterface", data) + if err != nil { + return *new(bool), err + } + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + return out0, nil +} + +// PackSymbol is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x95d89b41. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function symbol() view returns(string) +func (aftermarketDeviceId *AftermarketDeviceId) PackSymbol() []byte { + enc, err := aftermarketDeviceId.abi.Pack("symbol") + if err != nil { + panic(err) + } + return enc +} + +// TryPackSymbol is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x95d89b41. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function symbol() view returns(string) +func (aftermarketDeviceId *AftermarketDeviceId) TryPackSymbol() ([]byte, error) { + return aftermarketDeviceId.abi.Pack("symbol") +} + +// UnpackSymbol is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0x95d89b41. +// +// Solidity: function symbol() view returns(string) +func (aftermarketDeviceId *AftermarketDeviceId) UnpackSymbol(data []byte) (string, error) { + out, err := aftermarketDeviceId.abi.Unpack("symbol", data) + if err != nil { + return *new(string), err + } + out0 := *abi.ConvertType(out[0], new(string)).(*string) + return out0, nil +} + +// PackTokenIdToVersion is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xf1a9d41c. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function tokenIdToVersion(uint256 ) view returns(uint256) +func (aftermarketDeviceId *AftermarketDeviceId) PackTokenIdToVersion(arg0 *big.Int) []byte { + enc, err := aftermarketDeviceId.abi.Pack("tokenIdToVersion", arg0) + if err != nil { + panic(err) + } + return enc +} + +// TryPackTokenIdToVersion is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xf1a9d41c. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function tokenIdToVersion(uint256 ) view returns(uint256) +func (aftermarketDeviceId *AftermarketDeviceId) TryPackTokenIdToVersion(arg0 *big.Int) ([]byte, error) { + return aftermarketDeviceId.abi.Pack("tokenIdToVersion", arg0) +} + +// UnpackTokenIdToVersion is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0xf1a9d41c. +// +// Solidity: function tokenIdToVersion(uint256 ) view returns(uint256) +func (aftermarketDeviceId *AftermarketDeviceId) UnpackTokenIdToVersion(data []byte) (*big.Int, error) { + out, err := aftermarketDeviceId.abi.Unpack("tokenIdToVersion", data) + if err != nil { + return new(big.Int), err + } + out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int) + return out0, nil +} + +// PackTokenURI is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xc87b56dd. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function tokenURI(uint256 tokenId) view returns(string) +func (aftermarketDeviceId *AftermarketDeviceId) PackTokenURI(tokenId *big.Int) []byte { + enc, err := aftermarketDeviceId.abi.Pack("tokenURI", tokenId) + if err != nil { + panic(err) + } + return enc +} + +// TryPackTokenURI is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xc87b56dd. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function tokenURI(uint256 tokenId) view returns(string) +func (aftermarketDeviceId *AftermarketDeviceId) TryPackTokenURI(tokenId *big.Int) ([]byte, error) { + return aftermarketDeviceId.abi.Pack("tokenURI", tokenId) +} + +// UnpackTokenURI is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0xc87b56dd. +// +// Solidity: function tokenURI(uint256 tokenId) view returns(string) +func (aftermarketDeviceId *AftermarketDeviceId) UnpackTokenURI(data []byte) (string, error) { + out, err := aftermarketDeviceId.abi.Unpack("tokenURI", data) + if err != nil { + return *new(string), err + } + out0 := *abi.ConvertType(out[0], new(string)).(*string) + return out0, nil +} + +// PackTransferFrom is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x23b872dd. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function transferFrom(address from, address to, uint256 tokenId) returns() +func (aftermarketDeviceId *AftermarketDeviceId) PackTransferFrom(from common.Address, to common.Address, tokenId *big.Int) []byte { + enc, err := aftermarketDeviceId.abi.Pack("transferFrom", from, to, tokenId) + if err != nil { + panic(err) + } + return enc +} + +// TryPackTransferFrom is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x23b872dd. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function transferFrom(address from, address to, uint256 tokenId) returns() +func (aftermarketDeviceId *AftermarketDeviceId) TryPackTransferFrom(from common.Address, to common.Address, tokenId *big.Int) ([]byte, error) { + return aftermarketDeviceId.abi.Pack("transferFrom", from, to, tokenId) +} + +// PackTrustedForwarders is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x54776bb9. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function trustedForwarders(address ) view returns(bool) +func (aftermarketDeviceId *AftermarketDeviceId) PackTrustedForwarders(arg0 common.Address) []byte { + enc, err := aftermarketDeviceId.abi.Pack("trustedForwarders", arg0) + if err != nil { + panic(err) + } + return enc +} + +// TryPackTrustedForwarders is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x54776bb9. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function trustedForwarders(address ) view returns(bool) +func (aftermarketDeviceId *AftermarketDeviceId) TryPackTrustedForwarders(arg0 common.Address) ([]byte, error) { + return aftermarketDeviceId.abi.Pack("trustedForwarders", arg0) +} + +// UnpackTrustedForwarders is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0x54776bb9. +// +// Solidity: function trustedForwarders(address ) view returns(bool) +func (aftermarketDeviceId *AftermarketDeviceId) UnpackTrustedForwarders(data []byte) (bool, error) { + out, err := aftermarketDeviceId.abi.Unpack("trustedForwarders", data) + if err != nil { + return *new(bool), err + } + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + return out0, nil +} + +// PackUpgradeTo is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x3659cfe6. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function upgradeTo(address newImplementation) returns() +func (aftermarketDeviceId *AftermarketDeviceId) PackUpgradeTo(newImplementation common.Address) []byte { + enc, err := aftermarketDeviceId.abi.Pack("upgradeTo", newImplementation) + if err != nil { + panic(err) + } + return enc +} + +// TryPackUpgradeTo is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x3659cfe6. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function upgradeTo(address newImplementation) returns() +func (aftermarketDeviceId *AftermarketDeviceId) TryPackUpgradeTo(newImplementation common.Address) ([]byte, error) { + return aftermarketDeviceId.abi.Pack("upgradeTo", newImplementation) +} + +// PackUpgradeToAndCall is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x4f1ef286. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function upgradeToAndCall(address newImplementation, bytes data) payable returns() +func (aftermarketDeviceId *AftermarketDeviceId) PackUpgradeToAndCall(newImplementation common.Address, data []byte) []byte { + enc, err := aftermarketDeviceId.abi.Pack("upgradeToAndCall", newImplementation, data) + if err != nil { + panic(err) + } + return enc +} + +// TryPackUpgradeToAndCall is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x4f1ef286. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function upgradeToAndCall(address newImplementation, bytes data) payable returns() +func (aftermarketDeviceId *AftermarketDeviceId) TryPackUpgradeToAndCall(newImplementation common.Address, data []byte) ([]byte, error) { + return aftermarketDeviceId.abi.Pack("upgradeToAndCall", newImplementation, data) +} + +// AftermarketDeviceIdAdminChanged represents a AdminChanged event raised by the AftermarketDeviceId contract. +type AftermarketDeviceIdAdminChanged struct { + PreviousAdmin common.Address + NewAdmin common.Address + Raw *types.Log // Blockchain specific contextual infos +} + +const AftermarketDeviceIdAdminChangedEventName = "AdminChanged" + +// ContractEventName returns the user-defined event name. +func (AftermarketDeviceIdAdminChanged) ContractEventName() string { + return AftermarketDeviceIdAdminChangedEventName +} + +// UnpackAdminChangedEvent is the Go binding that unpacks the event data emitted +// by contract. +// +// Solidity: event AdminChanged(address previousAdmin, address newAdmin) +func (aftermarketDeviceId *AftermarketDeviceId) UnpackAdminChangedEvent(log *types.Log) (*AftermarketDeviceIdAdminChanged, error) { + event := "AdminChanged" + if len(log.Topics) == 0 || log.Topics[0] != aftermarketDeviceId.abi.Events[event].ID { + return nil, errors.New("event signature mismatch") + } + out := new(AftermarketDeviceIdAdminChanged) + if len(log.Data) > 0 { + if err := aftermarketDeviceId.abi.UnpackIntoInterface(out, event, log.Data); err != nil { + return nil, err + } + } + var indexed abi.Arguments + for _, arg := range aftermarketDeviceId.abi.Events[event].Inputs { + if arg.Indexed { + indexed = append(indexed, arg) + } + } + if err := abi.ParseTopics(out, indexed, log.Topics[1:]); err != nil { + return nil, err + } + out.Raw = log + return out, nil +} + +// AftermarketDeviceIdApproval represents a Approval event raised by the AftermarketDeviceId contract. +type AftermarketDeviceIdApproval struct { + Owner common.Address + Approved common.Address + TokenId *big.Int + Raw *types.Log // Blockchain specific contextual infos +} + +const AftermarketDeviceIdApprovalEventName = "Approval" + +// ContractEventName returns the user-defined event name. +func (AftermarketDeviceIdApproval) ContractEventName() string { + return AftermarketDeviceIdApprovalEventName +} + +// UnpackApprovalEvent is the Go binding that unpacks the event data emitted +// by contract. +// +// Solidity: event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId) +func (aftermarketDeviceId *AftermarketDeviceId) UnpackApprovalEvent(log *types.Log) (*AftermarketDeviceIdApproval, error) { + event := "Approval" + if len(log.Topics) == 0 || log.Topics[0] != aftermarketDeviceId.abi.Events[event].ID { + return nil, errors.New("event signature mismatch") + } + out := new(AftermarketDeviceIdApproval) + if len(log.Data) > 0 { + if err := aftermarketDeviceId.abi.UnpackIntoInterface(out, event, log.Data); err != nil { + return nil, err + } + } + var indexed abi.Arguments + for _, arg := range aftermarketDeviceId.abi.Events[event].Inputs { + if arg.Indexed { + indexed = append(indexed, arg) + } + } + if err := abi.ParseTopics(out, indexed, log.Topics[1:]); err != nil { + return nil, err + } + out.Raw = log + return out, nil +} + +// AftermarketDeviceIdApprovalForAll represents a ApprovalForAll event raised by the AftermarketDeviceId contract. +type AftermarketDeviceIdApprovalForAll struct { + Owner common.Address + Operator common.Address + Approved bool + Raw *types.Log // Blockchain specific contextual infos +} + +const AftermarketDeviceIdApprovalForAllEventName = "ApprovalForAll" + +// ContractEventName returns the user-defined event name. +func (AftermarketDeviceIdApprovalForAll) ContractEventName() string { + return AftermarketDeviceIdApprovalForAllEventName +} + +// UnpackApprovalForAllEvent is the Go binding that unpacks the event data emitted +// by contract. +// +// Solidity: event ApprovalForAll(address indexed owner, address indexed operator, bool approved) +func (aftermarketDeviceId *AftermarketDeviceId) UnpackApprovalForAllEvent(log *types.Log) (*AftermarketDeviceIdApprovalForAll, error) { + event := "ApprovalForAll" + if len(log.Topics) == 0 || log.Topics[0] != aftermarketDeviceId.abi.Events[event].ID { + return nil, errors.New("event signature mismatch") + } + out := new(AftermarketDeviceIdApprovalForAll) + if len(log.Data) > 0 { + if err := aftermarketDeviceId.abi.UnpackIntoInterface(out, event, log.Data); err != nil { + return nil, err + } + } + var indexed abi.Arguments + for _, arg := range aftermarketDeviceId.abi.Events[event].Inputs { + if arg.Indexed { + indexed = append(indexed, arg) + } + } + if err := abi.ParseTopics(out, indexed, log.Topics[1:]); err != nil { + return nil, err + } + out.Raw = log + return out, nil +} + +// AftermarketDeviceIdBatchMetadataUpdate represents a BatchMetadataUpdate event raised by the AftermarketDeviceId contract. +type AftermarketDeviceIdBatchMetadataUpdate struct { + FromTokenId *big.Int + ToTokenId *big.Int + Raw *types.Log // Blockchain specific contextual infos +} + +const AftermarketDeviceIdBatchMetadataUpdateEventName = "BatchMetadataUpdate" + +// ContractEventName returns the user-defined event name. +func (AftermarketDeviceIdBatchMetadataUpdate) ContractEventName() string { + return AftermarketDeviceIdBatchMetadataUpdateEventName +} + +// UnpackBatchMetadataUpdateEvent is the Go binding that unpacks the event data emitted +// by contract. +// +// Solidity: event BatchMetadataUpdate(uint256 _fromTokenId, uint256 _toTokenId) +func (aftermarketDeviceId *AftermarketDeviceId) UnpackBatchMetadataUpdateEvent(log *types.Log) (*AftermarketDeviceIdBatchMetadataUpdate, error) { + event := "BatchMetadataUpdate" + if len(log.Topics) == 0 || log.Topics[0] != aftermarketDeviceId.abi.Events[event].ID { + return nil, errors.New("event signature mismatch") + } + out := new(AftermarketDeviceIdBatchMetadataUpdate) + if len(log.Data) > 0 { + if err := aftermarketDeviceId.abi.UnpackIntoInterface(out, event, log.Data); err != nil { + return nil, err + } + } + var indexed abi.Arguments + for _, arg := range aftermarketDeviceId.abi.Events[event].Inputs { + if arg.Indexed { + indexed = append(indexed, arg) + } + } + if err := abi.ParseTopics(out, indexed, log.Topics[1:]); err != nil { + return nil, err + } + out.Raw = log + return out, nil +} + +// AftermarketDeviceIdBeaconUpgraded represents a BeaconUpgraded event raised by the AftermarketDeviceId contract. +type AftermarketDeviceIdBeaconUpgraded struct { + Beacon common.Address + Raw *types.Log // Blockchain specific contextual infos +} + +const AftermarketDeviceIdBeaconUpgradedEventName = "BeaconUpgraded" + +// ContractEventName returns the user-defined event name. +func (AftermarketDeviceIdBeaconUpgraded) ContractEventName() string { + return AftermarketDeviceIdBeaconUpgradedEventName +} + +// UnpackBeaconUpgradedEvent is the Go binding that unpacks the event data emitted +// by contract. +// +// Solidity: event BeaconUpgraded(address indexed beacon) +func (aftermarketDeviceId *AftermarketDeviceId) UnpackBeaconUpgradedEvent(log *types.Log) (*AftermarketDeviceIdBeaconUpgraded, error) { + event := "BeaconUpgraded" + if len(log.Topics) == 0 || log.Topics[0] != aftermarketDeviceId.abi.Events[event].ID { + return nil, errors.New("event signature mismatch") + } + out := new(AftermarketDeviceIdBeaconUpgraded) + if len(log.Data) > 0 { + if err := aftermarketDeviceId.abi.UnpackIntoInterface(out, event, log.Data); err != nil { + return nil, err + } + } + var indexed abi.Arguments + for _, arg := range aftermarketDeviceId.abi.Events[event].Inputs { + if arg.Indexed { + indexed = append(indexed, arg) + } + } + if err := abi.ParseTopics(out, indexed, log.Topics[1:]); err != nil { + return nil, err + } + out.Raw = log + return out, nil +} + +// AftermarketDeviceIdInitialized represents a Initialized event raised by the AftermarketDeviceId contract. +type AftermarketDeviceIdInitialized struct { + Version uint8 + Raw *types.Log // Blockchain specific contextual infos +} + +const AftermarketDeviceIdInitializedEventName = "Initialized" + +// ContractEventName returns the user-defined event name. +func (AftermarketDeviceIdInitialized) ContractEventName() string { + return AftermarketDeviceIdInitializedEventName +} + +// UnpackInitializedEvent is the Go binding that unpacks the event data emitted +// by contract. +// +// Solidity: event Initialized(uint8 version) +func (aftermarketDeviceId *AftermarketDeviceId) UnpackInitializedEvent(log *types.Log) (*AftermarketDeviceIdInitialized, error) { + event := "Initialized" + if len(log.Topics) == 0 || log.Topics[0] != aftermarketDeviceId.abi.Events[event].ID { + return nil, errors.New("event signature mismatch") + } + out := new(AftermarketDeviceIdInitialized) + if len(log.Data) > 0 { + if err := aftermarketDeviceId.abi.UnpackIntoInterface(out, event, log.Data); err != nil { + return nil, err + } + } + var indexed abi.Arguments + for _, arg := range aftermarketDeviceId.abi.Events[event].Inputs { + if arg.Indexed { + indexed = append(indexed, arg) + } + } + if err := abi.ParseTopics(out, indexed, log.Topics[1:]); err != nil { + return nil, err + } + out.Raw = log + return out, nil +} + +// AftermarketDeviceIdMetadataUpdate represents a MetadataUpdate event raised by the AftermarketDeviceId contract. +type AftermarketDeviceIdMetadataUpdate struct { + TokenId *big.Int + Raw *types.Log // Blockchain specific contextual infos +} + +const AftermarketDeviceIdMetadataUpdateEventName = "MetadataUpdate" + +// ContractEventName returns the user-defined event name. +func (AftermarketDeviceIdMetadataUpdate) ContractEventName() string { + return AftermarketDeviceIdMetadataUpdateEventName +} + +// UnpackMetadataUpdateEvent is the Go binding that unpacks the event data emitted +// by contract. +// +// Solidity: event MetadataUpdate(uint256 _tokenId) +func (aftermarketDeviceId *AftermarketDeviceId) UnpackMetadataUpdateEvent(log *types.Log) (*AftermarketDeviceIdMetadataUpdate, error) { + event := "MetadataUpdate" + if len(log.Topics) == 0 || log.Topics[0] != aftermarketDeviceId.abi.Events[event].ID { + return nil, errors.New("event signature mismatch") + } + out := new(AftermarketDeviceIdMetadataUpdate) + if len(log.Data) > 0 { + if err := aftermarketDeviceId.abi.UnpackIntoInterface(out, event, log.Data); err != nil { + return nil, err + } + } + var indexed abi.Arguments + for _, arg := range aftermarketDeviceId.abi.Events[event].Inputs { + if arg.Indexed { + indexed = append(indexed, arg) + } + } + if err := abi.ParseTopics(out, indexed, log.Topics[1:]); err != nil { + return nil, err + } + out.Raw = log + return out, nil +} + +// AftermarketDeviceIdPrivilegeCreated represents a PrivilegeCreated event raised by the AftermarketDeviceId contract. +type AftermarketDeviceIdPrivilegeCreated struct { + PrivilegeId *big.Int + Enabled bool + Description string + Raw *types.Log // Blockchain specific contextual infos +} + +const AftermarketDeviceIdPrivilegeCreatedEventName = "PrivilegeCreated" + +// ContractEventName returns the user-defined event name. +func (AftermarketDeviceIdPrivilegeCreated) ContractEventName() string { + return AftermarketDeviceIdPrivilegeCreatedEventName +} + +// UnpackPrivilegeCreatedEvent is the Go binding that unpacks the event data emitted +// by contract. +// +// Solidity: event PrivilegeCreated(uint256 indexed privilegeId, bool enabled, string description) +func (aftermarketDeviceId *AftermarketDeviceId) UnpackPrivilegeCreatedEvent(log *types.Log) (*AftermarketDeviceIdPrivilegeCreated, error) { + event := "PrivilegeCreated" + if len(log.Topics) == 0 || log.Topics[0] != aftermarketDeviceId.abi.Events[event].ID { + return nil, errors.New("event signature mismatch") + } + out := new(AftermarketDeviceIdPrivilegeCreated) + if len(log.Data) > 0 { + if err := aftermarketDeviceId.abi.UnpackIntoInterface(out, event, log.Data); err != nil { + return nil, err + } + } + var indexed abi.Arguments + for _, arg := range aftermarketDeviceId.abi.Events[event].Inputs { + if arg.Indexed { + indexed = append(indexed, arg) + } + } + if err := abi.ParseTopics(out, indexed, log.Topics[1:]); err != nil { + return nil, err + } + out.Raw = log + return out, nil +} + +// AftermarketDeviceIdPrivilegeDisabled represents a PrivilegeDisabled event raised by the AftermarketDeviceId contract. +type AftermarketDeviceIdPrivilegeDisabled struct { + PrivilegeId *big.Int + Raw *types.Log // Blockchain specific contextual infos +} + +const AftermarketDeviceIdPrivilegeDisabledEventName = "PrivilegeDisabled" + +// ContractEventName returns the user-defined event name. +func (AftermarketDeviceIdPrivilegeDisabled) ContractEventName() string { + return AftermarketDeviceIdPrivilegeDisabledEventName +} + +// UnpackPrivilegeDisabledEvent is the Go binding that unpacks the event data emitted +// by contract. +// +// Solidity: event PrivilegeDisabled(uint256 indexed privilegeId) +func (aftermarketDeviceId *AftermarketDeviceId) UnpackPrivilegeDisabledEvent(log *types.Log) (*AftermarketDeviceIdPrivilegeDisabled, error) { + event := "PrivilegeDisabled" + if len(log.Topics) == 0 || log.Topics[0] != aftermarketDeviceId.abi.Events[event].ID { + return nil, errors.New("event signature mismatch") + } + out := new(AftermarketDeviceIdPrivilegeDisabled) + if len(log.Data) > 0 { + if err := aftermarketDeviceId.abi.UnpackIntoInterface(out, event, log.Data); err != nil { + return nil, err + } + } + var indexed abi.Arguments + for _, arg := range aftermarketDeviceId.abi.Events[event].Inputs { + if arg.Indexed { + indexed = append(indexed, arg) + } + } + if err := abi.ParseTopics(out, indexed, log.Topics[1:]); err != nil { + return nil, err + } + out.Raw = log + return out, nil +} + +// AftermarketDeviceIdPrivilegeEnabled represents a PrivilegeEnabled event raised by the AftermarketDeviceId contract. +type AftermarketDeviceIdPrivilegeEnabled struct { + PrivilegeId *big.Int + Raw *types.Log // Blockchain specific contextual infos +} + +const AftermarketDeviceIdPrivilegeEnabledEventName = "PrivilegeEnabled" + +// ContractEventName returns the user-defined event name. +func (AftermarketDeviceIdPrivilegeEnabled) ContractEventName() string { + return AftermarketDeviceIdPrivilegeEnabledEventName +} + +// UnpackPrivilegeEnabledEvent is the Go binding that unpacks the event data emitted +// by contract. +// +// Solidity: event PrivilegeEnabled(uint256 indexed privilegeId) +func (aftermarketDeviceId *AftermarketDeviceId) UnpackPrivilegeEnabledEvent(log *types.Log) (*AftermarketDeviceIdPrivilegeEnabled, error) { + event := "PrivilegeEnabled" + if len(log.Topics) == 0 || log.Topics[0] != aftermarketDeviceId.abi.Events[event].ID { + return nil, errors.New("event signature mismatch") + } + out := new(AftermarketDeviceIdPrivilegeEnabled) + if len(log.Data) > 0 { + if err := aftermarketDeviceId.abi.UnpackIntoInterface(out, event, log.Data); err != nil { + return nil, err + } + } + var indexed abi.Arguments + for _, arg := range aftermarketDeviceId.abi.Events[event].Inputs { + if arg.Indexed { + indexed = append(indexed, arg) + } + } + if err := abi.ParseTopics(out, indexed, log.Topics[1:]); err != nil { + return nil, err + } + out.Raw = log + return out, nil +} + +// AftermarketDeviceIdPrivilegeSet represents a PrivilegeSet event raised by the AftermarketDeviceId contract. +type AftermarketDeviceIdPrivilegeSet struct { + TokenId *big.Int + Version *big.Int + PrivId *big.Int + User common.Address + Expires *big.Int + Raw *types.Log // Blockchain specific contextual infos +} + +const AftermarketDeviceIdPrivilegeSetEventName = "PrivilegeSet" + +// ContractEventName returns the user-defined event name. +func (AftermarketDeviceIdPrivilegeSet) ContractEventName() string { + return AftermarketDeviceIdPrivilegeSetEventName +} + +// UnpackPrivilegeSetEvent is the Go binding that unpacks the event data emitted +// by contract. +// +// Solidity: event PrivilegeSet(uint256 indexed tokenId, uint256 version, uint256 indexed privId, address indexed user, uint256 expires) +func (aftermarketDeviceId *AftermarketDeviceId) UnpackPrivilegeSetEvent(log *types.Log) (*AftermarketDeviceIdPrivilegeSet, error) { + event := "PrivilegeSet" + if len(log.Topics) == 0 || log.Topics[0] != aftermarketDeviceId.abi.Events[event].ID { + return nil, errors.New("event signature mismatch") + } + out := new(AftermarketDeviceIdPrivilegeSet) + if len(log.Data) > 0 { + if err := aftermarketDeviceId.abi.UnpackIntoInterface(out, event, log.Data); err != nil { + return nil, err + } + } + var indexed abi.Arguments + for _, arg := range aftermarketDeviceId.abi.Events[event].Inputs { + if arg.Indexed { + indexed = append(indexed, arg) + } + } + if err := abi.ParseTopics(out, indexed, log.Topics[1:]); err != nil { + return nil, err + } + out.Raw = log + return out, nil +} + +// AftermarketDeviceIdRoleAdminChanged represents a RoleAdminChanged event raised by the AftermarketDeviceId contract. +type AftermarketDeviceIdRoleAdminChanged struct { + Role [32]byte + PreviousAdminRole [32]byte + NewAdminRole [32]byte + Raw *types.Log // Blockchain specific contextual infos +} + +const AftermarketDeviceIdRoleAdminChangedEventName = "RoleAdminChanged" + +// ContractEventName returns the user-defined event name. +func (AftermarketDeviceIdRoleAdminChanged) ContractEventName() string { + return AftermarketDeviceIdRoleAdminChangedEventName +} + +// UnpackRoleAdminChangedEvent is the Go binding that unpacks the event data emitted +// by contract. +// +// Solidity: event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole) +func (aftermarketDeviceId *AftermarketDeviceId) UnpackRoleAdminChangedEvent(log *types.Log) (*AftermarketDeviceIdRoleAdminChanged, error) { + event := "RoleAdminChanged" + if len(log.Topics) == 0 || log.Topics[0] != aftermarketDeviceId.abi.Events[event].ID { + return nil, errors.New("event signature mismatch") + } + out := new(AftermarketDeviceIdRoleAdminChanged) + if len(log.Data) > 0 { + if err := aftermarketDeviceId.abi.UnpackIntoInterface(out, event, log.Data); err != nil { + return nil, err + } + } + var indexed abi.Arguments + for _, arg := range aftermarketDeviceId.abi.Events[event].Inputs { + if arg.Indexed { + indexed = append(indexed, arg) + } + } + if err := abi.ParseTopics(out, indexed, log.Topics[1:]); err != nil { + return nil, err + } + out.Raw = log + return out, nil +} + +// AftermarketDeviceIdRoleGranted represents a RoleGranted event raised by the AftermarketDeviceId contract. +type AftermarketDeviceIdRoleGranted struct { + Role [32]byte + Account common.Address + Sender common.Address + Raw *types.Log // Blockchain specific contextual infos +} + +const AftermarketDeviceIdRoleGrantedEventName = "RoleGranted" + +// ContractEventName returns the user-defined event name. +func (AftermarketDeviceIdRoleGranted) ContractEventName() string { + return AftermarketDeviceIdRoleGrantedEventName +} + +// UnpackRoleGrantedEvent is the Go binding that unpacks the event data emitted +// by contract. +// +// Solidity: event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender) +func (aftermarketDeviceId *AftermarketDeviceId) UnpackRoleGrantedEvent(log *types.Log) (*AftermarketDeviceIdRoleGranted, error) { + event := "RoleGranted" + if len(log.Topics) == 0 || log.Topics[0] != aftermarketDeviceId.abi.Events[event].ID { + return nil, errors.New("event signature mismatch") + } + out := new(AftermarketDeviceIdRoleGranted) + if len(log.Data) > 0 { + if err := aftermarketDeviceId.abi.UnpackIntoInterface(out, event, log.Data); err != nil { + return nil, err + } + } + var indexed abi.Arguments + for _, arg := range aftermarketDeviceId.abi.Events[event].Inputs { + if arg.Indexed { + indexed = append(indexed, arg) + } + } + if err := abi.ParseTopics(out, indexed, log.Topics[1:]); err != nil { + return nil, err + } + out.Raw = log + return out, nil +} + +// AftermarketDeviceIdRoleRevoked represents a RoleRevoked event raised by the AftermarketDeviceId contract. +type AftermarketDeviceIdRoleRevoked struct { + Role [32]byte + Account common.Address + Sender common.Address + Raw *types.Log // Blockchain specific contextual infos +} + +const AftermarketDeviceIdRoleRevokedEventName = "RoleRevoked" + +// ContractEventName returns the user-defined event name. +func (AftermarketDeviceIdRoleRevoked) ContractEventName() string { + return AftermarketDeviceIdRoleRevokedEventName +} + +// UnpackRoleRevokedEvent is the Go binding that unpacks the event data emitted +// by contract. +// +// Solidity: event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender) +func (aftermarketDeviceId *AftermarketDeviceId) UnpackRoleRevokedEvent(log *types.Log) (*AftermarketDeviceIdRoleRevoked, error) { + event := "RoleRevoked" + if len(log.Topics) == 0 || log.Topics[0] != aftermarketDeviceId.abi.Events[event].ID { + return nil, errors.New("event signature mismatch") + } + out := new(AftermarketDeviceIdRoleRevoked) + if len(log.Data) > 0 { + if err := aftermarketDeviceId.abi.UnpackIntoInterface(out, event, log.Data); err != nil { + return nil, err + } + } + var indexed abi.Arguments + for _, arg := range aftermarketDeviceId.abi.Events[event].Inputs { + if arg.Indexed { + indexed = append(indexed, arg) + } + } + if err := abi.ParseTopics(out, indexed, log.Topics[1:]); err != nil { + return nil, err + } + out.Raw = log + return out, nil +} + +// AftermarketDeviceIdTransfer represents a Transfer event raised by the AftermarketDeviceId contract. +type AftermarketDeviceIdTransfer struct { + From common.Address + To common.Address + TokenId *big.Int + Raw *types.Log // Blockchain specific contextual infos +} + +const AftermarketDeviceIdTransferEventName = "Transfer" + +// ContractEventName returns the user-defined event name. +func (AftermarketDeviceIdTransfer) ContractEventName() string { + return AftermarketDeviceIdTransferEventName +} + +// UnpackTransferEvent is the Go binding that unpacks the event data emitted +// by contract. +// +// Solidity: event Transfer(address indexed from, address indexed to, uint256 indexed tokenId) +func (aftermarketDeviceId *AftermarketDeviceId) UnpackTransferEvent(log *types.Log) (*AftermarketDeviceIdTransfer, error) { + event := "Transfer" + if len(log.Topics) == 0 || log.Topics[0] != aftermarketDeviceId.abi.Events[event].ID { + return nil, errors.New("event signature mismatch") + } + out := new(AftermarketDeviceIdTransfer) + if len(log.Data) > 0 { + if err := aftermarketDeviceId.abi.UnpackIntoInterface(out, event, log.Data); err != nil { + return nil, err + } + } + var indexed abi.Arguments + for _, arg := range aftermarketDeviceId.abi.Events[event].Inputs { + if arg.Indexed { + indexed = append(indexed, arg) + } + } + if err := abi.ParseTopics(out, indexed, log.Topics[1:]); err != nil { + return nil, err + } + out.Raw = log + return out, nil +} + +// AftermarketDeviceIdUpgraded represents a Upgraded event raised by the AftermarketDeviceId contract. +type AftermarketDeviceIdUpgraded struct { + Implementation common.Address + Raw *types.Log // Blockchain specific contextual infos +} + +const AftermarketDeviceIdUpgradedEventName = "Upgraded" + +// ContractEventName returns the user-defined event name. +func (AftermarketDeviceIdUpgraded) ContractEventName() string { + return AftermarketDeviceIdUpgradedEventName +} + +// UnpackUpgradedEvent is the Go binding that unpacks the event data emitted +// by contract. +// +// Solidity: event Upgraded(address indexed implementation) +func (aftermarketDeviceId *AftermarketDeviceId) UnpackUpgradedEvent(log *types.Log) (*AftermarketDeviceIdUpgraded, error) { + event := "Upgraded" + if len(log.Topics) == 0 || log.Topics[0] != aftermarketDeviceId.abi.Events[event].ID { + return nil, errors.New("event signature mismatch") + } + out := new(AftermarketDeviceIdUpgraded) + if len(log.Data) > 0 { + if err := aftermarketDeviceId.abi.UnpackIntoInterface(out, event, log.Data); err != nil { + return nil, err + } + } + var indexed abi.Arguments + for _, arg := range aftermarketDeviceId.abi.Events[event].Inputs { + if arg.Indexed { + indexed = append(indexed, arg) + } + } + if err := abi.ParseTopics(out, indexed, log.Topics[1:]); err != nil { + return nil, err + } + out.Raw = log + return out, nil +} + +// UnpackError attempts to decode the provided error data using user-defined +// error definitions. +func (aftermarketDeviceId *AftermarketDeviceId) UnpackError(raw []byte) (any, error) { + if bytes.Equal(raw[:4], aftermarketDeviceId.abi.Errors["Unauthorized"].ID.Bytes()[:4]) { + return aftermarketDeviceId.UnpackUnauthorizedError(raw[4:]) + } + if bytes.Equal(raw[:4], aftermarketDeviceId.abi.Errors["ZeroAddress"].ID.Bytes()[:4]) { + return aftermarketDeviceId.UnpackZeroAddressError(raw[4:]) + } + return nil, errors.New("Unknown error") +} + +// AftermarketDeviceIdUnauthorized represents a Unauthorized error raised by the AftermarketDeviceId contract. +type AftermarketDeviceIdUnauthorized struct { +} + +// ErrorID returns the hash of canonical representation of the error's signature. +// +// Solidity: error Unauthorized() +func AftermarketDeviceIdUnauthorizedErrorID() common.Hash { + return common.HexToHash("0x82b4290015f7ec7256ca2a6247d3c2a89c4865c0e791456df195f40ad0a81367") +} + +// UnpackUnauthorizedError is the Go binding used to decode the provided +// error data into the corresponding Go error struct. +// +// Solidity: error Unauthorized() +func (aftermarketDeviceId *AftermarketDeviceId) UnpackUnauthorizedError(raw []byte) (*AftermarketDeviceIdUnauthorized, error) { + out := new(AftermarketDeviceIdUnauthorized) + if err := aftermarketDeviceId.abi.UnpackIntoInterface(out, "Unauthorized", raw); err != nil { + return nil, err + } + return out, nil +} + +// AftermarketDeviceIdZeroAddress represents a ZeroAddress error raised by the AftermarketDeviceId contract. +type AftermarketDeviceIdZeroAddress struct { +} + +// ErrorID returns the hash of canonical representation of the error's signature. +// +// Solidity: error ZeroAddress() +func AftermarketDeviceIdZeroAddressErrorID() common.Hash { + return common.HexToHash("0xd92e233df2717d4a40030e20904abd27b68fcbeede117eaaccbbdac9618c8c73") +} + +// UnpackZeroAddressError is the Go binding used to decode the provided +// error data into the corresponding Go error struct. +// +// Solidity: error ZeroAddress() +func (aftermarketDeviceId *AftermarketDeviceId) UnpackZeroAddressError(raw []byte) (*AftermarketDeviceIdZeroAddress, error) { + out := new(AftermarketDeviceIdZeroAddress) + if err := aftermarketDeviceId.abi.UnpackIntoInterface(out, "ZeroAddress", raw); err != nil { + return nil, err + } + return out, nil +} diff --git a/bindings/dimoForwarder/dimoForwarder.go b/bindings/dimoForwarder/dimoForwarder.go new file mode 100644 index 00000000..d0c63bc6 --- /dev/null +++ b/bindings/dimoForwarder/dimoForwarder.go @@ -0,0 +1,1063 @@ +// Code generated via abigen V2 - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package dimoForwarder + +import ( + "bytes" + "errors" + "math/big" + + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/accounts/abi/bind/v2" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" +) + +// Reference imports to suppress errors if they are not otherwise used. +var ( + _ = bytes.Equal + _ = errors.New + _ = big.NewInt + _ = common.Big1 + _ = types.BloomLookup + _ = abi.ConvertType +) + +// DimoForwarderMetaData contains all meta data concerning the DimoForwarder contract. +var DimoForwarderMetaData = bind.MetaData{ + ABI: "[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"idProxySource\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"idProxyTraget\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"sourceId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"targetId\",\"type\":\"uint256\"}],\"name\":\"InvalidLink\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"idProxy\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"errorMessage\",\"type\":\"string\"}],\"name\":\"TransferFailed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroAddress\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"beacon\",\"type\":\"address\"}],\"name\":\"BeaconUpgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"previousAdminRole\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"newAdminRole\",\"type\":\"bytes32\"}],\"name\":\"RoleAdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleGranted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleRevoked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"SAFE_TRANSFER_FROM\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"UPGRADER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"adIdProxyAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"dimoRegistry\",\"outputs\":[{\"internalType\":\"contractIDimoRegistry\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleAdmin\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"grantRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"hasRole\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"dimoRegistry_\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"vehicleIdProxyAddress_\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"adIdProxyAddress_\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"proxiableUUID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"renounceRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"revokeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"adIdProxyAddress_\",\"type\":\"address\"}],\"name\":\"setAftermarketDeviceIdProxyAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"dimoRegistry_\",\"type\":\"address\"}],\"name\":\"setDimoRegistryAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"vehicleIdProxyAddress_\",\"type\":\"address\"}],\"name\":\"setVehicleIdProxyAddress\",\"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\":\"vehicleIds\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256[]\",\"name\":\"aftermarketDeviceIds\",\"type\":\"uint256[]\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"transferVehicleAndAftermarketDeviceIds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"vehicleId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"aftermarketDeviceId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"transferVehicleAndAftermarketDeviceIds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"vehicleIdProxyAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]", + ID: "DimoForwarder", +} + +// DimoForwarder is an auto generated Go binding around an Ethereum contract. +type DimoForwarder struct { + abi abi.ABI +} + +// NewDimoForwarder creates a new instance of DimoForwarder. +func NewDimoForwarder() *DimoForwarder { + parsed, err := DimoForwarderMetaData.ParseABI() + if err != nil { + panic(errors.New("invalid ABI: " + err.Error())) + } + return &DimoForwarder{abi: *parsed} +} + +// Instance creates a wrapper for a deployed contract instance at the given address. +// Use this to create the instance object passed to abigen v2 library functions Call, Transact, etc. +func (c *DimoForwarder) Instance(backend bind.ContractBackend, addr common.Address) *bind.BoundContract { + return bind.NewBoundContract(addr, c.abi, backend, backend, backend) +} + +// PackADMINROLE is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x75b238fc. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function ADMIN_ROLE() view returns(bytes32) +func (dimoForwarder *DimoForwarder) PackADMINROLE() []byte { + enc, err := dimoForwarder.abi.Pack("ADMIN_ROLE") + if err != nil { + panic(err) + } + return enc +} + +// TryPackADMINROLE is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x75b238fc. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function ADMIN_ROLE() view returns(bytes32) +func (dimoForwarder *DimoForwarder) TryPackADMINROLE() ([]byte, error) { + return dimoForwarder.abi.Pack("ADMIN_ROLE") +} + +// UnpackADMINROLE is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0x75b238fc. +// +// Solidity: function ADMIN_ROLE() view returns(bytes32) +func (dimoForwarder *DimoForwarder) UnpackADMINROLE(data []byte) ([32]byte, error) { + out, err := dimoForwarder.abi.Unpack("ADMIN_ROLE", data) + if err != nil { + return *new([32]byte), err + } + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + return out0, nil +} + +// PackDEFAULTADMINROLE is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xa217fddf. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function DEFAULT_ADMIN_ROLE() view returns(bytes32) +func (dimoForwarder *DimoForwarder) PackDEFAULTADMINROLE() []byte { + enc, err := dimoForwarder.abi.Pack("DEFAULT_ADMIN_ROLE") + if err != nil { + panic(err) + } + return enc +} + +// TryPackDEFAULTADMINROLE is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xa217fddf. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function DEFAULT_ADMIN_ROLE() view returns(bytes32) +func (dimoForwarder *DimoForwarder) TryPackDEFAULTADMINROLE() ([]byte, error) { + return dimoForwarder.abi.Pack("DEFAULT_ADMIN_ROLE") +} + +// UnpackDEFAULTADMINROLE is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0xa217fddf. +// +// Solidity: function DEFAULT_ADMIN_ROLE() view returns(bytes32) +func (dimoForwarder *DimoForwarder) UnpackDEFAULTADMINROLE(data []byte) ([32]byte, error) { + out, err := dimoForwarder.abi.Unpack("DEFAULT_ADMIN_ROLE", data) + if err != nil { + return *new([32]byte), err + } + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + return out0, nil +} + +// PackSAFETRANSFERFROM is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xe4cdbfdb. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function SAFE_TRANSFER_FROM() view returns(bytes4) +func (dimoForwarder *DimoForwarder) PackSAFETRANSFERFROM() []byte { + enc, err := dimoForwarder.abi.Pack("SAFE_TRANSFER_FROM") + if err != nil { + panic(err) + } + return enc +} + +// TryPackSAFETRANSFERFROM is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xe4cdbfdb. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function SAFE_TRANSFER_FROM() view returns(bytes4) +func (dimoForwarder *DimoForwarder) TryPackSAFETRANSFERFROM() ([]byte, error) { + return dimoForwarder.abi.Pack("SAFE_TRANSFER_FROM") +} + +// UnpackSAFETRANSFERFROM is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0xe4cdbfdb. +// +// Solidity: function SAFE_TRANSFER_FROM() view returns(bytes4) +func (dimoForwarder *DimoForwarder) UnpackSAFETRANSFERFROM(data []byte) ([4]byte, error) { + out, err := dimoForwarder.abi.Unpack("SAFE_TRANSFER_FROM", data) + if err != nil { + return *new([4]byte), err + } + out0 := *abi.ConvertType(out[0], new([4]byte)).(*[4]byte) + return out0, nil +} + +// PackUPGRADERROLE is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xf72c0d8b. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function UPGRADER_ROLE() view returns(bytes32) +func (dimoForwarder *DimoForwarder) PackUPGRADERROLE() []byte { + enc, err := dimoForwarder.abi.Pack("UPGRADER_ROLE") + if err != nil { + panic(err) + } + return enc +} + +// TryPackUPGRADERROLE is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xf72c0d8b. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function UPGRADER_ROLE() view returns(bytes32) +func (dimoForwarder *DimoForwarder) TryPackUPGRADERROLE() ([]byte, error) { + return dimoForwarder.abi.Pack("UPGRADER_ROLE") +} + +// UnpackUPGRADERROLE is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0xf72c0d8b. +// +// Solidity: function UPGRADER_ROLE() view returns(bytes32) +func (dimoForwarder *DimoForwarder) UnpackUPGRADERROLE(data []byte) ([32]byte, error) { + out, err := dimoForwarder.abi.Unpack("UPGRADER_ROLE", data) + if err != nil { + return *new([32]byte), err + } + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + return out0, nil +} + +// PackAdIdProxyAddress is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xb1ba0e45. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function adIdProxyAddress() view returns(address) +func (dimoForwarder *DimoForwarder) PackAdIdProxyAddress() []byte { + enc, err := dimoForwarder.abi.Pack("adIdProxyAddress") + if err != nil { + panic(err) + } + return enc +} + +// TryPackAdIdProxyAddress is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xb1ba0e45. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function adIdProxyAddress() view returns(address) +func (dimoForwarder *DimoForwarder) TryPackAdIdProxyAddress() ([]byte, error) { + return dimoForwarder.abi.Pack("adIdProxyAddress") +} + +// UnpackAdIdProxyAddress is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0xb1ba0e45. +// +// Solidity: function adIdProxyAddress() view returns(address) +func (dimoForwarder *DimoForwarder) UnpackAdIdProxyAddress(data []byte) (common.Address, error) { + out, err := dimoForwarder.abi.Unpack("adIdProxyAddress", data) + if err != nil { + return *new(common.Address), err + } + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + return out0, nil +} + +// PackDimoRegistry is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x20678275. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function dimoRegistry() view returns(address) +func (dimoForwarder *DimoForwarder) PackDimoRegistry() []byte { + enc, err := dimoForwarder.abi.Pack("dimoRegistry") + if err != nil { + panic(err) + } + return enc +} + +// TryPackDimoRegistry is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x20678275. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function dimoRegistry() view returns(address) +func (dimoForwarder *DimoForwarder) TryPackDimoRegistry() ([]byte, error) { + return dimoForwarder.abi.Pack("dimoRegistry") +} + +// UnpackDimoRegistry is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0x20678275. +// +// Solidity: function dimoRegistry() view returns(address) +func (dimoForwarder *DimoForwarder) UnpackDimoRegistry(data []byte) (common.Address, error) { + out, err := dimoForwarder.abi.Unpack("dimoRegistry", data) + if err != nil { + return *new(common.Address), err + } + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + return out0, nil +} + +// PackGetRoleAdmin is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x248a9ca3. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function getRoleAdmin(bytes32 role) view returns(bytes32) +func (dimoForwarder *DimoForwarder) PackGetRoleAdmin(role [32]byte) []byte { + enc, err := dimoForwarder.abi.Pack("getRoleAdmin", role) + if err != nil { + panic(err) + } + return enc +} + +// TryPackGetRoleAdmin is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x248a9ca3. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function getRoleAdmin(bytes32 role) view returns(bytes32) +func (dimoForwarder *DimoForwarder) TryPackGetRoleAdmin(role [32]byte) ([]byte, error) { + return dimoForwarder.abi.Pack("getRoleAdmin", role) +} + +// UnpackGetRoleAdmin is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0x248a9ca3. +// +// Solidity: function getRoleAdmin(bytes32 role) view returns(bytes32) +func (dimoForwarder *DimoForwarder) UnpackGetRoleAdmin(data []byte) ([32]byte, error) { + out, err := dimoForwarder.abi.Unpack("getRoleAdmin", data) + if err != nil { + return *new([32]byte), err + } + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + return out0, nil +} + +// PackGrantRole is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x2f2ff15d. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function grantRole(bytes32 role, address account) returns() +func (dimoForwarder *DimoForwarder) PackGrantRole(role [32]byte, account common.Address) []byte { + enc, err := dimoForwarder.abi.Pack("grantRole", role, account) + if err != nil { + panic(err) + } + return enc +} + +// TryPackGrantRole is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x2f2ff15d. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function grantRole(bytes32 role, address account) returns() +func (dimoForwarder *DimoForwarder) TryPackGrantRole(role [32]byte, account common.Address) ([]byte, error) { + return dimoForwarder.abi.Pack("grantRole", role, account) +} + +// PackHasRole is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x91d14854. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function hasRole(bytes32 role, address account) view returns(bool) +func (dimoForwarder *DimoForwarder) PackHasRole(role [32]byte, account common.Address) []byte { + enc, err := dimoForwarder.abi.Pack("hasRole", role, account) + if err != nil { + panic(err) + } + return enc +} + +// TryPackHasRole is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x91d14854. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function hasRole(bytes32 role, address account) view returns(bool) +func (dimoForwarder *DimoForwarder) TryPackHasRole(role [32]byte, account common.Address) ([]byte, error) { + return dimoForwarder.abi.Pack("hasRole", role, account) +} + +// UnpackHasRole is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0x91d14854. +// +// Solidity: function hasRole(bytes32 role, address account) view returns(bool) +func (dimoForwarder *DimoForwarder) UnpackHasRole(data []byte) (bool, error) { + out, err := dimoForwarder.abi.Unpack("hasRole", data) + if err != nil { + return *new(bool), err + } + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + return out0, nil +} + +// PackInitialize is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xc0c53b8b. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function initialize(address dimoRegistry_, address vehicleIdProxyAddress_, address adIdProxyAddress_) returns() +func (dimoForwarder *DimoForwarder) PackInitialize(dimoRegistry common.Address, vehicleIdProxyAddress common.Address, adIdProxyAddress common.Address) []byte { + enc, err := dimoForwarder.abi.Pack("initialize", dimoRegistry, vehicleIdProxyAddress, adIdProxyAddress) + if err != nil { + panic(err) + } + return enc +} + +// TryPackInitialize is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xc0c53b8b. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function initialize(address dimoRegistry_, address vehicleIdProxyAddress_, address adIdProxyAddress_) returns() +func (dimoForwarder *DimoForwarder) TryPackInitialize(dimoRegistry common.Address, vehicleIdProxyAddress common.Address, adIdProxyAddress common.Address) ([]byte, error) { + return dimoForwarder.abi.Pack("initialize", dimoRegistry, vehicleIdProxyAddress, adIdProxyAddress) +} + +// PackProxiableUUID is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x52d1902d. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function proxiableUUID() view returns(bytes32) +func (dimoForwarder *DimoForwarder) PackProxiableUUID() []byte { + enc, err := dimoForwarder.abi.Pack("proxiableUUID") + if err != nil { + panic(err) + } + return enc +} + +// TryPackProxiableUUID is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x52d1902d. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function proxiableUUID() view returns(bytes32) +func (dimoForwarder *DimoForwarder) TryPackProxiableUUID() ([]byte, error) { + return dimoForwarder.abi.Pack("proxiableUUID") +} + +// UnpackProxiableUUID is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0x52d1902d. +// +// Solidity: function proxiableUUID() view returns(bytes32) +func (dimoForwarder *DimoForwarder) UnpackProxiableUUID(data []byte) ([32]byte, error) { + out, err := dimoForwarder.abi.Unpack("proxiableUUID", data) + if err != nil { + return *new([32]byte), err + } + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + return out0, nil +} + +// PackRenounceRole is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x36568abe. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function renounceRole(bytes32 role, address account) returns() +func (dimoForwarder *DimoForwarder) PackRenounceRole(role [32]byte, account common.Address) []byte { + enc, err := dimoForwarder.abi.Pack("renounceRole", role, account) + if err != nil { + panic(err) + } + return enc +} + +// TryPackRenounceRole is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x36568abe. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function renounceRole(bytes32 role, address account) returns() +func (dimoForwarder *DimoForwarder) TryPackRenounceRole(role [32]byte, account common.Address) ([]byte, error) { + return dimoForwarder.abi.Pack("renounceRole", role, account) +} + +// PackRevokeRole is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xd547741f. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function revokeRole(bytes32 role, address account) returns() +func (dimoForwarder *DimoForwarder) PackRevokeRole(role [32]byte, account common.Address) []byte { + enc, err := dimoForwarder.abi.Pack("revokeRole", role, account) + if err != nil { + panic(err) + } + return enc +} + +// TryPackRevokeRole is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xd547741f. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function revokeRole(bytes32 role, address account) returns() +func (dimoForwarder *DimoForwarder) TryPackRevokeRole(role [32]byte, account common.Address) ([]byte, error) { + return dimoForwarder.abi.Pack("revokeRole", role, account) +} + +// PackSetAftermarketDeviceIdProxyAddress is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x4d49d82a. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function setAftermarketDeviceIdProxyAddress(address adIdProxyAddress_) returns() +func (dimoForwarder *DimoForwarder) PackSetAftermarketDeviceIdProxyAddress(adIdProxyAddress common.Address) []byte { + enc, err := dimoForwarder.abi.Pack("setAftermarketDeviceIdProxyAddress", adIdProxyAddress) + if err != nil { + panic(err) + } + return enc +} + +// TryPackSetAftermarketDeviceIdProxyAddress is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x4d49d82a. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function setAftermarketDeviceIdProxyAddress(address adIdProxyAddress_) returns() +func (dimoForwarder *DimoForwarder) TryPackSetAftermarketDeviceIdProxyAddress(adIdProxyAddress common.Address) ([]byte, error) { + return dimoForwarder.abi.Pack("setAftermarketDeviceIdProxyAddress", adIdProxyAddress) +} + +// PackSetDimoRegistryAddress is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x0db857ea. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function setDimoRegistryAddress(address dimoRegistry_) returns() +func (dimoForwarder *DimoForwarder) PackSetDimoRegistryAddress(dimoRegistry common.Address) []byte { + enc, err := dimoForwarder.abi.Pack("setDimoRegistryAddress", dimoRegistry) + if err != nil { + panic(err) + } + return enc +} + +// TryPackSetDimoRegistryAddress is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x0db857ea. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function setDimoRegistryAddress(address dimoRegistry_) returns() +func (dimoForwarder *DimoForwarder) TryPackSetDimoRegistryAddress(dimoRegistry common.Address) ([]byte, error) { + return dimoForwarder.abi.Pack("setDimoRegistryAddress", dimoRegistry) +} + +// PackSetVehicleIdProxyAddress is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x9bfae6da. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function setVehicleIdProxyAddress(address vehicleIdProxyAddress_) returns() +func (dimoForwarder *DimoForwarder) PackSetVehicleIdProxyAddress(vehicleIdProxyAddress common.Address) []byte { + enc, err := dimoForwarder.abi.Pack("setVehicleIdProxyAddress", vehicleIdProxyAddress) + if err != nil { + panic(err) + } + return enc +} + +// TryPackSetVehicleIdProxyAddress is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x9bfae6da. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function setVehicleIdProxyAddress(address vehicleIdProxyAddress_) returns() +func (dimoForwarder *DimoForwarder) TryPackSetVehicleIdProxyAddress(vehicleIdProxyAddress common.Address) ([]byte, error) { + return dimoForwarder.abi.Pack("setVehicleIdProxyAddress", vehicleIdProxyAddress) +} + +// PackSupportsInterface is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x01ffc9a7. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function supportsInterface(bytes4 interfaceId) view returns(bool) +func (dimoForwarder *DimoForwarder) PackSupportsInterface(interfaceId [4]byte) []byte { + enc, err := dimoForwarder.abi.Pack("supportsInterface", interfaceId) + if err != nil { + panic(err) + } + return enc +} + +// TryPackSupportsInterface is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x01ffc9a7. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function supportsInterface(bytes4 interfaceId) view returns(bool) +func (dimoForwarder *DimoForwarder) TryPackSupportsInterface(interfaceId [4]byte) ([]byte, error) { + return dimoForwarder.abi.Pack("supportsInterface", interfaceId) +} + +// UnpackSupportsInterface is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0x01ffc9a7. +// +// Solidity: function supportsInterface(bytes4 interfaceId) view returns(bool) +func (dimoForwarder *DimoForwarder) UnpackSupportsInterface(data []byte) (bool, error) { + out, err := dimoForwarder.abi.Unpack("supportsInterface", data) + if err != nil { + return *new(bool), err + } + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + return out0, nil +} + +// PackTransferVehicleAndAftermarketDeviceIds is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x3cdd8326. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function transferVehicleAndAftermarketDeviceIds(uint256[] vehicleIds, uint256[] aftermarketDeviceIds, address to) returns() +func (dimoForwarder *DimoForwarder) PackTransferVehicleAndAftermarketDeviceIds(vehicleIds []*big.Int, aftermarketDeviceIds []*big.Int, to common.Address) []byte { + enc, err := dimoForwarder.abi.Pack("transferVehicleAndAftermarketDeviceIds", vehicleIds, aftermarketDeviceIds, to) + if err != nil { + panic(err) + } + return enc +} + +// TryPackTransferVehicleAndAftermarketDeviceIds is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x3cdd8326. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function transferVehicleAndAftermarketDeviceIds(uint256[] vehicleIds, uint256[] aftermarketDeviceIds, address to) returns() +func (dimoForwarder *DimoForwarder) TryPackTransferVehicleAndAftermarketDeviceIds(vehicleIds []*big.Int, aftermarketDeviceIds []*big.Int, to common.Address) ([]byte, error) { + return dimoForwarder.abi.Pack("transferVehicleAndAftermarketDeviceIds", vehicleIds, aftermarketDeviceIds, to) +} + +// PackTransferVehicleAndAftermarketDeviceIds0 is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x6d2f54de. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function transferVehicleAndAftermarketDeviceIds(uint256 vehicleId, uint256 aftermarketDeviceId, address to) returns() +func (dimoForwarder *DimoForwarder) PackTransferVehicleAndAftermarketDeviceIds0(vehicleId *big.Int, aftermarketDeviceId *big.Int, to common.Address) []byte { + enc, err := dimoForwarder.abi.Pack("transferVehicleAndAftermarketDeviceIds0", vehicleId, aftermarketDeviceId, to) + if err != nil { + panic(err) + } + return enc +} + +// TryPackTransferVehicleAndAftermarketDeviceIds0 is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x6d2f54de. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function transferVehicleAndAftermarketDeviceIds(uint256 vehicleId, uint256 aftermarketDeviceId, address to) returns() +func (dimoForwarder *DimoForwarder) TryPackTransferVehicleAndAftermarketDeviceIds0(vehicleId *big.Int, aftermarketDeviceId *big.Int, to common.Address) ([]byte, error) { + return dimoForwarder.abi.Pack("transferVehicleAndAftermarketDeviceIds0", vehicleId, aftermarketDeviceId, to) +} + +// PackUpgradeTo is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x3659cfe6. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function upgradeTo(address newImplementation) returns() +func (dimoForwarder *DimoForwarder) PackUpgradeTo(newImplementation common.Address) []byte { + enc, err := dimoForwarder.abi.Pack("upgradeTo", newImplementation) + if err != nil { + panic(err) + } + return enc +} + +// TryPackUpgradeTo is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x3659cfe6. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function upgradeTo(address newImplementation) returns() +func (dimoForwarder *DimoForwarder) TryPackUpgradeTo(newImplementation common.Address) ([]byte, error) { + return dimoForwarder.abi.Pack("upgradeTo", newImplementation) +} + +// PackUpgradeToAndCall is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x4f1ef286. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function upgradeToAndCall(address newImplementation, bytes data) payable returns() +func (dimoForwarder *DimoForwarder) PackUpgradeToAndCall(newImplementation common.Address, data []byte) []byte { + enc, err := dimoForwarder.abi.Pack("upgradeToAndCall", newImplementation, data) + if err != nil { + panic(err) + } + return enc +} + +// TryPackUpgradeToAndCall is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x4f1ef286. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function upgradeToAndCall(address newImplementation, bytes data) payable returns() +func (dimoForwarder *DimoForwarder) TryPackUpgradeToAndCall(newImplementation common.Address, data []byte) ([]byte, error) { + return dimoForwarder.abi.Pack("upgradeToAndCall", newImplementation, data) +} + +// PackVehicleIdProxyAddress is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x8823467a. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function vehicleIdProxyAddress() view returns(address) +func (dimoForwarder *DimoForwarder) PackVehicleIdProxyAddress() []byte { + enc, err := dimoForwarder.abi.Pack("vehicleIdProxyAddress") + if err != nil { + panic(err) + } + return enc +} + +// TryPackVehicleIdProxyAddress is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x8823467a. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function vehicleIdProxyAddress() view returns(address) +func (dimoForwarder *DimoForwarder) TryPackVehicleIdProxyAddress() ([]byte, error) { + return dimoForwarder.abi.Pack("vehicleIdProxyAddress") +} + +// UnpackVehicleIdProxyAddress is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0x8823467a. +// +// Solidity: function vehicleIdProxyAddress() view returns(address) +func (dimoForwarder *DimoForwarder) UnpackVehicleIdProxyAddress(data []byte) (common.Address, error) { + out, err := dimoForwarder.abi.Unpack("vehicleIdProxyAddress", data) + if err != nil { + return *new(common.Address), err + } + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + return out0, nil +} + +// DimoForwarderAdminChanged represents a AdminChanged event raised by the DimoForwarder contract. +type DimoForwarderAdminChanged struct { + PreviousAdmin common.Address + NewAdmin common.Address + Raw *types.Log // Blockchain specific contextual infos +} + +const DimoForwarderAdminChangedEventName = "AdminChanged" + +// ContractEventName returns the user-defined event name. +func (DimoForwarderAdminChanged) ContractEventName() string { + return DimoForwarderAdminChangedEventName +} + +// UnpackAdminChangedEvent is the Go binding that unpacks the event data emitted +// by contract. +// +// Solidity: event AdminChanged(address previousAdmin, address newAdmin) +func (dimoForwarder *DimoForwarder) UnpackAdminChangedEvent(log *types.Log) (*DimoForwarderAdminChanged, error) { + event := "AdminChanged" + if len(log.Topics) == 0 || log.Topics[0] != dimoForwarder.abi.Events[event].ID { + return nil, errors.New("event signature mismatch") + } + out := new(DimoForwarderAdminChanged) + if len(log.Data) > 0 { + if err := dimoForwarder.abi.UnpackIntoInterface(out, event, log.Data); err != nil { + return nil, err + } + } + var indexed abi.Arguments + for _, arg := range dimoForwarder.abi.Events[event].Inputs { + if arg.Indexed { + indexed = append(indexed, arg) + } + } + if err := abi.ParseTopics(out, indexed, log.Topics[1:]); err != nil { + return nil, err + } + out.Raw = log + return out, nil +} + +// DimoForwarderBeaconUpgraded represents a BeaconUpgraded event raised by the DimoForwarder contract. +type DimoForwarderBeaconUpgraded struct { + Beacon common.Address + Raw *types.Log // Blockchain specific contextual infos +} + +const DimoForwarderBeaconUpgradedEventName = "BeaconUpgraded" + +// ContractEventName returns the user-defined event name. +func (DimoForwarderBeaconUpgraded) ContractEventName() string { + return DimoForwarderBeaconUpgradedEventName +} + +// UnpackBeaconUpgradedEvent is the Go binding that unpacks the event data emitted +// by contract. +// +// Solidity: event BeaconUpgraded(address indexed beacon) +func (dimoForwarder *DimoForwarder) UnpackBeaconUpgradedEvent(log *types.Log) (*DimoForwarderBeaconUpgraded, error) { + event := "BeaconUpgraded" + if len(log.Topics) == 0 || log.Topics[0] != dimoForwarder.abi.Events[event].ID { + return nil, errors.New("event signature mismatch") + } + out := new(DimoForwarderBeaconUpgraded) + if len(log.Data) > 0 { + if err := dimoForwarder.abi.UnpackIntoInterface(out, event, log.Data); err != nil { + return nil, err + } + } + var indexed abi.Arguments + for _, arg := range dimoForwarder.abi.Events[event].Inputs { + if arg.Indexed { + indexed = append(indexed, arg) + } + } + if err := abi.ParseTopics(out, indexed, log.Topics[1:]); err != nil { + return nil, err + } + out.Raw = log + return out, nil +} + +// DimoForwarderInitialized represents a Initialized event raised by the DimoForwarder contract. +type DimoForwarderInitialized struct { + Version uint8 + Raw *types.Log // Blockchain specific contextual infos +} + +const DimoForwarderInitializedEventName = "Initialized" + +// ContractEventName returns the user-defined event name. +func (DimoForwarderInitialized) ContractEventName() string { + return DimoForwarderInitializedEventName +} + +// UnpackInitializedEvent is the Go binding that unpacks the event data emitted +// by contract. +// +// Solidity: event Initialized(uint8 version) +func (dimoForwarder *DimoForwarder) UnpackInitializedEvent(log *types.Log) (*DimoForwarderInitialized, error) { + event := "Initialized" + if len(log.Topics) == 0 || log.Topics[0] != dimoForwarder.abi.Events[event].ID { + return nil, errors.New("event signature mismatch") + } + out := new(DimoForwarderInitialized) + if len(log.Data) > 0 { + if err := dimoForwarder.abi.UnpackIntoInterface(out, event, log.Data); err != nil { + return nil, err + } + } + var indexed abi.Arguments + for _, arg := range dimoForwarder.abi.Events[event].Inputs { + if arg.Indexed { + indexed = append(indexed, arg) + } + } + if err := abi.ParseTopics(out, indexed, log.Topics[1:]); err != nil { + return nil, err + } + out.Raw = log + return out, nil +} + +// DimoForwarderRoleAdminChanged represents a RoleAdminChanged event raised by the DimoForwarder contract. +type DimoForwarderRoleAdminChanged struct { + Role [32]byte + PreviousAdminRole [32]byte + NewAdminRole [32]byte + Raw *types.Log // Blockchain specific contextual infos +} + +const DimoForwarderRoleAdminChangedEventName = "RoleAdminChanged" + +// ContractEventName returns the user-defined event name. +func (DimoForwarderRoleAdminChanged) ContractEventName() string { + return DimoForwarderRoleAdminChangedEventName +} + +// UnpackRoleAdminChangedEvent is the Go binding that unpacks the event data emitted +// by contract. +// +// Solidity: event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole) +func (dimoForwarder *DimoForwarder) UnpackRoleAdminChangedEvent(log *types.Log) (*DimoForwarderRoleAdminChanged, error) { + event := "RoleAdminChanged" + if len(log.Topics) == 0 || log.Topics[0] != dimoForwarder.abi.Events[event].ID { + return nil, errors.New("event signature mismatch") + } + out := new(DimoForwarderRoleAdminChanged) + if len(log.Data) > 0 { + if err := dimoForwarder.abi.UnpackIntoInterface(out, event, log.Data); err != nil { + return nil, err + } + } + var indexed abi.Arguments + for _, arg := range dimoForwarder.abi.Events[event].Inputs { + if arg.Indexed { + indexed = append(indexed, arg) + } + } + if err := abi.ParseTopics(out, indexed, log.Topics[1:]); err != nil { + return nil, err + } + out.Raw = log + return out, nil +} + +// DimoForwarderRoleGranted represents a RoleGranted event raised by the DimoForwarder contract. +type DimoForwarderRoleGranted struct { + Role [32]byte + Account common.Address + Sender common.Address + Raw *types.Log // Blockchain specific contextual infos +} + +const DimoForwarderRoleGrantedEventName = "RoleGranted" + +// ContractEventName returns the user-defined event name. +func (DimoForwarderRoleGranted) ContractEventName() string { + return DimoForwarderRoleGrantedEventName +} + +// UnpackRoleGrantedEvent is the Go binding that unpacks the event data emitted +// by contract. +// +// Solidity: event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender) +func (dimoForwarder *DimoForwarder) UnpackRoleGrantedEvent(log *types.Log) (*DimoForwarderRoleGranted, error) { + event := "RoleGranted" + if len(log.Topics) == 0 || log.Topics[0] != dimoForwarder.abi.Events[event].ID { + return nil, errors.New("event signature mismatch") + } + out := new(DimoForwarderRoleGranted) + if len(log.Data) > 0 { + if err := dimoForwarder.abi.UnpackIntoInterface(out, event, log.Data); err != nil { + return nil, err + } + } + var indexed abi.Arguments + for _, arg := range dimoForwarder.abi.Events[event].Inputs { + if arg.Indexed { + indexed = append(indexed, arg) + } + } + if err := abi.ParseTopics(out, indexed, log.Topics[1:]); err != nil { + return nil, err + } + out.Raw = log + return out, nil +} + +// DimoForwarderRoleRevoked represents a RoleRevoked event raised by the DimoForwarder contract. +type DimoForwarderRoleRevoked struct { + Role [32]byte + Account common.Address + Sender common.Address + Raw *types.Log // Blockchain specific contextual infos +} + +const DimoForwarderRoleRevokedEventName = "RoleRevoked" + +// ContractEventName returns the user-defined event name. +func (DimoForwarderRoleRevoked) ContractEventName() string { + return DimoForwarderRoleRevokedEventName +} + +// UnpackRoleRevokedEvent is the Go binding that unpacks the event data emitted +// by contract. +// +// Solidity: event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender) +func (dimoForwarder *DimoForwarder) UnpackRoleRevokedEvent(log *types.Log) (*DimoForwarderRoleRevoked, error) { + event := "RoleRevoked" + if len(log.Topics) == 0 || log.Topics[0] != dimoForwarder.abi.Events[event].ID { + return nil, errors.New("event signature mismatch") + } + out := new(DimoForwarderRoleRevoked) + if len(log.Data) > 0 { + if err := dimoForwarder.abi.UnpackIntoInterface(out, event, log.Data); err != nil { + return nil, err + } + } + var indexed abi.Arguments + for _, arg := range dimoForwarder.abi.Events[event].Inputs { + if arg.Indexed { + indexed = append(indexed, arg) + } + } + if err := abi.ParseTopics(out, indexed, log.Topics[1:]); err != nil { + return nil, err + } + out.Raw = log + return out, nil +} + +// DimoForwarderUpgraded represents a Upgraded event raised by the DimoForwarder contract. +type DimoForwarderUpgraded struct { + Implementation common.Address + Raw *types.Log // Blockchain specific contextual infos +} + +const DimoForwarderUpgradedEventName = "Upgraded" + +// ContractEventName returns the user-defined event name. +func (DimoForwarderUpgraded) ContractEventName() string { + return DimoForwarderUpgradedEventName +} + +// UnpackUpgradedEvent is the Go binding that unpacks the event data emitted +// by contract. +// +// Solidity: event Upgraded(address indexed implementation) +func (dimoForwarder *DimoForwarder) UnpackUpgradedEvent(log *types.Log) (*DimoForwarderUpgraded, error) { + event := "Upgraded" + if len(log.Topics) == 0 || log.Topics[0] != dimoForwarder.abi.Events[event].ID { + return nil, errors.New("event signature mismatch") + } + out := new(DimoForwarderUpgraded) + if len(log.Data) > 0 { + if err := dimoForwarder.abi.UnpackIntoInterface(out, event, log.Data); err != nil { + return nil, err + } + } + var indexed abi.Arguments + for _, arg := range dimoForwarder.abi.Events[event].Inputs { + if arg.Indexed { + indexed = append(indexed, arg) + } + } + if err := abi.ParseTopics(out, indexed, log.Topics[1:]); err != nil { + return nil, err + } + out.Raw = log + return out, nil +} + +// UnpackError attempts to decode the provided error data using user-defined +// error definitions. +func (dimoForwarder *DimoForwarder) UnpackError(raw []byte) (any, error) { + if bytes.Equal(raw[:4], dimoForwarder.abi.Errors["InvalidLink"].ID.Bytes()[:4]) { + return dimoForwarder.UnpackInvalidLinkError(raw[4:]) + } + if bytes.Equal(raw[:4], dimoForwarder.abi.Errors["TransferFailed"].ID.Bytes()[:4]) { + return dimoForwarder.UnpackTransferFailedError(raw[4:]) + } + if bytes.Equal(raw[:4], dimoForwarder.abi.Errors["ZeroAddress"].ID.Bytes()[:4]) { + return dimoForwarder.UnpackZeroAddressError(raw[4:]) + } + return nil, errors.New("Unknown error") +} + +// DimoForwarderInvalidLink represents a InvalidLink error raised by the DimoForwarder contract. +type DimoForwarderInvalidLink struct { + IdProxySource common.Address + IdProxyTraget common.Address + SourceId *big.Int + TargetId *big.Int +} + +// ErrorID returns the hash of canonical representation of the error's signature. +// +// Solidity: error InvalidLink(address idProxySource, address idProxyTraget, uint256 sourceId, uint256 targetId) +func DimoForwarderInvalidLinkErrorID() common.Hash { + return common.HexToHash("0x08ee6d9866be82d3f5b24594002781d23c51dd22640c216d421b0054f147e80b") +} + +// UnpackInvalidLinkError is the Go binding used to decode the provided +// error data into the corresponding Go error struct. +// +// Solidity: error InvalidLink(address idProxySource, address idProxyTraget, uint256 sourceId, uint256 targetId) +func (dimoForwarder *DimoForwarder) UnpackInvalidLinkError(raw []byte) (*DimoForwarderInvalidLink, error) { + out := new(DimoForwarderInvalidLink) + if err := dimoForwarder.abi.UnpackIntoInterface(out, "InvalidLink", raw); err != nil { + return nil, err + } + return out, nil +} + +// DimoForwarderTransferFailed represents a TransferFailed error raised by the DimoForwarder contract. +type DimoForwarderTransferFailed struct { + IdProxy common.Address + Id *big.Int + ErrorMessage string +} + +// ErrorID returns the hash of canonical representation of the error's signature. +// +// Solidity: error TransferFailed(address idProxy, uint256 id, string errorMessage) +func DimoForwarderTransferFailedErrorID() common.Hash { + return common.HexToHash("0x32bd04fba17e3a4e042de2ca40e007e3f7478948cb07937b3e2059d4be9486e0") +} + +// UnpackTransferFailedError is the Go binding used to decode the provided +// error data into the corresponding Go error struct. +// +// Solidity: error TransferFailed(address idProxy, uint256 id, string errorMessage) +func (dimoForwarder *DimoForwarder) UnpackTransferFailedError(raw []byte) (*DimoForwarderTransferFailed, error) { + out := new(DimoForwarderTransferFailed) + if err := dimoForwarder.abi.UnpackIntoInterface(out, "TransferFailed", raw); err != nil { + return nil, err + } + return out, nil +} + +// DimoForwarderZeroAddress represents a ZeroAddress error raised by the DimoForwarder contract. +type DimoForwarderZeroAddress struct { +} + +// ErrorID returns the hash of canonical representation of the error's signature. +// +// Solidity: error ZeroAddress() +func DimoForwarderZeroAddressErrorID() common.Hash { + return common.HexToHash("0xd92e233df2717d4a40030e20904abd27b68fcbeede117eaaccbbdac9618c8c73") +} + +// UnpackZeroAddressError is the Go binding used to decode the provided +// error data into the corresponding Go error struct. +// +// Solidity: error ZeroAddress() +func (dimoForwarder *DimoForwarder) UnpackZeroAddressError(raw []byte) (*DimoForwarderZeroAddress, error) { + out := new(DimoForwarderZeroAddress) + if err := dimoForwarder.abi.UnpackIntoInterface(out, "ZeroAddress", raw); err != nil { + return nil, err + } + return out, nil +} diff --git a/bindings/integrationId/integrationId.go b/bindings/integrationId/integrationId.go new file mode 100644 index 00000000..8cbbefcd --- /dev/null +++ b/bindings/integrationId/integrationId.go @@ -0,0 +1,2161 @@ +// Code generated via abigen V2 - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package integrationId + +import ( + "bytes" + "errors" + "math/big" + + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/accounts/abi/bind/v2" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" +) + +// Reference imports to suppress errors if they are not otherwise used. +var ( + _ = bytes.Equal + _ = errors.New + _ = big.NewInt + _ = common.Big1 + _ = types.BloomLookup + _ = abi.ConvertType +) + +// MultiPrivilegeSetPrivilegeData is an auto generated low-level Go binding around an user-defined struct. +type MultiPrivilegeSetPrivilegeData struct { + TokenId *big.Int + PrivId *big.Int + User common.Address + Expires *big.Int +} + +// IntegrationIdMetaData contains all meta data concerning the IntegrationId contract. +var IntegrationIdMetaData = bind.MetaData{ + ABI: "[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"ZeroAddress\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AdminChanged\",\"type\":\"event\"},{\"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\":false,\"internalType\":\"uint256\",\"name\":\"_fromTokenId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_toTokenId\",\"type\":\"uint256\"}],\"name\":\"BatchMetadataUpdate\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"beacon\",\"type\":\"address\"}],\"name\":\"BeaconUpgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_tokenId\",\"type\":\"uint256\"}],\"name\":\"MetadataUpdate\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"privilegeId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"enabled\",\"type\":\"bool\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"description\",\"type\":\"string\"}],\"name\":\"PrivilegeCreated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"privilegeId\",\"type\":\"uint256\"}],\"name\":\"PrivilegeDisabled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"privilegeId\",\"type\":\"uint256\"}],\"name\":\"PrivilegeEnabled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"version\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"privId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"expires\",\"type\":\"uint256\"}],\"name\":\"PrivilegeSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"previousAdminRole\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"newAdminRole\",\"type\":\"bytes32\"}],\"name\":\"RoleAdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleGranted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleRevoked\",\"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\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"BURNER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MINTER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"TRANSFERER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"UPGRADER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"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\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"burn\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"enabled\",\"type\":\"bool\"},{\"internalType\":\"string\",\"name\":\"description\",\"type\":\"string\"}],\"name\":\"createPrivilege\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"dimoRegistry\",\"outputs\":[{\"internalType\":\"contractIDimoRegistry\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"privId\",\"type\":\"uint256\"}],\"name\":\"disablePrivilege\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"privId\",\"type\":\"uint256\"}],\"name\":\"enablePrivilege\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"exists\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"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\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleAdmin\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"grantRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"privId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"}],\"name\":\"hasPrivilege\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"hasRole\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"name_\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"symbol_\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"baseUri_\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"dimoRegistry_\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"trustedForwarders_\",\"type\":\"address[]\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"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\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"privilegeEntry\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"privId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"}],\"name\":\"privilegeExpiresAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"privilegeRecord\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"enabled\",\"type\":\"bool\"},{\"internalType\":\"string\",\"name\":\"description\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"proxiableUUID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"renounceRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"revokeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"safeMint\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"uri\",\"type\":\"string\"}],\"name\":\"safeMint\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"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\":\"string\",\"name\":\"baseURI_\",\"type\":\"string\"}],\"name\":\"setBaseURI\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"dimoRegistry_\",\"type\":\"address\"}],\"name\":\"setDimoRegistryAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"privId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"expires\",\"type\":\"uint256\"}],\"name\":\"setPrivilege\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"privId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"expires\",\"type\":\"uint256\"}],\"internalType\":\"structMultiPrivilege.SetPrivilegeData[]\",\"name\":\"privData\",\"type\":\"tuple[]\"}],\"name\":\"setPrivileges\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"trusted\",\"type\":\"bool\"}],\"name\":\"setTrustedForwarder\",\"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\":\"\",\"type\":\"uint256\"}],\"name\":\"tokenIdToVersion\",\"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\":[{\"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\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"trustedForwarders\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"}]", + ID: "IntegrationId", +} + +// IntegrationId is an auto generated Go binding around an Ethereum contract. +type IntegrationId struct { + abi abi.ABI +} + +// NewIntegrationId creates a new instance of IntegrationId. +func NewIntegrationId() *IntegrationId { + parsed, err := IntegrationIdMetaData.ParseABI() + if err != nil { + panic(errors.New("invalid ABI: " + err.Error())) + } + return &IntegrationId{abi: *parsed} +} + +// Instance creates a wrapper for a deployed contract instance at the given address. +// Use this to create the instance object passed to abigen v2 library functions Call, Transact, etc. +func (c *IntegrationId) Instance(backend bind.ContractBackend, addr common.Address) *bind.BoundContract { + return bind.NewBoundContract(addr, c.abi, backend, backend, backend) +} + +// PackADMINROLE is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x75b238fc. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function ADMIN_ROLE() view returns(bytes32) +func (integrationId *IntegrationId) PackADMINROLE() []byte { + enc, err := integrationId.abi.Pack("ADMIN_ROLE") + if err != nil { + panic(err) + } + return enc +} + +// TryPackADMINROLE is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x75b238fc. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function ADMIN_ROLE() view returns(bytes32) +func (integrationId *IntegrationId) TryPackADMINROLE() ([]byte, error) { + return integrationId.abi.Pack("ADMIN_ROLE") +} + +// UnpackADMINROLE is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0x75b238fc. +// +// Solidity: function ADMIN_ROLE() view returns(bytes32) +func (integrationId *IntegrationId) UnpackADMINROLE(data []byte) ([32]byte, error) { + out, err := integrationId.abi.Unpack("ADMIN_ROLE", data) + if err != nil { + return *new([32]byte), err + } + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + return out0, nil +} + +// PackBURNERROLE is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x282c51f3. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function BURNER_ROLE() view returns(bytes32) +func (integrationId *IntegrationId) PackBURNERROLE() []byte { + enc, err := integrationId.abi.Pack("BURNER_ROLE") + if err != nil { + panic(err) + } + return enc +} + +// TryPackBURNERROLE is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x282c51f3. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function BURNER_ROLE() view returns(bytes32) +func (integrationId *IntegrationId) TryPackBURNERROLE() ([]byte, error) { + return integrationId.abi.Pack("BURNER_ROLE") +} + +// UnpackBURNERROLE is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0x282c51f3. +// +// Solidity: function BURNER_ROLE() view returns(bytes32) +func (integrationId *IntegrationId) UnpackBURNERROLE(data []byte) ([32]byte, error) { + out, err := integrationId.abi.Unpack("BURNER_ROLE", data) + if err != nil { + return *new([32]byte), err + } + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + return out0, nil +} + +// PackDEFAULTADMINROLE is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xa217fddf. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function DEFAULT_ADMIN_ROLE() view returns(bytes32) +func (integrationId *IntegrationId) PackDEFAULTADMINROLE() []byte { + enc, err := integrationId.abi.Pack("DEFAULT_ADMIN_ROLE") + if err != nil { + panic(err) + } + return enc +} + +// TryPackDEFAULTADMINROLE is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xa217fddf. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function DEFAULT_ADMIN_ROLE() view returns(bytes32) +func (integrationId *IntegrationId) TryPackDEFAULTADMINROLE() ([]byte, error) { + return integrationId.abi.Pack("DEFAULT_ADMIN_ROLE") +} + +// UnpackDEFAULTADMINROLE is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0xa217fddf. +// +// Solidity: function DEFAULT_ADMIN_ROLE() view returns(bytes32) +func (integrationId *IntegrationId) UnpackDEFAULTADMINROLE(data []byte) ([32]byte, error) { + out, err := integrationId.abi.Unpack("DEFAULT_ADMIN_ROLE", data) + if err != nil { + return *new([32]byte), err + } + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + return out0, nil +} + +// PackMINTERROLE is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xd5391393. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function MINTER_ROLE() view returns(bytes32) +func (integrationId *IntegrationId) PackMINTERROLE() []byte { + enc, err := integrationId.abi.Pack("MINTER_ROLE") + if err != nil { + panic(err) + } + return enc +} + +// TryPackMINTERROLE is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xd5391393. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function MINTER_ROLE() view returns(bytes32) +func (integrationId *IntegrationId) TryPackMINTERROLE() ([]byte, error) { + return integrationId.abi.Pack("MINTER_ROLE") +} + +// UnpackMINTERROLE is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0xd5391393. +// +// Solidity: function MINTER_ROLE() view returns(bytes32) +func (integrationId *IntegrationId) UnpackMINTERROLE(data []byte) ([32]byte, error) { + out, err := integrationId.abi.Unpack("MINTER_ROLE", data) + if err != nil { + return *new([32]byte), err + } + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + return out0, nil +} + +// PackTRANSFERERROLE is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x0ade7dc1. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function TRANSFERER_ROLE() view returns(bytes32) +func (integrationId *IntegrationId) PackTRANSFERERROLE() []byte { + enc, err := integrationId.abi.Pack("TRANSFERER_ROLE") + if err != nil { + panic(err) + } + return enc +} + +// TryPackTRANSFERERROLE is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x0ade7dc1. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function TRANSFERER_ROLE() view returns(bytes32) +func (integrationId *IntegrationId) TryPackTRANSFERERROLE() ([]byte, error) { + return integrationId.abi.Pack("TRANSFERER_ROLE") +} + +// UnpackTRANSFERERROLE is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0x0ade7dc1. +// +// Solidity: function TRANSFERER_ROLE() view returns(bytes32) +func (integrationId *IntegrationId) UnpackTRANSFERERROLE(data []byte) ([32]byte, error) { + out, err := integrationId.abi.Unpack("TRANSFERER_ROLE", data) + if err != nil { + return *new([32]byte), err + } + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + return out0, nil +} + +// PackUPGRADERROLE is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xf72c0d8b. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function UPGRADER_ROLE() view returns(bytes32) +func (integrationId *IntegrationId) PackUPGRADERROLE() []byte { + enc, err := integrationId.abi.Pack("UPGRADER_ROLE") + if err != nil { + panic(err) + } + return enc +} + +// TryPackUPGRADERROLE is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xf72c0d8b. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function UPGRADER_ROLE() view returns(bytes32) +func (integrationId *IntegrationId) TryPackUPGRADERROLE() ([]byte, error) { + return integrationId.abi.Pack("UPGRADER_ROLE") +} + +// UnpackUPGRADERROLE is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0xf72c0d8b. +// +// Solidity: function UPGRADER_ROLE() view returns(bytes32) +func (integrationId *IntegrationId) UnpackUPGRADERROLE(data []byte) ([32]byte, error) { + out, err := integrationId.abi.Unpack("UPGRADER_ROLE", data) + if err != nil { + return *new([32]byte), err + } + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + return out0, nil +} + +// PackApprove is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x095ea7b3. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function approve(address to, uint256 tokenId) returns() +func (integrationId *IntegrationId) PackApprove(to common.Address, tokenId *big.Int) []byte { + enc, err := integrationId.abi.Pack("approve", to, tokenId) + if err != nil { + panic(err) + } + return enc +} + +// TryPackApprove is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x095ea7b3. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function approve(address to, uint256 tokenId) returns() +func (integrationId *IntegrationId) TryPackApprove(to common.Address, tokenId *big.Int) ([]byte, error) { + return integrationId.abi.Pack("approve", to, tokenId) +} + +// PackBalanceOf is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x70a08231. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function balanceOf(address owner) view returns(uint256) +func (integrationId *IntegrationId) PackBalanceOf(owner common.Address) []byte { + enc, err := integrationId.abi.Pack("balanceOf", owner) + if err != nil { + panic(err) + } + return enc +} + +// TryPackBalanceOf is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x70a08231. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function balanceOf(address owner) view returns(uint256) +func (integrationId *IntegrationId) TryPackBalanceOf(owner common.Address) ([]byte, error) { + return integrationId.abi.Pack("balanceOf", owner) +} + +// UnpackBalanceOf is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0x70a08231. +// +// Solidity: function balanceOf(address owner) view returns(uint256) +func (integrationId *IntegrationId) UnpackBalanceOf(data []byte) (*big.Int, error) { + out, err := integrationId.abi.Unpack("balanceOf", data) + if err != nil { + return new(big.Int), err + } + out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int) + return out0, nil +} + +// PackBurn is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x42966c68. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function burn(uint256 tokenId) returns() +func (integrationId *IntegrationId) PackBurn(tokenId *big.Int) []byte { + enc, err := integrationId.abi.Pack("burn", tokenId) + if err != nil { + panic(err) + } + return enc +} + +// TryPackBurn is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x42966c68. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function burn(uint256 tokenId) returns() +func (integrationId *IntegrationId) TryPackBurn(tokenId *big.Int) ([]byte, error) { + return integrationId.abi.Pack("burn", tokenId) +} + +// PackCreatePrivilege is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xc1d58b3b. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function createPrivilege(bool enabled, string description) returns() +func (integrationId *IntegrationId) PackCreatePrivilege(enabled bool, description string) []byte { + enc, err := integrationId.abi.Pack("createPrivilege", enabled, description) + if err != nil { + panic(err) + } + return enc +} + +// TryPackCreatePrivilege is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xc1d58b3b. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function createPrivilege(bool enabled, string description) returns() +func (integrationId *IntegrationId) TryPackCreatePrivilege(enabled bool, description string) ([]byte, error) { + return integrationId.abi.Pack("createPrivilege", enabled, description) +} + +// PackDimoRegistry is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x20678275. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function dimoRegistry() view returns(address) +func (integrationId *IntegrationId) PackDimoRegistry() []byte { + enc, err := integrationId.abi.Pack("dimoRegistry") + if err != nil { + panic(err) + } + return enc +} + +// TryPackDimoRegistry is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x20678275. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function dimoRegistry() view returns(address) +func (integrationId *IntegrationId) TryPackDimoRegistry() ([]byte, error) { + return integrationId.abi.Pack("dimoRegistry") +} + +// UnpackDimoRegistry is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0x20678275. +// +// Solidity: function dimoRegistry() view returns(address) +func (integrationId *IntegrationId) UnpackDimoRegistry(data []byte) (common.Address, error) { + out, err := integrationId.abi.Unpack("dimoRegistry", data) + if err != nil { + return *new(common.Address), err + } + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + return out0, nil +} + +// PackDisablePrivilege is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x1a153ed0. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function disablePrivilege(uint256 privId) returns() +func (integrationId *IntegrationId) PackDisablePrivilege(privId *big.Int) []byte { + enc, err := integrationId.abi.Pack("disablePrivilege", privId) + if err != nil { + panic(err) + } + return enc +} + +// TryPackDisablePrivilege is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x1a153ed0. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function disablePrivilege(uint256 privId) returns() +func (integrationId *IntegrationId) TryPackDisablePrivilege(privId *big.Int) ([]byte, error) { + return integrationId.abi.Pack("disablePrivilege", privId) +} + +// PackEnablePrivilege is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x831ba696. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function enablePrivilege(uint256 privId) returns() +func (integrationId *IntegrationId) PackEnablePrivilege(privId *big.Int) []byte { + enc, err := integrationId.abi.Pack("enablePrivilege", privId) + if err != nil { + panic(err) + } + return enc +} + +// TryPackEnablePrivilege is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x831ba696. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function enablePrivilege(uint256 privId) returns() +func (integrationId *IntegrationId) TryPackEnablePrivilege(privId *big.Int) ([]byte, error) { + return integrationId.abi.Pack("enablePrivilege", privId) +} + +// PackExists is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x4f558e79. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function exists(uint256 tokenId) view returns(bool) +func (integrationId *IntegrationId) PackExists(tokenId *big.Int) []byte { + enc, err := integrationId.abi.Pack("exists", tokenId) + if err != nil { + panic(err) + } + return enc +} + +// TryPackExists is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x4f558e79. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function exists(uint256 tokenId) view returns(bool) +func (integrationId *IntegrationId) TryPackExists(tokenId *big.Int) ([]byte, error) { + return integrationId.abi.Pack("exists", tokenId) +} + +// UnpackExists is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0x4f558e79. +// +// Solidity: function exists(uint256 tokenId) view returns(bool) +func (integrationId *IntegrationId) UnpackExists(data []byte) (bool, error) { + out, err := integrationId.abi.Unpack("exists", data) + if err != nil { + return *new(bool), err + } + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + return out0, nil +} + +// PackGetApproved is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x081812fc. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function getApproved(uint256 tokenId) view returns(address) +func (integrationId *IntegrationId) PackGetApproved(tokenId *big.Int) []byte { + enc, err := integrationId.abi.Pack("getApproved", tokenId) + if err != nil { + panic(err) + } + return enc +} + +// TryPackGetApproved is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x081812fc. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function getApproved(uint256 tokenId) view returns(address) +func (integrationId *IntegrationId) TryPackGetApproved(tokenId *big.Int) ([]byte, error) { + return integrationId.abi.Pack("getApproved", tokenId) +} + +// UnpackGetApproved is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0x081812fc. +// +// Solidity: function getApproved(uint256 tokenId) view returns(address) +func (integrationId *IntegrationId) UnpackGetApproved(data []byte) (common.Address, error) { + out, err := integrationId.abi.Unpack("getApproved", data) + if err != nil { + return *new(common.Address), err + } + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + return out0, nil +} + +// PackGetRoleAdmin is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x248a9ca3. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function getRoleAdmin(bytes32 role) view returns(bytes32) +func (integrationId *IntegrationId) PackGetRoleAdmin(role [32]byte) []byte { + enc, err := integrationId.abi.Pack("getRoleAdmin", role) + if err != nil { + panic(err) + } + return enc +} + +// TryPackGetRoleAdmin is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x248a9ca3. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function getRoleAdmin(bytes32 role) view returns(bytes32) +func (integrationId *IntegrationId) TryPackGetRoleAdmin(role [32]byte) ([]byte, error) { + return integrationId.abi.Pack("getRoleAdmin", role) +} + +// UnpackGetRoleAdmin is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0x248a9ca3. +// +// Solidity: function getRoleAdmin(bytes32 role) view returns(bytes32) +func (integrationId *IntegrationId) UnpackGetRoleAdmin(data []byte) ([32]byte, error) { + out, err := integrationId.abi.Unpack("getRoleAdmin", data) + if err != nil { + return *new([32]byte), err + } + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + return out0, nil +} + +// PackGrantRole is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x2f2ff15d. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function grantRole(bytes32 role, address account) returns() +func (integrationId *IntegrationId) PackGrantRole(role [32]byte, account common.Address) []byte { + enc, err := integrationId.abi.Pack("grantRole", role, account) + if err != nil { + panic(err) + } + return enc +} + +// TryPackGrantRole is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x2f2ff15d. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function grantRole(bytes32 role, address account) returns() +func (integrationId *IntegrationId) TryPackGrantRole(role [32]byte, account common.Address) ([]byte, error) { + return integrationId.abi.Pack("grantRole", role, account) +} + +// PackHasPrivilege is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x05d80b00. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function hasPrivilege(uint256 tokenId, uint256 privId, address user) view returns(bool) +func (integrationId *IntegrationId) PackHasPrivilege(tokenId *big.Int, privId *big.Int, user common.Address) []byte { + enc, err := integrationId.abi.Pack("hasPrivilege", tokenId, privId, user) + if err != nil { + panic(err) + } + return enc +} + +// TryPackHasPrivilege is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x05d80b00. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function hasPrivilege(uint256 tokenId, uint256 privId, address user) view returns(bool) +func (integrationId *IntegrationId) TryPackHasPrivilege(tokenId *big.Int, privId *big.Int, user common.Address) ([]byte, error) { + return integrationId.abi.Pack("hasPrivilege", tokenId, privId, user) +} + +// UnpackHasPrivilege is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0x05d80b00. +// +// Solidity: function hasPrivilege(uint256 tokenId, uint256 privId, address user) view returns(bool) +func (integrationId *IntegrationId) UnpackHasPrivilege(data []byte) (bool, error) { + out, err := integrationId.abi.Unpack("hasPrivilege", data) + if err != nil { + return *new(bool), err + } + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + return out0, nil +} + +// PackHasRole is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x91d14854. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function hasRole(bytes32 role, address account) view returns(bool) +func (integrationId *IntegrationId) PackHasRole(role [32]byte, account common.Address) []byte { + enc, err := integrationId.abi.Pack("hasRole", role, account) + if err != nil { + panic(err) + } + return enc +} + +// TryPackHasRole is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x91d14854. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function hasRole(bytes32 role, address account) view returns(bool) +func (integrationId *IntegrationId) TryPackHasRole(role [32]byte, account common.Address) ([]byte, error) { + return integrationId.abi.Pack("hasRole", role, account) +} + +// UnpackHasRole is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0x91d14854. +// +// Solidity: function hasRole(bytes32 role, address account) view returns(bool) +func (integrationId *IntegrationId) UnpackHasRole(data []byte) (bool, error) { + out, err := integrationId.abi.Unpack("hasRole", data) + if err != nil { + return *new(bool), err + } + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + return out0, nil +} + +// PackInitialize is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x2cd0213f. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function initialize(string name_, string symbol_, string baseUri_, address dimoRegistry_, address[] trustedForwarders_) returns() +func (integrationId *IntegrationId) PackInitialize(name string, symbol string, baseUri string, dimoRegistry common.Address, trustedForwarders []common.Address) []byte { + enc, err := integrationId.abi.Pack("initialize", name, symbol, baseUri, dimoRegistry, trustedForwarders) + if err != nil { + panic(err) + } + return enc +} + +// TryPackInitialize is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x2cd0213f. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function initialize(string name_, string symbol_, string baseUri_, address dimoRegistry_, address[] trustedForwarders_) returns() +func (integrationId *IntegrationId) TryPackInitialize(name string, symbol string, baseUri string, dimoRegistry common.Address, trustedForwarders []common.Address) ([]byte, error) { + return integrationId.abi.Pack("initialize", name, symbol, baseUri, dimoRegistry, trustedForwarders) +} + +// PackIsApprovedForAll is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xe985e9c5. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function isApprovedForAll(address owner, address operator) view returns(bool) +func (integrationId *IntegrationId) PackIsApprovedForAll(owner common.Address, operator common.Address) []byte { + enc, err := integrationId.abi.Pack("isApprovedForAll", owner, operator) + if err != nil { + panic(err) + } + return enc +} + +// TryPackIsApprovedForAll is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xe985e9c5. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function isApprovedForAll(address owner, address operator) view returns(bool) +func (integrationId *IntegrationId) TryPackIsApprovedForAll(owner common.Address, operator common.Address) ([]byte, error) { + return integrationId.abi.Pack("isApprovedForAll", owner, operator) +} + +// UnpackIsApprovedForAll is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0xe985e9c5. +// +// Solidity: function isApprovedForAll(address owner, address operator) view returns(bool) +func (integrationId *IntegrationId) UnpackIsApprovedForAll(data []byte) (bool, error) { + out, err := integrationId.abi.Unpack("isApprovedForAll", data) + if err != nil { + return *new(bool), err + } + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + return out0, nil +} + +// PackName is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x06fdde03. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function name() view returns(string) +func (integrationId *IntegrationId) PackName() []byte { + enc, err := integrationId.abi.Pack("name") + if err != nil { + panic(err) + } + return enc +} + +// TryPackName is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x06fdde03. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function name() view returns(string) +func (integrationId *IntegrationId) TryPackName() ([]byte, error) { + return integrationId.abi.Pack("name") +} + +// UnpackName is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0x06fdde03. +// +// Solidity: function name() view returns(string) +func (integrationId *IntegrationId) UnpackName(data []byte) (string, error) { + out, err := integrationId.abi.Unpack("name", data) + if err != nil { + return *new(string), err + } + out0 := *abi.ConvertType(out[0], new(string)).(*string) + return out0, nil +} + +// PackOwnerOf is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x6352211e. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function ownerOf(uint256 tokenId) view returns(address) +func (integrationId *IntegrationId) PackOwnerOf(tokenId *big.Int) []byte { + enc, err := integrationId.abi.Pack("ownerOf", tokenId) + if err != nil { + panic(err) + } + return enc +} + +// TryPackOwnerOf is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x6352211e. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function ownerOf(uint256 tokenId) view returns(address) +func (integrationId *IntegrationId) TryPackOwnerOf(tokenId *big.Int) ([]byte, error) { + return integrationId.abi.Pack("ownerOf", tokenId) +} + +// UnpackOwnerOf is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0x6352211e. +// +// Solidity: function ownerOf(uint256 tokenId) view returns(address) +func (integrationId *IntegrationId) UnpackOwnerOf(data []byte) (common.Address, error) { + out, err := integrationId.abi.Unpack("ownerOf", data) + if err != nil { + return *new(common.Address), err + } + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + return out0, nil +} + +// PackPrivilegeEntry is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x48db4640. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function privilegeEntry(uint256 , uint256 , uint256 , address ) view returns(uint256) +func (integrationId *IntegrationId) PackPrivilegeEntry(arg0 *big.Int, arg1 *big.Int, arg2 *big.Int, arg3 common.Address) []byte { + enc, err := integrationId.abi.Pack("privilegeEntry", arg0, arg1, arg2, arg3) + if err != nil { + panic(err) + } + return enc +} + +// TryPackPrivilegeEntry is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x48db4640. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function privilegeEntry(uint256 , uint256 , uint256 , address ) view returns(uint256) +func (integrationId *IntegrationId) TryPackPrivilegeEntry(arg0 *big.Int, arg1 *big.Int, arg2 *big.Int, arg3 common.Address) ([]byte, error) { + return integrationId.abi.Pack("privilegeEntry", arg0, arg1, arg2, arg3) +} + +// UnpackPrivilegeEntry is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0x48db4640. +// +// Solidity: function privilegeEntry(uint256 , uint256 , uint256 , address ) view returns(uint256) +func (integrationId *IntegrationId) UnpackPrivilegeEntry(data []byte) (*big.Int, error) { + out, err := integrationId.abi.Unpack("privilegeEntry", data) + if err != nil { + return new(big.Int), err + } + out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int) + return out0, nil +} + +// PackPrivilegeExpiresAt is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xd0f8f5f6. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function privilegeExpiresAt(uint256 tokenId, uint256 privId, address user) view returns(uint256) +func (integrationId *IntegrationId) PackPrivilegeExpiresAt(tokenId *big.Int, privId *big.Int, user common.Address) []byte { + enc, err := integrationId.abi.Pack("privilegeExpiresAt", tokenId, privId, user) + if err != nil { + panic(err) + } + return enc +} + +// TryPackPrivilegeExpiresAt is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xd0f8f5f6. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function privilegeExpiresAt(uint256 tokenId, uint256 privId, address user) view returns(uint256) +func (integrationId *IntegrationId) TryPackPrivilegeExpiresAt(tokenId *big.Int, privId *big.Int, user common.Address) ([]byte, error) { + return integrationId.abi.Pack("privilegeExpiresAt", tokenId, privId, user) +} + +// UnpackPrivilegeExpiresAt is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0xd0f8f5f6. +// +// Solidity: function privilegeExpiresAt(uint256 tokenId, uint256 privId, address user) view returns(uint256) +func (integrationId *IntegrationId) UnpackPrivilegeExpiresAt(data []byte) (*big.Int, error) { + out, err := integrationId.abi.Unpack("privilegeExpiresAt", data) + if err != nil { + return new(big.Int), err + } + out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int) + return out0, nil +} + +// PackPrivilegeRecord is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xf9ad3efe. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function privilegeRecord(uint256 ) view returns(bool enabled, string description) +func (integrationId *IntegrationId) PackPrivilegeRecord(arg0 *big.Int) []byte { + enc, err := integrationId.abi.Pack("privilegeRecord", arg0) + if err != nil { + panic(err) + } + return enc +} + +// TryPackPrivilegeRecord is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xf9ad3efe. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function privilegeRecord(uint256 ) view returns(bool enabled, string description) +func (integrationId *IntegrationId) TryPackPrivilegeRecord(arg0 *big.Int) ([]byte, error) { + return integrationId.abi.Pack("privilegeRecord", arg0) +} + +// PrivilegeRecordOutput serves as a container for the return parameters of contract +// method PrivilegeRecord. +type PrivilegeRecordOutput struct { + Enabled bool + Description string +} + +// UnpackPrivilegeRecord is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0xf9ad3efe. +// +// Solidity: function privilegeRecord(uint256 ) view returns(bool enabled, string description) +func (integrationId *IntegrationId) UnpackPrivilegeRecord(data []byte) (PrivilegeRecordOutput, error) { + out, err := integrationId.abi.Unpack("privilegeRecord", data) + outstruct := new(PrivilegeRecordOutput) + if err != nil { + return *outstruct, err + } + outstruct.Enabled = *abi.ConvertType(out[0], new(bool)).(*bool) + outstruct.Description = *abi.ConvertType(out[1], new(string)).(*string) + return *outstruct, nil +} + +// PackProxiableUUID is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x52d1902d. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function proxiableUUID() view returns(bytes32) +func (integrationId *IntegrationId) PackProxiableUUID() []byte { + enc, err := integrationId.abi.Pack("proxiableUUID") + if err != nil { + panic(err) + } + return enc +} + +// TryPackProxiableUUID is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x52d1902d. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function proxiableUUID() view returns(bytes32) +func (integrationId *IntegrationId) TryPackProxiableUUID() ([]byte, error) { + return integrationId.abi.Pack("proxiableUUID") +} + +// UnpackProxiableUUID is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0x52d1902d. +// +// Solidity: function proxiableUUID() view returns(bytes32) +func (integrationId *IntegrationId) UnpackProxiableUUID(data []byte) ([32]byte, error) { + out, err := integrationId.abi.Unpack("proxiableUUID", data) + if err != nil { + return *new([32]byte), err + } + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + return out0, nil +} + +// PackRenounceRole is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x36568abe. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function renounceRole(bytes32 role, address account) returns() +func (integrationId *IntegrationId) PackRenounceRole(role [32]byte, account common.Address) []byte { + enc, err := integrationId.abi.Pack("renounceRole", role, account) + if err != nil { + panic(err) + } + return enc +} + +// TryPackRenounceRole is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x36568abe. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function renounceRole(bytes32 role, address account) returns() +func (integrationId *IntegrationId) TryPackRenounceRole(role [32]byte, account common.Address) ([]byte, error) { + return integrationId.abi.Pack("renounceRole", role, account) +} + +// PackRevokeRole is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xd547741f. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function revokeRole(bytes32 role, address account) returns() +func (integrationId *IntegrationId) PackRevokeRole(role [32]byte, account common.Address) []byte { + enc, err := integrationId.abi.Pack("revokeRole", role, account) + if err != nil { + panic(err) + } + return enc +} + +// TryPackRevokeRole is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xd547741f. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function revokeRole(bytes32 role, address account) returns() +func (integrationId *IntegrationId) TryPackRevokeRole(role [32]byte, account common.Address) ([]byte, error) { + return integrationId.abi.Pack("revokeRole", role, account) +} + +// PackSafeMint is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x40d097c3. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function safeMint(address to) returns(uint256 tokenId) +func (integrationId *IntegrationId) PackSafeMint(to common.Address) []byte { + enc, err := integrationId.abi.Pack("safeMint", to) + if err != nil { + panic(err) + } + return enc +} + +// TryPackSafeMint is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x40d097c3. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function safeMint(address to) returns(uint256 tokenId) +func (integrationId *IntegrationId) TryPackSafeMint(to common.Address) ([]byte, error) { + return integrationId.abi.Pack("safeMint", to) +} + +// UnpackSafeMint is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0x40d097c3. +// +// Solidity: function safeMint(address to) returns(uint256 tokenId) +func (integrationId *IntegrationId) UnpackSafeMint(data []byte) (*big.Int, error) { + out, err := integrationId.abi.Unpack("safeMint", data) + if err != nil { + return new(big.Int), err + } + out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int) + return out0, nil +} + +// PackSafeMint0 is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xd204c45e. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function safeMint(address to, string uri) returns(uint256 tokenId) +func (integrationId *IntegrationId) PackSafeMint0(to common.Address, uri string) []byte { + enc, err := integrationId.abi.Pack("safeMint0", to, uri) + if err != nil { + panic(err) + } + return enc +} + +// TryPackSafeMint0 is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xd204c45e. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function safeMint(address to, string uri) returns(uint256 tokenId) +func (integrationId *IntegrationId) TryPackSafeMint0(to common.Address, uri string) ([]byte, error) { + return integrationId.abi.Pack("safeMint0", to, uri) +} + +// UnpackSafeMint0 is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0xd204c45e. +// +// Solidity: function safeMint(address to, string uri) returns(uint256 tokenId) +func (integrationId *IntegrationId) UnpackSafeMint0(data []byte) (*big.Int, error) { + out, err := integrationId.abi.Unpack("safeMint0", data) + if err != nil { + return new(big.Int), err + } + out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int) + return out0, nil +} + +// PackSafeTransferFrom is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x42842e0e. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function safeTransferFrom(address from, address to, uint256 tokenId) returns() +func (integrationId *IntegrationId) PackSafeTransferFrom(from common.Address, to common.Address, tokenId *big.Int) []byte { + enc, err := integrationId.abi.Pack("safeTransferFrom", from, to, tokenId) + if err != nil { + panic(err) + } + return enc +} + +// TryPackSafeTransferFrom is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x42842e0e. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function safeTransferFrom(address from, address to, uint256 tokenId) returns() +func (integrationId *IntegrationId) TryPackSafeTransferFrom(from common.Address, to common.Address, tokenId *big.Int) ([]byte, error) { + return integrationId.abi.Pack("safeTransferFrom", from, to, tokenId) +} + +// PackSafeTransferFrom0 is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xb88d4fde. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function safeTransferFrom(address from, address to, uint256 tokenId, bytes data) returns() +func (integrationId *IntegrationId) PackSafeTransferFrom0(from common.Address, to common.Address, tokenId *big.Int, data []byte) []byte { + enc, err := integrationId.abi.Pack("safeTransferFrom0", from, to, tokenId, data) + if err != nil { + panic(err) + } + return enc +} + +// TryPackSafeTransferFrom0 is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xb88d4fde. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function safeTransferFrom(address from, address to, uint256 tokenId, bytes data) returns() +func (integrationId *IntegrationId) TryPackSafeTransferFrom0(from common.Address, to common.Address, tokenId *big.Int, data []byte) ([]byte, error) { + return integrationId.abi.Pack("safeTransferFrom0", from, to, tokenId, data) +} + +// PackSetApprovalForAll is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xa22cb465. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function setApprovalForAll(address operator, bool approved) returns() +func (integrationId *IntegrationId) PackSetApprovalForAll(operator common.Address, approved bool) []byte { + enc, err := integrationId.abi.Pack("setApprovalForAll", operator, approved) + if err != nil { + panic(err) + } + return enc +} + +// TryPackSetApprovalForAll is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xa22cb465. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function setApprovalForAll(address operator, bool approved) returns() +func (integrationId *IntegrationId) TryPackSetApprovalForAll(operator common.Address, approved bool) ([]byte, error) { + return integrationId.abi.Pack("setApprovalForAll", operator, approved) +} + +// PackSetBaseURI is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x55f804b3. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function setBaseURI(string baseURI_) returns() +func (integrationId *IntegrationId) PackSetBaseURI(baseURI string) []byte { + enc, err := integrationId.abi.Pack("setBaseURI", baseURI) + if err != nil { + panic(err) + } + return enc +} + +// TryPackSetBaseURI is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x55f804b3. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function setBaseURI(string baseURI_) returns() +func (integrationId *IntegrationId) TryPackSetBaseURI(baseURI string) ([]byte, error) { + return integrationId.abi.Pack("setBaseURI", baseURI) +} + +// PackSetDimoRegistryAddress is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x0db857ea. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function setDimoRegistryAddress(address dimoRegistry_) returns() +func (integrationId *IntegrationId) PackSetDimoRegistryAddress(dimoRegistry common.Address) []byte { + enc, err := integrationId.abi.Pack("setDimoRegistryAddress", dimoRegistry) + if err != nil { + panic(err) + } + return enc +} + +// TryPackSetDimoRegistryAddress is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x0db857ea. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function setDimoRegistryAddress(address dimoRegistry_) returns() +func (integrationId *IntegrationId) TryPackSetDimoRegistryAddress(dimoRegistry common.Address) ([]byte, error) { + return integrationId.abi.Pack("setDimoRegistryAddress", dimoRegistry) +} + +// PackSetPrivilege is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xeca3221a. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function setPrivilege(uint256 tokenId, uint256 privId, address user, uint256 expires) returns() +func (integrationId *IntegrationId) PackSetPrivilege(tokenId *big.Int, privId *big.Int, user common.Address, expires *big.Int) []byte { + enc, err := integrationId.abi.Pack("setPrivilege", tokenId, privId, user, expires) + if err != nil { + panic(err) + } + return enc +} + +// TryPackSetPrivilege is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xeca3221a. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function setPrivilege(uint256 tokenId, uint256 privId, address user, uint256 expires) returns() +func (integrationId *IntegrationId) TryPackSetPrivilege(tokenId *big.Int, privId *big.Int, user common.Address, expires *big.Int) ([]byte, error) { + return integrationId.abi.Pack("setPrivilege", tokenId, privId, user, expires) +} + +// PackSetPrivileges is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x57ae9754. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function setPrivileges((uint256,uint256,address,uint256)[] privData) returns() +func (integrationId *IntegrationId) PackSetPrivileges(privData []MultiPrivilegeSetPrivilegeData) []byte { + enc, err := integrationId.abi.Pack("setPrivileges", privData) + if err != nil { + panic(err) + } + return enc +} + +// TryPackSetPrivileges is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x57ae9754. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function setPrivileges((uint256,uint256,address,uint256)[] privData) returns() +func (integrationId *IntegrationId) TryPackSetPrivileges(privData []MultiPrivilegeSetPrivilegeData) ([]byte, error) { + return integrationId.abi.Pack("setPrivileges", privData) +} + +// PackSetTrustedForwarder is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xe691d03b. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function setTrustedForwarder(address addr, bool trusted) returns() +func (integrationId *IntegrationId) PackSetTrustedForwarder(addr common.Address, trusted bool) []byte { + enc, err := integrationId.abi.Pack("setTrustedForwarder", addr, trusted) + if err != nil { + panic(err) + } + return enc +} + +// TryPackSetTrustedForwarder is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xe691d03b. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function setTrustedForwarder(address addr, bool trusted) returns() +func (integrationId *IntegrationId) TryPackSetTrustedForwarder(addr common.Address, trusted bool) ([]byte, error) { + return integrationId.abi.Pack("setTrustedForwarder", addr, trusted) +} + +// PackSupportsInterface is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x01ffc9a7. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function supportsInterface(bytes4 interfaceId) view returns(bool) +func (integrationId *IntegrationId) PackSupportsInterface(interfaceId [4]byte) []byte { + enc, err := integrationId.abi.Pack("supportsInterface", interfaceId) + if err != nil { + panic(err) + } + return enc +} + +// TryPackSupportsInterface is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x01ffc9a7. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function supportsInterface(bytes4 interfaceId) view returns(bool) +func (integrationId *IntegrationId) TryPackSupportsInterface(interfaceId [4]byte) ([]byte, error) { + return integrationId.abi.Pack("supportsInterface", interfaceId) +} + +// UnpackSupportsInterface is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0x01ffc9a7. +// +// Solidity: function supportsInterface(bytes4 interfaceId) view returns(bool) +func (integrationId *IntegrationId) UnpackSupportsInterface(data []byte) (bool, error) { + out, err := integrationId.abi.Unpack("supportsInterface", data) + if err != nil { + return *new(bool), err + } + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + return out0, nil +} + +// PackSymbol is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x95d89b41. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function symbol() view returns(string) +func (integrationId *IntegrationId) PackSymbol() []byte { + enc, err := integrationId.abi.Pack("symbol") + if err != nil { + panic(err) + } + return enc +} + +// TryPackSymbol is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x95d89b41. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function symbol() view returns(string) +func (integrationId *IntegrationId) TryPackSymbol() ([]byte, error) { + return integrationId.abi.Pack("symbol") +} + +// UnpackSymbol is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0x95d89b41. +// +// Solidity: function symbol() view returns(string) +func (integrationId *IntegrationId) UnpackSymbol(data []byte) (string, error) { + out, err := integrationId.abi.Unpack("symbol", data) + if err != nil { + return *new(string), err + } + out0 := *abi.ConvertType(out[0], new(string)).(*string) + return out0, nil +} + +// PackTokenIdToVersion is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xf1a9d41c. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function tokenIdToVersion(uint256 ) view returns(uint256) +func (integrationId *IntegrationId) PackTokenIdToVersion(arg0 *big.Int) []byte { + enc, err := integrationId.abi.Pack("tokenIdToVersion", arg0) + if err != nil { + panic(err) + } + return enc +} + +// TryPackTokenIdToVersion is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xf1a9d41c. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function tokenIdToVersion(uint256 ) view returns(uint256) +func (integrationId *IntegrationId) TryPackTokenIdToVersion(arg0 *big.Int) ([]byte, error) { + return integrationId.abi.Pack("tokenIdToVersion", arg0) +} + +// UnpackTokenIdToVersion is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0xf1a9d41c. +// +// Solidity: function tokenIdToVersion(uint256 ) view returns(uint256) +func (integrationId *IntegrationId) UnpackTokenIdToVersion(data []byte) (*big.Int, error) { + out, err := integrationId.abi.Unpack("tokenIdToVersion", data) + if err != nil { + return new(big.Int), err + } + out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int) + return out0, nil +} + +// PackTokenURI is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xc87b56dd. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function tokenURI(uint256 tokenId) view returns(string) +func (integrationId *IntegrationId) PackTokenURI(tokenId *big.Int) []byte { + enc, err := integrationId.abi.Pack("tokenURI", tokenId) + if err != nil { + panic(err) + } + return enc +} + +// TryPackTokenURI is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xc87b56dd. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function tokenURI(uint256 tokenId) view returns(string) +func (integrationId *IntegrationId) TryPackTokenURI(tokenId *big.Int) ([]byte, error) { + return integrationId.abi.Pack("tokenURI", tokenId) +} + +// UnpackTokenURI is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0xc87b56dd. +// +// Solidity: function tokenURI(uint256 tokenId) view returns(string) +func (integrationId *IntegrationId) UnpackTokenURI(data []byte) (string, error) { + out, err := integrationId.abi.Unpack("tokenURI", data) + if err != nil { + return *new(string), err + } + out0 := *abi.ConvertType(out[0], new(string)).(*string) + return out0, nil +} + +// PackTransferFrom is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x23b872dd. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function transferFrom(address from, address to, uint256 tokenId) returns() +func (integrationId *IntegrationId) PackTransferFrom(from common.Address, to common.Address, tokenId *big.Int) []byte { + enc, err := integrationId.abi.Pack("transferFrom", from, to, tokenId) + if err != nil { + panic(err) + } + return enc +} + +// TryPackTransferFrom is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x23b872dd. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function transferFrom(address from, address to, uint256 tokenId) returns() +func (integrationId *IntegrationId) TryPackTransferFrom(from common.Address, to common.Address, tokenId *big.Int) ([]byte, error) { + return integrationId.abi.Pack("transferFrom", from, to, tokenId) +} + +// PackTrustedForwarders is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x54776bb9. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function trustedForwarders(address ) view returns(bool) +func (integrationId *IntegrationId) PackTrustedForwarders(arg0 common.Address) []byte { + enc, err := integrationId.abi.Pack("trustedForwarders", arg0) + if err != nil { + panic(err) + } + return enc +} + +// TryPackTrustedForwarders is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x54776bb9. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function trustedForwarders(address ) view returns(bool) +func (integrationId *IntegrationId) TryPackTrustedForwarders(arg0 common.Address) ([]byte, error) { + return integrationId.abi.Pack("trustedForwarders", arg0) +} + +// UnpackTrustedForwarders is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0x54776bb9. +// +// Solidity: function trustedForwarders(address ) view returns(bool) +func (integrationId *IntegrationId) UnpackTrustedForwarders(data []byte) (bool, error) { + out, err := integrationId.abi.Unpack("trustedForwarders", data) + if err != nil { + return *new(bool), err + } + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + return out0, nil +} + +// PackUpgradeTo is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x3659cfe6. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function upgradeTo(address newImplementation) returns() +func (integrationId *IntegrationId) PackUpgradeTo(newImplementation common.Address) []byte { + enc, err := integrationId.abi.Pack("upgradeTo", newImplementation) + if err != nil { + panic(err) + } + return enc +} + +// TryPackUpgradeTo is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x3659cfe6. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function upgradeTo(address newImplementation) returns() +func (integrationId *IntegrationId) TryPackUpgradeTo(newImplementation common.Address) ([]byte, error) { + return integrationId.abi.Pack("upgradeTo", newImplementation) +} + +// PackUpgradeToAndCall is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x4f1ef286. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function upgradeToAndCall(address newImplementation, bytes data) payable returns() +func (integrationId *IntegrationId) PackUpgradeToAndCall(newImplementation common.Address, data []byte) []byte { + enc, err := integrationId.abi.Pack("upgradeToAndCall", newImplementation, data) + if err != nil { + panic(err) + } + return enc +} + +// TryPackUpgradeToAndCall is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x4f1ef286. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function upgradeToAndCall(address newImplementation, bytes data) payable returns() +func (integrationId *IntegrationId) TryPackUpgradeToAndCall(newImplementation common.Address, data []byte) ([]byte, error) { + return integrationId.abi.Pack("upgradeToAndCall", newImplementation, data) +} + +// IntegrationIdAdminChanged represents a AdminChanged event raised by the IntegrationId contract. +type IntegrationIdAdminChanged struct { + PreviousAdmin common.Address + NewAdmin common.Address + Raw *types.Log // Blockchain specific contextual infos +} + +const IntegrationIdAdminChangedEventName = "AdminChanged" + +// ContractEventName returns the user-defined event name. +func (IntegrationIdAdminChanged) ContractEventName() string { + return IntegrationIdAdminChangedEventName +} + +// UnpackAdminChangedEvent is the Go binding that unpacks the event data emitted +// by contract. +// +// Solidity: event AdminChanged(address previousAdmin, address newAdmin) +func (integrationId *IntegrationId) UnpackAdminChangedEvent(log *types.Log) (*IntegrationIdAdminChanged, error) { + event := "AdminChanged" + if len(log.Topics) == 0 || log.Topics[0] != integrationId.abi.Events[event].ID { + return nil, errors.New("event signature mismatch") + } + out := new(IntegrationIdAdminChanged) + if len(log.Data) > 0 { + if err := integrationId.abi.UnpackIntoInterface(out, event, log.Data); err != nil { + return nil, err + } + } + var indexed abi.Arguments + for _, arg := range integrationId.abi.Events[event].Inputs { + if arg.Indexed { + indexed = append(indexed, arg) + } + } + if err := abi.ParseTopics(out, indexed, log.Topics[1:]); err != nil { + return nil, err + } + out.Raw = log + return out, nil +} + +// IntegrationIdApproval represents a Approval event raised by the IntegrationId contract. +type IntegrationIdApproval struct { + Owner common.Address + Approved common.Address + TokenId *big.Int + Raw *types.Log // Blockchain specific contextual infos +} + +const IntegrationIdApprovalEventName = "Approval" + +// ContractEventName returns the user-defined event name. +func (IntegrationIdApproval) ContractEventName() string { + return IntegrationIdApprovalEventName +} + +// UnpackApprovalEvent is the Go binding that unpacks the event data emitted +// by contract. +// +// Solidity: event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId) +func (integrationId *IntegrationId) UnpackApprovalEvent(log *types.Log) (*IntegrationIdApproval, error) { + event := "Approval" + if len(log.Topics) == 0 || log.Topics[0] != integrationId.abi.Events[event].ID { + return nil, errors.New("event signature mismatch") + } + out := new(IntegrationIdApproval) + if len(log.Data) > 0 { + if err := integrationId.abi.UnpackIntoInterface(out, event, log.Data); err != nil { + return nil, err + } + } + var indexed abi.Arguments + for _, arg := range integrationId.abi.Events[event].Inputs { + if arg.Indexed { + indexed = append(indexed, arg) + } + } + if err := abi.ParseTopics(out, indexed, log.Topics[1:]); err != nil { + return nil, err + } + out.Raw = log + return out, nil +} + +// IntegrationIdApprovalForAll represents a ApprovalForAll event raised by the IntegrationId contract. +type IntegrationIdApprovalForAll struct { + Owner common.Address + Operator common.Address + Approved bool + Raw *types.Log // Blockchain specific contextual infos +} + +const IntegrationIdApprovalForAllEventName = "ApprovalForAll" + +// ContractEventName returns the user-defined event name. +func (IntegrationIdApprovalForAll) ContractEventName() string { + return IntegrationIdApprovalForAllEventName +} + +// UnpackApprovalForAllEvent is the Go binding that unpacks the event data emitted +// by contract. +// +// Solidity: event ApprovalForAll(address indexed owner, address indexed operator, bool approved) +func (integrationId *IntegrationId) UnpackApprovalForAllEvent(log *types.Log) (*IntegrationIdApprovalForAll, error) { + event := "ApprovalForAll" + if len(log.Topics) == 0 || log.Topics[0] != integrationId.abi.Events[event].ID { + return nil, errors.New("event signature mismatch") + } + out := new(IntegrationIdApprovalForAll) + if len(log.Data) > 0 { + if err := integrationId.abi.UnpackIntoInterface(out, event, log.Data); err != nil { + return nil, err + } + } + var indexed abi.Arguments + for _, arg := range integrationId.abi.Events[event].Inputs { + if arg.Indexed { + indexed = append(indexed, arg) + } + } + if err := abi.ParseTopics(out, indexed, log.Topics[1:]); err != nil { + return nil, err + } + out.Raw = log + return out, nil +} + +// IntegrationIdBatchMetadataUpdate represents a BatchMetadataUpdate event raised by the IntegrationId contract. +type IntegrationIdBatchMetadataUpdate struct { + FromTokenId *big.Int + ToTokenId *big.Int + Raw *types.Log // Blockchain specific contextual infos +} + +const IntegrationIdBatchMetadataUpdateEventName = "BatchMetadataUpdate" + +// ContractEventName returns the user-defined event name. +func (IntegrationIdBatchMetadataUpdate) ContractEventName() string { + return IntegrationIdBatchMetadataUpdateEventName +} + +// UnpackBatchMetadataUpdateEvent is the Go binding that unpacks the event data emitted +// by contract. +// +// Solidity: event BatchMetadataUpdate(uint256 _fromTokenId, uint256 _toTokenId) +func (integrationId *IntegrationId) UnpackBatchMetadataUpdateEvent(log *types.Log) (*IntegrationIdBatchMetadataUpdate, error) { + event := "BatchMetadataUpdate" + if len(log.Topics) == 0 || log.Topics[0] != integrationId.abi.Events[event].ID { + return nil, errors.New("event signature mismatch") + } + out := new(IntegrationIdBatchMetadataUpdate) + if len(log.Data) > 0 { + if err := integrationId.abi.UnpackIntoInterface(out, event, log.Data); err != nil { + return nil, err + } + } + var indexed abi.Arguments + for _, arg := range integrationId.abi.Events[event].Inputs { + if arg.Indexed { + indexed = append(indexed, arg) + } + } + if err := abi.ParseTopics(out, indexed, log.Topics[1:]); err != nil { + return nil, err + } + out.Raw = log + return out, nil +} + +// IntegrationIdBeaconUpgraded represents a BeaconUpgraded event raised by the IntegrationId contract. +type IntegrationIdBeaconUpgraded struct { + Beacon common.Address + Raw *types.Log // Blockchain specific contextual infos +} + +const IntegrationIdBeaconUpgradedEventName = "BeaconUpgraded" + +// ContractEventName returns the user-defined event name. +func (IntegrationIdBeaconUpgraded) ContractEventName() string { + return IntegrationIdBeaconUpgradedEventName +} + +// UnpackBeaconUpgradedEvent is the Go binding that unpacks the event data emitted +// by contract. +// +// Solidity: event BeaconUpgraded(address indexed beacon) +func (integrationId *IntegrationId) UnpackBeaconUpgradedEvent(log *types.Log) (*IntegrationIdBeaconUpgraded, error) { + event := "BeaconUpgraded" + if len(log.Topics) == 0 || log.Topics[0] != integrationId.abi.Events[event].ID { + return nil, errors.New("event signature mismatch") + } + out := new(IntegrationIdBeaconUpgraded) + if len(log.Data) > 0 { + if err := integrationId.abi.UnpackIntoInterface(out, event, log.Data); err != nil { + return nil, err + } + } + var indexed abi.Arguments + for _, arg := range integrationId.abi.Events[event].Inputs { + if arg.Indexed { + indexed = append(indexed, arg) + } + } + if err := abi.ParseTopics(out, indexed, log.Topics[1:]); err != nil { + return nil, err + } + out.Raw = log + return out, nil +} + +// IntegrationIdInitialized represents a Initialized event raised by the IntegrationId contract. +type IntegrationIdInitialized struct { + Version uint8 + Raw *types.Log // Blockchain specific contextual infos +} + +const IntegrationIdInitializedEventName = "Initialized" + +// ContractEventName returns the user-defined event name. +func (IntegrationIdInitialized) ContractEventName() string { + return IntegrationIdInitializedEventName +} + +// UnpackInitializedEvent is the Go binding that unpacks the event data emitted +// by contract. +// +// Solidity: event Initialized(uint8 version) +func (integrationId *IntegrationId) UnpackInitializedEvent(log *types.Log) (*IntegrationIdInitialized, error) { + event := "Initialized" + if len(log.Topics) == 0 || log.Topics[0] != integrationId.abi.Events[event].ID { + return nil, errors.New("event signature mismatch") + } + out := new(IntegrationIdInitialized) + if len(log.Data) > 0 { + if err := integrationId.abi.UnpackIntoInterface(out, event, log.Data); err != nil { + return nil, err + } + } + var indexed abi.Arguments + for _, arg := range integrationId.abi.Events[event].Inputs { + if arg.Indexed { + indexed = append(indexed, arg) + } + } + if err := abi.ParseTopics(out, indexed, log.Topics[1:]); err != nil { + return nil, err + } + out.Raw = log + return out, nil +} + +// IntegrationIdMetadataUpdate represents a MetadataUpdate event raised by the IntegrationId contract. +type IntegrationIdMetadataUpdate struct { + TokenId *big.Int + Raw *types.Log // Blockchain specific contextual infos +} + +const IntegrationIdMetadataUpdateEventName = "MetadataUpdate" + +// ContractEventName returns the user-defined event name. +func (IntegrationIdMetadataUpdate) ContractEventName() string { + return IntegrationIdMetadataUpdateEventName +} + +// UnpackMetadataUpdateEvent is the Go binding that unpacks the event data emitted +// by contract. +// +// Solidity: event MetadataUpdate(uint256 _tokenId) +func (integrationId *IntegrationId) UnpackMetadataUpdateEvent(log *types.Log) (*IntegrationIdMetadataUpdate, error) { + event := "MetadataUpdate" + if len(log.Topics) == 0 || log.Topics[0] != integrationId.abi.Events[event].ID { + return nil, errors.New("event signature mismatch") + } + out := new(IntegrationIdMetadataUpdate) + if len(log.Data) > 0 { + if err := integrationId.abi.UnpackIntoInterface(out, event, log.Data); err != nil { + return nil, err + } + } + var indexed abi.Arguments + for _, arg := range integrationId.abi.Events[event].Inputs { + if arg.Indexed { + indexed = append(indexed, arg) + } + } + if err := abi.ParseTopics(out, indexed, log.Topics[1:]); err != nil { + return nil, err + } + out.Raw = log + return out, nil +} + +// IntegrationIdPrivilegeCreated represents a PrivilegeCreated event raised by the IntegrationId contract. +type IntegrationIdPrivilegeCreated struct { + PrivilegeId *big.Int + Enabled bool + Description string + Raw *types.Log // Blockchain specific contextual infos +} + +const IntegrationIdPrivilegeCreatedEventName = "PrivilegeCreated" + +// ContractEventName returns the user-defined event name. +func (IntegrationIdPrivilegeCreated) ContractEventName() string { + return IntegrationIdPrivilegeCreatedEventName +} + +// UnpackPrivilegeCreatedEvent is the Go binding that unpacks the event data emitted +// by contract. +// +// Solidity: event PrivilegeCreated(uint256 indexed privilegeId, bool enabled, string description) +func (integrationId *IntegrationId) UnpackPrivilegeCreatedEvent(log *types.Log) (*IntegrationIdPrivilegeCreated, error) { + event := "PrivilegeCreated" + if len(log.Topics) == 0 || log.Topics[0] != integrationId.abi.Events[event].ID { + return nil, errors.New("event signature mismatch") + } + out := new(IntegrationIdPrivilegeCreated) + if len(log.Data) > 0 { + if err := integrationId.abi.UnpackIntoInterface(out, event, log.Data); err != nil { + return nil, err + } + } + var indexed abi.Arguments + for _, arg := range integrationId.abi.Events[event].Inputs { + if arg.Indexed { + indexed = append(indexed, arg) + } + } + if err := abi.ParseTopics(out, indexed, log.Topics[1:]); err != nil { + return nil, err + } + out.Raw = log + return out, nil +} + +// IntegrationIdPrivilegeDisabled represents a PrivilegeDisabled event raised by the IntegrationId contract. +type IntegrationIdPrivilegeDisabled struct { + PrivilegeId *big.Int + Raw *types.Log // Blockchain specific contextual infos +} + +const IntegrationIdPrivilegeDisabledEventName = "PrivilegeDisabled" + +// ContractEventName returns the user-defined event name. +func (IntegrationIdPrivilegeDisabled) ContractEventName() string { + return IntegrationIdPrivilegeDisabledEventName +} + +// UnpackPrivilegeDisabledEvent is the Go binding that unpacks the event data emitted +// by contract. +// +// Solidity: event PrivilegeDisabled(uint256 indexed privilegeId) +func (integrationId *IntegrationId) UnpackPrivilegeDisabledEvent(log *types.Log) (*IntegrationIdPrivilegeDisabled, error) { + event := "PrivilegeDisabled" + if len(log.Topics) == 0 || log.Topics[0] != integrationId.abi.Events[event].ID { + return nil, errors.New("event signature mismatch") + } + out := new(IntegrationIdPrivilegeDisabled) + if len(log.Data) > 0 { + if err := integrationId.abi.UnpackIntoInterface(out, event, log.Data); err != nil { + return nil, err + } + } + var indexed abi.Arguments + for _, arg := range integrationId.abi.Events[event].Inputs { + if arg.Indexed { + indexed = append(indexed, arg) + } + } + if err := abi.ParseTopics(out, indexed, log.Topics[1:]); err != nil { + return nil, err + } + out.Raw = log + return out, nil +} + +// IntegrationIdPrivilegeEnabled represents a PrivilegeEnabled event raised by the IntegrationId contract. +type IntegrationIdPrivilegeEnabled struct { + PrivilegeId *big.Int + Raw *types.Log // Blockchain specific contextual infos +} + +const IntegrationIdPrivilegeEnabledEventName = "PrivilegeEnabled" + +// ContractEventName returns the user-defined event name. +func (IntegrationIdPrivilegeEnabled) ContractEventName() string { + return IntegrationIdPrivilegeEnabledEventName +} + +// UnpackPrivilegeEnabledEvent is the Go binding that unpacks the event data emitted +// by contract. +// +// Solidity: event PrivilegeEnabled(uint256 indexed privilegeId) +func (integrationId *IntegrationId) UnpackPrivilegeEnabledEvent(log *types.Log) (*IntegrationIdPrivilegeEnabled, error) { + event := "PrivilegeEnabled" + if len(log.Topics) == 0 || log.Topics[0] != integrationId.abi.Events[event].ID { + return nil, errors.New("event signature mismatch") + } + out := new(IntegrationIdPrivilegeEnabled) + if len(log.Data) > 0 { + if err := integrationId.abi.UnpackIntoInterface(out, event, log.Data); err != nil { + return nil, err + } + } + var indexed abi.Arguments + for _, arg := range integrationId.abi.Events[event].Inputs { + if arg.Indexed { + indexed = append(indexed, arg) + } + } + if err := abi.ParseTopics(out, indexed, log.Topics[1:]); err != nil { + return nil, err + } + out.Raw = log + return out, nil +} + +// IntegrationIdPrivilegeSet represents a PrivilegeSet event raised by the IntegrationId contract. +type IntegrationIdPrivilegeSet struct { + TokenId *big.Int + Version *big.Int + PrivId *big.Int + User common.Address + Expires *big.Int + Raw *types.Log // Blockchain specific contextual infos +} + +const IntegrationIdPrivilegeSetEventName = "PrivilegeSet" + +// ContractEventName returns the user-defined event name. +func (IntegrationIdPrivilegeSet) ContractEventName() string { + return IntegrationIdPrivilegeSetEventName +} + +// UnpackPrivilegeSetEvent is the Go binding that unpacks the event data emitted +// by contract. +// +// Solidity: event PrivilegeSet(uint256 indexed tokenId, uint256 version, uint256 indexed privId, address indexed user, uint256 expires) +func (integrationId *IntegrationId) UnpackPrivilegeSetEvent(log *types.Log) (*IntegrationIdPrivilegeSet, error) { + event := "PrivilegeSet" + if len(log.Topics) == 0 || log.Topics[0] != integrationId.abi.Events[event].ID { + return nil, errors.New("event signature mismatch") + } + out := new(IntegrationIdPrivilegeSet) + if len(log.Data) > 0 { + if err := integrationId.abi.UnpackIntoInterface(out, event, log.Data); err != nil { + return nil, err + } + } + var indexed abi.Arguments + for _, arg := range integrationId.abi.Events[event].Inputs { + if arg.Indexed { + indexed = append(indexed, arg) + } + } + if err := abi.ParseTopics(out, indexed, log.Topics[1:]); err != nil { + return nil, err + } + out.Raw = log + return out, nil +} + +// IntegrationIdRoleAdminChanged represents a RoleAdminChanged event raised by the IntegrationId contract. +type IntegrationIdRoleAdminChanged struct { + Role [32]byte + PreviousAdminRole [32]byte + NewAdminRole [32]byte + Raw *types.Log // Blockchain specific contextual infos +} + +const IntegrationIdRoleAdminChangedEventName = "RoleAdminChanged" + +// ContractEventName returns the user-defined event name. +func (IntegrationIdRoleAdminChanged) ContractEventName() string { + return IntegrationIdRoleAdminChangedEventName +} + +// UnpackRoleAdminChangedEvent is the Go binding that unpacks the event data emitted +// by contract. +// +// Solidity: event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole) +func (integrationId *IntegrationId) UnpackRoleAdminChangedEvent(log *types.Log) (*IntegrationIdRoleAdminChanged, error) { + event := "RoleAdminChanged" + if len(log.Topics) == 0 || log.Topics[0] != integrationId.abi.Events[event].ID { + return nil, errors.New("event signature mismatch") + } + out := new(IntegrationIdRoleAdminChanged) + if len(log.Data) > 0 { + if err := integrationId.abi.UnpackIntoInterface(out, event, log.Data); err != nil { + return nil, err + } + } + var indexed abi.Arguments + for _, arg := range integrationId.abi.Events[event].Inputs { + if arg.Indexed { + indexed = append(indexed, arg) + } + } + if err := abi.ParseTopics(out, indexed, log.Topics[1:]); err != nil { + return nil, err + } + out.Raw = log + return out, nil +} + +// IntegrationIdRoleGranted represents a RoleGranted event raised by the IntegrationId contract. +type IntegrationIdRoleGranted struct { + Role [32]byte + Account common.Address + Sender common.Address + Raw *types.Log // Blockchain specific contextual infos +} + +const IntegrationIdRoleGrantedEventName = "RoleGranted" + +// ContractEventName returns the user-defined event name. +func (IntegrationIdRoleGranted) ContractEventName() string { + return IntegrationIdRoleGrantedEventName +} + +// UnpackRoleGrantedEvent is the Go binding that unpacks the event data emitted +// by contract. +// +// Solidity: event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender) +func (integrationId *IntegrationId) UnpackRoleGrantedEvent(log *types.Log) (*IntegrationIdRoleGranted, error) { + event := "RoleGranted" + if len(log.Topics) == 0 || log.Topics[0] != integrationId.abi.Events[event].ID { + return nil, errors.New("event signature mismatch") + } + out := new(IntegrationIdRoleGranted) + if len(log.Data) > 0 { + if err := integrationId.abi.UnpackIntoInterface(out, event, log.Data); err != nil { + return nil, err + } + } + var indexed abi.Arguments + for _, arg := range integrationId.abi.Events[event].Inputs { + if arg.Indexed { + indexed = append(indexed, arg) + } + } + if err := abi.ParseTopics(out, indexed, log.Topics[1:]); err != nil { + return nil, err + } + out.Raw = log + return out, nil +} + +// IntegrationIdRoleRevoked represents a RoleRevoked event raised by the IntegrationId contract. +type IntegrationIdRoleRevoked struct { + Role [32]byte + Account common.Address + Sender common.Address + Raw *types.Log // Blockchain specific contextual infos +} + +const IntegrationIdRoleRevokedEventName = "RoleRevoked" + +// ContractEventName returns the user-defined event name. +func (IntegrationIdRoleRevoked) ContractEventName() string { + return IntegrationIdRoleRevokedEventName +} + +// UnpackRoleRevokedEvent is the Go binding that unpacks the event data emitted +// by contract. +// +// Solidity: event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender) +func (integrationId *IntegrationId) UnpackRoleRevokedEvent(log *types.Log) (*IntegrationIdRoleRevoked, error) { + event := "RoleRevoked" + if len(log.Topics) == 0 || log.Topics[0] != integrationId.abi.Events[event].ID { + return nil, errors.New("event signature mismatch") + } + out := new(IntegrationIdRoleRevoked) + if len(log.Data) > 0 { + if err := integrationId.abi.UnpackIntoInterface(out, event, log.Data); err != nil { + return nil, err + } + } + var indexed abi.Arguments + for _, arg := range integrationId.abi.Events[event].Inputs { + if arg.Indexed { + indexed = append(indexed, arg) + } + } + if err := abi.ParseTopics(out, indexed, log.Topics[1:]); err != nil { + return nil, err + } + out.Raw = log + return out, nil +} + +// IntegrationIdTransfer represents a Transfer event raised by the IntegrationId contract. +type IntegrationIdTransfer struct { + From common.Address + To common.Address + TokenId *big.Int + Raw *types.Log // Blockchain specific contextual infos +} + +const IntegrationIdTransferEventName = "Transfer" + +// ContractEventName returns the user-defined event name. +func (IntegrationIdTransfer) ContractEventName() string { + return IntegrationIdTransferEventName +} + +// UnpackTransferEvent is the Go binding that unpacks the event data emitted +// by contract. +// +// Solidity: event Transfer(address indexed from, address indexed to, uint256 indexed tokenId) +func (integrationId *IntegrationId) UnpackTransferEvent(log *types.Log) (*IntegrationIdTransfer, error) { + event := "Transfer" + if len(log.Topics) == 0 || log.Topics[0] != integrationId.abi.Events[event].ID { + return nil, errors.New("event signature mismatch") + } + out := new(IntegrationIdTransfer) + if len(log.Data) > 0 { + if err := integrationId.abi.UnpackIntoInterface(out, event, log.Data); err != nil { + return nil, err + } + } + var indexed abi.Arguments + for _, arg := range integrationId.abi.Events[event].Inputs { + if arg.Indexed { + indexed = append(indexed, arg) + } + } + if err := abi.ParseTopics(out, indexed, log.Topics[1:]); err != nil { + return nil, err + } + out.Raw = log + return out, nil +} + +// IntegrationIdUpgraded represents a Upgraded event raised by the IntegrationId contract. +type IntegrationIdUpgraded struct { + Implementation common.Address + Raw *types.Log // Blockchain specific contextual infos +} + +const IntegrationIdUpgradedEventName = "Upgraded" + +// ContractEventName returns the user-defined event name. +func (IntegrationIdUpgraded) ContractEventName() string { + return IntegrationIdUpgradedEventName +} + +// UnpackUpgradedEvent is the Go binding that unpacks the event data emitted +// by contract. +// +// Solidity: event Upgraded(address indexed implementation) +func (integrationId *IntegrationId) UnpackUpgradedEvent(log *types.Log) (*IntegrationIdUpgraded, error) { + event := "Upgraded" + if len(log.Topics) == 0 || log.Topics[0] != integrationId.abi.Events[event].ID { + return nil, errors.New("event signature mismatch") + } + out := new(IntegrationIdUpgraded) + if len(log.Data) > 0 { + if err := integrationId.abi.UnpackIntoInterface(out, event, log.Data); err != nil { + return nil, err + } + } + var indexed abi.Arguments + for _, arg := range integrationId.abi.Events[event].Inputs { + if arg.Indexed { + indexed = append(indexed, arg) + } + } + if err := abi.ParseTopics(out, indexed, log.Topics[1:]); err != nil { + return nil, err + } + out.Raw = log + return out, nil +} + +// UnpackError attempts to decode the provided error data using user-defined +// error definitions. +func (integrationId *IntegrationId) UnpackError(raw []byte) (any, error) { + if bytes.Equal(raw[:4], integrationId.abi.Errors["ZeroAddress"].ID.Bytes()[:4]) { + return integrationId.UnpackZeroAddressError(raw[4:]) + } + return nil, errors.New("Unknown error") +} + +// IntegrationIdZeroAddress represents a ZeroAddress error raised by the IntegrationId contract. +type IntegrationIdZeroAddress struct { +} + +// ErrorID returns the hash of canonical representation of the error's signature. +// +// Solidity: error ZeroAddress() +func IntegrationIdZeroAddressErrorID() common.Hash { + return common.HexToHash("0xd92e233df2717d4a40030e20904abd27b68fcbeede117eaaccbbdac9618c8c73") +} + +// UnpackZeroAddressError is the Go binding used to decode the provided +// error data into the corresponding Go error struct. +// +// Solidity: error ZeroAddress() +func (integrationId *IntegrationId) UnpackZeroAddressError(raw []byte) (*IntegrationIdZeroAddress, error) { + out := new(IntegrationIdZeroAddress) + if err := integrationId.abi.UnpackIntoInterface(out, "ZeroAddress", raw); err != nil { + return nil, err + } + return out, nil +} diff --git a/bindings/manufacturerId/manufacturerId.go b/bindings/manufacturerId/manufacturerId.go new file mode 100644 index 00000000..867f413c --- /dev/null +++ b/bindings/manufacturerId/manufacturerId.go @@ -0,0 +1,2104 @@ +// Code generated via abigen V2 - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package manufacturerId + +import ( + "bytes" + "errors" + "math/big" + + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/accounts/abi/bind/v2" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" +) + +// Reference imports to suppress errors if they are not otherwise used. +var ( + _ = bytes.Equal + _ = errors.New + _ = big.NewInt + _ = common.Big1 + _ = types.BloomLookup + _ = abi.ConvertType +) + +// ManufacturerIdSetPrivilegeData is an auto generated low-level Go binding around an user-defined struct. +type ManufacturerIdSetPrivilegeData struct { + TokenId *big.Int + PrivId *big.Int + User common.Address + Expires *big.Int +} + +// ManufacturerIdMetaData contains all meta data concerning the ManufacturerId contract. +var ManufacturerIdMetaData = bind.MetaData{ + ABI: "[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"ZeroAddress\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AdminChanged\",\"type\":\"event\"},{\"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\":false,\"internalType\":\"uint256\",\"name\":\"_fromTokenId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_toTokenId\",\"type\":\"uint256\"}],\"name\":\"BatchMetadataUpdate\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"beacon\",\"type\":\"address\"}],\"name\":\"BeaconUpgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_tokenId\",\"type\":\"uint256\"}],\"name\":\"MetadataUpdate\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"privilegeId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"enabled\",\"type\":\"bool\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"description\",\"type\":\"string\"}],\"name\":\"PrivilegeCreated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"privilegeId\",\"type\":\"uint256\"}],\"name\":\"PrivilegeDisabled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"privilegeId\",\"type\":\"uint256\"}],\"name\":\"PrivilegeEnabled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"version\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"privId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"expires\",\"type\":\"uint256\"}],\"name\":\"PrivilegeSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"previousAdminRole\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"newAdminRole\",\"type\":\"bytes32\"}],\"name\":\"RoleAdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleGranted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleRevoked\",\"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\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"BURNER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MINTER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"TRANSFERER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"UPGRADER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"_dimoRegistry\",\"outputs\":[{\"internalType\":\"contractIDimoRegistry\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"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\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"burn\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"enabled\",\"type\":\"bool\"},{\"internalType\":\"string\",\"name\":\"description\",\"type\":\"string\"}],\"name\":\"createPrivilege\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"privId\",\"type\":\"uint256\"}],\"name\":\"disablePrivilege\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"privId\",\"type\":\"uint256\"}],\"name\":\"enablePrivilege\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"exists\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"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\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleAdmin\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"grantRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"privId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"}],\"name\":\"hasPrivilege\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"hasRole\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"name_\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"symbol_\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"baseUri_\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"dimoRegistry_\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"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\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"privilegeEntry\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"privId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"}],\"name\":\"privilegeExpiresAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"privilegeRecord\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"enabled\",\"type\":\"bool\"},{\"internalType\":\"string\",\"name\":\"description\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"proxiableUUID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"renounceRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"revokeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"safeMint\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"uri\",\"type\":\"string\"}],\"name\":\"safeMint\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"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\":\"string\",\"name\":\"baseURI_\",\"type\":\"string\"}],\"name\":\"setBaseURI\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"setDimoRegistryAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"privId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"expires\",\"type\":\"uint256\"}],\"name\":\"setPrivilege\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"privId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"expires\",\"type\":\"uint256\"}],\"internalType\":\"structManufacturerId.SetPrivilegeData[]\",\"name\":\"privData\",\"type\":\"tuple[]\"}],\"name\":\"setPrivileges\",\"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\":\"\",\"type\":\"uint256\"}],\"name\":\"tokenIdToVersion\",\"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\":[{\"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\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"}]", + ID: "ManufacturerId", +} + +// ManufacturerId is an auto generated Go binding around an Ethereum contract. +type ManufacturerId struct { + abi abi.ABI +} + +// NewManufacturerId creates a new instance of ManufacturerId. +func NewManufacturerId() *ManufacturerId { + parsed, err := ManufacturerIdMetaData.ParseABI() + if err != nil { + panic(errors.New("invalid ABI: " + err.Error())) + } + return &ManufacturerId{abi: *parsed} +} + +// Instance creates a wrapper for a deployed contract instance at the given address. +// Use this to create the instance object passed to abigen v2 library functions Call, Transact, etc. +func (c *ManufacturerId) Instance(backend bind.ContractBackend, addr common.Address) *bind.BoundContract { + return bind.NewBoundContract(addr, c.abi, backend, backend, backend) +} + +// PackADMINROLE is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x75b238fc. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function ADMIN_ROLE() view returns(bytes32) +func (manufacturerId *ManufacturerId) PackADMINROLE() []byte { + enc, err := manufacturerId.abi.Pack("ADMIN_ROLE") + if err != nil { + panic(err) + } + return enc +} + +// TryPackADMINROLE is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x75b238fc. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function ADMIN_ROLE() view returns(bytes32) +func (manufacturerId *ManufacturerId) TryPackADMINROLE() ([]byte, error) { + return manufacturerId.abi.Pack("ADMIN_ROLE") +} + +// UnpackADMINROLE is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0x75b238fc. +// +// Solidity: function ADMIN_ROLE() view returns(bytes32) +func (manufacturerId *ManufacturerId) UnpackADMINROLE(data []byte) ([32]byte, error) { + out, err := manufacturerId.abi.Unpack("ADMIN_ROLE", data) + if err != nil { + return *new([32]byte), err + } + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + return out0, nil +} + +// PackBURNERROLE is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x282c51f3. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function BURNER_ROLE() view returns(bytes32) +func (manufacturerId *ManufacturerId) PackBURNERROLE() []byte { + enc, err := manufacturerId.abi.Pack("BURNER_ROLE") + if err != nil { + panic(err) + } + return enc +} + +// TryPackBURNERROLE is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x282c51f3. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function BURNER_ROLE() view returns(bytes32) +func (manufacturerId *ManufacturerId) TryPackBURNERROLE() ([]byte, error) { + return manufacturerId.abi.Pack("BURNER_ROLE") +} + +// UnpackBURNERROLE is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0x282c51f3. +// +// Solidity: function BURNER_ROLE() view returns(bytes32) +func (manufacturerId *ManufacturerId) UnpackBURNERROLE(data []byte) ([32]byte, error) { + out, err := manufacturerId.abi.Unpack("BURNER_ROLE", data) + if err != nil { + return *new([32]byte), err + } + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + return out0, nil +} + +// PackDEFAULTADMINROLE is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xa217fddf. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function DEFAULT_ADMIN_ROLE() view returns(bytes32) +func (manufacturerId *ManufacturerId) PackDEFAULTADMINROLE() []byte { + enc, err := manufacturerId.abi.Pack("DEFAULT_ADMIN_ROLE") + if err != nil { + panic(err) + } + return enc +} + +// TryPackDEFAULTADMINROLE is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xa217fddf. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function DEFAULT_ADMIN_ROLE() view returns(bytes32) +func (manufacturerId *ManufacturerId) TryPackDEFAULTADMINROLE() ([]byte, error) { + return manufacturerId.abi.Pack("DEFAULT_ADMIN_ROLE") +} + +// UnpackDEFAULTADMINROLE is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0xa217fddf. +// +// Solidity: function DEFAULT_ADMIN_ROLE() view returns(bytes32) +func (manufacturerId *ManufacturerId) UnpackDEFAULTADMINROLE(data []byte) ([32]byte, error) { + out, err := manufacturerId.abi.Unpack("DEFAULT_ADMIN_ROLE", data) + if err != nil { + return *new([32]byte), err + } + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + return out0, nil +} + +// PackMINTERROLE is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xd5391393. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function MINTER_ROLE() view returns(bytes32) +func (manufacturerId *ManufacturerId) PackMINTERROLE() []byte { + enc, err := manufacturerId.abi.Pack("MINTER_ROLE") + if err != nil { + panic(err) + } + return enc +} + +// TryPackMINTERROLE is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xd5391393. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function MINTER_ROLE() view returns(bytes32) +func (manufacturerId *ManufacturerId) TryPackMINTERROLE() ([]byte, error) { + return manufacturerId.abi.Pack("MINTER_ROLE") +} + +// UnpackMINTERROLE is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0xd5391393. +// +// Solidity: function MINTER_ROLE() view returns(bytes32) +func (manufacturerId *ManufacturerId) UnpackMINTERROLE(data []byte) ([32]byte, error) { + out, err := manufacturerId.abi.Unpack("MINTER_ROLE", data) + if err != nil { + return *new([32]byte), err + } + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + return out0, nil +} + +// PackTRANSFERERROLE is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x0ade7dc1. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function TRANSFERER_ROLE() view returns(bytes32) +func (manufacturerId *ManufacturerId) PackTRANSFERERROLE() []byte { + enc, err := manufacturerId.abi.Pack("TRANSFERER_ROLE") + if err != nil { + panic(err) + } + return enc +} + +// TryPackTRANSFERERROLE is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x0ade7dc1. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function TRANSFERER_ROLE() view returns(bytes32) +func (manufacturerId *ManufacturerId) TryPackTRANSFERERROLE() ([]byte, error) { + return manufacturerId.abi.Pack("TRANSFERER_ROLE") +} + +// UnpackTRANSFERERROLE is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0x0ade7dc1. +// +// Solidity: function TRANSFERER_ROLE() view returns(bytes32) +func (manufacturerId *ManufacturerId) UnpackTRANSFERERROLE(data []byte) ([32]byte, error) { + out, err := manufacturerId.abi.Unpack("TRANSFERER_ROLE", data) + if err != nil { + return *new([32]byte), err + } + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + return out0, nil +} + +// PackUPGRADERROLE is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xf72c0d8b. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function UPGRADER_ROLE() view returns(bytes32) +func (manufacturerId *ManufacturerId) PackUPGRADERROLE() []byte { + enc, err := manufacturerId.abi.Pack("UPGRADER_ROLE") + if err != nil { + panic(err) + } + return enc +} + +// TryPackUPGRADERROLE is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xf72c0d8b. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function UPGRADER_ROLE() view returns(bytes32) +func (manufacturerId *ManufacturerId) TryPackUPGRADERROLE() ([]byte, error) { + return manufacturerId.abi.Pack("UPGRADER_ROLE") +} + +// UnpackUPGRADERROLE is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0xf72c0d8b. +// +// Solidity: function UPGRADER_ROLE() view returns(bytes32) +func (manufacturerId *ManufacturerId) UnpackUPGRADERROLE(data []byte) ([32]byte, error) { + out, err := manufacturerId.abi.Unpack("UPGRADER_ROLE", data) + if err != nil { + return *new([32]byte), err + } + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + return out0, nil +} + +// PackDimoRegistry is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x7625c605. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function _dimoRegistry() view returns(address) +func (manufacturerId *ManufacturerId) PackDimoRegistry() []byte { + enc, err := manufacturerId.abi.Pack("_dimoRegistry") + if err != nil { + panic(err) + } + return enc +} + +// TryPackDimoRegistry is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x7625c605. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function _dimoRegistry() view returns(address) +func (manufacturerId *ManufacturerId) TryPackDimoRegistry() ([]byte, error) { + return manufacturerId.abi.Pack("_dimoRegistry") +} + +// UnpackDimoRegistry is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0x7625c605. +// +// Solidity: function _dimoRegistry() view returns(address) +func (manufacturerId *ManufacturerId) UnpackDimoRegistry(data []byte) (common.Address, error) { + out, err := manufacturerId.abi.Unpack("_dimoRegistry", data) + if err != nil { + return *new(common.Address), err + } + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + return out0, nil +} + +// PackApprove is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x095ea7b3. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function approve(address to, uint256 tokenId) returns() +func (manufacturerId *ManufacturerId) PackApprove(to common.Address, tokenId *big.Int) []byte { + enc, err := manufacturerId.abi.Pack("approve", to, tokenId) + if err != nil { + panic(err) + } + return enc +} + +// TryPackApprove is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x095ea7b3. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function approve(address to, uint256 tokenId) returns() +func (manufacturerId *ManufacturerId) TryPackApprove(to common.Address, tokenId *big.Int) ([]byte, error) { + return manufacturerId.abi.Pack("approve", to, tokenId) +} + +// PackBalanceOf is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x70a08231. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function balanceOf(address owner) view returns(uint256) +func (manufacturerId *ManufacturerId) PackBalanceOf(owner common.Address) []byte { + enc, err := manufacturerId.abi.Pack("balanceOf", owner) + if err != nil { + panic(err) + } + return enc +} + +// TryPackBalanceOf is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x70a08231. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function balanceOf(address owner) view returns(uint256) +func (manufacturerId *ManufacturerId) TryPackBalanceOf(owner common.Address) ([]byte, error) { + return manufacturerId.abi.Pack("balanceOf", owner) +} + +// UnpackBalanceOf is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0x70a08231. +// +// Solidity: function balanceOf(address owner) view returns(uint256) +func (manufacturerId *ManufacturerId) UnpackBalanceOf(data []byte) (*big.Int, error) { + out, err := manufacturerId.abi.Unpack("balanceOf", data) + if err != nil { + return new(big.Int), err + } + out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int) + return out0, nil +} + +// PackBurn is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x42966c68. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function burn(uint256 tokenId) returns() +func (manufacturerId *ManufacturerId) PackBurn(tokenId *big.Int) []byte { + enc, err := manufacturerId.abi.Pack("burn", tokenId) + if err != nil { + panic(err) + } + return enc +} + +// TryPackBurn is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x42966c68. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function burn(uint256 tokenId) returns() +func (manufacturerId *ManufacturerId) TryPackBurn(tokenId *big.Int) ([]byte, error) { + return manufacturerId.abi.Pack("burn", tokenId) +} + +// PackCreatePrivilege is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xc1d58b3b. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function createPrivilege(bool enabled, string description) returns() +func (manufacturerId *ManufacturerId) PackCreatePrivilege(enabled bool, description string) []byte { + enc, err := manufacturerId.abi.Pack("createPrivilege", enabled, description) + if err != nil { + panic(err) + } + return enc +} + +// TryPackCreatePrivilege is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xc1d58b3b. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function createPrivilege(bool enabled, string description) returns() +func (manufacturerId *ManufacturerId) TryPackCreatePrivilege(enabled bool, description string) ([]byte, error) { + return manufacturerId.abi.Pack("createPrivilege", enabled, description) +} + +// PackDisablePrivilege is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x1a153ed0. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function disablePrivilege(uint256 privId) returns() +func (manufacturerId *ManufacturerId) PackDisablePrivilege(privId *big.Int) []byte { + enc, err := manufacturerId.abi.Pack("disablePrivilege", privId) + if err != nil { + panic(err) + } + return enc +} + +// TryPackDisablePrivilege is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x1a153ed0. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function disablePrivilege(uint256 privId) returns() +func (manufacturerId *ManufacturerId) TryPackDisablePrivilege(privId *big.Int) ([]byte, error) { + return manufacturerId.abi.Pack("disablePrivilege", privId) +} + +// PackEnablePrivilege is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x831ba696. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function enablePrivilege(uint256 privId) returns() +func (manufacturerId *ManufacturerId) PackEnablePrivilege(privId *big.Int) []byte { + enc, err := manufacturerId.abi.Pack("enablePrivilege", privId) + if err != nil { + panic(err) + } + return enc +} + +// TryPackEnablePrivilege is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x831ba696. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function enablePrivilege(uint256 privId) returns() +func (manufacturerId *ManufacturerId) TryPackEnablePrivilege(privId *big.Int) ([]byte, error) { + return manufacturerId.abi.Pack("enablePrivilege", privId) +} + +// PackExists is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x4f558e79. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function exists(uint256 tokenId) view returns(bool) +func (manufacturerId *ManufacturerId) PackExists(tokenId *big.Int) []byte { + enc, err := manufacturerId.abi.Pack("exists", tokenId) + if err != nil { + panic(err) + } + return enc +} + +// TryPackExists is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x4f558e79. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function exists(uint256 tokenId) view returns(bool) +func (manufacturerId *ManufacturerId) TryPackExists(tokenId *big.Int) ([]byte, error) { + return manufacturerId.abi.Pack("exists", tokenId) +} + +// UnpackExists is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0x4f558e79. +// +// Solidity: function exists(uint256 tokenId) view returns(bool) +func (manufacturerId *ManufacturerId) UnpackExists(data []byte) (bool, error) { + out, err := manufacturerId.abi.Unpack("exists", data) + if err != nil { + return *new(bool), err + } + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + return out0, nil +} + +// PackGetApproved is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x081812fc. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function getApproved(uint256 tokenId) view returns(address) +func (manufacturerId *ManufacturerId) PackGetApproved(tokenId *big.Int) []byte { + enc, err := manufacturerId.abi.Pack("getApproved", tokenId) + if err != nil { + panic(err) + } + return enc +} + +// TryPackGetApproved is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x081812fc. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function getApproved(uint256 tokenId) view returns(address) +func (manufacturerId *ManufacturerId) TryPackGetApproved(tokenId *big.Int) ([]byte, error) { + return manufacturerId.abi.Pack("getApproved", tokenId) +} + +// UnpackGetApproved is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0x081812fc. +// +// Solidity: function getApproved(uint256 tokenId) view returns(address) +func (manufacturerId *ManufacturerId) UnpackGetApproved(data []byte) (common.Address, error) { + out, err := manufacturerId.abi.Unpack("getApproved", data) + if err != nil { + return *new(common.Address), err + } + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + return out0, nil +} + +// PackGetRoleAdmin is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x248a9ca3. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function getRoleAdmin(bytes32 role) view returns(bytes32) +func (manufacturerId *ManufacturerId) PackGetRoleAdmin(role [32]byte) []byte { + enc, err := manufacturerId.abi.Pack("getRoleAdmin", role) + if err != nil { + panic(err) + } + return enc +} + +// TryPackGetRoleAdmin is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x248a9ca3. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function getRoleAdmin(bytes32 role) view returns(bytes32) +func (manufacturerId *ManufacturerId) TryPackGetRoleAdmin(role [32]byte) ([]byte, error) { + return manufacturerId.abi.Pack("getRoleAdmin", role) +} + +// UnpackGetRoleAdmin is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0x248a9ca3. +// +// Solidity: function getRoleAdmin(bytes32 role) view returns(bytes32) +func (manufacturerId *ManufacturerId) UnpackGetRoleAdmin(data []byte) ([32]byte, error) { + out, err := manufacturerId.abi.Unpack("getRoleAdmin", data) + if err != nil { + return *new([32]byte), err + } + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + return out0, nil +} + +// PackGrantRole is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x2f2ff15d. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function grantRole(bytes32 role, address account) returns() +func (manufacturerId *ManufacturerId) PackGrantRole(role [32]byte, account common.Address) []byte { + enc, err := manufacturerId.abi.Pack("grantRole", role, account) + if err != nil { + panic(err) + } + return enc +} + +// TryPackGrantRole is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x2f2ff15d. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function grantRole(bytes32 role, address account) returns() +func (manufacturerId *ManufacturerId) TryPackGrantRole(role [32]byte, account common.Address) ([]byte, error) { + return manufacturerId.abi.Pack("grantRole", role, account) +} + +// PackHasPrivilege is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x05d80b00. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function hasPrivilege(uint256 tokenId, uint256 privId, address user) view returns(bool) +func (manufacturerId *ManufacturerId) PackHasPrivilege(tokenId *big.Int, privId *big.Int, user common.Address) []byte { + enc, err := manufacturerId.abi.Pack("hasPrivilege", tokenId, privId, user) + if err != nil { + panic(err) + } + return enc +} + +// TryPackHasPrivilege is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x05d80b00. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function hasPrivilege(uint256 tokenId, uint256 privId, address user) view returns(bool) +func (manufacturerId *ManufacturerId) TryPackHasPrivilege(tokenId *big.Int, privId *big.Int, user common.Address) ([]byte, error) { + return manufacturerId.abi.Pack("hasPrivilege", tokenId, privId, user) +} + +// UnpackHasPrivilege is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0x05d80b00. +// +// Solidity: function hasPrivilege(uint256 tokenId, uint256 privId, address user) view returns(bool) +func (manufacturerId *ManufacturerId) UnpackHasPrivilege(data []byte) (bool, error) { + out, err := manufacturerId.abi.Unpack("hasPrivilege", data) + if err != nil { + return *new(bool), err + } + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + return out0, nil +} + +// PackHasRole is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x91d14854. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function hasRole(bytes32 role, address account) view returns(bool) +func (manufacturerId *ManufacturerId) PackHasRole(role [32]byte, account common.Address) []byte { + enc, err := manufacturerId.abi.Pack("hasRole", role, account) + if err != nil { + panic(err) + } + return enc +} + +// TryPackHasRole is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x91d14854. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function hasRole(bytes32 role, address account) view returns(bool) +func (manufacturerId *ManufacturerId) TryPackHasRole(role [32]byte, account common.Address) ([]byte, error) { + return manufacturerId.abi.Pack("hasRole", role, account) +} + +// UnpackHasRole is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0x91d14854. +// +// Solidity: function hasRole(bytes32 role, address account) view returns(bool) +func (manufacturerId *ManufacturerId) UnpackHasRole(data []byte) (bool, error) { + out, err := manufacturerId.abi.Unpack("hasRole", data) + if err != nil { + return *new(bool), err + } + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + return out0, nil +} + +// PackInitialize is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x5c6d8da1. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function initialize(string name_, string symbol_, string baseUri_, address dimoRegistry_) returns() +func (manufacturerId *ManufacturerId) PackInitialize(name string, symbol string, baseUri string, dimoRegistry common.Address) []byte { + enc, err := manufacturerId.abi.Pack("initialize", name, symbol, baseUri, dimoRegistry) + if err != nil { + panic(err) + } + return enc +} + +// TryPackInitialize is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x5c6d8da1. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function initialize(string name_, string symbol_, string baseUri_, address dimoRegistry_) returns() +func (manufacturerId *ManufacturerId) TryPackInitialize(name string, symbol string, baseUri string, dimoRegistry common.Address) ([]byte, error) { + return manufacturerId.abi.Pack("initialize", name, symbol, baseUri, dimoRegistry) +} + +// PackIsApprovedForAll is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xe985e9c5. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function isApprovedForAll(address owner, address operator) view returns(bool) +func (manufacturerId *ManufacturerId) PackIsApprovedForAll(owner common.Address, operator common.Address) []byte { + enc, err := manufacturerId.abi.Pack("isApprovedForAll", owner, operator) + if err != nil { + panic(err) + } + return enc +} + +// TryPackIsApprovedForAll is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xe985e9c5. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function isApprovedForAll(address owner, address operator) view returns(bool) +func (manufacturerId *ManufacturerId) TryPackIsApprovedForAll(owner common.Address, operator common.Address) ([]byte, error) { + return manufacturerId.abi.Pack("isApprovedForAll", owner, operator) +} + +// UnpackIsApprovedForAll is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0xe985e9c5. +// +// Solidity: function isApprovedForAll(address owner, address operator) view returns(bool) +func (manufacturerId *ManufacturerId) UnpackIsApprovedForAll(data []byte) (bool, error) { + out, err := manufacturerId.abi.Unpack("isApprovedForAll", data) + if err != nil { + return *new(bool), err + } + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + return out0, nil +} + +// PackName is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x06fdde03. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function name() view returns(string) +func (manufacturerId *ManufacturerId) PackName() []byte { + enc, err := manufacturerId.abi.Pack("name") + if err != nil { + panic(err) + } + return enc +} + +// TryPackName is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x06fdde03. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function name() view returns(string) +func (manufacturerId *ManufacturerId) TryPackName() ([]byte, error) { + return manufacturerId.abi.Pack("name") +} + +// UnpackName is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0x06fdde03. +// +// Solidity: function name() view returns(string) +func (manufacturerId *ManufacturerId) UnpackName(data []byte) (string, error) { + out, err := manufacturerId.abi.Unpack("name", data) + if err != nil { + return *new(string), err + } + out0 := *abi.ConvertType(out[0], new(string)).(*string) + return out0, nil +} + +// PackOwnerOf is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x6352211e. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function ownerOf(uint256 tokenId) view returns(address) +func (manufacturerId *ManufacturerId) PackOwnerOf(tokenId *big.Int) []byte { + enc, err := manufacturerId.abi.Pack("ownerOf", tokenId) + if err != nil { + panic(err) + } + return enc +} + +// TryPackOwnerOf is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x6352211e. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function ownerOf(uint256 tokenId) view returns(address) +func (manufacturerId *ManufacturerId) TryPackOwnerOf(tokenId *big.Int) ([]byte, error) { + return manufacturerId.abi.Pack("ownerOf", tokenId) +} + +// UnpackOwnerOf is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0x6352211e. +// +// Solidity: function ownerOf(uint256 tokenId) view returns(address) +func (manufacturerId *ManufacturerId) UnpackOwnerOf(data []byte) (common.Address, error) { + out, err := manufacturerId.abi.Unpack("ownerOf", data) + if err != nil { + return *new(common.Address), err + } + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + return out0, nil +} + +// PackPrivilegeEntry is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x48db4640. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function privilegeEntry(uint256 , uint256 , uint256 , address ) view returns(uint256) +func (manufacturerId *ManufacturerId) PackPrivilegeEntry(arg0 *big.Int, arg1 *big.Int, arg2 *big.Int, arg3 common.Address) []byte { + enc, err := manufacturerId.abi.Pack("privilegeEntry", arg0, arg1, arg2, arg3) + if err != nil { + panic(err) + } + return enc +} + +// TryPackPrivilegeEntry is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x48db4640. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function privilegeEntry(uint256 , uint256 , uint256 , address ) view returns(uint256) +func (manufacturerId *ManufacturerId) TryPackPrivilegeEntry(arg0 *big.Int, arg1 *big.Int, arg2 *big.Int, arg3 common.Address) ([]byte, error) { + return manufacturerId.abi.Pack("privilegeEntry", arg0, arg1, arg2, arg3) +} + +// UnpackPrivilegeEntry is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0x48db4640. +// +// Solidity: function privilegeEntry(uint256 , uint256 , uint256 , address ) view returns(uint256) +func (manufacturerId *ManufacturerId) UnpackPrivilegeEntry(data []byte) (*big.Int, error) { + out, err := manufacturerId.abi.Unpack("privilegeEntry", data) + if err != nil { + return new(big.Int), err + } + out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int) + return out0, nil +} + +// PackPrivilegeExpiresAt is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xd0f8f5f6. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function privilegeExpiresAt(uint256 tokenId, uint256 privId, address user) view returns(uint256) +func (manufacturerId *ManufacturerId) PackPrivilegeExpiresAt(tokenId *big.Int, privId *big.Int, user common.Address) []byte { + enc, err := manufacturerId.abi.Pack("privilegeExpiresAt", tokenId, privId, user) + if err != nil { + panic(err) + } + return enc +} + +// TryPackPrivilegeExpiresAt is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xd0f8f5f6. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function privilegeExpiresAt(uint256 tokenId, uint256 privId, address user) view returns(uint256) +func (manufacturerId *ManufacturerId) TryPackPrivilegeExpiresAt(tokenId *big.Int, privId *big.Int, user common.Address) ([]byte, error) { + return manufacturerId.abi.Pack("privilegeExpiresAt", tokenId, privId, user) +} + +// UnpackPrivilegeExpiresAt is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0xd0f8f5f6. +// +// Solidity: function privilegeExpiresAt(uint256 tokenId, uint256 privId, address user) view returns(uint256) +func (manufacturerId *ManufacturerId) UnpackPrivilegeExpiresAt(data []byte) (*big.Int, error) { + out, err := manufacturerId.abi.Unpack("privilegeExpiresAt", data) + if err != nil { + return new(big.Int), err + } + out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int) + return out0, nil +} + +// PackPrivilegeRecord is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xf9ad3efe. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function privilegeRecord(uint256 ) view returns(bool enabled, string description) +func (manufacturerId *ManufacturerId) PackPrivilegeRecord(arg0 *big.Int) []byte { + enc, err := manufacturerId.abi.Pack("privilegeRecord", arg0) + if err != nil { + panic(err) + } + return enc +} + +// TryPackPrivilegeRecord is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xf9ad3efe. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function privilegeRecord(uint256 ) view returns(bool enabled, string description) +func (manufacturerId *ManufacturerId) TryPackPrivilegeRecord(arg0 *big.Int) ([]byte, error) { + return manufacturerId.abi.Pack("privilegeRecord", arg0) +} + +// PrivilegeRecordOutput serves as a container for the return parameters of contract +// method PrivilegeRecord. +type PrivilegeRecordOutput struct { + Enabled bool + Description string +} + +// UnpackPrivilegeRecord is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0xf9ad3efe. +// +// Solidity: function privilegeRecord(uint256 ) view returns(bool enabled, string description) +func (manufacturerId *ManufacturerId) UnpackPrivilegeRecord(data []byte) (PrivilegeRecordOutput, error) { + out, err := manufacturerId.abi.Unpack("privilegeRecord", data) + outstruct := new(PrivilegeRecordOutput) + if err != nil { + return *outstruct, err + } + outstruct.Enabled = *abi.ConvertType(out[0], new(bool)).(*bool) + outstruct.Description = *abi.ConvertType(out[1], new(string)).(*string) + return *outstruct, nil +} + +// PackProxiableUUID is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x52d1902d. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function proxiableUUID() view returns(bytes32) +func (manufacturerId *ManufacturerId) PackProxiableUUID() []byte { + enc, err := manufacturerId.abi.Pack("proxiableUUID") + if err != nil { + panic(err) + } + return enc +} + +// TryPackProxiableUUID is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x52d1902d. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function proxiableUUID() view returns(bytes32) +func (manufacturerId *ManufacturerId) TryPackProxiableUUID() ([]byte, error) { + return manufacturerId.abi.Pack("proxiableUUID") +} + +// UnpackProxiableUUID is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0x52d1902d. +// +// Solidity: function proxiableUUID() view returns(bytes32) +func (manufacturerId *ManufacturerId) UnpackProxiableUUID(data []byte) ([32]byte, error) { + out, err := manufacturerId.abi.Unpack("proxiableUUID", data) + if err != nil { + return *new([32]byte), err + } + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + return out0, nil +} + +// PackRenounceRole is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x36568abe. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function renounceRole(bytes32 role, address account) returns() +func (manufacturerId *ManufacturerId) PackRenounceRole(role [32]byte, account common.Address) []byte { + enc, err := manufacturerId.abi.Pack("renounceRole", role, account) + if err != nil { + panic(err) + } + return enc +} + +// TryPackRenounceRole is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x36568abe. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function renounceRole(bytes32 role, address account) returns() +func (manufacturerId *ManufacturerId) TryPackRenounceRole(role [32]byte, account common.Address) ([]byte, error) { + return manufacturerId.abi.Pack("renounceRole", role, account) +} + +// PackRevokeRole is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xd547741f. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function revokeRole(bytes32 role, address account) returns() +func (manufacturerId *ManufacturerId) PackRevokeRole(role [32]byte, account common.Address) []byte { + enc, err := manufacturerId.abi.Pack("revokeRole", role, account) + if err != nil { + panic(err) + } + return enc +} + +// TryPackRevokeRole is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xd547741f. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function revokeRole(bytes32 role, address account) returns() +func (manufacturerId *ManufacturerId) TryPackRevokeRole(role [32]byte, account common.Address) ([]byte, error) { + return manufacturerId.abi.Pack("revokeRole", role, account) +} + +// PackSafeMint is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x40d097c3. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function safeMint(address to) returns(uint256 tokenId) +func (manufacturerId *ManufacturerId) PackSafeMint(to common.Address) []byte { + enc, err := manufacturerId.abi.Pack("safeMint", to) + if err != nil { + panic(err) + } + return enc +} + +// TryPackSafeMint is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x40d097c3. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function safeMint(address to) returns(uint256 tokenId) +func (manufacturerId *ManufacturerId) TryPackSafeMint(to common.Address) ([]byte, error) { + return manufacturerId.abi.Pack("safeMint", to) +} + +// UnpackSafeMint is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0x40d097c3. +// +// Solidity: function safeMint(address to) returns(uint256 tokenId) +func (manufacturerId *ManufacturerId) UnpackSafeMint(data []byte) (*big.Int, error) { + out, err := manufacturerId.abi.Unpack("safeMint", data) + if err != nil { + return new(big.Int), err + } + out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int) + return out0, nil +} + +// PackSafeMint0 is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xd204c45e. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function safeMint(address to, string uri) returns(uint256 tokenId) +func (manufacturerId *ManufacturerId) PackSafeMint0(to common.Address, uri string) []byte { + enc, err := manufacturerId.abi.Pack("safeMint0", to, uri) + if err != nil { + panic(err) + } + return enc +} + +// TryPackSafeMint0 is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xd204c45e. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function safeMint(address to, string uri) returns(uint256 tokenId) +func (manufacturerId *ManufacturerId) TryPackSafeMint0(to common.Address, uri string) ([]byte, error) { + return manufacturerId.abi.Pack("safeMint0", to, uri) +} + +// UnpackSafeMint0 is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0xd204c45e. +// +// Solidity: function safeMint(address to, string uri) returns(uint256 tokenId) +func (manufacturerId *ManufacturerId) UnpackSafeMint0(data []byte) (*big.Int, error) { + out, err := manufacturerId.abi.Unpack("safeMint0", data) + if err != nil { + return new(big.Int), err + } + out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int) + return out0, nil +} + +// PackSafeTransferFrom is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x42842e0e. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function safeTransferFrom(address from, address to, uint256 tokenId) returns() +func (manufacturerId *ManufacturerId) PackSafeTransferFrom(from common.Address, to common.Address, tokenId *big.Int) []byte { + enc, err := manufacturerId.abi.Pack("safeTransferFrom", from, to, tokenId) + if err != nil { + panic(err) + } + return enc +} + +// TryPackSafeTransferFrom is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x42842e0e. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function safeTransferFrom(address from, address to, uint256 tokenId) returns() +func (manufacturerId *ManufacturerId) TryPackSafeTransferFrom(from common.Address, to common.Address, tokenId *big.Int) ([]byte, error) { + return manufacturerId.abi.Pack("safeTransferFrom", from, to, tokenId) +} + +// PackSafeTransferFrom0 is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xb88d4fde. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function safeTransferFrom(address from, address to, uint256 tokenId, bytes data) returns() +func (manufacturerId *ManufacturerId) PackSafeTransferFrom0(from common.Address, to common.Address, tokenId *big.Int, data []byte) []byte { + enc, err := manufacturerId.abi.Pack("safeTransferFrom0", from, to, tokenId, data) + if err != nil { + panic(err) + } + return enc +} + +// TryPackSafeTransferFrom0 is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xb88d4fde. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function safeTransferFrom(address from, address to, uint256 tokenId, bytes data) returns() +func (manufacturerId *ManufacturerId) TryPackSafeTransferFrom0(from common.Address, to common.Address, tokenId *big.Int, data []byte) ([]byte, error) { + return manufacturerId.abi.Pack("safeTransferFrom0", from, to, tokenId, data) +} + +// PackSetApprovalForAll is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xa22cb465. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function setApprovalForAll(address operator, bool approved) returns() +func (manufacturerId *ManufacturerId) PackSetApprovalForAll(operator common.Address, approved bool) []byte { + enc, err := manufacturerId.abi.Pack("setApprovalForAll", operator, approved) + if err != nil { + panic(err) + } + return enc +} + +// TryPackSetApprovalForAll is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xa22cb465. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function setApprovalForAll(address operator, bool approved) returns() +func (manufacturerId *ManufacturerId) TryPackSetApprovalForAll(operator common.Address, approved bool) ([]byte, error) { + return manufacturerId.abi.Pack("setApprovalForAll", operator, approved) +} + +// PackSetBaseURI is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x55f804b3. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function setBaseURI(string baseURI_) returns() +func (manufacturerId *ManufacturerId) PackSetBaseURI(baseURI string) []byte { + enc, err := manufacturerId.abi.Pack("setBaseURI", baseURI) + if err != nil { + panic(err) + } + return enc +} + +// TryPackSetBaseURI is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x55f804b3. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function setBaseURI(string baseURI_) returns() +func (manufacturerId *ManufacturerId) TryPackSetBaseURI(baseURI string) ([]byte, error) { + return manufacturerId.abi.Pack("setBaseURI", baseURI) +} + +// PackSetDimoRegistryAddress is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x0db857ea. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function setDimoRegistryAddress(address addr) returns() +func (manufacturerId *ManufacturerId) PackSetDimoRegistryAddress(addr common.Address) []byte { + enc, err := manufacturerId.abi.Pack("setDimoRegistryAddress", addr) + if err != nil { + panic(err) + } + return enc +} + +// TryPackSetDimoRegistryAddress is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x0db857ea. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function setDimoRegistryAddress(address addr) returns() +func (manufacturerId *ManufacturerId) TryPackSetDimoRegistryAddress(addr common.Address) ([]byte, error) { + return manufacturerId.abi.Pack("setDimoRegistryAddress", addr) +} + +// PackSetPrivilege is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xeca3221a. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function setPrivilege(uint256 tokenId, uint256 privId, address user, uint256 expires) returns() +func (manufacturerId *ManufacturerId) PackSetPrivilege(tokenId *big.Int, privId *big.Int, user common.Address, expires *big.Int) []byte { + enc, err := manufacturerId.abi.Pack("setPrivilege", tokenId, privId, user, expires) + if err != nil { + panic(err) + } + return enc +} + +// TryPackSetPrivilege is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xeca3221a. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function setPrivilege(uint256 tokenId, uint256 privId, address user, uint256 expires) returns() +func (manufacturerId *ManufacturerId) TryPackSetPrivilege(tokenId *big.Int, privId *big.Int, user common.Address, expires *big.Int) ([]byte, error) { + return manufacturerId.abi.Pack("setPrivilege", tokenId, privId, user, expires) +} + +// PackSetPrivileges is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x57ae9754. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function setPrivileges((uint256,uint256,address,uint256)[] privData) returns() +func (manufacturerId *ManufacturerId) PackSetPrivileges(privData []ManufacturerIdSetPrivilegeData) []byte { + enc, err := manufacturerId.abi.Pack("setPrivileges", privData) + if err != nil { + panic(err) + } + return enc +} + +// TryPackSetPrivileges is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x57ae9754. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function setPrivileges((uint256,uint256,address,uint256)[] privData) returns() +func (manufacturerId *ManufacturerId) TryPackSetPrivileges(privData []ManufacturerIdSetPrivilegeData) ([]byte, error) { + return manufacturerId.abi.Pack("setPrivileges", privData) +} + +// PackSupportsInterface is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x01ffc9a7. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function supportsInterface(bytes4 interfaceId) view returns(bool) +func (manufacturerId *ManufacturerId) PackSupportsInterface(interfaceId [4]byte) []byte { + enc, err := manufacturerId.abi.Pack("supportsInterface", interfaceId) + if err != nil { + panic(err) + } + return enc +} + +// TryPackSupportsInterface is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x01ffc9a7. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function supportsInterface(bytes4 interfaceId) view returns(bool) +func (manufacturerId *ManufacturerId) TryPackSupportsInterface(interfaceId [4]byte) ([]byte, error) { + return manufacturerId.abi.Pack("supportsInterface", interfaceId) +} + +// UnpackSupportsInterface is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0x01ffc9a7. +// +// Solidity: function supportsInterface(bytes4 interfaceId) view returns(bool) +func (manufacturerId *ManufacturerId) UnpackSupportsInterface(data []byte) (bool, error) { + out, err := manufacturerId.abi.Unpack("supportsInterface", data) + if err != nil { + return *new(bool), err + } + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + return out0, nil +} + +// PackSymbol is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x95d89b41. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function symbol() view returns(string) +func (manufacturerId *ManufacturerId) PackSymbol() []byte { + enc, err := manufacturerId.abi.Pack("symbol") + if err != nil { + panic(err) + } + return enc +} + +// TryPackSymbol is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x95d89b41. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function symbol() view returns(string) +func (manufacturerId *ManufacturerId) TryPackSymbol() ([]byte, error) { + return manufacturerId.abi.Pack("symbol") +} + +// UnpackSymbol is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0x95d89b41. +// +// Solidity: function symbol() view returns(string) +func (manufacturerId *ManufacturerId) UnpackSymbol(data []byte) (string, error) { + out, err := manufacturerId.abi.Unpack("symbol", data) + if err != nil { + return *new(string), err + } + out0 := *abi.ConvertType(out[0], new(string)).(*string) + return out0, nil +} + +// PackTokenIdToVersion is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xf1a9d41c. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function tokenIdToVersion(uint256 ) view returns(uint256) +func (manufacturerId *ManufacturerId) PackTokenIdToVersion(arg0 *big.Int) []byte { + enc, err := manufacturerId.abi.Pack("tokenIdToVersion", arg0) + if err != nil { + panic(err) + } + return enc +} + +// TryPackTokenIdToVersion is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xf1a9d41c. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function tokenIdToVersion(uint256 ) view returns(uint256) +func (manufacturerId *ManufacturerId) TryPackTokenIdToVersion(arg0 *big.Int) ([]byte, error) { + return manufacturerId.abi.Pack("tokenIdToVersion", arg0) +} + +// UnpackTokenIdToVersion is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0xf1a9d41c. +// +// Solidity: function tokenIdToVersion(uint256 ) view returns(uint256) +func (manufacturerId *ManufacturerId) UnpackTokenIdToVersion(data []byte) (*big.Int, error) { + out, err := manufacturerId.abi.Unpack("tokenIdToVersion", data) + if err != nil { + return new(big.Int), err + } + out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int) + return out0, nil +} + +// PackTokenURI is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xc87b56dd. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function tokenURI(uint256 tokenId) view returns(string) +func (manufacturerId *ManufacturerId) PackTokenURI(tokenId *big.Int) []byte { + enc, err := manufacturerId.abi.Pack("tokenURI", tokenId) + if err != nil { + panic(err) + } + return enc +} + +// TryPackTokenURI is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xc87b56dd. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function tokenURI(uint256 tokenId) view returns(string) +func (manufacturerId *ManufacturerId) TryPackTokenURI(tokenId *big.Int) ([]byte, error) { + return manufacturerId.abi.Pack("tokenURI", tokenId) +} + +// UnpackTokenURI is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0xc87b56dd. +// +// Solidity: function tokenURI(uint256 tokenId) view returns(string) +func (manufacturerId *ManufacturerId) UnpackTokenURI(data []byte) (string, error) { + out, err := manufacturerId.abi.Unpack("tokenURI", data) + if err != nil { + return *new(string), err + } + out0 := *abi.ConvertType(out[0], new(string)).(*string) + return out0, nil +} + +// PackTransferFrom is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x23b872dd. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function transferFrom(address from, address to, uint256 tokenId) returns() +func (manufacturerId *ManufacturerId) PackTransferFrom(from common.Address, to common.Address, tokenId *big.Int) []byte { + enc, err := manufacturerId.abi.Pack("transferFrom", from, to, tokenId) + if err != nil { + panic(err) + } + return enc +} + +// TryPackTransferFrom is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x23b872dd. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function transferFrom(address from, address to, uint256 tokenId) returns() +func (manufacturerId *ManufacturerId) TryPackTransferFrom(from common.Address, to common.Address, tokenId *big.Int) ([]byte, error) { + return manufacturerId.abi.Pack("transferFrom", from, to, tokenId) +} + +// PackUpgradeTo is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x3659cfe6. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function upgradeTo(address newImplementation) returns() +func (manufacturerId *ManufacturerId) PackUpgradeTo(newImplementation common.Address) []byte { + enc, err := manufacturerId.abi.Pack("upgradeTo", newImplementation) + if err != nil { + panic(err) + } + return enc +} + +// TryPackUpgradeTo is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x3659cfe6. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function upgradeTo(address newImplementation) returns() +func (manufacturerId *ManufacturerId) TryPackUpgradeTo(newImplementation common.Address) ([]byte, error) { + return manufacturerId.abi.Pack("upgradeTo", newImplementation) +} + +// PackUpgradeToAndCall is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x4f1ef286. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function upgradeToAndCall(address newImplementation, bytes data) payable returns() +func (manufacturerId *ManufacturerId) PackUpgradeToAndCall(newImplementation common.Address, data []byte) []byte { + enc, err := manufacturerId.abi.Pack("upgradeToAndCall", newImplementation, data) + if err != nil { + panic(err) + } + return enc +} + +// TryPackUpgradeToAndCall is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x4f1ef286. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function upgradeToAndCall(address newImplementation, bytes data) payable returns() +func (manufacturerId *ManufacturerId) TryPackUpgradeToAndCall(newImplementation common.Address, data []byte) ([]byte, error) { + return manufacturerId.abi.Pack("upgradeToAndCall", newImplementation, data) +} + +// ManufacturerIdAdminChanged represents a AdminChanged event raised by the ManufacturerId contract. +type ManufacturerIdAdminChanged struct { + PreviousAdmin common.Address + NewAdmin common.Address + Raw *types.Log // Blockchain specific contextual infos +} + +const ManufacturerIdAdminChangedEventName = "AdminChanged" + +// ContractEventName returns the user-defined event name. +func (ManufacturerIdAdminChanged) ContractEventName() string { + return ManufacturerIdAdminChangedEventName +} + +// UnpackAdminChangedEvent is the Go binding that unpacks the event data emitted +// by contract. +// +// Solidity: event AdminChanged(address previousAdmin, address newAdmin) +func (manufacturerId *ManufacturerId) UnpackAdminChangedEvent(log *types.Log) (*ManufacturerIdAdminChanged, error) { + event := "AdminChanged" + if len(log.Topics) == 0 || log.Topics[0] != manufacturerId.abi.Events[event].ID { + return nil, errors.New("event signature mismatch") + } + out := new(ManufacturerIdAdminChanged) + if len(log.Data) > 0 { + if err := manufacturerId.abi.UnpackIntoInterface(out, event, log.Data); err != nil { + return nil, err + } + } + var indexed abi.Arguments + for _, arg := range manufacturerId.abi.Events[event].Inputs { + if arg.Indexed { + indexed = append(indexed, arg) + } + } + if err := abi.ParseTopics(out, indexed, log.Topics[1:]); err != nil { + return nil, err + } + out.Raw = log + return out, nil +} + +// ManufacturerIdApproval represents a Approval event raised by the ManufacturerId contract. +type ManufacturerIdApproval struct { + Owner common.Address + Approved common.Address + TokenId *big.Int + Raw *types.Log // Blockchain specific contextual infos +} + +const ManufacturerIdApprovalEventName = "Approval" + +// ContractEventName returns the user-defined event name. +func (ManufacturerIdApproval) ContractEventName() string { + return ManufacturerIdApprovalEventName +} + +// UnpackApprovalEvent is the Go binding that unpacks the event data emitted +// by contract. +// +// Solidity: event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId) +func (manufacturerId *ManufacturerId) UnpackApprovalEvent(log *types.Log) (*ManufacturerIdApproval, error) { + event := "Approval" + if len(log.Topics) == 0 || log.Topics[0] != manufacturerId.abi.Events[event].ID { + return nil, errors.New("event signature mismatch") + } + out := new(ManufacturerIdApproval) + if len(log.Data) > 0 { + if err := manufacturerId.abi.UnpackIntoInterface(out, event, log.Data); err != nil { + return nil, err + } + } + var indexed abi.Arguments + for _, arg := range manufacturerId.abi.Events[event].Inputs { + if arg.Indexed { + indexed = append(indexed, arg) + } + } + if err := abi.ParseTopics(out, indexed, log.Topics[1:]); err != nil { + return nil, err + } + out.Raw = log + return out, nil +} + +// ManufacturerIdApprovalForAll represents a ApprovalForAll event raised by the ManufacturerId contract. +type ManufacturerIdApprovalForAll struct { + Owner common.Address + Operator common.Address + Approved bool + Raw *types.Log // Blockchain specific contextual infos +} + +const ManufacturerIdApprovalForAllEventName = "ApprovalForAll" + +// ContractEventName returns the user-defined event name. +func (ManufacturerIdApprovalForAll) ContractEventName() string { + return ManufacturerIdApprovalForAllEventName +} + +// UnpackApprovalForAllEvent is the Go binding that unpacks the event data emitted +// by contract. +// +// Solidity: event ApprovalForAll(address indexed owner, address indexed operator, bool approved) +func (manufacturerId *ManufacturerId) UnpackApprovalForAllEvent(log *types.Log) (*ManufacturerIdApprovalForAll, error) { + event := "ApprovalForAll" + if len(log.Topics) == 0 || log.Topics[0] != manufacturerId.abi.Events[event].ID { + return nil, errors.New("event signature mismatch") + } + out := new(ManufacturerIdApprovalForAll) + if len(log.Data) > 0 { + if err := manufacturerId.abi.UnpackIntoInterface(out, event, log.Data); err != nil { + return nil, err + } + } + var indexed abi.Arguments + for _, arg := range manufacturerId.abi.Events[event].Inputs { + if arg.Indexed { + indexed = append(indexed, arg) + } + } + if err := abi.ParseTopics(out, indexed, log.Topics[1:]); err != nil { + return nil, err + } + out.Raw = log + return out, nil +} + +// ManufacturerIdBatchMetadataUpdate represents a BatchMetadataUpdate event raised by the ManufacturerId contract. +type ManufacturerIdBatchMetadataUpdate struct { + FromTokenId *big.Int + ToTokenId *big.Int + Raw *types.Log // Blockchain specific contextual infos +} + +const ManufacturerIdBatchMetadataUpdateEventName = "BatchMetadataUpdate" + +// ContractEventName returns the user-defined event name. +func (ManufacturerIdBatchMetadataUpdate) ContractEventName() string { + return ManufacturerIdBatchMetadataUpdateEventName +} + +// UnpackBatchMetadataUpdateEvent is the Go binding that unpacks the event data emitted +// by contract. +// +// Solidity: event BatchMetadataUpdate(uint256 _fromTokenId, uint256 _toTokenId) +func (manufacturerId *ManufacturerId) UnpackBatchMetadataUpdateEvent(log *types.Log) (*ManufacturerIdBatchMetadataUpdate, error) { + event := "BatchMetadataUpdate" + if len(log.Topics) == 0 || log.Topics[0] != manufacturerId.abi.Events[event].ID { + return nil, errors.New("event signature mismatch") + } + out := new(ManufacturerIdBatchMetadataUpdate) + if len(log.Data) > 0 { + if err := manufacturerId.abi.UnpackIntoInterface(out, event, log.Data); err != nil { + return nil, err + } + } + var indexed abi.Arguments + for _, arg := range manufacturerId.abi.Events[event].Inputs { + if arg.Indexed { + indexed = append(indexed, arg) + } + } + if err := abi.ParseTopics(out, indexed, log.Topics[1:]); err != nil { + return nil, err + } + out.Raw = log + return out, nil +} + +// ManufacturerIdBeaconUpgraded represents a BeaconUpgraded event raised by the ManufacturerId contract. +type ManufacturerIdBeaconUpgraded struct { + Beacon common.Address + Raw *types.Log // Blockchain specific contextual infos +} + +const ManufacturerIdBeaconUpgradedEventName = "BeaconUpgraded" + +// ContractEventName returns the user-defined event name. +func (ManufacturerIdBeaconUpgraded) ContractEventName() string { + return ManufacturerIdBeaconUpgradedEventName +} + +// UnpackBeaconUpgradedEvent is the Go binding that unpacks the event data emitted +// by contract. +// +// Solidity: event BeaconUpgraded(address indexed beacon) +func (manufacturerId *ManufacturerId) UnpackBeaconUpgradedEvent(log *types.Log) (*ManufacturerIdBeaconUpgraded, error) { + event := "BeaconUpgraded" + if len(log.Topics) == 0 || log.Topics[0] != manufacturerId.abi.Events[event].ID { + return nil, errors.New("event signature mismatch") + } + out := new(ManufacturerIdBeaconUpgraded) + if len(log.Data) > 0 { + if err := manufacturerId.abi.UnpackIntoInterface(out, event, log.Data); err != nil { + return nil, err + } + } + var indexed abi.Arguments + for _, arg := range manufacturerId.abi.Events[event].Inputs { + if arg.Indexed { + indexed = append(indexed, arg) + } + } + if err := abi.ParseTopics(out, indexed, log.Topics[1:]); err != nil { + return nil, err + } + out.Raw = log + return out, nil +} + +// ManufacturerIdInitialized represents a Initialized event raised by the ManufacturerId contract. +type ManufacturerIdInitialized struct { + Version uint8 + Raw *types.Log // Blockchain specific contextual infos +} + +const ManufacturerIdInitializedEventName = "Initialized" + +// ContractEventName returns the user-defined event name. +func (ManufacturerIdInitialized) ContractEventName() string { + return ManufacturerIdInitializedEventName +} + +// UnpackInitializedEvent is the Go binding that unpacks the event data emitted +// by contract. +// +// Solidity: event Initialized(uint8 version) +func (manufacturerId *ManufacturerId) UnpackInitializedEvent(log *types.Log) (*ManufacturerIdInitialized, error) { + event := "Initialized" + if len(log.Topics) == 0 || log.Topics[0] != manufacturerId.abi.Events[event].ID { + return nil, errors.New("event signature mismatch") + } + out := new(ManufacturerIdInitialized) + if len(log.Data) > 0 { + if err := manufacturerId.abi.UnpackIntoInterface(out, event, log.Data); err != nil { + return nil, err + } + } + var indexed abi.Arguments + for _, arg := range manufacturerId.abi.Events[event].Inputs { + if arg.Indexed { + indexed = append(indexed, arg) + } + } + if err := abi.ParseTopics(out, indexed, log.Topics[1:]); err != nil { + return nil, err + } + out.Raw = log + return out, nil +} + +// ManufacturerIdMetadataUpdate represents a MetadataUpdate event raised by the ManufacturerId contract. +type ManufacturerIdMetadataUpdate struct { + TokenId *big.Int + Raw *types.Log // Blockchain specific contextual infos +} + +const ManufacturerIdMetadataUpdateEventName = "MetadataUpdate" + +// ContractEventName returns the user-defined event name. +func (ManufacturerIdMetadataUpdate) ContractEventName() string { + return ManufacturerIdMetadataUpdateEventName +} + +// UnpackMetadataUpdateEvent is the Go binding that unpacks the event data emitted +// by contract. +// +// Solidity: event MetadataUpdate(uint256 _tokenId) +func (manufacturerId *ManufacturerId) UnpackMetadataUpdateEvent(log *types.Log) (*ManufacturerIdMetadataUpdate, error) { + event := "MetadataUpdate" + if len(log.Topics) == 0 || log.Topics[0] != manufacturerId.abi.Events[event].ID { + return nil, errors.New("event signature mismatch") + } + out := new(ManufacturerIdMetadataUpdate) + if len(log.Data) > 0 { + if err := manufacturerId.abi.UnpackIntoInterface(out, event, log.Data); err != nil { + return nil, err + } + } + var indexed abi.Arguments + for _, arg := range manufacturerId.abi.Events[event].Inputs { + if arg.Indexed { + indexed = append(indexed, arg) + } + } + if err := abi.ParseTopics(out, indexed, log.Topics[1:]); err != nil { + return nil, err + } + out.Raw = log + return out, nil +} + +// ManufacturerIdPrivilegeCreated represents a PrivilegeCreated event raised by the ManufacturerId contract. +type ManufacturerIdPrivilegeCreated struct { + PrivilegeId *big.Int + Enabled bool + Description string + Raw *types.Log // Blockchain specific contextual infos +} + +const ManufacturerIdPrivilegeCreatedEventName = "PrivilegeCreated" + +// ContractEventName returns the user-defined event name. +func (ManufacturerIdPrivilegeCreated) ContractEventName() string { + return ManufacturerIdPrivilegeCreatedEventName +} + +// UnpackPrivilegeCreatedEvent is the Go binding that unpacks the event data emitted +// by contract. +// +// Solidity: event PrivilegeCreated(uint256 indexed privilegeId, bool enabled, string description) +func (manufacturerId *ManufacturerId) UnpackPrivilegeCreatedEvent(log *types.Log) (*ManufacturerIdPrivilegeCreated, error) { + event := "PrivilegeCreated" + if len(log.Topics) == 0 || log.Topics[0] != manufacturerId.abi.Events[event].ID { + return nil, errors.New("event signature mismatch") + } + out := new(ManufacturerIdPrivilegeCreated) + if len(log.Data) > 0 { + if err := manufacturerId.abi.UnpackIntoInterface(out, event, log.Data); err != nil { + return nil, err + } + } + var indexed abi.Arguments + for _, arg := range manufacturerId.abi.Events[event].Inputs { + if arg.Indexed { + indexed = append(indexed, arg) + } + } + if err := abi.ParseTopics(out, indexed, log.Topics[1:]); err != nil { + return nil, err + } + out.Raw = log + return out, nil +} + +// ManufacturerIdPrivilegeDisabled represents a PrivilegeDisabled event raised by the ManufacturerId contract. +type ManufacturerIdPrivilegeDisabled struct { + PrivilegeId *big.Int + Raw *types.Log // Blockchain specific contextual infos +} + +const ManufacturerIdPrivilegeDisabledEventName = "PrivilegeDisabled" + +// ContractEventName returns the user-defined event name. +func (ManufacturerIdPrivilegeDisabled) ContractEventName() string { + return ManufacturerIdPrivilegeDisabledEventName +} + +// UnpackPrivilegeDisabledEvent is the Go binding that unpacks the event data emitted +// by contract. +// +// Solidity: event PrivilegeDisabled(uint256 indexed privilegeId) +func (manufacturerId *ManufacturerId) UnpackPrivilegeDisabledEvent(log *types.Log) (*ManufacturerIdPrivilegeDisabled, error) { + event := "PrivilegeDisabled" + if len(log.Topics) == 0 || log.Topics[0] != manufacturerId.abi.Events[event].ID { + return nil, errors.New("event signature mismatch") + } + out := new(ManufacturerIdPrivilegeDisabled) + if len(log.Data) > 0 { + if err := manufacturerId.abi.UnpackIntoInterface(out, event, log.Data); err != nil { + return nil, err + } + } + var indexed abi.Arguments + for _, arg := range manufacturerId.abi.Events[event].Inputs { + if arg.Indexed { + indexed = append(indexed, arg) + } + } + if err := abi.ParseTopics(out, indexed, log.Topics[1:]); err != nil { + return nil, err + } + out.Raw = log + return out, nil +} + +// ManufacturerIdPrivilegeEnabled represents a PrivilegeEnabled event raised by the ManufacturerId contract. +type ManufacturerIdPrivilegeEnabled struct { + PrivilegeId *big.Int + Raw *types.Log // Blockchain specific contextual infos +} + +const ManufacturerIdPrivilegeEnabledEventName = "PrivilegeEnabled" + +// ContractEventName returns the user-defined event name. +func (ManufacturerIdPrivilegeEnabled) ContractEventName() string { + return ManufacturerIdPrivilegeEnabledEventName +} + +// UnpackPrivilegeEnabledEvent is the Go binding that unpacks the event data emitted +// by contract. +// +// Solidity: event PrivilegeEnabled(uint256 indexed privilegeId) +func (manufacturerId *ManufacturerId) UnpackPrivilegeEnabledEvent(log *types.Log) (*ManufacturerIdPrivilegeEnabled, error) { + event := "PrivilegeEnabled" + if len(log.Topics) == 0 || log.Topics[0] != manufacturerId.abi.Events[event].ID { + return nil, errors.New("event signature mismatch") + } + out := new(ManufacturerIdPrivilegeEnabled) + if len(log.Data) > 0 { + if err := manufacturerId.abi.UnpackIntoInterface(out, event, log.Data); err != nil { + return nil, err + } + } + var indexed abi.Arguments + for _, arg := range manufacturerId.abi.Events[event].Inputs { + if arg.Indexed { + indexed = append(indexed, arg) + } + } + if err := abi.ParseTopics(out, indexed, log.Topics[1:]); err != nil { + return nil, err + } + out.Raw = log + return out, nil +} + +// ManufacturerIdPrivilegeSet represents a PrivilegeSet event raised by the ManufacturerId contract. +type ManufacturerIdPrivilegeSet struct { + TokenId *big.Int + Version *big.Int + PrivId *big.Int + User common.Address + Expires *big.Int + Raw *types.Log // Blockchain specific contextual infos +} + +const ManufacturerIdPrivilegeSetEventName = "PrivilegeSet" + +// ContractEventName returns the user-defined event name. +func (ManufacturerIdPrivilegeSet) ContractEventName() string { + return ManufacturerIdPrivilegeSetEventName +} + +// UnpackPrivilegeSetEvent is the Go binding that unpacks the event data emitted +// by contract. +// +// Solidity: event PrivilegeSet(uint256 indexed tokenId, uint256 version, uint256 indexed privId, address indexed user, uint256 expires) +func (manufacturerId *ManufacturerId) UnpackPrivilegeSetEvent(log *types.Log) (*ManufacturerIdPrivilegeSet, error) { + event := "PrivilegeSet" + if len(log.Topics) == 0 || log.Topics[0] != manufacturerId.abi.Events[event].ID { + return nil, errors.New("event signature mismatch") + } + out := new(ManufacturerIdPrivilegeSet) + if len(log.Data) > 0 { + if err := manufacturerId.abi.UnpackIntoInterface(out, event, log.Data); err != nil { + return nil, err + } + } + var indexed abi.Arguments + for _, arg := range manufacturerId.abi.Events[event].Inputs { + if arg.Indexed { + indexed = append(indexed, arg) + } + } + if err := abi.ParseTopics(out, indexed, log.Topics[1:]); err != nil { + return nil, err + } + out.Raw = log + return out, nil +} + +// ManufacturerIdRoleAdminChanged represents a RoleAdminChanged event raised by the ManufacturerId contract. +type ManufacturerIdRoleAdminChanged struct { + Role [32]byte + PreviousAdminRole [32]byte + NewAdminRole [32]byte + Raw *types.Log // Blockchain specific contextual infos +} + +const ManufacturerIdRoleAdminChangedEventName = "RoleAdminChanged" + +// ContractEventName returns the user-defined event name. +func (ManufacturerIdRoleAdminChanged) ContractEventName() string { + return ManufacturerIdRoleAdminChangedEventName +} + +// UnpackRoleAdminChangedEvent is the Go binding that unpacks the event data emitted +// by contract. +// +// Solidity: event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole) +func (manufacturerId *ManufacturerId) UnpackRoleAdminChangedEvent(log *types.Log) (*ManufacturerIdRoleAdminChanged, error) { + event := "RoleAdminChanged" + if len(log.Topics) == 0 || log.Topics[0] != manufacturerId.abi.Events[event].ID { + return nil, errors.New("event signature mismatch") + } + out := new(ManufacturerIdRoleAdminChanged) + if len(log.Data) > 0 { + if err := manufacturerId.abi.UnpackIntoInterface(out, event, log.Data); err != nil { + return nil, err + } + } + var indexed abi.Arguments + for _, arg := range manufacturerId.abi.Events[event].Inputs { + if arg.Indexed { + indexed = append(indexed, arg) + } + } + if err := abi.ParseTopics(out, indexed, log.Topics[1:]); err != nil { + return nil, err + } + out.Raw = log + return out, nil +} + +// ManufacturerIdRoleGranted represents a RoleGranted event raised by the ManufacturerId contract. +type ManufacturerIdRoleGranted struct { + Role [32]byte + Account common.Address + Sender common.Address + Raw *types.Log // Blockchain specific contextual infos +} + +const ManufacturerIdRoleGrantedEventName = "RoleGranted" + +// ContractEventName returns the user-defined event name. +func (ManufacturerIdRoleGranted) ContractEventName() string { + return ManufacturerIdRoleGrantedEventName +} + +// UnpackRoleGrantedEvent is the Go binding that unpacks the event data emitted +// by contract. +// +// Solidity: event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender) +func (manufacturerId *ManufacturerId) UnpackRoleGrantedEvent(log *types.Log) (*ManufacturerIdRoleGranted, error) { + event := "RoleGranted" + if len(log.Topics) == 0 || log.Topics[0] != manufacturerId.abi.Events[event].ID { + return nil, errors.New("event signature mismatch") + } + out := new(ManufacturerIdRoleGranted) + if len(log.Data) > 0 { + if err := manufacturerId.abi.UnpackIntoInterface(out, event, log.Data); err != nil { + return nil, err + } + } + var indexed abi.Arguments + for _, arg := range manufacturerId.abi.Events[event].Inputs { + if arg.Indexed { + indexed = append(indexed, arg) + } + } + if err := abi.ParseTopics(out, indexed, log.Topics[1:]); err != nil { + return nil, err + } + out.Raw = log + return out, nil +} + +// ManufacturerIdRoleRevoked represents a RoleRevoked event raised by the ManufacturerId contract. +type ManufacturerIdRoleRevoked struct { + Role [32]byte + Account common.Address + Sender common.Address + Raw *types.Log // Blockchain specific contextual infos +} + +const ManufacturerIdRoleRevokedEventName = "RoleRevoked" + +// ContractEventName returns the user-defined event name. +func (ManufacturerIdRoleRevoked) ContractEventName() string { + return ManufacturerIdRoleRevokedEventName +} + +// UnpackRoleRevokedEvent is the Go binding that unpacks the event data emitted +// by contract. +// +// Solidity: event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender) +func (manufacturerId *ManufacturerId) UnpackRoleRevokedEvent(log *types.Log) (*ManufacturerIdRoleRevoked, error) { + event := "RoleRevoked" + if len(log.Topics) == 0 || log.Topics[0] != manufacturerId.abi.Events[event].ID { + return nil, errors.New("event signature mismatch") + } + out := new(ManufacturerIdRoleRevoked) + if len(log.Data) > 0 { + if err := manufacturerId.abi.UnpackIntoInterface(out, event, log.Data); err != nil { + return nil, err + } + } + var indexed abi.Arguments + for _, arg := range manufacturerId.abi.Events[event].Inputs { + if arg.Indexed { + indexed = append(indexed, arg) + } + } + if err := abi.ParseTopics(out, indexed, log.Topics[1:]); err != nil { + return nil, err + } + out.Raw = log + return out, nil +} + +// ManufacturerIdTransfer represents a Transfer event raised by the ManufacturerId contract. +type ManufacturerIdTransfer struct { + From common.Address + To common.Address + TokenId *big.Int + Raw *types.Log // Blockchain specific contextual infos +} + +const ManufacturerIdTransferEventName = "Transfer" + +// ContractEventName returns the user-defined event name. +func (ManufacturerIdTransfer) ContractEventName() string { + return ManufacturerIdTransferEventName +} + +// UnpackTransferEvent is the Go binding that unpacks the event data emitted +// by contract. +// +// Solidity: event Transfer(address indexed from, address indexed to, uint256 indexed tokenId) +func (manufacturerId *ManufacturerId) UnpackTransferEvent(log *types.Log) (*ManufacturerIdTransfer, error) { + event := "Transfer" + if len(log.Topics) == 0 || log.Topics[0] != manufacturerId.abi.Events[event].ID { + return nil, errors.New("event signature mismatch") + } + out := new(ManufacturerIdTransfer) + if len(log.Data) > 0 { + if err := manufacturerId.abi.UnpackIntoInterface(out, event, log.Data); err != nil { + return nil, err + } + } + var indexed abi.Arguments + for _, arg := range manufacturerId.abi.Events[event].Inputs { + if arg.Indexed { + indexed = append(indexed, arg) + } + } + if err := abi.ParseTopics(out, indexed, log.Topics[1:]); err != nil { + return nil, err + } + out.Raw = log + return out, nil +} + +// ManufacturerIdUpgraded represents a Upgraded event raised by the ManufacturerId contract. +type ManufacturerIdUpgraded struct { + Implementation common.Address + Raw *types.Log // Blockchain specific contextual infos +} + +const ManufacturerIdUpgradedEventName = "Upgraded" + +// ContractEventName returns the user-defined event name. +func (ManufacturerIdUpgraded) ContractEventName() string { + return ManufacturerIdUpgradedEventName +} + +// UnpackUpgradedEvent is the Go binding that unpacks the event data emitted +// by contract. +// +// Solidity: event Upgraded(address indexed implementation) +func (manufacturerId *ManufacturerId) UnpackUpgradedEvent(log *types.Log) (*ManufacturerIdUpgraded, error) { + event := "Upgraded" + if len(log.Topics) == 0 || log.Topics[0] != manufacturerId.abi.Events[event].ID { + return nil, errors.New("event signature mismatch") + } + out := new(ManufacturerIdUpgraded) + if len(log.Data) > 0 { + if err := manufacturerId.abi.UnpackIntoInterface(out, event, log.Data); err != nil { + return nil, err + } + } + var indexed abi.Arguments + for _, arg := range manufacturerId.abi.Events[event].Inputs { + if arg.Indexed { + indexed = append(indexed, arg) + } + } + if err := abi.ParseTopics(out, indexed, log.Topics[1:]); err != nil { + return nil, err + } + out.Raw = log + return out, nil +} + +// UnpackError attempts to decode the provided error data using user-defined +// error definitions. +func (manufacturerId *ManufacturerId) UnpackError(raw []byte) (any, error) { + if bytes.Equal(raw[:4], manufacturerId.abi.Errors["ZeroAddress"].ID.Bytes()[:4]) { + return manufacturerId.UnpackZeroAddressError(raw[4:]) + } + return nil, errors.New("Unknown error") +} + +// ManufacturerIdZeroAddress represents a ZeroAddress error raised by the ManufacturerId contract. +type ManufacturerIdZeroAddress struct { +} + +// ErrorID returns the hash of canonical representation of the error's signature. +// +// Solidity: error ZeroAddress() +func ManufacturerIdZeroAddressErrorID() common.Hash { + return common.HexToHash("0xd92e233df2717d4a40030e20904abd27b68fcbeede117eaaccbbdac9618c8c73") +} + +// UnpackZeroAddressError is the Go binding used to decode the provided +// error data into the corresponding Go error struct. +// +// Solidity: error ZeroAddress() +func (manufacturerId *ManufacturerId) UnpackZeroAddressError(raw []byte) (*ManufacturerIdZeroAddress, error) { + out := new(ManufacturerIdZeroAddress) + if err := manufacturerId.abi.UnpackIntoInterface(out, "ZeroAddress", raw); err != nil { + return nil, err + } + return out, nil +} diff --git a/bindings/registry/registry.go b/bindings/registry/registry.go new file mode 100644 index 00000000..6fb51a95 --- /dev/null +++ b/bindings/registry/registry.go @@ -0,0 +1,6777 @@ +// Code generated via abigen V2 - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package registry + +import ( + "bytes" + "errors" + "math/big" + + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/accounts/abi/bind/v2" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" +) + +// Reference imports to suppress errors if they are not otherwise used. +var ( + _ = bytes.Equal + _ = errors.New + _ = big.NewInt + _ = common.Big1 + _ = types.BloomLookup + _ = abi.ConvertType +) + +// AftermarketDeviceIdAddressPair is an auto generated low-level Go binding around an user-defined struct. +type AftermarketDeviceIdAddressPair struct { + AftermarketDeviceNodeId *big.Int + DeviceAddress common.Address +} + +// AftermarketDeviceInfos is an auto generated low-level Go binding around an user-defined struct. +type AftermarketDeviceInfos struct { + Addr common.Address + AttrInfoPairs []AttributeInfoPair +} + +// AftermarketDeviceOwnerPair is an auto generated low-level Go binding around an user-defined struct. +type AftermarketDeviceOwnerPair struct { + AftermarketDeviceNodeId *big.Int + Owner common.Address +} + +// AttributeInfoPair is an auto generated low-level Go binding around an user-defined struct. +type AttributeInfoPair struct { + Attribute string + Info string +} + +// DevAdminIdManufacturerName is an auto generated low-level Go binding around an user-defined struct. +type DevAdminIdManufacturerName struct { + TokenId *big.Int + Name string +} + +// DevAdminVehicleIdDeviceDefinitionId is an auto generated low-level Go binding around an user-defined struct. +type DevAdminVehicleIdDeviceDefinitionId struct { + VehicleId *big.Int + DeviceDefinitionId string +} + +// DeviceDefinitionInput is an auto generated low-level Go binding around an user-defined struct. +type DeviceDefinitionInput struct { + Id string + Model string + Year *big.Int + Metadata string + Ksuid string + DeviceType string + ImageURI string +} + +// DeviceDefinitionUpdateInput is an auto generated low-level Go binding around an user-defined struct. +type DeviceDefinitionUpdateInput struct { + Id string + Metadata string + Ksuid string + DeviceType string + ImageURI string +} + +// MintSyntheticDeviceBatchInput is an auto generated low-level Go binding around an user-defined struct. +type MintSyntheticDeviceBatchInput struct { + VehicleNode *big.Int + SyntheticDeviceAddr common.Address + AttrInfoPairs []AttributeInfoPair +} + +// MintSyntheticDeviceInput is an auto generated low-level Go binding around an user-defined struct. +type MintSyntheticDeviceInput struct { + ConnectionId *big.Int + VehicleNode *big.Int + SyntheticDeviceSig []byte + VehicleOwnerSig []byte + SyntheticDeviceAddr common.Address + AttrInfoPairs []AttributeInfoPair +} + +// MintVehicleAndSdInput is an auto generated low-level Go binding around an user-defined struct. +type MintVehicleAndSdInput struct { + ManufacturerNode *big.Int + Owner common.Address + AttrInfoPairsVehicle []AttributeInfoPair + ConnectionId *big.Int + VehicleOwnerSig []byte + SyntheticDeviceSig []byte + SyntheticDeviceAddr common.Address + AttrInfoPairsDevice []AttributeInfoPair +} + +// MintVehicleAndSdInputBatch is an auto generated low-level Go binding around an user-defined struct. +type MintVehicleAndSdInputBatch struct { + ManufacturerNode *big.Int + Owner common.Address + AttrInfoPairsVehicle []AttributeInfoPair + ConnectionId *big.Int + VehicleOwnerSig []byte + SyntheticDeviceSig []byte + SyntheticDeviceAddr common.Address + AttrInfoPairsDevice []AttributeInfoPair + SacdInput SacdInput +} + +// MintVehicleAndSdInputWithSnId is an auto generated low-level Go binding around an user-defined struct. +type MintVehicleAndSdInputWithSnId struct { + ManufacturerNode *big.Int + Owner common.Address + StorageNodeId *big.Int + AttrInfoPairsVehicle []AttributeInfoPair + ConnectionId *big.Int + VehicleOwnerSig []byte + SyntheticDeviceSig []byte + SyntheticDeviceAddr common.Address + AttrInfoPairsDevice []AttributeInfoPair +} + +// MintVehicleAndSdInputWithSnIdBatch is an auto generated low-level Go binding around an user-defined struct. +type MintVehicleAndSdInputWithSnIdBatch struct { + ManufacturerNode *big.Int + Owner common.Address + StorageNodeId *big.Int + AttrInfoPairsVehicle []AttributeInfoPair + ConnectionId *big.Int + VehicleOwnerSig []byte + SyntheticDeviceSig []byte + SyntheticDeviceAddr common.Address + AttrInfoPairsDevice []AttributeInfoPair + SacdInput SacdInput +} + +// SacdInput is an auto generated low-level Go binding around an user-defined struct. +type SacdInput struct { + Grantee common.Address + Permissions *big.Int + Expiration *big.Int + Source string +} + +// TablelandPolicy is an auto generated low-level Go binding around an user-defined struct. +type TablelandPolicy struct { + AllowInsert bool + AllowUpdate bool + AllowDelete bool + WhereClause string + WithCheck string + UpdatableColumns []string +} + +// RegistryMetaData contains all meta data concerning the Registry contract. +var RegistryMetaData = bind.MetaData{ + ABI: "[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"UintUtils__InsufficientHexLength\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"moduleAddr\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes4[]\",\"name\":\"selectors\",\"type\":\"bytes4[]\"}],\"name\":\"ModuleAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"moduleAddr\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes4[]\",\"name\":\"selectors\",\"type\":\"bytes4[]\"}],\"name\":\"ModuleRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"oldImplementation\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes4[]\",\"name\":\"oldSelectors\",\"type\":\"bytes4[]\"},{\"indexed\":false,\"internalType\":\"bytes4[]\",\"name\":\"newSelectors\",\"type\":\"bytes4[]\"}],\"name\":\"ModuleUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"previousAdminRole\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"newAdminRole\",\"type\":\"bytes32\"}],\"name\":\"RoleAdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleGranted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleRevoked\",\"type\":\"event\"},{\"stateMutability\":\"nonpayable\",\"type\":\"fallback\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"},{\"internalType\":\"bytes4[]\",\"name\":\"selectors\",\"type\":\"bytes4[]\"}],\"name\":\"addModule\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"},{\"internalType\":\"bytes4[]\",\"name\":\"selectors\",\"type\":\"bytes4[]\"}],\"name\":\"removeModule\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"oldImplementation\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes4[]\",\"name\":\"oldSelectors\",\"type\":\"bytes4[]\"},{\"internalType\":\"bytes4[]\",\"name\":\"newSelectors\",\"type\":\"bytes4[]\"}],\"name\":\"updateModule\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"AdNotClaimed\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"AdPaired\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"proxy\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"InvalidNode\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"storageNodeId\",\"type\":\"uint256\"}],\"name\":\"InvalidStorageNode\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"VehiclePaired\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"attribute\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"info\",\"type\":\"string\"}],\"name\":\"AftermarketDeviceAttributeSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"AftermarketDeviceNodeBurned\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"aftermarketDeviceNode\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"vehicleNode\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"AftermarketDevicePaired\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"aftermarketDeviceNode\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"oldOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"AftermarketDeviceTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"aftermarketDeviceNode\",\"type\":\"uint256\"}],\"name\":\"AftermarketDeviceUnclaimed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"aftermarketDeviceNode\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"vehicleNode\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"AftermarketDeviceUnpaired\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"vehicleId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"ddId\",\"type\":\"string\"}],\"name\":\"DeviceDefinitionIdSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"attribute\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"info\",\"type\":\"string\"}],\"name\":\"SyntheticDeviceAttributeSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"syntheticDeviceNode\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"vehicleNode\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"SyntheticDeviceNodeBurned\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"attribute\",\"type\":\"string\"}],\"name\":\"VehicleAttributeRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"attribute\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"info\",\"type\":\"string\"}],\"name\":\"VehicleAttributeSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"vehicleNode\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"VehicleNodeBurned\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"vehicleId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"storageNodeId\",\"type\":\"uint256\"}],\"name\":\"VehicleStorageNodeIdSet\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"uint256[]\",\"name\":\"tokenIds\",\"type\":\"uint256[]\"}],\"name\":\"adminBurnAftermarketDevices\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256[]\",\"name\":\"tokenIds\",\"type\":\"uint256[]\"}],\"name\":\"adminBurnAftermarketDevicesAndDeletePairings\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256[]\",\"name\":\"tokenIds\",\"type\":\"uint256[]\"}],\"name\":\"adminBurnSyntheticDevicesAndDeletePairings\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256[]\",\"name\":\"tokenIds\",\"type\":\"uint256[]\"}],\"name\":\"adminBurnVehicles\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256[]\",\"name\":\"tokenIds\",\"type\":\"uint256[]\"}],\"name\":\"adminBurnVehiclesAndDeletePairings\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"adminCacheDimoStreamrEns\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"newParentNode\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"idProxyAddress\",\"type\":\"address\"},{\"internalType\":\"uint256[]\",\"name\":\"nodeIdList\",\"type\":\"uint256[]\"}],\"name\":\"adminChangeParentNode\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"aftermarketDeviceNode\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"vehicleNode\",\"type\":\"uint256\"}],\"name\":\"adminPairAftermarketDevice\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"attribute\",\"type\":\"string\"}],\"name\":\"adminRemoveVehicleAttribute\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256[]\",\"name\":\"vehicleIds\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256\",\"name\":\"storageNodeId\",\"type\":\"uint256\"}],\"name\":\"adminSetStorageNodeIdForVehicleIds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"vehicleId\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"deviceDefinitionId\",\"type\":\"string\"}],\"internalType\":\"structDevAdmin.VehicleIdDeviceDefinitionId[]\",\"name\":\"vehicleIdDdId\",\"type\":\"tuple[]\"}],\"name\":\"adminSetVehicleDDs\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"internalType\":\"structDevAdmin.IdManufacturerName[]\",\"name\":\"idManufacturerNames\",\"type\":\"tuple[]\"}],\"name\":\"renameManufacturers\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"aftermarketDeviceNode\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferAftermarketDeviceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256[]\",\"name\":\"aftermarketDeviceNodes\",\"type\":\"uint256[]\"}],\"name\":\"unclaimAftermarketDeviceNode\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256[]\",\"name\":\"aftermarketDeviceNodes\",\"type\":\"uint256[]\"}],\"name\":\"unpairAftermarketDeviceByDeviceNode\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256[]\",\"name\":\"vehicleNodes\",\"type\":\"uint256[]\"}],\"name\":\"unpairAftermarketDeviceByVehicleNode\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleAdmin\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"grantRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"hasRole\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"renounceRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"revokeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"version\",\"type\":\"string\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes[]\",\"name\":\"data\",\"type\":\"bytes[]\"}],\"name\":\"multiDelegateCall\",\"outputs\":[{\"internalType\":\"bytes[]\",\"name\":\"results\",\"type\":\"bytes[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes[]\",\"name\":\"data\",\"type\":\"bytes[]\"}],\"name\":\"multiStaticCall\",\"outputs\":[{\"internalType\":\"bytes[]\",\"name\":\"results\",\"type\":\"bytes[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"onERC721Received\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"AdNotPaired\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"attr\",\"type\":\"string\"}],\"name\":\"AttributeExists\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"attr\",\"type\":\"string\"}],\"name\":\"AttributeNotWhitelisted\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"DeviceAlreadyClaimed\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"DeviceAlreadyRegistered\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidAdSignature\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidLicense\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidOwnerSignature\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"InvalidParentNode\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidSigner\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OwnersDoNotMatch\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"Unauthorized\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"VehicleNotPaired\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroAddress\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"manufacturerId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"aftermarketDeviceAddress\",\"type\":\"address\"}],\"name\":\"AftermarketDeviceAddressReset\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"attribute\",\"type\":\"string\"}],\"name\":\"AftermarketDeviceAttributeAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"aftermarketDeviceNode\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"AftermarketDeviceClaimed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"proxy\",\"type\":\"address\"}],\"name\":\"AftermarketDeviceIdProxySet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"manufacturerId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"aftermarketDeviceAddress\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"AftermarketDeviceNodeMinted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"aftermarketDeviceNode\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"AftermarketDeviceUnclaimed\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"attribute\",\"type\":\"string\"}],\"name\":\"addAftermarketDeviceAttribute\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"aftermarketDeviceNode\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"aftermarketDeviceSig\",\"type\":\"bytes\"}],\"name\":\"claimAftermarketDevice\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"aftermarketDeviceNodeId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"internalType\":\"structAftermarketDeviceOwnerPair[]\",\"name\":\"adOwnerPair\",\"type\":\"tuple[]\"}],\"name\":\"claimAftermarketDeviceBatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"aftermarketDeviceNode\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"ownerSig\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"aftermarketDeviceSig\",\"type\":\"bytes\"}],\"name\":\"claimAftermarketDeviceSign\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"nodeId\",\"type\":\"uint256\"}],\"name\":\"getAftermarketDeviceAddressById\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"getAftermarketDeviceIdByAddress\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"nodeId\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"nodeId\",\"type\":\"uint256\"}],\"name\":\"isAftermarketDeviceClaimed\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"isClaimed\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"manufacturerNode\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"string\",\"name\":\"attribute\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"info\",\"type\":\"string\"}],\"internalType\":\"structAttributeInfoPair[]\",\"name\":\"attrInfoPairs\",\"type\":\"tuple[]\"}],\"internalType\":\"structAftermarketDeviceInfos[]\",\"name\":\"adInfos\",\"type\":\"tuple[]\"}],\"name\":\"mintAftermarketDeviceByManufacturerBatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"aftermarketDeviceNode\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"vehicleNode\",\"type\":\"uint256\"}],\"name\":\"pairAftermarketDevice\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"aftermarketDeviceNode\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"vehicleNode\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"aftermarketDeviceSig\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"vehicleOwnerSig\",\"type\":\"bytes\"}],\"name\":\"pairAftermarketDeviceSign\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"aftermarketDeviceNode\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"vehicleNode\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"signature\",\"type\":\"bytes\"}],\"name\":\"pairAftermarketDeviceSign\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"aftermarketDeviceNode\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"vehicleNode\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"aftermarketDeviceSig\",\"type\":\"bytes\"}],\"name\":\"pairAftermarketDeviceWithAdSig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256[]\",\"name\":\"aftermarketDeviceNodeList\",\"type\":\"uint256[]\"}],\"name\":\"reprovisionAftermarketDeviceByManufacturerBatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"aftermarketDeviceNodeId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"deviceAddress\",\"type\":\"address\"}],\"internalType\":\"structAftermarketDeviceIdAddressPair[]\",\"name\":\"adIdAddrs\",\"type\":\"tuple[]\"}],\"name\":\"resetAftermarketDeviceAddressByManufacturerBatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"aftermarketDeviceNode\",\"type\":\"uint256\"}],\"name\":\"resetAftermarketDeviceForClaiming\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"setAftermarketDeviceIdProxyAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"string\",\"name\":\"attribute\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"info\",\"type\":\"string\"}],\"internalType\":\"structAttributeInfoPair[]\",\"name\":\"attrInfo\",\"type\":\"tuple[]\"}],\"name\":\"setAftermarketDeviceInfo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"aftermarketDeviceNode\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"vehicleNode\",\"type\":\"uint256\"}],\"name\":\"unpairAftermarketDevice\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"aftermarketDeviceNode\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"vehicleNode\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"signature\",\"type\":\"bytes\"}],\"name\":\"unpairAftermarketDeviceSign\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"controller\",\"type\":\"address\"}],\"name\":\"ControllerSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"attribute\",\"type\":\"string\"}],\"name\":\"ManufacturerAttributeAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"attribute\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"info\",\"type\":\"string\"}],\"name\":\"ManufacturerAttributeSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"proxy\",\"type\":\"address\"}],\"name\":\"ManufacturerIdProxySet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"ManufacturerNodeMinted\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"attribute\",\"type\":\"string\"}],\"name\":\"addManufacturerAttribute\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"name\":\"getManufacturerIdByName\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"nodeId\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"getManufacturerNameById\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"isAllowedToOwnManufacturerNode\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"_isAllowed\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"isController\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"_isController\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"isManufacturerMinted\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"_isManufacturerMinted\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"components\":[{\"internalType\":\"string\",\"name\":\"attribute\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"info\",\"type\":\"string\"}],\"internalType\":\"structAttributeInfoPair[]\",\"name\":\"attrInfoPairList\",\"type\":\"tuple[]\"}],\"name\":\"mintManufacturer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"string[]\",\"name\":\"names\",\"type\":\"string[]\"}],\"name\":\"mintManufacturerBatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_controller\",\"type\":\"address\"}],\"name\":\"setController\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"setManufacturerIdProxyAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"string\",\"name\":\"attribute\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"info\",\"type\":\"string\"}],\"internalType\":\"structAttributeInfoPair[]\",\"name\":\"attrInfoList\",\"type\":\"tuple[]\"}],\"name\":\"setManufacturerInfo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"updateManufacturerMinted\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"InvalidSdSignature\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyNftProxy\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"attribute\",\"type\":\"string\"}],\"name\":\"SyntheticDeviceAttributeAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"proxy\",\"type\":\"address\"}],\"name\":\"SyntheticDeviceIdProxySet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"connectionId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"syntheticDeviceNode\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"vehicleNode\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"syntheticDeviceAddress\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"SyntheticDeviceNodeMinted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"manufacturerNode\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"VehicleNodeMinted\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"attribute\",\"type\":\"string\"}],\"name\":\"addSyntheticDeviceAttribute\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"vehicleNode\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"syntheticDeviceNode\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"ownerSig\",\"type\":\"bytes\"}],\"name\":\"burnSyntheticDeviceSign\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"nodeId\",\"type\":\"uint256\"}],\"name\":\"getSyntheticDeviceAddressById\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"getSyntheticDeviceIdByAddress\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"nodeId\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"connectionId\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"vehicleNode\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"syntheticDeviceAddr\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"string\",\"name\":\"attribute\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"info\",\"type\":\"string\"}],\"internalType\":\"structAttributeInfoPair[]\",\"name\":\"attrInfoPairs\",\"type\":\"tuple[]\"}],\"internalType\":\"structMintSyntheticDeviceBatchInput[]\",\"name\":\"data\",\"type\":\"tuple[]\"}],\"name\":\"mintSyntheticDeviceBatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"connectionId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"vehicleNode\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"syntheticDeviceSig\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"vehicleOwnerSig\",\"type\":\"bytes\"},{\"internalType\":\"address\",\"name\":\"syntheticDeviceAddr\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"string\",\"name\":\"attribute\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"info\",\"type\":\"string\"}],\"internalType\":\"structAttributeInfoPair[]\",\"name\":\"attrInfoPairs\",\"type\":\"tuple[]\"}],\"internalType\":\"structMintSyntheticDeviceInput\",\"name\":\"data\",\"type\":\"tuple\"}],\"name\":\"mintSyntheticDeviceSign\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"setSyntheticDeviceIdProxyAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"string\",\"name\":\"attribute\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"info\",\"type\":\"string\"}],\"internalType\":\"structAttributeInfoPair[]\",\"name\":\"attrInfo\",\"type\":\"tuple[]\"}],\"name\":\"setSyntheticDeviceInfo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"validateSdBurnAndResetNode\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"attribute\",\"type\":\"string\"}],\"name\":\"VehicleAttributeAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"proxy\",\"type\":\"address\"}],\"name\":\"VehicleIdProxySet\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"attribute\",\"type\":\"string\"}],\"name\":\"addVehicleAttribute\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"ownerSig\",\"type\":\"bytes\"}],\"name\":\"burnVehicleSign\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"vehicleId\",\"type\":\"uint256\"}],\"name\":\"getDeviceDefinitionIdByVehicleId\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"ddId\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"manufacturerNode\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"string\",\"name\":\"attribute\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"info\",\"type\":\"string\"}],\"internalType\":\"structAttributeInfoPair[]\",\"name\":\"attrInfo\",\"type\":\"tuple[]\"}],\"name\":\"mintVehicle\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"manufacturerNode\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"string\",\"name\":\"attribute\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"info\",\"type\":\"string\"}],\"internalType\":\"structAttributeInfoPair[]\",\"name\":\"attrInfo\",\"type\":\"tuple[]\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"grantee\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"permissions\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiration\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"source\",\"type\":\"string\"}],\"internalType\":\"structSacdInput\",\"name\":\"sacdInput\",\"type\":\"tuple\"}],\"name\":\"mintVehicle\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"manufacturerNode\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"storageNodeId\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"string\",\"name\":\"attribute\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"info\",\"type\":\"string\"}],\"internalType\":\"structAttributeInfoPair[]\",\"name\":\"attrInfo\",\"type\":\"tuple[]\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"grantee\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"permissions\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiration\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"source\",\"type\":\"string\"}],\"internalType\":\"structSacdInput\",\"name\":\"sacdInput\",\"type\":\"tuple\"}],\"name\":\"mintVehicle\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"manufacturerNode\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"storageNodeId\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"string\",\"name\":\"attribute\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"info\",\"type\":\"string\"}],\"internalType\":\"structAttributeInfoPair[]\",\"name\":\"attrInfo\",\"type\":\"tuple[]\"}],\"name\":\"mintVehicle\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"manufacturerNode\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"string\",\"name\":\"attribute\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"info\",\"type\":\"string\"}],\"internalType\":\"structAttributeInfoPair[]\",\"name\":\"attrInfo\",\"type\":\"tuple[]\"},{\"internalType\":\"bytes\",\"name\":\"signature\",\"type\":\"bytes\"}],\"name\":\"mintVehicleSign\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"manufacturerNode\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"storageNodeId\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"string\",\"name\":\"attribute\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"info\",\"type\":\"string\"}],\"internalType\":\"structAttributeInfoPair[]\",\"name\":\"attrInfo\",\"type\":\"tuple[]\"},{\"internalType\":\"bytes\",\"name\":\"signature\",\"type\":\"bytes\"}],\"name\":\"mintVehicleSign\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"setVehicleIdProxyAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"string\",\"name\":\"attribute\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"info\",\"type\":\"string\"}],\"internalType\":\"structAttributeInfoPair[]\",\"name\":\"attrInfo\",\"type\":\"tuple[]\"}],\"name\":\"setVehicleInfo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"validateBurnAndResetNode\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"idProxyAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"attribute\",\"type\":\"string\"}],\"name\":\"getInfo\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"info\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"idProxyAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"getParentNode\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"parentNode\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"idProxyAddress\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"nodeId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"beneficiary\",\"type\":\"address\"}],\"name\":\"BeneficiarySet\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"idProxyAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"nodeId\",\"type\":\"uint256\"}],\"name\":\"getBeneficiary\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"beneficiary\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"idProxyAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"sourceNode\",\"type\":\"uint256\"}],\"name\":\"getLink\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"targetNode\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"idProxyAddressSource\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"idProxyAddressTarget\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"sourceNode\",\"type\":\"uint256\"}],\"name\":\"getNodeLink\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"targetNode\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"nodeId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"beneficiary\",\"type\":\"address\"}],\"name\":\"setAftermarketDeviceBeneficiary\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"manufacturerNode\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"storageNodeId\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"string\",\"name\":\"attribute\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"info\",\"type\":\"string\"}],\"internalType\":\"structAttributeInfoPair[]\",\"name\":\"attrInfoPairsVehicle\",\"type\":\"tuple[]\"},{\"internalType\":\"uint256\",\"name\":\"connectionId\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"vehicleOwnerSig\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"syntheticDeviceSig\",\"type\":\"bytes\"},{\"internalType\":\"address\",\"name\":\"syntheticDeviceAddr\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"string\",\"name\":\"attribute\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"info\",\"type\":\"string\"}],\"internalType\":\"structAttributeInfoPair[]\",\"name\":\"attrInfoPairsDevice\",\"type\":\"tuple[]\"}],\"internalType\":\"structMintVehicleAndSdInputWithSnId\",\"name\":\"data\",\"type\":\"tuple\"}],\"name\":\"mintVehicleAndSdSign\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"manufacturerNode\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"string\",\"name\":\"attribute\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"info\",\"type\":\"string\"}],\"internalType\":\"structAttributeInfoPair[]\",\"name\":\"attrInfoPairsVehicle\",\"type\":\"tuple[]\"},{\"internalType\":\"uint256\",\"name\":\"connectionId\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"vehicleOwnerSig\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"syntheticDeviceSig\",\"type\":\"bytes\"},{\"internalType\":\"address\",\"name\":\"syntheticDeviceAddr\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"string\",\"name\":\"attribute\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"info\",\"type\":\"string\"}],\"internalType\":\"structAttributeInfoPair[]\",\"name\":\"attrInfoPairsDevice\",\"type\":\"tuple[]\"}],\"internalType\":\"structMintVehicleAndSdInput\",\"name\":\"data\",\"type\":\"tuple\"}],\"name\":\"mintVehicleAndSdSign\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"manufacturerNode\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"storageNodeId\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"string\",\"name\":\"attribute\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"info\",\"type\":\"string\"}],\"internalType\":\"structAttributeInfoPair[]\",\"name\":\"attrInfoPairsVehicle\",\"type\":\"tuple[]\"},{\"internalType\":\"uint256\",\"name\":\"connectionId\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"vehicleOwnerSig\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"syntheticDeviceSig\",\"type\":\"bytes\"},{\"internalType\":\"address\",\"name\":\"syntheticDeviceAddr\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"string\",\"name\":\"attribute\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"info\",\"type\":\"string\"}],\"internalType\":\"structAttributeInfoPair[]\",\"name\":\"attrInfoPairsDevice\",\"type\":\"tuple[]\"}],\"internalType\":\"structMintVehicleAndSdInputWithSnId\",\"name\":\"data\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"grantee\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"permissions\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiration\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"source\",\"type\":\"string\"}],\"internalType\":\"structSacdInput\",\"name\":\"sacdInput\",\"type\":\"tuple\"}],\"name\":\"mintVehicleAndSdSignAndSacd\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"manufacturerNode\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"string\",\"name\":\"attribute\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"info\",\"type\":\"string\"}],\"internalType\":\"structAttributeInfoPair[]\",\"name\":\"attrInfoPairsVehicle\",\"type\":\"tuple[]\"},{\"internalType\":\"uint256\",\"name\":\"connectionId\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"vehicleOwnerSig\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"syntheticDeviceSig\",\"type\":\"bytes\"},{\"internalType\":\"address\",\"name\":\"syntheticDeviceAddr\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"string\",\"name\":\"attribute\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"info\",\"type\":\"string\"}],\"internalType\":\"structAttributeInfoPair[]\",\"name\":\"attrInfoPairsDevice\",\"type\":\"tuple[]\"}],\"internalType\":\"structMintVehicleAndSdInput\",\"name\":\"data\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"grantee\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"permissions\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiration\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"source\",\"type\":\"string\"}],\"internalType\":\"structSacdInput\",\"name\":\"sacdInput\",\"type\":\"tuple\"}],\"name\":\"mintVehicleAndSdSignAndSacd\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"manufacturerNode\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"storageNodeId\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"string\",\"name\":\"attribute\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"info\",\"type\":\"string\"}],\"internalType\":\"structAttributeInfoPair[]\",\"name\":\"attrInfoPairsVehicle\",\"type\":\"tuple[]\"},{\"internalType\":\"uint256\",\"name\":\"connectionId\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"vehicleOwnerSig\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"syntheticDeviceSig\",\"type\":\"bytes\"},{\"internalType\":\"address\",\"name\":\"syntheticDeviceAddr\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"string\",\"name\":\"attribute\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"info\",\"type\":\"string\"}],\"internalType\":\"structAttributeInfoPair[]\",\"name\":\"attrInfoPairsDevice\",\"type\":\"tuple[]\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"grantee\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"permissions\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiration\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"source\",\"type\":\"string\"}],\"internalType\":\"structSacdInput\",\"name\":\"sacdInput\",\"type\":\"tuple\"}],\"internalType\":\"structMintVehicleAndSdInputWithSnIdBatch[]\",\"name\":\"data\",\"type\":\"tuple[]\"}],\"name\":\"mintVehicleAndSdSignBatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"manufacturerNode\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"string\",\"name\":\"attribute\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"info\",\"type\":\"string\"}],\"internalType\":\"structAttributeInfoPair[]\",\"name\":\"attrInfoPairsVehicle\",\"type\":\"tuple[]\"},{\"internalType\":\"uint256\",\"name\":\"connectionId\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"vehicleOwnerSig\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"syntheticDeviceSig\",\"type\":\"bytes\"},{\"internalType\":\"address\",\"name\":\"syntheticDeviceAddr\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"string\",\"name\":\"attribute\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"info\",\"type\":\"string\"}],\"internalType\":\"structAttributeInfoPair[]\",\"name\":\"attrInfoPairsDevice\",\"type\":\"tuple[]\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"grantee\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"permissions\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiration\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"source\",\"type\":\"string\"}],\"internalType\":\"structSacdInput\",\"name\":\"sacdInput\",\"type\":\"tuple\"}],\"internalType\":\"structMintVehicleAndSdInputBatch[]\",\"name\":\"data\",\"type\":\"tuple[]\"}],\"name\":\"mintVehicleAndSdSignBatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"connectionsManager\",\"type\":\"address\"}],\"name\":\"ConnectionsManagerSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"dimoCredit\",\"type\":\"address\"}],\"name\":\"DimoCreditSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"dimoToken\",\"type\":\"address\"}],\"name\":\"DimoTokenSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"foundation\",\"type\":\"address\"}],\"name\":\"FoundationSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"manufacturerLicense\",\"type\":\"address\"}],\"name\":\"ManufacturerLicenseSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sacd\",\"type\":\"address\"}],\"name\":\"SacdSet\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"getConnectionsManager\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"connectionsManager\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getDimoCredit\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"dimoCredit\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getDimoToken\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"dimoToken\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getFoundation\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"foundation\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getManufacturerLicense\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"manufacturerLicense\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getSacd\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"sacd\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"connectionsManager\",\"type\":\"address\"}],\"name\":\"setConnectionsManager\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"dimoCredit\",\"type\":\"address\"}],\"name\":\"setDimoCredit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"dimoToken\",\"type\":\"address\"}],\"name\":\"setDimoToken\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"foundation\",\"type\":\"address\"}],\"name\":\"setFoundation\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"manufacturerLicense\",\"type\":\"address\"}],\"name\":\"setManufacturerLicense\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sacd\",\"type\":\"address\"}],\"name\":\"setSacd\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"dimoStreamrEns\",\"type\":\"string\"}],\"name\":\"DimoStreamrEnsSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"dimoStreamrNode\",\"type\":\"address\"}],\"name\":\"DimoStreamrNodeSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"streamRegistry\",\"type\":\"address\"}],\"name\":\"StreamRegistrySet\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"dimoStreamrEns\",\"type\":\"string\"}],\"name\":\"setDimoBaseStreamId\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"dimoStreamrNode\",\"type\":\"address\"}],\"name\":\"setDimoStreamrNode\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"streamRegistry\",\"type\":\"address\"}],\"name\":\"setStreamRegistry\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"internalType\":\"enumIStreamRegistry.PermissionType\",\"name\":\"permissionType\",\"type\":\"uint8\"}],\"name\":\"NoStreamrPermission\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"streamId\",\"type\":\"string\"}],\"name\":\"StreamDoesNotExist\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"vehicleId\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"streamId\",\"type\":\"string\"}],\"name\":\"VehicleStreamAlreadySet\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"vehicleId\",\"type\":\"uint256\"}],\"name\":\"VehicleStreamNotSet\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"streamId\",\"type\":\"string\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"subscriber\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"expirationTime\",\"type\":\"uint256\"}],\"name\":\"SubscribedToVehicleStream\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"vehicleId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"streamId\",\"type\":\"string\"}],\"name\":\"VehicleStreamSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"vehicleId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"streamId\",\"type\":\"string\"}],\"name\":\"VehicleStreamUnset\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"vehicleId\",\"type\":\"uint256\"}],\"name\":\"createVehicleStream\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"vehicleId\",\"type\":\"uint256\"}],\"name\":\"getVehicleStream\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"streamId\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"vehicleId\",\"type\":\"uint256\"}],\"name\":\"onBurnVehicleStream\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"vehicleId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"subscriber\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"expirationTime\",\"type\":\"uint256\"}],\"name\":\"onSetSubscribePrivilege\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"vehicleId\",\"type\":\"uint256\"}],\"name\":\"onTransferVehicleStream\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"vehicleId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"subscriber\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"expirationTime\",\"type\":\"uint256\"}],\"name\":\"setSubscriptionToVehicleStream\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"vehicleId\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"streamId\",\"type\":\"string\"}],\"name\":\"setVehicleStream\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"vehicleId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expirationTime\",\"type\":\"uint256\"}],\"name\":\"subscribeToVehicleStream\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"vehicleId\",\"type\":\"uint256\"}],\"name\":\"unsetVehicleStream\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"chainid\",\"type\":\"uint256\"}],\"name\":\"ChainNotSupported\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"InvalidManufacturerId\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"manufacturerId\",\"type\":\"uint256\"}],\"name\":\"TableAlreadyExists\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tableId\",\"type\":\"uint256\"}],\"name\":\"TableDoesNotExist\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"}],\"name\":\"Unauthorized\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"tableId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"id\",\"type\":\"string\"}],\"name\":\"DeviceDefinitionDeleted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"tableId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"id\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"model\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"year\",\"type\":\"uint256\"}],\"name\":\"DeviceDefinitionInserted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"tableOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"manufacturerId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"tableId\",\"type\":\"uint256\"}],\"name\":\"DeviceDefinitionTableCreated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"tableId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"id\",\"type\":\"string\"}],\"name\":\"DeviceDefinitionUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"manufacturerId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"tableId\",\"type\":\"uint256\"}],\"name\":\"ManufacturerTableSet\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tableOwner\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"manufacturerId\",\"type\":\"uint256\"}],\"name\":\"createDeviceDefinitionTable\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tableOwner\",\"type\":\"address\"},{\"internalType\":\"uint256[]\",\"name\":\"manufacturerIds\",\"type\":\"uint256[]\"}],\"name\":\"createDeviceDefinitionTableBatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"manufacturerId\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"id\",\"type\":\"string\"}],\"name\":\"deleteDeviceDefinition\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"manufacturerId\",\"type\":\"uint256\"}],\"name\":\"getDeviceDefinitionTableId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"tableId\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"manufacturerId\",\"type\":\"uint256\"}],\"name\":\"getDeviceDefinitionTableName\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"tableName\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"manufacturerId\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"string\",\"name\":\"id\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"model\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"year\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"metadata\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"ksuid\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"deviceType\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"imageURI\",\"type\":\"string\"}],\"internalType\":\"structDeviceDefinitionInput\",\"name\":\"data\",\"type\":\"tuple\"}],\"name\":\"insertDeviceDefinition\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"manufacturerId\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"string\",\"name\":\"id\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"model\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"year\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"metadata\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"ksuid\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"deviceType\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"imageURI\",\"type\":\"string\"}],\"internalType\":\"structDeviceDefinitionInput[]\",\"name\":\"data\",\"type\":\"tuple[]\"}],\"name\":\"insertDeviceDefinitionBatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"manufacturerId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"tableId\",\"type\":\"uint256\"}],\"name\":\"setDeviceDefinitionTable\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"manufacturerId\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"string\",\"name\":\"id\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"metadata\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"ksuid\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"deviceType\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"imageURI\",\"type\":\"string\"}],\"internalType\":\"structDeviceDefinitionUpdateInput\",\"name\":\"data\",\"type\":\"tuple\"}],\"name\":\"updateDeviceDefinition\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"getPolicy\",\"outputs\":[{\"components\":[{\"internalType\":\"bool\",\"name\":\"allowInsert\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"allowUpdate\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"allowDelete\",\"type\":\"bool\"},{\"internalType\":\"string\",\"name\":\"whereClause\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"withCheck\",\"type\":\"string\"},{\"internalType\":\"string[]\",\"name\":\"updatableColumns\",\"type\":\"string[]\"}],\"internalType\":\"structTablelandPolicy\",\"name\":\"policy\",\"type\":\"tuple\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"operation\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"cost\",\"type\":\"uint256\"}],\"name\":\"OperationCostSet\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"operation\",\"type\":\"bytes32\"}],\"name\":\"getDcxOperationCost\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"cost\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"operation\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"cost\",\"type\":\"uint256\"}],\"name\":\"setDcxOperationCost\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"storageNode\",\"type\":\"address\"}],\"name\":\"StorageNodeSet\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"getDefaultStorageNodeId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"defaultStorageNodeId\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getStorageNode\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"storageNode\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"storageNodeId\",\"type\":\"uint256\"}],\"name\":\"setDefaultStorageNodeId\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"storageNode\",\"type\":\"address\"}],\"name\":\"setStorageNode\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"vehicleId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"storageNodeId\",\"type\":\"uint256\"}],\"name\":\"setStorageNodeIdForVehicle\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"vehicleId\",\"type\":\"uint256\"}],\"name\":\"vehicleIdToStorageNodeId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]", + ID: "Registry", +} + +// Registry is an auto generated Go binding around an Ethereum contract. +type Registry struct { + abi abi.ABI +} + +// NewRegistry creates a new instance of Registry. +func NewRegistry() *Registry { + parsed, err := RegistryMetaData.ParseABI() + if err != nil { + panic(errors.New("invalid ABI: " + err.Error())) + } + return &Registry{abi: *parsed} +} + +// Instance creates a wrapper for a deployed contract instance at the given address. +// Use this to create the instance object passed to abigen v2 library functions Call, Transact, etc. +func (c *Registry) Instance(backend bind.ContractBackend, addr common.Address) *bind.BoundContract { + return bind.NewBoundContract(addr, c.abi, backend, backend, backend) +} + +// PackAddAftermarketDeviceAttribute is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x6111afa3. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function addAftermarketDeviceAttribute(string attribute) returns() +func (registry *Registry) PackAddAftermarketDeviceAttribute(attribute string) []byte { + enc, err := registry.abi.Pack("addAftermarketDeviceAttribute", attribute) + if err != nil { + panic(err) + } + return enc +} + +// TryPackAddAftermarketDeviceAttribute is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x6111afa3. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function addAftermarketDeviceAttribute(string attribute) returns() +func (registry *Registry) TryPackAddAftermarketDeviceAttribute(attribute string) ([]byte, error) { + return registry.abi.Pack("addAftermarketDeviceAttribute", attribute) +} + +// PackAddManufacturerAttribute is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x50300a3f. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function addManufacturerAttribute(string attribute) returns() +func (registry *Registry) PackAddManufacturerAttribute(attribute string) []byte { + enc, err := registry.abi.Pack("addManufacturerAttribute", attribute) + if err != nil { + panic(err) + } + return enc +} + +// TryPackAddManufacturerAttribute is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x50300a3f. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function addManufacturerAttribute(string attribute) returns() +func (registry *Registry) TryPackAddManufacturerAttribute(attribute string) ([]byte, error) { + return registry.abi.Pack("addManufacturerAttribute", attribute) +} + +// PackAddModule is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x0df5b997. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function addModule(address implementation, bytes4[] selectors) returns() +func (registry *Registry) PackAddModule(implementation common.Address, selectors [][4]byte) []byte { + enc, err := registry.abi.Pack("addModule", implementation, selectors) + if err != nil { + panic(err) + } + return enc +} + +// TryPackAddModule is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x0df5b997. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function addModule(address implementation, bytes4[] selectors) returns() +func (registry *Registry) TryPackAddModule(implementation common.Address, selectors [][4]byte) ([]byte, error) { + return registry.abi.Pack("addModule", implementation, selectors) +} + +// PackAddSyntheticDeviceAttribute is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xe1f371df. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function addSyntheticDeviceAttribute(string attribute) returns() +func (registry *Registry) PackAddSyntheticDeviceAttribute(attribute string) []byte { + enc, err := registry.abi.Pack("addSyntheticDeviceAttribute", attribute) + if err != nil { + panic(err) + } + return enc +} + +// TryPackAddSyntheticDeviceAttribute is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xe1f371df. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function addSyntheticDeviceAttribute(string attribute) returns() +func (registry *Registry) TryPackAddSyntheticDeviceAttribute(attribute string) ([]byte, error) { + return registry.abi.Pack("addSyntheticDeviceAttribute", attribute) +} + +// PackAddVehicleAttribute is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xf0d1a557. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function addVehicleAttribute(string attribute) returns() +func (registry *Registry) PackAddVehicleAttribute(attribute string) []byte { + enc, err := registry.abi.Pack("addVehicleAttribute", attribute) + if err != nil { + panic(err) + } + return enc +} + +// TryPackAddVehicleAttribute is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xf0d1a557. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function addVehicleAttribute(string attribute) returns() +func (registry *Registry) TryPackAddVehicleAttribute(attribute string) ([]byte, error) { + return registry.abi.Pack("addVehicleAttribute", attribute) +} + +// PackAdminBurnAftermarketDevices is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xd7376bae. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function adminBurnAftermarketDevices(uint256[] tokenIds) returns() +func (registry *Registry) PackAdminBurnAftermarketDevices(tokenIds []*big.Int) []byte { + enc, err := registry.abi.Pack("adminBurnAftermarketDevices", tokenIds) + if err != nil { + panic(err) + } + return enc +} + +// TryPackAdminBurnAftermarketDevices is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xd7376bae. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function adminBurnAftermarketDevices(uint256[] tokenIds) returns() +func (registry *Registry) TryPackAdminBurnAftermarketDevices(tokenIds []*big.Int) ([]byte, error) { + return registry.abi.Pack("adminBurnAftermarketDevices", tokenIds) +} + +// PackAdminBurnAftermarketDevicesAndDeletePairings is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x63dec203. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function adminBurnAftermarketDevicesAndDeletePairings(uint256[] tokenIds) returns() +func (registry *Registry) PackAdminBurnAftermarketDevicesAndDeletePairings(tokenIds []*big.Int) []byte { + enc, err := registry.abi.Pack("adminBurnAftermarketDevicesAndDeletePairings", tokenIds) + if err != nil { + panic(err) + } + return enc +} + +// TryPackAdminBurnAftermarketDevicesAndDeletePairings is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x63dec203. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function adminBurnAftermarketDevicesAndDeletePairings(uint256[] tokenIds) returns() +func (registry *Registry) TryPackAdminBurnAftermarketDevicesAndDeletePairings(tokenIds []*big.Int) ([]byte, error) { + return registry.abi.Pack("adminBurnAftermarketDevicesAndDeletePairings", tokenIds) +} + +// PackAdminBurnSyntheticDevicesAndDeletePairings is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x52878b61. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function adminBurnSyntheticDevicesAndDeletePairings(uint256[] tokenIds) returns() +func (registry *Registry) PackAdminBurnSyntheticDevicesAndDeletePairings(tokenIds []*big.Int) []byte { + enc, err := registry.abi.Pack("adminBurnSyntheticDevicesAndDeletePairings", tokenIds) + if err != nil { + panic(err) + } + return enc +} + +// TryPackAdminBurnSyntheticDevicesAndDeletePairings is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x52878b61. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function adminBurnSyntheticDevicesAndDeletePairings(uint256[] tokenIds) returns() +func (registry *Registry) TryPackAdminBurnSyntheticDevicesAndDeletePairings(tokenIds []*big.Int) ([]byte, error) { + return registry.abi.Pack("adminBurnSyntheticDevicesAndDeletePairings", tokenIds) +} + +// PackAdminBurnVehicles is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x282eb387. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function adminBurnVehicles(uint256[] tokenIds) returns() +func (registry *Registry) PackAdminBurnVehicles(tokenIds []*big.Int) []byte { + enc, err := registry.abi.Pack("adminBurnVehicles", tokenIds) + if err != nil { + panic(err) + } + return enc +} + +// TryPackAdminBurnVehicles is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x282eb387. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function adminBurnVehicles(uint256[] tokenIds) returns() +func (registry *Registry) TryPackAdminBurnVehicles(tokenIds []*big.Int) ([]byte, error) { + return registry.abi.Pack("adminBurnVehicles", tokenIds) +} + +// PackAdminBurnVehiclesAndDeletePairings is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x11d679c9. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function adminBurnVehiclesAndDeletePairings(uint256[] tokenIds) returns() +func (registry *Registry) PackAdminBurnVehiclesAndDeletePairings(tokenIds []*big.Int) []byte { + enc, err := registry.abi.Pack("adminBurnVehiclesAndDeletePairings", tokenIds) + if err != nil { + panic(err) + } + return enc +} + +// TryPackAdminBurnVehiclesAndDeletePairings is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x11d679c9. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function adminBurnVehiclesAndDeletePairings(uint256[] tokenIds) returns() +func (registry *Registry) TryPackAdminBurnVehiclesAndDeletePairings(tokenIds []*big.Int) ([]byte, error) { + return registry.abi.Pack("adminBurnVehiclesAndDeletePairings", tokenIds) +} + +// PackAdminCacheDimoStreamrEns is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xb17b974b. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function adminCacheDimoStreamrEns() returns() +func (registry *Registry) PackAdminCacheDimoStreamrEns() []byte { + enc, err := registry.abi.Pack("adminCacheDimoStreamrEns") + if err != nil { + panic(err) + } + return enc +} + +// TryPackAdminCacheDimoStreamrEns is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xb17b974b. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function adminCacheDimoStreamrEns() returns() +func (registry *Registry) TryPackAdminCacheDimoStreamrEns() ([]byte, error) { + return registry.abi.Pack("adminCacheDimoStreamrEns") +} + +// PackAdminChangeParentNode is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x56936962. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function adminChangeParentNode(uint256 newParentNode, address idProxyAddress, uint256[] nodeIdList) returns() +func (registry *Registry) PackAdminChangeParentNode(newParentNode *big.Int, idProxyAddress common.Address, nodeIdList []*big.Int) []byte { + enc, err := registry.abi.Pack("adminChangeParentNode", newParentNode, idProxyAddress, nodeIdList) + if err != nil { + panic(err) + } + return enc +} + +// TryPackAdminChangeParentNode is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x56936962. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function adminChangeParentNode(uint256 newParentNode, address idProxyAddress, uint256[] nodeIdList) returns() +func (registry *Registry) TryPackAdminChangeParentNode(newParentNode *big.Int, idProxyAddress common.Address, nodeIdList []*big.Int) ([]byte, error) { + return registry.abi.Pack("adminChangeParentNode", newParentNode, idProxyAddress, nodeIdList) +} + +// PackAdminPairAftermarketDevice is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x3febacab. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function adminPairAftermarketDevice(uint256 aftermarketDeviceNode, uint256 vehicleNode) returns() +func (registry *Registry) PackAdminPairAftermarketDevice(aftermarketDeviceNode *big.Int, vehicleNode *big.Int) []byte { + enc, err := registry.abi.Pack("adminPairAftermarketDevice", aftermarketDeviceNode, vehicleNode) + if err != nil { + panic(err) + } + return enc +} + +// TryPackAdminPairAftermarketDevice is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x3febacab. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function adminPairAftermarketDevice(uint256 aftermarketDeviceNode, uint256 vehicleNode) returns() +func (registry *Registry) TryPackAdminPairAftermarketDevice(aftermarketDeviceNode *big.Int, vehicleNode *big.Int) ([]byte, error) { + return registry.abi.Pack("adminPairAftermarketDevice", aftermarketDeviceNode, vehicleNode) +} + +// PackAdminRemoveVehicleAttribute is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x5f741f4d. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function adminRemoveVehicleAttribute(string attribute) returns() +func (registry *Registry) PackAdminRemoveVehicleAttribute(attribute string) []byte { + enc, err := registry.abi.Pack("adminRemoveVehicleAttribute", attribute) + if err != nil { + panic(err) + } + return enc +} + +// TryPackAdminRemoveVehicleAttribute is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x5f741f4d. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function adminRemoveVehicleAttribute(string attribute) returns() +func (registry *Registry) TryPackAdminRemoveVehicleAttribute(attribute string) ([]byte, error) { + return registry.abi.Pack("adminRemoveVehicleAttribute", attribute) +} + +// PackAdminSetStorageNodeIdForVehicleIds is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x3d9cf004. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function adminSetStorageNodeIdForVehicleIds(uint256[] vehicleIds, uint256 storageNodeId) returns() +func (registry *Registry) PackAdminSetStorageNodeIdForVehicleIds(vehicleIds []*big.Int, storageNodeId *big.Int) []byte { + enc, err := registry.abi.Pack("adminSetStorageNodeIdForVehicleIds", vehicleIds, storageNodeId) + if err != nil { + panic(err) + } + return enc +} + +// TryPackAdminSetStorageNodeIdForVehicleIds is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x3d9cf004. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function adminSetStorageNodeIdForVehicleIds(uint256[] vehicleIds, uint256 storageNodeId) returns() +func (registry *Registry) TryPackAdminSetStorageNodeIdForVehicleIds(vehicleIds []*big.Int, storageNodeId *big.Int) ([]byte, error) { + return registry.abi.Pack("adminSetStorageNodeIdForVehicleIds", vehicleIds, storageNodeId) +} + +// PackAdminSetVehicleDDs is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xdd60fd1a. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function adminSetVehicleDDs((uint256,string)[] vehicleIdDdId) returns() +func (registry *Registry) PackAdminSetVehicleDDs(vehicleIdDdId []DevAdminVehicleIdDeviceDefinitionId) []byte { + enc, err := registry.abi.Pack("adminSetVehicleDDs", vehicleIdDdId) + if err != nil { + panic(err) + } + return enc +} + +// TryPackAdminSetVehicleDDs is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xdd60fd1a. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function adminSetVehicleDDs((uint256,string)[] vehicleIdDdId) returns() +func (registry *Registry) TryPackAdminSetVehicleDDs(vehicleIdDdId []DevAdminVehicleIdDeviceDefinitionId) ([]byte, error) { + return registry.abi.Pack("adminSetVehicleDDs", vehicleIdDdId) +} + +// PackBurnSyntheticDeviceSign is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x7c7c9978. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function burnSyntheticDeviceSign(uint256 vehicleNode, uint256 syntheticDeviceNode, bytes ownerSig) returns() +func (registry *Registry) PackBurnSyntheticDeviceSign(vehicleNode *big.Int, syntheticDeviceNode *big.Int, ownerSig []byte) []byte { + enc, err := registry.abi.Pack("burnSyntheticDeviceSign", vehicleNode, syntheticDeviceNode, ownerSig) + if err != nil { + panic(err) + } + return enc +} + +// TryPackBurnSyntheticDeviceSign is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x7c7c9978. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function burnSyntheticDeviceSign(uint256 vehicleNode, uint256 syntheticDeviceNode, bytes ownerSig) returns() +func (registry *Registry) TryPackBurnSyntheticDeviceSign(vehicleNode *big.Int, syntheticDeviceNode *big.Int, ownerSig []byte) ([]byte, error) { + return registry.abi.Pack("burnSyntheticDeviceSign", vehicleNode, syntheticDeviceNode, ownerSig) +} + +// PackBurnVehicleSign is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xd0b61156. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function burnVehicleSign(uint256 tokenId, bytes ownerSig) returns() +func (registry *Registry) PackBurnVehicleSign(tokenId *big.Int, ownerSig []byte) []byte { + enc, err := registry.abi.Pack("burnVehicleSign", tokenId, ownerSig) + if err != nil { + panic(err) + } + return enc +} + +// TryPackBurnVehicleSign is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xd0b61156. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function burnVehicleSign(uint256 tokenId, bytes ownerSig) returns() +func (registry *Registry) TryPackBurnVehicleSign(tokenId *big.Int, ownerSig []byte) ([]byte, error) { + return registry.abi.Pack("burnVehicleSign", tokenId, ownerSig) +} + +// PackClaimAftermarketDevice is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x08d2c2f5. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function claimAftermarketDevice(uint256 aftermarketDeviceNode, bytes aftermarketDeviceSig) returns() +func (registry *Registry) PackClaimAftermarketDevice(aftermarketDeviceNode *big.Int, aftermarketDeviceSig []byte) []byte { + enc, err := registry.abi.Pack("claimAftermarketDevice", aftermarketDeviceNode, aftermarketDeviceSig) + if err != nil { + panic(err) + } + return enc +} + +// TryPackClaimAftermarketDevice is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x08d2c2f5. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function claimAftermarketDevice(uint256 aftermarketDeviceNode, bytes aftermarketDeviceSig) returns() +func (registry *Registry) TryPackClaimAftermarketDevice(aftermarketDeviceNode *big.Int, aftermarketDeviceSig []byte) ([]byte, error) { + return registry.abi.Pack("claimAftermarketDevice", aftermarketDeviceNode, aftermarketDeviceSig) +} + +// PackClaimAftermarketDeviceBatch is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xab2ae229. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function claimAftermarketDeviceBatch((uint256,address)[] adOwnerPair) returns() +func (registry *Registry) PackClaimAftermarketDeviceBatch(adOwnerPair []AftermarketDeviceOwnerPair) []byte { + enc, err := registry.abi.Pack("claimAftermarketDeviceBatch", adOwnerPair) + if err != nil { + panic(err) + } + return enc +} + +// TryPackClaimAftermarketDeviceBatch is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xab2ae229. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function claimAftermarketDeviceBatch((uint256,address)[] adOwnerPair) returns() +func (registry *Registry) TryPackClaimAftermarketDeviceBatch(adOwnerPair []AftermarketDeviceOwnerPair) ([]byte, error) { + return registry.abi.Pack("claimAftermarketDeviceBatch", adOwnerPair) +} + +// PackClaimAftermarketDeviceSign is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x89a841bb. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function claimAftermarketDeviceSign(uint256 aftermarketDeviceNode, address owner, bytes ownerSig, bytes aftermarketDeviceSig) returns() +func (registry *Registry) PackClaimAftermarketDeviceSign(aftermarketDeviceNode *big.Int, owner common.Address, ownerSig []byte, aftermarketDeviceSig []byte) []byte { + enc, err := registry.abi.Pack("claimAftermarketDeviceSign", aftermarketDeviceNode, owner, ownerSig, aftermarketDeviceSig) + if err != nil { + panic(err) + } + return enc +} + +// TryPackClaimAftermarketDeviceSign is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x89a841bb. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function claimAftermarketDeviceSign(uint256 aftermarketDeviceNode, address owner, bytes ownerSig, bytes aftermarketDeviceSig) returns() +func (registry *Registry) TryPackClaimAftermarketDeviceSign(aftermarketDeviceNode *big.Int, owner common.Address, ownerSig []byte, aftermarketDeviceSig []byte) ([]byte, error) { + return registry.abi.Pack("claimAftermarketDeviceSign", aftermarketDeviceNode, owner, ownerSig, aftermarketDeviceSig) +} + +// PackCreateDeviceDefinitionTable is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x20954d21. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function createDeviceDefinitionTable(address tableOwner, uint256 manufacturerId) returns() +func (registry *Registry) PackCreateDeviceDefinitionTable(tableOwner common.Address, manufacturerId *big.Int) []byte { + enc, err := registry.abi.Pack("createDeviceDefinitionTable", tableOwner, manufacturerId) + if err != nil { + panic(err) + } + return enc +} + +// TryPackCreateDeviceDefinitionTable is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x20954d21. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function createDeviceDefinitionTable(address tableOwner, uint256 manufacturerId) returns() +func (registry *Registry) TryPackCreateDeviceDefinitionTable(tableOwner common.Address, manufacturerId *big.Int) ([]byte, error) { + return registry.abi.Pack("createDeviceDefinitionTable", tableOwner, manufacturerId) +} + +// PackCreateDeviceDefinitionTableBatch is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x794c6790. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function createDeviceDefinitionTableBatch(address tableOwner, uint256[] manufacturerIds) returns() +func (registry *Registry) PackCreateDeviceDefinitionTableBatch(tableOwner common.Address, manufacturerIds []*big.Int) []byte { + enc, err := registry.abi.Pack("createDeviceDefinitionTableBatch", tableOwner, manufacturerIds) + if err != nil { + panic(err) + } + return enc +} + +// TryPackCreateDeviceDefinitionTableBatch is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x794c6790. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function createDeviceDefinitionTableBatch(address tableOwner, uint256[] manufacturerIds) returns() +func (registry *Registry) TryPackCreateDeviceDefinitionTableBatch(tableOwner common.Address, manufacturerIds []*big.Int) ([]byte, error) { + return registry.abi.Pack("createDeviceDefinitionTableBatch", tableOwner, manufacturerIds) +} + +// PackCreateVehicleStream is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x497323c8. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function createVehicleStream(uint256 vehicleId) returns() +func (registry *Registry) PackCreateVehicleStream(vehicleId *big.Int) []byte { + enc, err := registry.abi.Pack("createVehicleStream", vehicleId) + if err != nil { + panic(err) + } + return enc +} + +// TryPackCreateVehicleStream is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x497323c8. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function createVehicleStream(uint256 vehicleId) returns() +func (registry *Registry) TryPackCreateVehicleStream(vehicleId *big.Int) ([]byte, error) { + return registry.abi.Pack("createVehicleStream", vehicleId) +} + +// PackDeleteDeviceDefinition is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x32b3f2d5. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function deleteDeviceDefinition(uint256 manufacturerId, string id) returns() +func (registry *Registry) PackDeleteDeviceDefinition(manufacturerId *big.Int, id string) []byte { + enc, err := registry.abi.Pack("deleteDeviceDefinition", manufacturerId, id) + if err != nil { + panic(err) + } + return enc +} + +// TryPackDeleteDeviceDefinition is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x32b3f2d5. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function deleteDeviceDefinition(uint256 manufacturerId, string id) returns() +func (registry *Registry) TryPackDeleteDeviceDefinition(manufacturerId *big.Int, id string) ([]byte, error) { + return registry.abi.Pack("deleteDeviceDefinition", manufacturerId, id) +} + +// PackGetAftermarketDeviceAddressById is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x682a25e3. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function getAftermarketDeviceAddressById(uint256 nodeId) view returns(address addr) +func (registry *Registry) PackGetAftermarketDeviceAddressById(nodeId *big.Int) []byte { + enc, err := registry.abi.Pack("getAftermarketDeviceAddressById", nodeId) + if err != nil { + panic(err) + } + return enc +} + +// TryPackGetAftermarketDeviceAddressById is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x682a25e3. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function getAftermarketDeviceAddressById(uint256 nodeId) view returns(address addr) +func (registry *Registry) TryPackGetAftermarketDeviceAddressById(nodeId *big.Int) ([]byte, error) { + return registry.abi.Pack("getAftermarketDeviceAddressById", nodeId) +} + +// UnpackGetAftermarketDeviceAddressById is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0x682a25e3. +// +// Solidity: function getAftermarketDeviceAddressById(uint256 nodeId) view returns(address addr) +func (registry *Registry) UnpackGetAftermarketDeviceAddressById(data []byte) (common.Address, error) { + out, err := registry.abi.Unpack("getAftermarketDeviceAddressById", data) + if err != nil { + return *new(common.Address), err + } + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + return out0, nil +} + +// PackGetAftermarketDeviceIdByAddress is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x9796cf22. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function getAftermarketDeviceIdByAddress(address addr) view returns(uint256 nodeId) +func (registry *Registry) PackGetAftermarketDeviceIdByAddress(addr common.Address) []byte { + enc, err := registry.abi.Pack("getAftermarketDeviceIdByAddress", addr) + if err != nil { + panic(err) + } + return enc +} + +// TryPackGetAftermarketDeviceIdByAddress is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x9796cf22. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function getAftermarketDeviceIdByAddress(address addr) view returns(uint256 nodeId) +func (registry *Registry) TryPackGetAftermarketDeviceIdByAddress(addr common.Address) ([]byte, error) { + return registry.abi.Pack("getAftermarketDeviceIdByAddress", addr) +} + +// UnpackGetAftermarketDeviceIdByAddress is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0x9796cf22. +// +// Solidity: function getAftermarketDeviceIdByAddress(address addr) view returns(uint256 nodeId) +func (registry *Registry) UnpackGetAftermarketDeviceIdByAddress(data []byte) (*big.Int, error) { + out, err := registry.abi.Unpack("getAftermarketDeviceIdByAddress", data) + if err != nil { + return new(big.Int), err + } + out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int) + return out0, nil +} + +// PackGetBeneficiary is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x0a6cef46. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function getBeneficiary(address idProxyAddress, uint256 nodeId) view returns(address beneficiary) +func (registry *Registry) PackGetBeneficiary(idProxyAddress common.Address, nodeId *big.Int) []byte { + enc, err := registry.abi.Pack("getBeneficiary", idProxyAddress, nodeId) + if err != nil { + panic(err) + } + return enc +} + +// TryPackGetBeneficiary is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x0a6cef46. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function getBeneficiary(address idProxyAddress, uint256 nodeId) view returns(address beneficiary) +func (registry *Registry) TryPackGetBeneficiary(idProxyAddress common.Address, nodeId *big.Int) ([]byte, error) { + return registry.abi.Pack("getBeneficiary", idProxyAddress, nodeId) +} + +// UnpackGetBeneficiary is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0x0a6cef46. +// +// Solidity: function getBeneficiary(address idProxyAddress, uint256 nodeId) view returns(address beneficiary) +func (registry *Registry) UnpackGetBeneficiary(data []byte) (common.Address, error) { + out, err := registry.abi.Unpack("getBeneficiary", data) + if err != nil { + return *new(common.Address), err + } + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + return out0, nil +} + +// PackGetConnectionsManager is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xb0c1d1df. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function getConnectionsManager() view returns(address connectionsManager) +func (registry *Registry) PackGetConnectionsManager() []byte { + enc, err := registry.abi.Pack("getConnectionsManager") + if err != nil { + panic(err) + } + return enc +} + +// TryPackGetConnectionsManager is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xb0c1d1df. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function getConnectionsManager() view returns(address connectionsManager) +func (registry *Registry) TryPackGetConnectionsManager() ([]byte, error) { + return registry.abi.Pack("getConnectionsManager") +} + +// UnpackGetConnectionsManager is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0xb0c1d1df. +// +// Solidity: function getConnectionsManager() view returns(address connectionsManager) +func (registry *Registry) UnpackGetConnectionsManager(data []byte) (common.Address, error) { + out, err := registry.abi.Unpack("getConnectionsManager", data) + if err != nil { + return *new(common.Address), err + } + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + return out0, nil +} + +// PackGetDcxOperationCost is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xd25f5787. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function getDcxOperationCost(bytes32 operation) view returns(uint256 cost) +func (registry *Registry) PackGetDcxOperationCost(operation [32]byte) []byte { + enc, err := registry.abi.Pack("getDcxOperationCost", operation) + if err != nil { + panic(err) + } + return enc +} + +// TryPackGetDcxOperationCost is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xd25f5787. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function getDcxOperationCost(bytes32 operation) view returns(uint256 cost) +func (registry *Registry) TryPackGetDcxOperationCost(operation [32]byte) ([]byte, error) { + return registry.abi.Pack("getDcxOperationCost", operation) +} + +// UnpackGetDcxOperationCost is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0xd25f5787. +// +// Solidity: function getDcxOperationCost(bytes32 operation) view returns(uint256 cost) +func (registry *Registry) UnpackGetDcxOperationCost(data []byte) (*big.Int, error) { + out, err := registry.abi.Unpack("getDcxOperationCost", data) + if err != nil { + return new(big.Int), err + } + out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int) + return out0, nil +} + +// PackGetDefaultStorageNodeId is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xe75745e9. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function getDefaultStorageNodeId() view returns(uint256 defaultStorageNodeId) +func (registry *Registry) PackGetDefaultStorageNodeId() []byte { + enc, err := registry.abi.Pack("getDefaultStorageNodeId") + if err != nil { + panic(err) + } + return enc +} + +// TryPackGetDefaultStorageNodeId is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xe75745e9. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function getDefaultStorageNodeId() view returns(uint256 defaultStorageNodeId) +func (registry *Registry) TryPackGetDefaultStorageNodeId() ([]byte, error) { + return registry.abi.Pack("getDefaultStorageNodeId") +} + +// UnpackGetDefaultStorageNodeId is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0xe75745e9. +// +// Solidity: function getDefaultStorageNodeId() view returns(uint256 defaultStorageNodeId) +func (registry *Registry) UnpackGetDefaultStorageNodeId(data []byte) (*big.Int, error) { + out, err := registry.abi.Unpack("getDefaultStorageNodeId", data) + if err != nil { + return new(big.Int), err + } + out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int) + return out0, nil +} + +// PackGetDeviceDefinitionIdByVehicleId is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xb7bded95. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function getDeviceDefinitionIdByVehicleId(uint256 vehicleId) view returns(string ddId) +func (registry *Registry) PackGetDeviceDefinitionIdByVehicleId(vehicleId *big.Int) []byte { + enc, err := registry.abi.Pack("getDeviceDefinitionIdByVehicleId", vehicleId) + if err != nil { + panic(err) + } + return enc +} + +// TryPackGetDeviceDefinitionIdByVehicleId is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xb7bded95. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function getDeviceDefinitionIdByVehicleId(uint256 vehicleId) view returns(string ddId) +func (registry *Registry) TryPackGetDeviceDefinitionIdByVehicleId(vehicleId *big.Int) ([]byte, error) { + return registry.abi.Pack("getDeviceDefinitionIdByVehicleId", vehicleId) +} + +// UnpackGetDeviceDefinitionIdByVehicleId is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0xb7bded95. +// +// Solidity: function getDeviceDefinitionIdByVehicleId(uint256 vehicleId) view returns(string ddId) +func (registry *Registry) UnpackGetDeviceDefinitionIdByVehicleId(data []byte) (string, error) { + out, err := registry.abi.Unpack("getDeviceDefinitionIdByVehicleId", data) + if err != nil { + return *new(string), err + } + out0 := *abi.ConvertType(out[0], new(string)).(*string) + return out0, nil +} + +// PackGetDeviceDefinitionTableId is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x396e5987. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function getDeviceDefinitionTableId(uint256 manufacturerId) view returns(uint256 tableId) +func (registry *Registry) PackGetDeviceDefinitionTableId(manufacturerId *big.Int) []byte { + enc, err := registry.abi.Pack("getDeviceDefinitionTableId", manufacturerId) + if err != nil { + panic(err) + } + return enc +} + +// TryPackGetDeviceDefinitionTableId is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x396e5987. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function getDeviceDefinitionTableId(uint256 manufacturerId) view returns(uint256 tableId) +func (registry *Registry) TryPackGetDeviceDefinitionTableId(manufacturerId *big.Int) ([]byte, error) { + return registry.abi.Pack("getDeviceDefinitionTableId", manufacturerId) +} + +// UnpackGetDeviceDefinitionTableId is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0x396e5987. +// +// Solidity: function getDeviceDefinitionTableId(uint256 manufacturerId) view returns(uint256 tableId) +func (registry *Registry) UnpackGetDeviceDefinitionTableId(data []byte) (*big.Int, error) { + out, err := registry.abi.Unpack("getDeviceDefinitionTableId", data) + if err != nil { + return new(big.Int), err + } + out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int) + return out0, nil +} + +// PackGetDeviceDefinitionTableName is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xa1d17941. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function getDeviceDefinitionTableName(uint256 manufacturerId) view returns(string tableName) +func (registry *Registry) PackGetDeviceDefinitionTableName(manufacturerId *big.Int) []byte { + enc, err := registry.abi.Pack("getDeviceDefinitionTableName", manufacturerId) + if err != nil { + panic(err) + } + return enc +} + +// TryPackGetDeviceDefinitionTableName is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xa1d17941. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function getDeviceDefinitionTableName(uint256 manufacturerId) view returns(string tableName) +func (registry *Registry) TryPackGetDeviceDefinitionTableName(manufacturerId *big.Int) ([]byte, error) { + return registry.abi.Pack("getDeviceDefinitionTableName", manufacturerId) +} + +// UnpackGetDeviceDefinitionTableName is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0xa1d17941. +// +// Solidity: function getDeviceDefinitionTableName(uint256 manufacturerId) view returns(string tableName) +func (registry *Registry) UnpackGetDeviceDefinitionTableName(data []byte) (string, error) { + out, err := registry.abi.Unpack("getDeviceDefinitionTableName", data) + if err != nil { + return *new(string), err + } + out0 := *abi.ConvertType(out[0], new(string)).(*string) + return out0, nil +} + +// PackGetDimoCredit is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xcfe55b7d. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function getDimoCredit() view returns(address dimoCredit) +func (registry *Registry) PackGetDimoCredit() []byte { + enc, err := registry.abi.Pack("getDimoCredit") + if err != nil { + panic(err) + } + return enc +} + +// TryPackGetDimoCredit is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xcfe55b7d. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function getDimoCredit() view returns(address dimoCredit) +func (registry *Registry) TryPackGetDimoCredit() ([]byte, error) { + return registry.abi.Pack("getDimoCredit") +} + +// UnpackGetDimoCredit is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0xcfe55b7d. +// +// Solidity: function getDimoCredit() view returns(address dimoCredit) +func (registry *Registry) UnpackGetDimoCredit(data []byte) (common.Address, error) { + out, err := registry.abi.Unpack("getDimoCredit", data) + if err != nil { + return *new(common.Address), err + } + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + return out0, nil +} + +// PackGetDimoToken is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x77898251. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function getDimoToken() view returns(address dimoToken) +func (registry *Registry) PackGetDimoToken() []byte { + enc, err := registry.abi.Pack("getDimoToken") + if err != nil { + panic(err) + } + return enc +} + +// TryPackGetDimoToken is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x77898251. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function getDimoToken() view returns(address dimoToken) +func (registry *Registry) TryPackGetDimoToken() ([]byte, error) { + return registry.abi.Pack("getDimoToken") +} + +// UnpackGetDimoToken is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0x77898251. +// +// Solidity: function getDimoToken() view returns(address dimoToken) +func (registry *Registry) UnpackGetDimoToken(data []byte) (common.Address, error) { + out, err := registry.abi.Unpack("getDimoToken", data) + if err != nil { + return *new(common.Address), err + } + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + return out0, nil +} + +// PackGetFoundation is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xa2bc6cdf. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function getFoundation() view returns(address foundation) +func (registry *Registry) PackGetFoundation() []byte { + enc, err := registry.abi.Pack("getFoundation") + if err != nil { + panic(err) + } + return enc +} + +// TryPackGetFoundation is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xa2bc6cdf. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function getFoundation() view returns(address foundation) +func (registry *Registry) TryPackGetFoundation() ([]byte, error) { + return registry.abi.Pack("getFoundation") +} + +// UnpackGetFoundation is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0xa2bc6cdf. +// +// Solidity: function getFoundation() view returns(address foundation) +func (registry *Registry) UnpackGetFoundation(data []byte) (common.Address, error) { + out, err := registry.abi.Unpack("getFoundation", data) + if err != nil { + return *new(common.Address), err + } + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + return out0, nil +} + +// PackGetInfo is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xdce2f860. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function getInfo(address idProxyAddress, uint256 tokenId, string attribute) view returns(string info) +func (registry *Registry) PackGetInfo(idProxyAddress common.Address, tokenId *big.Int, attribute string) []byte { + enc, err := registry.abi.Pack("getInfo", idProxyAddress, tokenId, attribute) + if err != nil { + panic(err) + } + return enc +} + +// TryPackGetInfo is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xdce2f860. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function getInfo(address idProxyAddress, uint256 tokenId, string attribute) view returns(string info) +func (registry *Registry) TryPackGetInfo(idProxyAddress common.Address, tokenId *big.Int, attribute string) ([]byte, error) { + return registry.abi.Pack("getInfo", idProxyAddress, tokenId, attribute) +} + +// UnpackGetInfo is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0xdce2f860. +// +// Solidity: function getInfo(address idProxyAddress, uint256 tokenId, string attribute) view returns(string info) +func (registry *Registry) UnpackGetInfo(data []byte) (string, error) { + out, err := registry.abi.Unpack("getInfo", data) + if err != nil { + return *new(string), err + } + out0 := *abi.ConvertType(out[0], new(string)).(*string) + return out0, nil +} + +// PackGetLink is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x112e62a2. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function getLink(address idProxyAddress, uint256 sourceNode) view returns(uint256 targetNode) +func (registry *Registry) PackGetLink(idProxyAddress common.Address, sourceNode *big.Int) []byte { + enc, err := registry.abi.Pack("getLink", idProxyAddress, sourceNode) + if err != nil { + panic(err) + } + return enc +} + +// TryPackGetLink is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x112e62a2. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function getLink(address idProxyAddress, uint256 sourceNode) view returns(uint256 targetNode) +func (registry *Registry) TryPackGetLink(idProxyAddress common.Address, sourceNode *big.Int) ([]byte, error) { + return registry.abi.Pack("getLink", idProxyAddress, sourceNode) +} + +// UnpackGetLink is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0x112e62a2. +// +// Solidity: function getLink(address idProxyAddress, uint256 sourceNode) view returns(uint256 targetNode) +func (registry *Registry) UnpackGetLink(data []byte) (*big.Int, error) { + out, err := registry.abi.Unpack("getLink", data) + if err != nil { + return new(big.Int), err + } + out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int) + return out0, nil +} + +// PackGetManufacturerIdByName is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xce55aab0. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function getManufacturerIdByName(string name) view returns(uint256 nodeId) +func (registry *Registry) PackGetManufacturerIdByName(name string) []byte { + enc, err := registry.abi.Pack("getManufacturerIdByName", name) + if err != nil { + panic(err) + } + return enc +} + +// TryPackGetManufacturerIdByName is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xce55aab0. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function getManufacturerIdByName(string name) view returns(uint256 nodeId) +func (registry *Registry) TryPackGetManufacturerIdByName(name string) ([]byte, error) { + return registry.abi.Pack("getManufacturerIdByName", name) +} + +// UnpackGetManufacturerIdByName is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0xce55aab0. +// +// Solidity: function getManufacturerIdByName(string name) view returns(uint256 nodeId) +func (registry *Registry) UnpackGetManufacturerIdByName(data []byte) (*big.Int, error) { + out, err := registry.abi.Unpack("getManufacturerIdByName", data) + if err != nil { + return new(big.Int), err + } + out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int) + return out0, nil +} + +// PackGetManufacturerLicense is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x170e4293. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function getManufacturerLicense() view returns(address manufacturerLicense) +func (registry *Registry) PackGetManufacturerLicense() []byte { + enc, err := registry.abi.Pack("getManufacturerLicense") + if err != nil { + panic(err) + } + return enc +} + +// TryPackGetManufacturerLicense is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x170e4293. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function getManufacturerLicense() view returns(address manufacturerLicense) +func (registry *Registry) TryPackGetManufacturerLicense() ([]byte, error) { + return registry.abi.Pack("getManufacturerLicense") +} + +// UnpackGetManufacturerLicense is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0x170e4293. +// +// Solidity: function getManufacturerLicense() view returns(address manufacturerLicense) +func (registry *Registry) UnpackGetManufacturerLicense(data []byte) (common.Address, error) { + out, err := registry.abi.Unpack("getManufacturerLicense", data) + if err != nil { + return *new(common.Address), err + } + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + return out0, nil +} + +// PackGetManufacturerNameById is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x9109b30b. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function getManufacturerNameById(uint256 tokenId) view returns(string name) +func (registry *Registry) PackGetManufacturerNameById(tokenId *big.Int) []byte { + enc, err := registry.abi.Pack("getManufacturerNameById", tokenId) + if err != nil { + panic(err) + } + return enc +} + +// TryPackGetManufacturerNameById is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x9109b30b. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function getManufacturerNameById(uint256 tokenId) view returns(string name) +func (registry *Registry) TryPackGetManufacturerNameById(tokenId *big.Int) ([]byte, error) { + return registry.abi.Pack("getManufacturerNameById", tokenId) +} + +// UnpackGetManufacturerNameById is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0x9109b30b. +// +// Solidity: function getManufacturerNameById(uint256 tokenId) view returns(string name) +func (registry *Registry) UnpackGetManufacturerNameById(data []byte) (string, error) { + out, err := registry.abi.Unpack("getManufacturerNameById", data) + if err != nil { + return *new(string), err + } + out0 := *abi.ConvertType(out[0], new(string)).(*string) + return out0, nil +} + +// PackGetNodeLink is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xbd2b5568. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function getNodeLink(address idProxyAddressSource, address idProxyAddressTarget, uint256 sourceNode) view returns(uint256 targetNode) +func (registry *Registry) PackGetNodeLink(idProxyAddressSource common.Address, idProxyAddressTarget common.Address, sourceNode *big.Int) []byte { + enc, err := registry.abi.Pack("getNodeLink", idProxyAddressSource, idProxyAddressTarget, sourceNode) + if err != nil { + panic(err) + } + return enc +} + +// TryPackGetNodeLink is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xbd2b5568. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function getNodeLink(address idProxyAddressSource, address idProxyAddressTarget, uint256 sourceNode) view returns(uint256 targetNode) +func (registry *Registry) TryPackGetNodeLink(idProxyAddressSource common.Address, idProxyAddressTarget common.Address, sourceNode *big.Int) ([]byte, error) { + return registry.abi.Pack("getNodeLink", idProxyAddressSource, idProxyAddressTarget, sourceNode) +} + +// UnpackGetNodeLink is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0xbd2b5568. +// +// Solidity: function getNodeLink(address idProxyAddressSource, address idProxyAddressTarget, uint256 sourceNode) view returns(uint256 targetNode) +func (registry *Registry) UnpackGetNodeLink(data []byte) (*big.Int, error) { + out, err := registry.abi.Unpack("getNodeLink", data) + if err != nil { + return new(big.Int), err + } + out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int) + return out0, nil +} + +// PackGetParentNode is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x82087d24. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function getParentNode(address idProxyAddress, uint256 tokenId) view returns(uint256 parentNode) +func (registry *Registry) PackGetParentNode(idProxyAddress common.Address, tokenId *big.Int) []byte { + enc, err := registry.abi.Pack("getParentNode", idProxyAddress, tokenId) + if err != nil { + panic(err) + } + return enc +} + +// TryPackGetParentNode is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x82087d24. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function getParentNode(address idProxyAddress, uint256 tokenId) view returns(uint256 parentNode) +func (registry *Registry) TryPackGetParentNode(idProxyAddress common.Address, tokenId *big.Int) ([]byte, error) { + return registry.abi.Pack("getParentNode", idProxyAddress, tokenId) +} + +// UnpackGetParentNode is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0x82087d24. +// +// Solidity: function getParentNode(address idProxyAddress, uint256 tokenId) view returns(uint256 parentNode) +func (registry *Registry) UnpackGetParentNode(data []byte) (*big.Int, error) { + out, err := registry.abi.Unpack("getParentNode", data) + if err != nil { + return new(big.Int), err + } + out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int) + return out0, nil +} + +// PackGetPolicy is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x66df322e. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function getPolicy(address caller, uint256 ) payable returns((bool,bool,bool,string,string,string[]) policy) +func (registry *Registry) PackGetPolicy(caller common.Address, arg1 *big.Int) []byte { + enc, err := registry.abi.Pack("getPolicy", caller, arg1) + if err != nil { + panic(err) + } + return enc +} + +// TryPackGetPolicy is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x66df322e. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function getPolicy(address caller, uint256 ) payable returns((bool,bool,bool,string,string,string[]) policy) +func (registry *Registry) TryPackGetPolicy(caller common.Address, arg1 *big.Int) ([]byte, error) { + return registry.abi.Pack("getPolicy", caller, arg1) +} + +// UnpackGetPolicy is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0x66df322e. +// +// Solidity: function getPolicy(address caller, uint256 ) payable returns((bool,bool,bool,string,string,string[]) policy) +func (registry *Registry) UnpackGetPolicy(data []byte) (TablelandPolicy, error) { + out, err := registry.abi.Unpack("getPolicy", data) + if err != nil { + return *new(TablelandPolicy), err + } + out0 := *abi.ConvertType(out[0], new(TablelandPolicy)).(*TablelandPolicy) + return out0, nil +} + +// PackGetRoleAdmin is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x248a9ca3. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function getRoleAdmin(bytes32 role) view returns(bytes32) +func (registry *Registry) PackGetRoleAdmin(role [32]byte) []byte { + enc, err := registry.abi.Pack("getRoleAdmin", role) + if err != nil { + panic(err) + } + return enc +} + +// TryPackGetRoleAdmin is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x248a9ca3. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function getRoleAdmin(bytes32 role) view returns(bytes32) +func (registry *Registry) TryPackGetRoleAdmin(role [32]byte) ([]byte, error) { + return registry.abi.Pack("getRoleAdmin", role) +} + +// UnpackGetRoleAdmin is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0x248a9ca3. +// +// Solidity: function getRoleAdmin(bytes32 role) view returns(bytes32) +func (registry *Registry) UnpackGetRoleAdmin(data []byte) ([32]byte, error) { + out, err := registry.abi.Unpack("getRoleAdmin", data) + if err != nil { + return *new([32]byte), err + } + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + return out0, nil +} + +// PackGetSacd is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xc3d8478c. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function getSacd() view returns(address sacd) +func (registry *Registry) PackGetSacd() []byte { + enc, err := registry.abi.Pack("getSacd") + if err != nil { + panic(err) + } + return enc +} + +// TryPackGetSacd is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xc3d8478c. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function getSacd() view returns(address sacd) +func (registry *Registry) TryPackGetSacd() ([]byte, error) { + return registry.abi.Pack("getSacd") +} + +// UnpackGetSacd is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0xc3d8478c. +// +// Solidity: function getSacd() view returns(address sacd) +func (registry *Registry) UnpackGetSacd(data []byte) (common.Address, error) { + out, err := registry.abi.Unpack("getSacd", data) + if err != nil { + return *new(common.Address), err + } + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + return out0, nil +} + +// PackGetStorageNode is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x5cc867dc. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function getStorageNode() view returns(address storageNode) +func (registry *Registry) PackGetStorageNode() []byte { + enc, err := registry.abi.Pack("getStorageNode") + if err != nil { + panic(err) + } + return enc +} + +// TryPackGetStorageNode is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x5cc867dc. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function getStorageNode() view returns(address storageNode) +func (registry *Registry) TryPackGetStorageNode() ([]byte, error) { + return registry.abi.Pack("getStorageNode") +} + +// UnpackGetStorageNode is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0x5cc867dc. +// +// Solidity: function getStorageNode() view returns(address storageNode) +func (registry *Registry) UnpackGetStorageNode(data []byte) (common.Address, error) { + out, err := registry.abi.Unpack("getStorageNode", data) + if err != nil { + return *new(common.Address), err + } + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + return out0, nil +} + +// PackGetSyntheticDeviceAddressById is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x493b27e1. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function getSyntheticDeviceAddressById(uint256 nodeId) view returns(address addr) +func (registry *Registry) PackGetSyntheticDeviceAddressById(nodeId *big.Int) []byte { + enc, err := registry.abi.Pack("getSyntheticDeviceAddressById", nodeId) + if err != nil { + panic(err) + } + return enc +} + +// TryPackGetSyntheticDeviceAddressById is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x493b27e1. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function getSyntheticDeviceAddressById(uint256 nodeId) view returns(address addr) +func (registry *Registry) TryPackGetSyntheticDeviceAddressById(nodeId *big.Int) ([]byte, error) { + return registry.abi.Pack("getSyntheticDeviceAddressById", nodeId) +} + +// UnpackGetSyntheticDeviceAddressById is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0x493b27e1. +// +// Solidity: function getSyntheticDeviceAddressById(uint256 nodeId) view returns(address addr) +func (registry *Registry) UnpackGetSyntheticDeviceAddressById(data []byte) (common.Address, error) { + out, err := registry.abi.Unpack("getSyntheticDeviceAddressById", data) + if err != nil { + return *new(common.Address), err + } + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + return out0, nil +} + +// PackGetSyntheticDeviceIdByAddress is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x795b910a. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function getSyntheticDeviceIdByAddress(address addr) view returns(uint256 nodeId) +func (registry *Registry) PackGetSyntheticDeviceIdByAddress(addr common.Address) []byte { + enc, err := registry.abi.Pack("getSyntheticDeviceIdByAddress", addr) + if err != nil { + panic(err) + } + return enc +} + +// TryPackGetSyntheticDeviceIdByAddress is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x795b910a. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function getSyntheticDeviceIdByAddress(address addr) view returns(uint256 nodeId) +func (registry *Registry) TryPackGetSyntheticDeviceIdByAddress(addr common.Address) ([]byte, error) { + return registry.abi.Pack("getSyntheticDeviceIdByAddress", addr) +} + +// UnpackGetSyntheticDeviceIdByAddress is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0x795b910a. +// +// Solidity: function getSyntheticDeviceIdByAddress(address addr) view returns(uint256 nodeId) +func (registry *Registry) UnpackGetSyntheticDeviceIdByAddress(data []byte) (*big.Int, error) { + out, err := registry.abi.Unpack("getSyntheticDeviceIdByAddress", data) + if err != nil { + return new(big.Int), err + } + out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int) + return out0, nil +} + +// PackGetVehicleStream is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x180e469a. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function getVehicleStream(uint256 vehicleId) view returns(string streamId) +func (registry *Registry) PackGetVehicleStream(vehicleId *big.Int) []byte { + enc, err := registry.abi.Pack("getVehicleStream", vehicleId) + if err != nil { + panic(err) + } + return enc +} + +// TryPackGetVehicleStream is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x180e469a. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function getVehicleStream(uint256 vehicleId) view returns(string streamId) +func (registry *Registry) TryPackGetVehicleStream(vehicleId *big.Int) ([]byte, error) { + return registry.abi.Pack("getVehicleStream", vehicleId) +} + +// UnpackGetVehicleStream is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0x180e469a. +// +// Solidity: function getVehicleStream(uint256 vehicleId) view returns(string streamId) +func (registry *Registry) UnpackGetVehicleStream(data []byte) (string, error) { + out, err := registry.abi.Unpack("getVehicleStream", data) + if err != nil { + return *new(string), err + } + out0 := *abi.ConvertType(out[0], new(string)).(*string) + return out0, nil +} + +// PackGrantRole is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x2f2ff15d. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function grantRole(bytes32 role, address account) returns() +func (registry *Registry) PackGrantRole(role [32]byte, account common.Address) []byte { + enc, err := registry.abi.Pack("grantRole", role, account) + if err != nil { + panic(err) + } + return enc +} + +// TryPackGrantRole is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x2f2ff15d. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function grantRole(bytes32 role, address account) returns() +func (registry *Registry) TryPackGrantRole(role [32]byte, account common.Address) ([]byte, error) { + return registry.abi.Pack("grantRole", role, account) +} + +// PackHasRole is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x91d14854. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function hasRole(bytes32 role, address account) view returns(bool) +func (registry *Registry) PackHasRole(role [32]byte, account common.Address) []byte { + enc, err := registry.abi.Pack("hasRole", role, account) + if err != nil { + panic(err) + } + return enc +} + +// TryPackHasRole is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x91d14854. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function hasRole(bytes32 role, address account) view returns(bool) +func (registry *Registry) TryPackHasRole(role [32]byte, account common.Address) ([]byte, error) { + return registry.abi.Pack("hasRole", role, account) +} + +// UnpackHasRole is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0x91d14854. +// +// Solidity: function hasRole(bytes32 role, address account) view returns(bool) +func (registry *Registry) UnpackHasRole(data []byte) (bool, error) { + out, err := registry.abi.Unpack("hasRole", data) + if err != nil { + return *new(bool), err + } + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + return out0, nil +} + +// PackInitialize is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x4cd88b76. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function initialize(string name, string version) returns() +func (registry *Registry) PackInitialize(name string, version string) []byte { + enc, err := registry.abi.Pack("initialize", name, version) + if err != nil { + panic(err) + } + return enc +} + +// TryPackInitialize is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x4cd88b76. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function initialize(string name, string version) returns() +func (registry *Registry) TryPackInitialize(name string, version string) ([]byte, error) { + return registry.abi.Pack("initialize", name, version) +} + +// PackInsertDeviceDefinition is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x23536c5f. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function insertDeviceDefinition(uint256 manufacturerId, (string,string,uint256,string,string,string,string) data) returns() +func (registry *Registry) PackInsertDeviceDefinition(manufacturerId *big.Int, data DeviceDefinitionInput) []byte { + enc, err := registry.abi.Pack("insertDeviceDefinition", manufacturerId, data) + if err != nil { + panic(err) + } + return enc +} + +// TryPackInsertDeviceDefinition is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x23536c5f. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function insertDeviceDefinition(uint256 manufacturerId, (string,string,uint256,string,string,string,string) data) returns() +func (registry *Registry) TryPackInsertDeviceDefinition(manufacturerId *big.Int, data DeviceDefinitionInput) ([]byte, error) { + return registry.abi.Pack("insertDeviceDefinition", manufacturerId, data) +} + +// PackInsertDeviceDefinitionBatch is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x80d50451. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function insertDeviceDefinitionBatch(uint256 manufacturerId, (string,string,uint256,string,string,string,string)[] data) returns() +func (registry *Registry) PackInsertDeviceDefinitionBatch(manufacturerId *big.Int, data []DeviceDefinitionInput) []byte { + enc, err := registry.abi.Pack("insertDeviceDefinitionBatch", manufacturerId, data) + if err != nil { + panic(err) + } + return enc +} + +// TryPackInsertDeviceDefinitionBatch is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x80d50451. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function insertDeviceDefinitionBatch(uint256 manufacturerId, (string,string,uint256,string,string,string,string)[] data) returns() +func (registry *Registry) TryPackInsertDeviceDefinitionBatch(manufacturerId *big.Int, data []DeviceDefinitionInput) ([]byte, error) { + return registry.abi.Pack("insertDeviceDefinitionBatch", manufacturerId, data) +} + +// PackIsAftermarketDeviceClaimed is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xc6b36f2a. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function isAftermarketDeviceClaimed(uint256 nodeId) view returns(bool isClaimed) +func (registry *Registry) PackIsAftermarketDeviceClaimed(nodeId *big.Int) []byte { + enc, err := registry.abi.Pack("isAftermarketDeviceClaimed", nodeId) + if err != nil { + panic(err) + } + return enc +} + +// TryPackIsAftermarketDeviceClaimed is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xc6b36f2a. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function isAftermarketDeviceClaimed(uint256 nodeId) view returns(bool isClaimed) +func (registry *Registry) TryPackIsAftermarketDeviceClaimed(nodeId *big.Int) ([]byte, error) { + return registry.abi.Pack("isAftermarketDeviceClaimed", nodeId) +} + +// UnpackIsAftermarketDeviceClaimed is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0xc6b36f2a. +// +// Solidity: function isAftermarketDeviceClaimed(uint256 nodeId) view returns(bool isClaimed) +func (registry *Registry) UnpackIsAftermarketDeviceClaimed(data []byte) (bool, error) { + out, err := registry.abi.Unpack("isAftermarketDeviceClaimed", data) + if err != nil { + return *new(bool), err + } + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + return out0, nil +} + +// PackIsAllowedToOwnManufacturerNode is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xd9c27c40. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function isAllowedToOwnManufacturerNode(address addr) view returns(bool _isAllowed) +func (registry *Registry) PackIsAllowedToOwnManufacturerNode(addr common.Address) []byte { + enc, err := registry.abi.Pack("isAllowedToOwnManufacturerNode", addr) + if err != nil { + panic(err) + } + return enc +} + +// TryPackIsAllowedToOwnManufacturerNode is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xd9c27c40. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function isAllowedToOwnManufacturerNode(address addr) view returns(bool _isAllowed) +func (registry *Registry) TryPackIsAllowedToOwnManufacturerNode(addr common.Address) ([]byte, error) { + return registry.abi.Pack("isAllowedToOwnManufacturerNode", addr) +} + +// UnpackIsAllowedToOwnManufacturerNode is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0xd9c27c40. +// +// Solidity: function isAllowedToOwnManufacturerNode(address addr) view returns(bool _isAllowed) +func (registry *Registry) UnpackIsAllowedToOwnManufacturerNode(data []byte) (bool, error) { + out, err := registry.abi.Unpack("isAllowedToOwnManufacturerNode", data) + if err != nil { + return *new(bool), err + } + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + return out0, nil +} + +// PackIsController is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xb429afeb. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function isController(address addr) view returns(bool _isController) +func (registry *Registry) PackIsController(addr common.Address) []byte { + enc, err := registry.abi.Pack("isController", addr) + if err != nil { + panic(err) + } + return enc +} + +// TryPackIsController is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xb429afeb. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function isController(address addr) view returns(bool _isController) +func (registry *Registry) TryPackIsController(addr common.Address) ([]byte, error) { + return registry.abi.Pack("isController", addr) +} + +// UnpackIsController is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0xb429afeb. +// +// Solidity: function isController(address addr) view returns(bool _isController) +func (registry *Registry) UnpackIsController(data []byte) (bool, error) { + out, err := registry.abi.Unpack("isController", data) + if err != nil { + return *new(bool), err + } + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + return out0, nil +} + +// PackIsManufacturerMinted is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x456bf169. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function isManufacturerMinted(address addr) view returns(bool _isManufacturerMinted) +func (registry *Registry) PackIsManufacturerMinted(addr common.Address) []byte { + enc, err := registry.abi.Pack("isManufacturerMinted", addr) + if err != nil { + panic(err) + } + return enc +} + +// TryPackIsManufacturerMinted is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x456bf169. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function isManufacturerMinted(address addr) view returns(bool _isManufacturerMinted) +func (registry *Registry) TryPackIsManufacturerMinted(addr common.Address) ([]byte, error) { + return registry.abi.Pack("isManufacturerMinted", addr) +} + +// UnpackIsManufacturerMinted is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0x456bf169. +// +// Solidity: function isManufacturerMinted(address addr) view returns(bool _isManufacturerMinted) +func (registry *Registry) UnpackIsManufacturerMinted(data []byte) (bool, error) { + out, err := registry.abi.Unpack("isManufacturerMinted", data) + if err != nil { + return *new(bool), err + } + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + return out0, nil +} + +// PackMintAftermarketDeviceByManufacturerBatch is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x7ba79a39. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function mintAftermarketDeviceByManufacturerBatch(uint256 manufacturerNode, (address,(string,string)[])[] adInfos) returns() +func (registry *Registry) PackMintAftermarketDeviceByManufacturerBatch(manufacturerNode *big.Int, adInfos []AftermarketDeviceInfos) []byte { + enc, err := registry.abi.Pack("mintAftermarketDeviceByManufacturerBatch", manufacturerNode, adInfos) + if err != nil { + panic(err) + } + return enc +} + +// TryPackMintAftermarketDeviceByManufacturerBatch is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x7ba79a39. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function mintAftermarketDeviceByManufacturerBatch(uint256 manufacturerNode, (address,(string,string)[])[] adInfos) returns() +func (registry *Registry) TryPackMintAftermarketDeviceByManufacturerBatch(manufacturerNode *big.Int, adInfos []AftermarketDeviceInfos) ([]byte, error) { + return registry.abi.Pack("mintAftermarketDeviceByManufacturerBatch", manufacturerNode, adInfos) +} + +// PackMintManufacturer is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x5f36da6b. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function mintManufacturer(address owner, string name, (string,string)[] attrInfoPairList) returns() +func (registry *Registry) PackMintManufacturer(owner common.Address, name string, attrInfoPairList []AttributeInfoPair) []byte { + enc, err := registry.abi.Pack("mintManufacturer", owner, name, attrInfoPairList) + if err != nil { + panic(err) + } + return enc +} + +// TryPackMintManufacturer is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x5f36da6b. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function mintManufacturer(address owner, string name, (string,string)[] attrInfoPairList) returns() +func (registry *Registry) TryPackMintManufacturer(owner common.Address, name string, attrInfoPairList []AttributeInfoPair) ([]byte, error) { + return registry.abi.Pack("mintManufacturer", owner, name, attrInfoPairList) +} + +// PackMintManufacturerBatch is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x9abb3000. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function mintManufacturerBatch(address owner, string[] names) returns() +func (registry *Registry) PackMintManufacturerBatch(owner common.Address, names []string) []byte { + enc, err := registry.abi.Pack("mintManufacturerBatch", owner, names) + if err != nil { + panic(err) + } + return enc +} + +// TryPackMintManufacturerBatch is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x9abb3000. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function mintManufacturerBatch(address owner, string[] names) returns() +func (registry *Registry) TryPackMintManufacturerBatch(owner common.Address, names []string) ([]byte, error) { + return registry.abi.Pack("mintManufacturerBatch", owner, names) +} + +// PackMintSyntheticDeviceBatch is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x261d982a. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function mintSyntheticDeviceBatch(uint256 connectionId, (uint256,address,(string,string)[])[] data) returns() +func (registry *Registry) PackMintSyntheticDeviceBatch(connectionId *big.Int, data []MintSyntheticDeviceBatchInput) []byte { + enc, err := registry.abi.Pack("mintSyntheticDeviceBatch", connectionId, data) + if err != nil { + panic(err) + } + return enc +} + +// TryPackMintSyntheticDeviceBatch is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x261d982a. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function mintSyntheticDeviceBatch(uint256 connectionId, (uint256,address,(string,string)[])[] data) returns() +func (registry *Registry) TryPackMintSyntheticDeviceBatch(connectionId *big.Int, data []MintSyntheticDeviceBatchInput) ([]byte, error) { + return registry.abi.Pack("mintSyntheticDeviceBatch", connectionId, data) +} + +// PackMintSyntheticDeviceSign is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xc624e8a1. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function mintSyntheticDeviceSign((uint256,uint256,bytes,bytes,address,(string,string)[]) data) returns() +func (registry *Registry) PackMintSyntheticDeviceSign(data MintSyntheticDeviceInput) []byte { + enc, err := registry.abi.Pack("mintSyntheticDeviceSign", data) + if err != nil { + panic(err) + } + return enc +} + +// TryPackMintSyntheticDeviceSign is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xc624e8a1. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function mintSyntheticDeviceSign((uint256,uint256,bytes,bytes,address,(string,string)[]) data) returns() +func (registry *Registry) TryPackMintSyntheticDeviceSign(data MintSyntheticDeviceInput) ([]byte, error) { + return registry.abi.Pack("mintSyntheticDeviceSign", data) +} + +// PackMintVehicle is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x3da44e56. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function mintVehicle(uint256 manufacturerNode, address owner, (string,string)[] attrInfo) returns() +func (registry *Registry) PackMintVehicle(manufacturerNode *big.Int, owner common.Address, attrInfo []AttributeInfoPair) []byte { + enc, err := registry.abi.Pack("mintVehicle", manufacturerNode, owner, attrInfo) + if err != nil { + panic(err) + } + return enc +} + +// TryPackMintVehicle is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x3da44e56. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function mintVehicle(uint256 manufacturerNode, address owner, (string,string)[] attrInfo) returns() +func (registry *Registry) TryPackMintVehicle(manufacturerNode *big.Int, owner common.Address, attrInfo []AttributeInfoPair) ([]byte, error) { + return registry.abi.Pack("mintVehicle", manufacturerNode, owner, attrInfo) +} + +// PackMintVehicle0 is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x5d9bc6a4. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function mintVehicle(uint256 manufacturerNode, address owner, (string,string)[] attrInfo, (address,uint256,uint256,string) sacdInput) returns() +func (registry *Registry) PackMintVehicle0(manufacturerNode *big.Int, owner common.Address, attrInfo []AttributeInfoPair, sacdInput SacdInput) []byte { + enc, err := registry.abi.Pack("mintVehicle0", manufacturerNode, owner, attrInfo, sacdInput) + if err != nil { + panic(err) + } + return enc +} + +// TryPackMintVehicle0 is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x5d9bc6a4. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function mintVehicle(uint256 manufacturerNode, address owner, (string,string)[] attrInfo, (address,uint256,uint256,string) sacdInput) returns() +func (registry *Registry) TryPackMintVehicle0(manufacturerNode *big.Int, owner common.Address, attrInfo []AttributeInfoPair, sacdInput SacdInput) ([]byte, error) { + return registry.abi.Pack("mintVehicle0", manufacturerNode, owner, attrInfo, sacdInput) +} + +// PackMintVehicle1 is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xab36bfb2. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function mintVehicle(uint256 manufacturerNode, address owner, uint256 storageNodeId, (string,string)[] attrInfo, (address,uint256,uint256,string) sacdInput) returns() +func (registry *Registry) PackMintVehicle1(manufacturerNode *big.Int, owner common.Address, storageNodeId *big.Int, attrInfo []AttributeInfoPair, sacdInput SacdInput) []byte { + enc, err := registry.abi.Pack("mintVehicle1", manufacturerNode, owner, storageNodeId, attrInfo, sacdInput) + if err != nil { + panic(err) + } + return enc +} + +// TryPackMintVehicle1 is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xab36bfb2. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function mintVehicle(uint256 manufacturerNode, address owner, uint256 storageNodeId, (string,string)[] attrInfo, (address,uint256,uint256,string) sacdInput) returns() +func (registry *Registry) TryPackMintVehicle1(manufacturerNode *big.Int, owner common.Address, storageNodeId *big.Int, attrInfo []AttributeInfoPair, sacdInput SacdInput) ([]byte, error) { + return registry.abi.Pack("mintVehicle1", manufacturerNode, owner, storageNodeId, attrInfo, sacdInput) +} + +// PackMintVehicle2 is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xf50373f8. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function mintVehicle(uint256 manufacturerNode, address owner, uint256 storageNodeId, (string,string)[] attrInfo) returns() +func (registry *Registry) PackMintVehicle2(manufacturerNode *big.Int, owner common.Address, storageNodeId *big.Int, attrInfo []AttributeInfoPair) []byte { + enc, err := registry.abi.Pack("mintVehicle2", manufacturerNode, owner, storageNodeId, attrInfo) + if err != nil { + panic(err) + } + return enc +} + +// TryPackMintVehicle2 is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xf50373f8. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function mintVehicle(uint256 manufacturerNode, address owner, uint256 storageNodeId, (string,string)[] attrInfo) returns() +func (registry *Registry) TryPackMintVehicle2(manufacturerNode *big.Int, owner common.Address, storageNodeId *big.Int, attrInfo []AttributeInfoPair) ([]byte, error) { + return registry.abi.Pack("mintVehicle2", manufacturerNode, owner, storageNodeId, attrInfo) +} + +// PackMintVehicleAndSdSign is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x688ecea4. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function mintVehicleAndSdSign((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]) data) returns() +func (registry *Registry) PackMintVehicleAndSdSign(data MintVehicleAndSdInputWithSnId) []byte { + enc, err := registry.abi.Pack("mintVehicleAndSdSign", data) + if err != nil { + panic(err) + } + return enc +} + +// TryPackMintVehicleAndSdSign is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x688ecea4. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function mintVehicleAndSdSign((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]) data) returns() +func (registry *Registry) TryPackMintVehicleAndSdSign(data MintVehicleAndSdInputWithSnId) ([]byte, error) { + return registry.abi.Pack("mintVehicleAndSdSign", data) +} + +// PackMintVehicleAndSdSign0 is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xfb1a28e8. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function mintVehicleAndSdSign((uint256,address,(string,string)[],uint256,bytes,bytes,address,(string,string)[]) data) returns() +func (registry *Registry) PackMintVehicleAndSdSign0(data MintVehicleAndSdInput) []byte { + enc, err := registry.abi.Pack("mintVehicleAndSdSign0", data) + if err != nil { + panic(err) + } + return enc +} + +// TryPackMintVehicleAndSdSign0 is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xfb1a28e8. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function mintVehicleAndSdSign((uint256,address,(string,string)[],uint256,bytes,bytes,address,(string,string)[]) data) returns() +func (registry *Registry) TryPackMintVehicleAndSdSign0(data MintVehicleAndSdInput) ([]byte, error) { + return registry.abi.Pack("mintVehicleAndSdSign0", data) +} + +// PackMintVehicleAndSdSignAndSacd is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x2caa687e. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function mintVehicleAndSdSignAndSacd((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]) data, (address,uint256,uint256,string) sacdInput) returns() +func (registry *Registry) PackMintVehicleAndSdSignAndSacd(data MintVehicleAndSdInputWithSnId, sacdInput SacdInput) []byte { + enc, err := registry.abi.Pack("mintVehicleAndSdSignAndSacd", data, sacdInput) + if err != nil { + panic(err) + } + return enc +} + +// TryPackMintVehicleAndSdSignAndSacd is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x2caa687e. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function mintVehicleAndSdSignAndSacd((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]) data, (address,uint256,uint256,string) sacdInput) returns() +func (registry *Registry) TryPackMintVehicleAndSdSignAndSacd(data MintVehicleAndSdInputWithSnId, sacdInput SacdInput) ([]byte, error) { + return registry.abi.Pack("mintVehicleAndSdSignAndSacd", data, sacdInput) +} + +// PackMintVehicleAndSdSignAndSacd0 is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x8a55bfbe. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function mintVehicleAndSdSignAndSacd((uint256,address,(string,string)[],uint256,bytes,bytes,address,(string,string)[]) data, (address,uint256,uint256,string) sacdInput) returns() +func (registry *Registry) PackMintVehicleAndSdSignAndSacd0(data MintVehicleAndSdInput, sacdInput SacdInput) []byte { + enc, err := registry.abi.Pack("mintVehicleAndSdSignAndSacd0", data, sacdInput) + if err != nil { + panic(err) + } + return enc +} + +// TryPackMintVehicleAndSdSignAndSacd0 is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x8a55bfbe. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function mintVehicleAndSdSignAndSacd((uint256,address,(string,string)[],uint256,bytes,bytes,address,(string,string)[]) data, (address,uint256,uint256,string) sacdInput) returns() +func (registry *Registry) TryPackMintVehicleAndSdSignAndSacd0(data MintVehicleAndSdInput, sacdInput SacdInput) ([]byte, error) { + return registry.abi.Pack("mintVehicleAndSdSignAndSacd0", data, sacdInput) +} + +// PackMintVehicleAndSdSignBatch is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x7b36d2d3. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function mintVehicleAndSdSignBatch((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[] data) returns() +func (registry *Registry) PackMintVehicleAndSdSignBatch(data []MintVehicleAndSdInputWithSnIdBatch) []byte { + enc, err := registry.abi.Pack("mintVehicleAndSdSignBatch", data) + if err != nil { + panic(err) + } + return enc +} + +// TryPackMintVehicleAndSdSignBatch is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x7b36d2d3. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function mintVehicleAndSdSignBatch((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[] data) returns() +func (registry *Registry) TryPackMintVehicleAndSdSignBatch(data []MintVehicleAndSdInputWithSnIdBatch) ([]byte, error) { + return registry.abi.Pack("mintVehicleAndSdSignBatch", data) +} + +// PackMintVehicleAndSdSignBatch0 is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xd44a15ee. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function mintVehicleAndSdSignBatch((uint256,address,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[] data) returns() +func (registry *Registry) PackMintVehicleAndSdSignBatch0(data []MintVehicleAndSdInputBatch) []byte { + enc, err := registry.abi.Pack("mintVehicleAndSdSignBatch0", data) + if err != nil { + panic(err) + } + return enc +} + +// TryPackMintVehicleAndSdSignBatch0 is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xd44a15ee. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function mintVehicleAndSdSignBatch((uint256,address,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[] data) returns() +func (registry *Registry) TryPackMintVehicleAndSdSignBatch0(data []MintVehicleAndSdInputBatch) ([]byte, error) { + return registry.abi.Pack("mintVehicleAndSdSignBatch0", data) +} + +// PackMintVehicleSign is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x1b1a82c8. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function mintVehicleSign(uint256 manufacturerNode, address owner, (string,string)[] attrInfo, bytes signature) returns() +func (registry *Registry) PackMintVehicleSign(manufacturerNode *big.Int, owner common.Address, attrInfo []AttributeInfoPair, signature []byte) []byte { + enc, err := registry.abi.Pack("mintVehicleSign", manufacturerNode, owner, attrInfo, signature) + if err != nil { + panic(err) + } + return enc +} + +// TryPackMintVehicleSign is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x1b1a82c8. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function mintVehicleSign(uint256 manufacturerNode, address owner, (string,string)[] attrInfo, bytes signature) returns() +func (registry *Registry) TryPackMintVehicleSign(manufacturerNode *big.Int, owner common.Address, attrInfo []AttributeInfoPair, signature []byte) ([]byte, error) { + return registry.abi.Pack("mintVehicleSign", manufacturerNode, owner, attrInfo, signature) +} + +// PackMintVehicleSign0 is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x561fa048. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function mintVehicleSign(uint256 manufacturerNode, address owner, uint256 storageNodeId, (string,string)[] attrInfo, bytes signature) returns() +func (registry *Registry) PackMintVehicleSign0(manufacturerNode *big.Int, owner common.Address, storageNodeId *big.Int, attrInfo []AttributeInfoPair, signature []byte) []byte { + enc, err := registry.abi.Pack("mintVehicleSign0", manufacturerNode, owner, storageNodeId, attrInfo, signature) + if err != nil { + panic(err) + } + return enc +} + +// TryPackMintVehicleSign0 is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x561fa048. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function mintVehicleSign(uint256 manufacturerNode, address owner, uint256 storageNodeId, (string,string)[] attrInfo, bytes signature) returns() +func (registry *Registry) TryPackMintVehicleSign0(manufacturerNode *big.Int, owner common.Address, storageNodeId *big.Int, attrInfo []AttributeInfoPair, signature []byte) ([]byte, error) { + return registry.abi.Pack("mintVehicleSign0", manufacturerNode, owner, storageNodeId, attrInfo, signature) +} + +// PackMultiDelegateCall is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x415c2d96. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function multiDelegateCall(bytes[] data) returns(bytes[] results) +func (registry *Registry) PackMultiDelegateCall(data [][]byte) []byte { + enc, err := registry.abi.Pack("multiDelegateCall", data) + if err != nil { + panic(err) + } + return enc +} + +// TryPackMultiDelegateCall is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x415c2d96. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function multiDelegateCall(bytes[] data) returns(bytes[] results) +func (registry *Registry) TryPackMultiDelegateCall(data [][]byte) ([]byte, error) { + return registry.abi.Pack("multiDelegateCall", data) +} + +// UnpackMultiDelegateCall is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0x415c2d96. +// +// Solidity: function multiDelegateCall(bytes[] data) returns(bytes[] results) +func (registry *Registry) UnpackMultiDelegateCall(data []byte) ([][]byte, error) { + out, err := registry.abi.Unpack("multiDelegateCall", data) + if err != nil { + return *new([][]byte), err + } + out0 := *abi.ConvertType(out[0], new([][]byte)).(*[][]byte) + return out0, nil +} + +// PackMultiStaticCall is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x1c0c6e51. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function multiStaticCall(bytes[] data) view returns(bytes[] results) +func (registry *Registry) PackMultiStaticCall(data [][]byte) []byte { + enc, err := registry.abi.Pack("multiStaticCall", data) + if err != nil { + panic(err) + } + return enc +} + +// TryPackMultiStaticCall is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x1c0c6e51. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function multiStaticCall(bytes[] data) view returns(bytes[] results) +func (registry *Registry) TryPackMultiStaticCall(data [][]byte) ([]byte, error) { + return registry.abi.Pack("multiStaticCall", data) +} + +// UnpackMultiStaticCall is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0x1c0c6e51. +// +// Solidity: function multiStaticCall(bytes[] data) view returns(bytes[] results) +func (registry *Registry) UnpackMultiStaticCall(data []byte) ([][]byte, error) { + out, err := registry.abi.Unpack("multiStaticCall", data) + if err != nil { + return *new([][]byte), err + } + out0 := *abi.ConvertType(out[0], new([][]byte)).(*[][]byte) + return out0, nil +} + +// PackOnBurnVehicleStream is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xa91ec798. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function onBurnVehicleStream(uint256 vehicleId) returns() +func (registry *Registry) PackOnBurnVehicleStream(vehicleId *big.Int) []byte { + enc, err := registry.abi.Pack("onBurnVehicleStream", vehicleId) + if err != nil { + panic(err) + } + return enc +} + +// TryPackOnBurnVehicleStream is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xa91ec798. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function onBurnVehicleStream(uint256 vehicleId) returns() +func (registry *Registry) TryPackOnBurnVehicleStream(vehicleId *big.Int) ([]byte, error) { + return registry.abi.Pack("onBurnVehicleStream", vehicleId) +} + +// PackOnERC721Received is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x150b7a02. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function onERC721Received(address , address , uint256 , bytes ) pure returns(bytes4) +func (registry *Registry) PackOnERC721Received(arg0 common.Address, arg1 common.Address, arg2 *big.Int, arg3 []byte) []byte { + enc, err := registry.abi.Pack("onERC721Received", arg0, arg1, arg2, arg3) + if err != nil { + panic(err) + } + return enc +} + +// TryPackOnERC721Received is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x150b7a02. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function onERC721Received(address , address , uint256 , bytes ) pure returns(bytes4) +func (registry *Registry) TryPackOnERC721Received(arg0 common.Address, arg1 common.Address, arg2 *big.Int, arg3 []byte) ([]byte, error) { + return registry.abi.Pack("onERC721Received", arg0, arg1, arg2, arg3) +} + +// UnpackOnERC721Received is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0x150b7a02. +// +// Solidity: function onERC721Received(address , address , uint256 , bytes ) pure returns(bytes4) +func (registry *Registry) UnpackOnERC721Received(data []byte) ([4]byte, error) { + out, err := registry.abi.Unpack("onERC721Received", data) + if err != nil { + return *new([4]byte), err + } + out0 := *abi.ConvertType(out[0], new([4]byte)).(*[4]byte) + return out0, nil +} + +// PackOnSetSubscribePrivilege is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xc8f11a06. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function onSetSubscribePrivilege(uint256 vehicleId, address subscriber, uint256 expirationTime) returns() +func (registry *Registry) PackOnSetSubscribePrivilege(vehicleId *big.Int, subscriber common.Address, expirationTime *big.Int) []byte { + enc, err := registry.abi.Pack("onSetSubscribePrivilege", vehicleId, subscriber, expirationTime) + if err != nil { + panic(err) + } + return enc +} + +// TryPackOnSetSubscribePrivilege is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xc8f11a06. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function onSetSubscribePrivilege(uint256 vehicleId, address subscriber, uint256 expirationTime) returns() +func (registry *Registry) TryPackOnSetSubscribePrivilege(vehicleId *big.Int, subscriber common.Address, expirationTime *big.Int) ([]byte, error) { + return registry.abi.Pack("onSetSubscribePrivilege", vehicleId, subscriber, expirationTime) +} + +// PackOnTransferVehicleStream is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x1882b263. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function onTransferVehicleStream(address to, uint256 vehicleId) returns() +func (registry *Registry) PackOnTransferVehicleStream(to common.Address, vehicleId *big.Int) []byte { + enc, err := registry.abi.Pack("onTransferVehicleStream", to, vehicleId) + if err != nil { + panic(err) + } + return enc +} + +// TryPackOnTransferVehicleStream is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x1882b263. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function onTransferVehicleStream(address to, uint256 vehicleId) returns() +func (registry *Registry) TryPackOnTransferVehicleStream(to common.Address, vehicleId *big.Int) ([]byte, error) { + return registry.abi.Pack("onTransferVehicleStream", to, vehicleId) +} + +// PackPairAftermarketDevice is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x492ab283. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function pairAftermarketDevice(uint256 aftermarketDeviceNode, uint256 vehicleNode) returns() +func (registry *Registry) PackPairAftermarketDevice(aftermarketDeviceNode *big.Int, vehicleNode *big.Int) []byte { + enc, err := registry.abi.Pack("pairAftermarketDevice", aftermarketDeviceNode, vehicleNode) + if err != nil { + panic(err) + } + return enc +} + +// TryPackPairAftermarketDevice is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x492ab283. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function pairAftermarketDevice(uint256 aftermarketDeviceNode, uint256 vehicleNode) returns() +func (registry *Registry) TryPackPairAftermarketDevice(aftermarketDeviceNode *big.Int, vehicleNode *big.Int) ([]byte, error) { + return registry.abi.Pack("pairAftermarketDevice", aftermarketDeviceNode, vehicleNode) +} + +// PackPairAftermarketDeviceSign is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xb50df2f7. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function pairAftermarketDeviceSign(uint256 aftermarketDeviceNode, uint256 vehicleNode, bytes aftermarketDeviceSig, bytes vehicleOwnerSig) returns() +func (registry *Registry) PackPairAftermarketDeviceSign(aftermarketDeviceNode *big.Int, vehicleNode *big.Int, aftermarketDeviceSig []byte, vehicleOwnerSig []byte) []byte { + enc, err := registry.abi.Pack("pairAftermarketDeviceSign", aftermarketDeviceNode, vehicleNode, aftermarketDeviceSig, vehicleOwnerSig) + if err != nil { + panic(err) + } + return enc +} + +// TryPackPairAftermarketDeviceSign is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xb50df2f7. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function pairAftermarketDeviceSign(uint256 aftermarketDeviceNode, uint256 vehicleNode, bytes aftermarketDeviceSig, bytes vehicleOwnerSig) returns() +func (registry *Registry) TryPackPairAftermarketDeviceSign(aftermarketDeviceNode *big.Int, vehicleNode *big.Int, aftermarketDeviceSig []byte, vehicleOwnerSig []byte) ([]byte, error) { + return registry.abi.Pack("pairAftermarketDeviceSign", aftermarketDeviceNode, vehicleNode, aftermarketDeviceSig, vehicleOwnerSig) +} + +// PackPairAftermarketDeviceSign0 is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xcfe642dd. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function pairAftermarketDeviceSign(uint256 aftermarketDeviceNode, uint256 vehicleNode, bytes signature) returns() +func (registry *Registry) PackPairAftermarketDeviceSign0(aftermarketDeviceNode *big.Int, vehicleNode *big.Int, signature []byte) []byte { + enc, err := registry.abi.Pack("pairAftermarketDeviceSign0", aftermarketDeviceNode, vehicleNode, signature) + if err != nil { + panic(err) + } + return enc +} + +// TryPackPairAftermarketDeviceSign0 is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xcfe642dd. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function pairAftermarketDeviceSign(uint256 aftermarketDeviceNode, uint256 vehicleNode, bytes signature) returns() +func (registry *Registry) TryPackPairAftermarketDeviceSign0(aftermarketDeviceNode *big.Int, vehicleNode *big.Int, signature []byte) ([]byte, error) { + return registry.abi.Pack("pairAftermarketDeviceSign0", aftermarketDeviceNode, vehicleNode, signature) +} + +// PackPairAftermarketDeviceWithAdSig is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x7ca22c7b. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function pairAftermarketDeviceWithAdSig(uint256 aftermarketDeviceNode, uint256 vehicleNode, bytes aftermarketDeviceSig) returns() +func (registry *Registry) PackPairAftermarketDeviceWithAdSig(aftermarketDeviceNode *big.Int, vehicleNode *big.Int, aftermarketDeviceSig []byte) []byte { + enc, err := registry.abi.Pack("pairAftermarketDeviceWithAdSig", aftermarketDeviceNode, vehicleNode, aftermarketDeviceSig) + if err != nil { + panic(err) + } + return enc +} + +// TryPackPairAftermarketDeviceWithAdSig is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x7ca22c7b. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function pairAftermarketDeviceWithAdSig(uint256 aftermarketDeviceNode, uint256 vehicleNode, bytes aftermarketDeviceSig) returns() +func (registry *Registry) TryPackPairAftermarketDeviceWithAdSig(aftermarketDeviceNode *big.Int, vehicleNode *big.Int, aftermarketDeviceSig []byte) ([]byte, error) { + return registry.abi.Pack("pairAftermarketDeviceWithAdSig", aftermarketDeviceNode, vehicleNode, aftermarketDeviceSig) +} + +// PackRemoveModule is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x9748a762. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function removeModule(address implementation, bytes4[] selectors) returns() +func (registry *Registry) PackRemoveModule(implementation common.Address, selectors [][4]byte) []byte { + enc, err := registry.abi.Pack("removeModule", implementation, selectors) + if err != nil { + panic(err) + } + return enc +} + +// TryPackRemoveModule is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x9748a762. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function removeModule(address implementation, bytes4[] selectors) returns() +func (registry *Registry) TryPackRemoveModule(implementation common.Address, selectors [][4]byte) ([]byte, error) { + return registry.abi.Pack("removeModule", implementation, selectors) +} + +// PackRenameManufacturers is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xf73a8f04. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function renameManufacturers((uint256,string)[] idManufacturerNames) returns() +func (registry *Registry) PackRenameManufacturers(idManufacturerNames []DevAdminIdManufacturerName) []byte { + enc, err := registry.abi.Pack("renameManufacturers", idManufacturerNames) + if err != nil { + panic(err) + } + return enc +} + +// TryPackRenameManufacturers is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xf73a8f04. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function renameManufacturers((uint256,string)[] idManufacturerNames) returns() +func (registry *Registry) TryPackRenameManufacturers(idManufacturerNames []DevAdminIdManufacturerName) ([]byte, error) { + return registry.abi.Pack("renameManufacturers", idManufacturerNames) +} + +// PackRenounceRole is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x8bb9c5bf. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function renounceRole(bytes32 role) returns() +func (registry *Registry) PackRenounceRole(role [32]byte) []byte { + enc, err := registry.abi.Pack("renounceRole", role) + if err != nil { + panic(err) + } + return enc +} + +// TryPackRenounceRole is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x8bb9c5bf. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function renounceRole(bytes32 role) returns() +func (registry *Registry) TryPackRenounceRole(role [32]byte) ([]byte, error) { + return registry.abi.Pack("renounceRole", role) +} + +// PackReprovisionAftermarketDeviceByManufacturerBatch is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x9b3abd48. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function reprovisionAftermarketDeviceByManufacturerBatch(uint256[] aftermarketDeviceNodeList) returns() +func (registry *Registry) PackReprovisionAftermarketDeviceByManufacturerBatch(aftermarketDeviceNodeList []*big.Int) []byte { + enc, err := registry.abi.Pack("reprovisionAftermarketDeviceByManufacturerBatch", aftermarketDeviceNodeList) + if err != nil { + panic(err) + } + return enc +} + +// TryPackReprovisionAftermarketDeviceByManufacturerBatch is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x9b3abd48. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function reprovisionAftermarketDeviceByManufacturerBatch(uint256[] aftermarketDeviceNodeList) returns() +func (registry *Registry) TryPackReprovisionAftermarketDeviceByManufacturerBatch(aftermarketDeviceNodeList []*big.Int) ([]byte, error) { + return registry.abi.Pack("reprovisionAftermarketDeviceByManufacturerBatch", aftermarketDeviceNodeList) +} + +// PackResetAftermarketDeviceAddressByManufacturerBatch is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x9d0b139b. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function resetAftermarketDeviceAddressByManufacturerBatch((uint256,address)[] adIdAddrs) returns() +func (registry *Registry) PackResetAftermarketDeviceAddressByManufacturerBatch(adIdAddrs []AftermarketDeviceIdAddressPair) []byte { + enc, err := registry.abi.Pack("resetAftermarketDeviceAddressByManufacturerBatch", adIdAddrs) + if err != nil { + panic(err) + } + return enc +} + +// TryPackResetAftermarketDeviceAddressByManufacturerBatch is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x9d0b139b. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function resetAftermarketDeviceAddressByManufacturerBatch((uint256,address)[] adIdAddrs) returns() +func (registry *Registry) TryPackResetAftermarketDeviceAddressByManufacturerBatch(adIdAddrs []AftermarketDeviceIdAddressPair) ([]byte, error) { + return registry.abi.Pack("resetAftermarketDeviceAddressByManufacturerBatch", adIdAddrs) +} + +// PackResetAftermarketDeviceForClaiming is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x4c92773c. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function resetAftermarketDeviceForClaiming(address from, uint256 aftermarketDeviceNode) returns(address) +func (registry *Registry) PackResetAftermarketDeviceForClaiming(from common.Address, aftermarketDeviceNode *big.Int) []byte { + enc, err := registry.abi.Pack("resetAftermarketDeviceForClaiming", from, aftermarketDeviceNode) + if err != nil { + panic(err) + } + return enc +} + +// TryPackResetAftermarketDeviceForClaiming is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x4c92773c. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function resetAftermarketDeviceForClaiming(address from, uint256 aftermarketDeviceNode) returns(address) +func (registry *Registry) TryPackResetAftermarketDeviceForClaiming(from common.Address, aftermarketDeviceNode *big.Int) ([]byte, error) { + return registry.abi.Pack("resetAftermarketDeviceForClaiming", from, aftermarketDeviceNode) +} + +// UnpackResetAftermarketDeviceForClaiming is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0x4c92773c. +// +// Solidity: function resetAftermarketDeviceForClaiming(address from, uint256 aftermarketDeviceNode) returns(address) +func (registry *Registry) UnpackResetAftermarketDeviceForClaiming(data []byte) (common.Address, error) { + out, err := registry.abi.Unpack("resetAftermarketDeviceForClaiming", data) + if err != nil { + return *new(common.Address), err + } + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + return out0, nil +} + +// PackRevokeRole is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xd547741f. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function revokeRole(bytes32 role, address account) returns() +func (registry *Registry) PackRevokeRole(role [32]byte, account common.Address) []byte { + enc, err := registry.abi.Pack("revokeRole", role, account) + if err != nil { + panic(err) + } + return enc +} + +// TryPackRevokeRole is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xd547741f. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function revokeRole(bytes32 role, address account) returns() +func (registry *Registry) TryPackRevokeRole(role [32]byte, account common.Address) ([]byte, error) { + return registry.abi.Pack("revokeRole", role, account) +} + +// PackSetAftermarketDeviceBeneficiary is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xbebc0bfc. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function setAftermarketDeviceBeneficiary(uint256 nodeId, address beneficiary) returns() +func (registry *Registry) PackSetAftermarketDeviceBeneficiary(nodeId *big.Int, beneficiary common.Address) []byte { + enc, err := registry.abi.Pack("setAftermarketDeviceBeneficiary", nodeId, beneficiary) + if err != nil { + panic(err) + } + return enc +} + +// TryPackSetAftermarketDeviceBeneficiary is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xbebc0bfc. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function setAftermarketDeviceBeneficiary(uint256 nodeId, address beneficiary) returns() +func (registry *Registry) TryPackSetAftermarketDeviceBeneficiary(nodeId *big.Int, beneficiary common.Address) ([]byte, error) { + return registry.abi.Pack("setAftermarketDeviceBeneficiary", nodeId, beneficiary) +} + +// PackSetAftermarketDeviceIdProxyAddress is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x4d49d82a. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function setAftermarketDeviceIdProxyAddress(address addr) returns() +func (registry *Registry) PackSetAftermarketDeviceIdProxyAddress(addr common.Address) []byte { + enc, err := registry.abi.Pack("setAftermarketDeviceIdProxyAddress", addr) + if err != nil { + panic(err) + } + return enc +} + +// TryPackSetAftermarketDeviceIdProxyAddress is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x4d49d82a. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function setAftermarketDeviceIdProxyAddress(address addr) returns() +func (registry *Registry) TryPackSetAftermarketDeviceIdProxyAddress(addr common.Address) ([]byte, error) { + return registry.abi.Pack("setAftermarketDeviceIdProxyAddress", addr) +} + +// PackSetAftermarketDeviceInfo is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x4d13b709. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function setAftermarketDeviceInfo(uint256 tokenId, (string,string)[] attrInfo) returns() +func (registry *Registry) PackSetAftermarketDeviceInfo(tokenId *big.Int, attrInfo []AttributeInfoPair) []byte { + enc, err := registry.abi.Pack("setAftermarketDeviceInfo", tokenId, attrInfo) + if err != nil { + panic(err) + } + return enc +} + +// TryPackSetAftermarketDeviceInfo is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x4d13b709. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function setAftermarketDeviceInfo(uint256 tokenId, (string,string)[] attrInfo) returns() +func (registry *Registry) TryPackSetAftermarketDeviceInfo(tokenId *big.Int, attrInfo []AttributeInfoPair) ([]byte, error) { + return registry.abi.Pack("setAftermarketDeviceInfo", tokenId, attrInfo) +} + +// PackSetConnectionsManager is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x2fee22f4. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function setConnectionsManager(address connectionsManager) returns() +func (registry *Registry) PackSetConnectionsManager(connectionsManager common.Address) []byte { + enc, err := registry.abi.Pack("setConnectionsManager", connectionsManager) + if err != nil { + panic(err) + } + return enc +} + +// TryPackSetConnectionsManager is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x2fee22f4. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function setConnectionsManager(address connectionsManager) returns() +func (registry *Registry) TryPackSetConnectionsManager(connectionsManager common.Address) ([]byte, error) { + return registry.abi.Pack("setConnectionsManager", connectionsManager) +} + +// PackSetController is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x92eefe9b. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function setController(address _controller) returns() +func (registry *Registry) PackSetController(controller common.Address) []byte { + enc, err := registry.abi.Pack("setController", controller) + if err != nil { + panic(err) + } + return enc +} + +// TryPackSetController is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x92eefe9b. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function setController(address _controller) returns() +func (registry *Registry) TryPackSetController(controller common.Address) ([]byte, error) { + return registry.abi.Pack("setController", controller) +} + +// PackSetDcxOperationCost is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xa2fe8c85. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function setDcxOperationCost(bytes32 operation, uint256 cost) returns() +func (registry *Registry) PackSetDcxOperationCost(operation [32]byte, cost *big.Int) []byte { + enc, err := registry.abi.Pack("setDcxOperationCost", operation, cost) + if err != nil { + panic(err) + } + return enc +} + +// TryPackSetDcxOperationCost is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xa2fe8c85. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function setDcxOperationCost(bytes32 operation, uint256 cost) returns() +func (registry *Registry) TryPackSetDcxOperationCost(operation [32]byte, cost *big.Int) ([]byte, error) { + return registry.abi.Pack("setDcxOperationCost", operation, cost) +} + +// PackSetDefaultStorageNodeId is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x856f3849. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function setDefaultStorageNodeId(uint256 storageNodeId) returns() +func (registry *Registry) PackSetDefaultStorageNodeId(storageNodeId *big.Int) []byte { + enc, err := registry.abi.Pack("setDefaultStorageNodeId", storageNodeId) + if err != nil { + panic(err) + } + return enc +} + +// TryPackSetDefaultStorageNodeId is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x856f3849. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function setDefaultStorageNodeId(uint256 storageNodeId) returns() +func (registry *Registry) TryPackSetDefaultStorageNodeId(storageNodeId *big.Int) ([]byte, error) { + return registry.abi.Pack("setDefaultStorageNodeId", storageNodeId) +} + +// PackSetDeviceDefinitionTable is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x088fafdb. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function setDeviceDefinitionTable(uint256 manufacturerId, uint256 tableId) returns() +func (registry *Registry) PackSetDeviceDefinitionTable(manufacturerId *big.Int, tableId *big.Int) []byte { + enc, err := registry.abi.Pack("setDeviceDefinitionTable", manufacturerId, tableId) + if err != nil { + panic(err) + } + return enc +} + +// TryPackSetDeviceDefinitionTable is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x088fafdb. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function setDeviceDefinitionTable(uint256 manufacturerId, uint256 tableId) returns() +func (registry *Registry) TryPackSetDeviceDefinitionTable(manufacturerId *big.Int, tableId *big.Int) ([]byte, error) { + return registry.abi.Pack("setDeviceDefinitionTable", manufacturerId, tableId) +} + +// PackSetDimoBaseStreamId is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x9e594424. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function setDimoBaseStreamId(string dimoStreamrEns) returns() +func (registry *Registry) PackSetDimoBaseStreamId(dimoStreamrEns string) []byte { + enc, err := registry.abi.Pack("setDimoBaseStreamId", dimoStreamrEns) + if err != nil { + panic(err) + } + return enc +} + +// TryPackSetDimoBaseStreamId is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x9e594424. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function setDimoBaseStreamId(string dimoStreamrEns) returns() +func (registry *Registry) TryPackSetDimoBaseStreamId(dimoStreamrEns string) ([]byte, error) { + return registry.abi.Pack("setDimoBaseStreamId", dimoStreamrEns) +} + +// PackSetDimoCredit is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x4fa9ff16. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function setDimoCredit(address dimoCredit) returns() +func (registry *Registry) PackSetDimoCredit(dimoCredit common.Address) []byte { + enc, err := registry.abi.Pack("setDimoCredit", dimoCredit) + if err != nil { + panic(err) + } + return enc +} + +// TryPackSetDimoCredit is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x4fa9ff16. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function setDimoCredit(address dimoCredit) returns() +func (registry *Registry) TryPackSetDimoCredit(dimoCredit common.Address) ([]byte, error) { + return registry.abi.Pack("setDimoCredit", dimoCredit) +} + +// PackSetDimoStreamrNode is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x5f450e29. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function setDimoStreamrNode(address dimoStreamrNode) returns() +func (registry *Registry) PackSetDimoStreamrNode(dimoStreamrNode common.Address) []byte { + enc, err := registry.abi.Pack("setDimoStreamrNode", dimoStreamrNode) + if err != nil { + panic(err) + } + return enc +} + +// TryPackSetDimoStreamrNode is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x5f450e29. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function setDimoStreamrNode(address dimoStreamrNode) returns() +func (registry *Registry) TryPackSetDimoStreamrNode(dimoStreamrNode common.Address) ([]byte, error) { + return registry.abi.Pack("setDimoStreamrNode", dimoStreamrNode) +} + +// PackSetDimoToken is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x5b6c1979. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function setDimoToken(address dimoToken) returns() +func (registry *Registry) PackSetDimoToken(dimoToken common.Address) []byte { + enc, err := registry.abi.Pack("setDimoToken", dimoToken) + if err != nil { + panic(err) + } + return enc +} + +// TryPackSetDimoToken is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x5b6c1979. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function setDimoToken(address dimoToken) returns() +func (registry *Registry) TryPackSetDimoToken(dimoToken common.Address) ([]byte, error) { + return registry.abi.Pack("setDimoToken", dimoToken) +} + +// PackSetFoundation is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xdb3543f5. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function setFoundation(address foundation) returns() +func (registry *Registry) PackSetFoundation(foundation common.Address) []byte { + enc, err := registry.abi.Pack("setFoundation", foundation) + if err != nil { + panic(err) + } + return enc +} + +// TryPackSetFoundation is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xdb3543f5. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function setFoundation(address foundation) returns() +func (registry *Registry) TryPackSetFoundation(foundation common.Address) ([]byte, error) { + return registry.abi.Pack("setFoundation", foundation) +} + +// PackSetManufacturerIdProxyAddress is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xd159f49a. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function setManufacturerIdProxyAddress(address addr) returns() +func (registry *Registry) PackSetManufacturerIdProxyAddress(addr common.Address) []byte { + enc, err := registry.abi.Pack("setManufacturerIdProxyAddress", addr) + if err != nil { + panic(err) + } + return enc +} + +// TryPackSetManufacturerIdProxyAddress is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xd159f49a. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function setManufacturerIdProxyAddress(address addr) returns() +func (registry *Registry) TryPackSetManufacturerIdProxyAddress(addr common.Address) ([]byte, error) { + return registry.abi.Pack("setManufacturerIdProxyAddress", addr) +} + +// PackSetManufacturerInfo is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x63545ffa. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function setManufacturerInfo(uint256 tokenId, (string,string)[] attrInfoList) returns() +func (registry *Registry) PackSetManufacturerInfo(tokenId *big.Int, attrInfoList []AttributeInfoPair) []byte { + enc, err := registry.abi.Pack("setManufacturerInfo", tokenId, attrInfoList) + if err != nil { + panic(err) + } + return enc +} + +// TryPackSetManufacturerInfo is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x63545ffa. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function setManufacturerInfo(uint256 tokenId, (string,string)[] attrInfoList) returns() +func (registry *Registry) TryPackSetManufacturerInfo(tokenId *big.Int, attrInfoList []AttributeInfoPair) ([]byte, error) { + return registry.abi.Pack("setManufacturerInfo", tokenId, attrInfoList) +} + +// PackSetManufacturerLicense is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xea9ae2f5. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function setManufacturerLicense(address manufacturerLicense) returns() +func (registry *Registry) PackSetManufacturerLicense(manufacturerLicense common.Address) []byte { + enc, err := registry.abi.Pack("setManufacturerLicense", manufacturerLicense) + if err != nil { + panic(err) + } + return enc +} + +// TryPackSetManufacturerLicense is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xea9ae2f5. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function setManufacturerLicense(address manufacturerLicense) returns() +func (registry *Registry) TryPackSetManufacturerLicense(manufacturerLicense common.Address) ([]byte, error) { + return registry.abi.Pack("setManufacturerLicense", manufacturerLicense) +} + +// PackSetSacd is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xc63f7dd2. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function setSacd(address sacd) returns() +func (registry *Registry) PackSetSacd(sacd common.Address) []byte { + enc, err := registry.abi.Pack("setSacd", sacd) + if err != nil { + panic(err) + } + return enc +} + +// TryPackSetSacd is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xc63f7dd2. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function setSacd(address sacd) returns() +func (registry *Registry) TryPackSetSacd(sacd common.Address) ([]byte, error) { + return registry.abi.Pack("setSacd", sacd) +} + +// PackSetStorageNode is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x6ee4a611. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function setStorageNode(address storageNode) returns() +func (registry *Registry) PackSetStorageNode(storageNode common.Address) []byte { + enc, err := registry.abi.Pack("setStorageNode", storageNode) + if err != nil { + panic(err) + } + return enc +} + +// TryPackSetStorageNode is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x6ee4a611. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function setStorageNode(address storageNode) returns() +func (registry *Registry) TryPackSetStorageNode(storageNode common.Address) ([]byte, error) { + return registry.abi.Pack("setStorageNode", storageNode) +} + +// PackSetStorageNodeIdForVehicle is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xae3ed8dd. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function setStorageNodeIdForVehicle(uint256 vehicleId, uint256 storageNodeId) returns() +func (registry *Registry) PackSetStorageNodeIdForVehicle(vehicleId *big.Int, storageNodeId *big.Int) []byte { + enc, err := registry.abi.Pack("setStorageNodeIdForVehicle", vehicleId, storageNodeId) + if err != nil { + panic(err) + } + return enc +} + +// TryPackSetStorageNodeIdForVehicle is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xae3ed8dd. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function setStorageNodeIdForVehicle(uint256 vehicleId, uint256 storageNodeId) returns() +func (registry *Registry) TryPackSetStorageNodeIdForVehicle(vehicleId *big.Int, storageNodeId *big.Int) ([]byte, error) { + return registry.abi.Pack("setStorageNodeIdForVehicle", vehicleId, storageNodeId) +} + +// PackSetStreamRegistry is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x0c3cac3b. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function setStreamRegistry(address streamRegistry) returns() +func (registry *Registry) PackSetStreamRegistry(streamRegistry common.Address) []byte { + enc, err := registry.abi.Pack("setStreamRegistry", streamRegistry) + if err != nil { + panic(err) + } + return enc +} + +// TryPackSetStreamRegistry is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x0c3cac3b. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function setStreamRegistry(address streamRegistry) returns() +func (registry *Registry) TryPackSetStreamRegistry(streamRegistry common.Address) ([]byte, error) { + return registry.abi.Pack("setStreamRegistry", streamRegistry) +} + +// PackSetSubscriptionToVehicleStream is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xbb44bb75. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function setSubscriptionToVehicleStream(uint256 vehicleId, address subscriber, uint256 expirationTime) returns() +func (registry *Registry) PackSetSubscriptionToVehicleStream(vehicleId *big.Int, subscriber common.Address, expirationTime *big.Int) []byte { + enc, err := registry.abi.Pack("setSubscriptionToVehicleStream", vehicleId, subscriber, expirationTime) + if err != nil { + panic(err) + } + return enc +} + +// TryPackSetSubscriptionToVehicleStream is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xbb44bb75. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function setSubscriptionToVehicleStream(uint256 vehicleId, address subscriber, uint256 expirationTime) returns() +func (registry *Registry) TryPackSetSubscriptionToVehicleStream(vehicleId *big.Int, subscriber common.Address, expirationTime *big.Int) ([]byte, error) { + return registry.abi.Pack("setSubscriptionToVehicleStream", vehicleId, subscriber, expirationTime) +} + +// PackSetSyntheticDeviceIdProxyAddress is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xecf452d7. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function setSyntheticDeviceIdProxyAddress(address addr) returns() +func (registry *Registry) PackSetSyntheticDeviceIdProxyAddress(addr common.Address) []byte { + enc, err := registry.abi.Pack("setSyntheticDeviceIdProxyAddress", addr) + if err != nil { + panic(err) + } + return enc +} + +// TryPackSetSyntheticDeviceIdProxyAddress is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xecf452d7. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function setSyntheticDeviceIdProxyAddress(address addr) returns() +func (registry *Registry) TryPackSetSyntheticDeviceIdProxyAddress(addr common.Address) ([]byte, error) { + return registry.abi.Pack("setSyntheticDeviceIdProxyAddress", addr) +} + +// PackSetSyntheticDeviceInfo is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x80430e0d. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function setSyntheticDeviceInfo(uint256 tokenId, (string,string)[] attrInfo) returns() +func (registry *Registry) PackSetSyntheticDeviceInfo(tokenId *big.Int, attrInfo []AttributeInfoPair) []byte { + enc, err := registry.abi.Pack("setSyntheticDeviceInfo", tokenId, attrInfo) + if err != nil { + panic(err) + } + return enc +} + +// TryPackSetSyntheticDeviceInfo is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x80430e0d. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function setSyntheticDeviceInfo(uint256 tokenId, (string,string)[] attrInfo) returns() +func (registry *Registry) TryPackSetSyntheticDeviceInfo(tokenId *big.Int, attrInfo []AttributeInfoPair) ([]byte, error) { + return registry.abi.Pack("setSyntheticDeviceInfo", tokenId, attrInfo) +} + +// PackSetVehicleIdProxyAddress is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x9bfae6da. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function setVehicleIdProxyAddress(address addr) returns() +func (registry *Registry) PackSetVehicleIdProxyAddress(addr common.Address) []byte { + enc, err := registry.abi.Pack("setVehicleIdProxyAddress", addr) + if err != nil { + panic(err) + } + return enc +} + +// TryPackSetVehicleIdProxyAddress is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x9bfae6da. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function setVehicleIdProxyAddress(address addr) returns() +func (registry *Registry) TryPackSetVehicleIdProxyAddress(addr common.Address) ([]byte, error) { + return registry.abi.Pack("setVehicleIdProxyAddress", addr) +} + +// PackSetVehicleInfo is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xd9c3ae61. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function setVehicleInfo(uint256 tokenId, (string,string)[] attrInfo) returns() +func (registry *Registry) PackSetVehicleInfo(tokenId *big.Int, attrInfo []AttributeInfoPair) []byte { + enc, err := registry.abi.Pack("setVehicleInfo", tokenId, attrInfo) + if err != nil { + panic(err) + } + return enc +} + +// TryPackSetVehicleInfo is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xd9c3ae61. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function setVehicleInfo(uint256 tokenId, (string,string)[] attrInfo) returns() +func (registry *Registry) TryPackSetVehicleInfo(tokenId *big.Int, attrInfo []AttributeInfoPair) ([]byte, error) { + return registry.abi.Pack("setVehicleInfo", tokenId, attrInfo) +} + +// PackSetVehicleStream is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x6f58f093. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function setVehicleStream(uint256 vehicleId, string streamId) returns() +func (registry *Registry) PackSetVehicleStream(vehicleId *big.Int, streamId string) []byte { + enc, err := registry.abi.Pack("setVehicleStream", vehicleId, streamId) + if err != nil { + panic(err) + } + return enc +} + +// TryPackSetVehicleStream is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x6f58f093. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function setVehicleStream(uint256 vehicleId, string streamId) returns() +func (registry *Registry) TryPackSetVehicleStream(vehicleId *big.Int, streamId string) ([]byte, error) { + return registry.abi.Pack("setVehicleStream", vehicleId, streamId) +} + +// PackSubscribeToVehicleStream is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x37479f7e. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function subscribeToVehicleStream(uint256 vehicleId, uint256 expirationTime) returns() +func (registry *Registry) PackSubscribeToVehicleStream(vehicleId *big.Int, expirationTime *big.Int) []byte { + enc, err := registry.abi.Pack("subscribeToVehicleStream", vehicleId, expirationTime) + if err != nil { + panic(err) + } + return enc +} + +// TryPackSubscribeToVehicleStream is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x37479f7e. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function subscribeToVehicleStream(uint256 vehicleId, uint256 expirationTime) returns() +func (registry *Registry) TryPackSubscribeToVehicleStream(vehicleId *big.Int, expirationTime *big.Int) ([]byte, error) { + return registry.abi.Pack("subscribeToVehicleStream", vehicleId, expirationTime) +} + +// PackTransferAftermarketDeviceOwnership is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xff96b761. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function transferAftermarketDeviceOwnership(uint256 aftermarketDeviceNode, address newOwner) returns() +func (registry *Registry) PackTransferAftermarketDeviceOwnership(aftermarketDeviceNode *big.Int, newOwner common.Address) []byte { + enc, err := registry.abi.Pack("transferAftermarketDeviceOwnership", aftermarketDeviceNode, newOwner) + if err != nil { + panic(err) + } + return enc +} + +// TryPackTransferAftermarketDeviceOwnership is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xff96b761. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function transferAftermarketDeviceOwnership(uint256 aftermarketDeviceNode, address newOwner) returns() +func (registry *Registry) TryPackTransferAftermarketDeviceOwnership(aftermarketDeviceNode *big.Int, newOwner common.Address) ([]byte, error) { + return registry.abi.Pack("transferAftermarketDeviceOwnership", aftermarketDeviceNode, newOwner) +} + +// PackUnclaimAftermarketDeviceNode is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x5c129493. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function unclaimAftermarketDeviceNode(uint256[] aftermarketDeviceNodes) returns() +func (registry *Registry) PackUnclaimAftermarketDeviceNode(aftermarketDeviceNodes []*big.Int) []byte { + enc, err := registry.abi.Pack("unclaimAftermarketDeviceNode", aftermarketDeviceNodes) + if err != nil { + panic(err) + } + return enc +} + +// TryPackUnclaimAftermarketDeviceNode is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x5c129493. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function unclaimAftermarketDeviceNode(uint256[] aftermarketDeviceNodes) returns() +func (registry *Registry) TryPackUnclaimAftermarketDeviceNode(aftermarketDeviceNodes []*big.Int) ([]byte, error) { + return registry.abi.Pack("unclaimAftermarketDeviceNode", aftermarketDeviceNodes) +} + +// PackUnpairAftermarketDevice is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xee4d9596. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function unpairAftermarketDevice(uint256 aftermarketDeviceNode, uint256 vehicleNode) returns() +func (registry *Registry) PackUnpairAftermarketDevice(aftermarketDeviceNode *big.Int, vehicleNode *big.Int) []byte { + enc, err := registry.abi.Pack("unpairAftermarketDevice", aftermarketDeviceNode, vehicleNode) + if err != nil { + panic(err) + } + return enc +} + +// TryPackUnpairAftermarketDevice is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xee4d9596. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function unpairAftermarketDevice(uint256 aftermarketDeviceNode, uint256 vehicleNode) returns() +func (registry *Registry) TryPackUnpairAftermarketDevice(aftermarketDeviceNode *big.Int, vehicleNode *big.Int) ([]byte, error) { + return registry.abi.Pack("unpairAftermarketDevice", aftermarketDeviceNode, vehicleNode) +} + +// PackUnpairAftermarketDeviceByDeviceNode is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x71193956. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function unpairAftermarketDeviceByDeviceNode(uint256[] aftermarketDeviceNodes) returns() +func (registry *Registry) PackUnpairAftermarketDeviceByDeviceNode(aftermarketDeviceNodes []*big.Int) []byte { + enc, err := registry.abi.Pack("unpairAftermarketDeviceByDeviceNode", aftermarketDeviceNodes) + if err != nil { + panic(err) + } + return enc +} + +// TryPackUnpairAftermarketDeviceByDeviceNode is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x71193956. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function unpairAftermarketDeviceByDeviceNode(uint256[] aftermarketDeviceNodes) returns() +func (registry *Registry) TryPackUnpairAftermarketDeviceByDeviceNode(aftermarketDeviceNodes []*big.Int) ([]byte, error) { + return registry.abi.Pack("unpairAftermarketDeviceByDeviceNode", aftermarketDeviceNodes) +} + +// PackUnpairAftermarketDeviceByVehicleNode is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x8c2ee9bb. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function unpairAftermarketDeviceByVehicleNode(uint256[] vehicleNodes) returns() +func (registry *Registry) PackUnpairAftermarketDeviceByVehicleNode(vehicleNodes []*big.Int) []byte { + enc, err := registry.abi.Pack("unpairAftermarketDeviceByVehicleNode", vehicleNodes) + if err != nil { + panic(err) + } + return enc +} + +// TryPackUnpairAftermarketDeviceByVehicleNode is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x8c2ee9bb. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function unpairAftermarketDeviceByVehicleNode(uint256[] vehicleNodes) returns() +func (registry *Registry) TryPackUnpairAftermarketDeviceByVehicleNode(vehicleNodes []*big.Int) ([]byte, error) { + return registry.abi.Pack("unpairAftermarketDeviceByVehicleNode", vehicleNodes) +} + +// PackUnpairAftermarketDeviceSign is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x3f65997a. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function unpairAftermarketDeviceSign(uint256 aftermarketDeviceNode, uint256 vehicleNode, bytes signature) returns() +func (registry *Registry) PackUnpairAftermarketDeviceSign(aftermarketDeviceNode *big.Int, vehicleNode *big.Int, signature []byte) []byte { + enc, err := registry.abi.Pack("unpairAftermarketDeviceSign", aftermarketDeviceNode, vehicleNode, signature) + if err != nil { + panic(err) + } + return enc +} + +// TryPackUnpairAftermarketDeviceSign is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x3f65997a. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function unpairAftermarketDeviceSign(uint256 aftermarketDeviceNode, uint256 vehicleNode, bytes signature) returns() +func (registry *Registry) TryPackUnpairAftermarketDeviceSign(aftermarketDeviceNode *big.Int, vehicleNode *big.Int, signature []byte) ([]byte, error) { + return registry.abi.Pack("unpairAftermarketDeviceSign", aftermarketDeviceNode, vehicleNode, signature) +} + +// PackUnsetVehicleStream is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xcd90df7e. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function unsetVehicleStream(uint256 vehicleId) returns() +func (registry *Registry) PackUnsetVehicleStream(vehicleId *big.Int) []byte { + enc, err := registry.abi.Pack("unsetVehicleStream", vehicleId) + if err != nil { + panic(err) + } + return enc +} + +// TryPackUnsetVehicleStream is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xcd90df7e. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function unsetVehicleStream(uint256 vehicleId) returns() +func (registry *Registry) TryPackUnsetVehicleStream(vehicleId *big.Int) ([]byte, error) { + return registry.abi.Pack("unsetVehicleStream", vehicleId) +} + +// PackUpdateDeviceDefinition is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x182fef60. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function updateDeviceDefinition(uint256 manufacturerId, (string,string,string,string,string) data) returns() +func (registry *Registry) PackUpdateDeviceDefinition(manufacturerId *big.Int, data DeviceDefinitionUpdateInput) []byte { + enc, err := registry.abi.Pack("updateDeviceDefinition", manufacturerId, data) + if err != nil { + panic(err) + } + return enc +} + +// TryPackUpdateDeviceDefinition is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x182fef60. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function updateDeviceDefinition(uint256 manufacturerId, (string,string,string,string,string) data) returns() +func (registry *Registry) TryPackUpdateDeviceDefinition(manufacturerId *big.Int, data DeviceDefinitionUpdateInput) ([]byte, error) { + return registry.abi.Pack("updateDeviceDefinition", manufacturerId, data) +} + +// PackUpdateManufacturerMinted is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x20d60248. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function updateManufacturerMinted(address from, address to) returns() +func (registry *Registry) PackUpdateManufacturerMinted(from common.Address, to common.Address) []byte { + enc, err := registry.abi.Pack("updateManufacturerMinted", from, to) + if err != nil { + panic(err) + } + return enc +} + +// TryPackUpdateManufacturerMinted is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x20d60248. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function updateManufacturerMinted(address from, address to) returns() +func (registry *Registry) TryPackUpdateManufacturerMinted(from common.Address, to common.Address) ([]byte, error) { + return registry.abi.Pack("updateManufacturerMinted", from, to) +} + +// PackUpdateModule is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x06d1d2a1. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function updateModule(address oldImplementation, address newImplementation, bytes4[] oldSelectors, bytes4[] newSelectors) returns() +func (registry *Registry) PackUpdateModule(oldImplementation common.Address, newImplementation common.Address, oldSelectors [][4]byte, newSelectors [][4]byte) []byte { + enc, err := registry.abi.Pack("updateModule", oldImplementation, newImplementation, oldSelectors, newSelectors) + if err != nil { + panic(err) + } + return enc +} + +// TryPackUpdateModule is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x06d1d2a1. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function updateModule(address oldImplementation, address newImplementation, bytes4[] oldSelectors, bytes4[] newSelectors) returns() +func (registry *Registry) TryPackUpdateModule(oldImplementation common.Address, newImplementation common.Address, oldSelectors [][4]byte, newSelectors [][4]byte) ([]byte, error) { + return registry.abi.Pack("updateModule", oldImplementation, newImplementation, oldSelectors, newSelectors) +} + +// PackValidateBurnAndResetNode is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xea0e7d3a. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function validateBurnAndResetNode(uint256 tokenId) returns() +func (registry *Registry) PackValidateBurnAndResetNode(tokenId *big.Int) []byte { + enc, err := registry.abi.Pack("validateBurnAndResetNode", tokenId) + if err != nil { + panic(err) + } + return enc +} + +// TryPackValidateBurnAndResetNode is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xea0e7d3a. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function validateBurnAndResetNode(uint256 tokenId) returns() +func (registry *Registry) TryPackValidateBurnAndResetNode(tokenId *big.Int) ([]byte, error) { + return registry.abi.Pack("validateBurnAndResetNode", tokenId) +} + +// PackValidateSdBurnAndResetNode is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x53c2aa33. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function validateSdBurnAndResetNode(uint256 tokenId) returns() +func (registry *Registry) PackValidateSdBurnAndResetNode(tokenId *big.Int) []byte { + enc, err := registry.abi.Pack("validateSdBurnAndResetNode", tokenId) + if err != nil { + panic(err) + } + return enc +} + +// TryPackValidateSdBurnAndResetNode is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x53c2aa33. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function validateSdBurnAndResetNode(uint256 tokenId) returns() +func (registry *Registry) TryPackValidateSdBurnAndResetNode(tokenId *big.Int) ([]byte, error) { + return registry.abi.Pack("validateSdBurnAndResetNode", tokenId) +} + +// PackVehicleIdToStorageNodeId is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x7a26a1ed. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function vehicleIdToStorageNodeId(uint256 vehicleId) view returns(uint256) +func (registry *Registry) PackVehicleIdToStorageNodeId(vehicleId *big.Int) []byte { + enc, err := registry.abi.Pack("vehicleIdToStorageNodeId", vehicleId) + if err != nil { + panic(err) + } + return enc +} + +// TryPackVehicleIdToStorageNodeId is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x7a26a1ed. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function vehicleIdToStorageNodeId(uint256 vehicleId) view returns(uint256) +func (registry *Registry) TryPackVehicleIdToStorageNodeId(vehicleId *big.Int) ([]byte, error) { + return registry.abi.Pack("vehicleIdToStorageNodeId", vehicleId) +} + +// UnpackVehicleIdToStorageNodeId is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0x7a26a1ed. +// +// Solidity: function vehicleIdToStorageNodeId(uint256 vehicleId) view returns(uint256) +func (registry *Registry) UnpackVehicleIdToStorageNodeId(data []byte) (*big.Int, error) { + out, err := registry.abi.Unpack("vehicleIdToStorageNodeId", data) + if err != nil { + return new(big.Int), err + } + out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int) + return out0, nil +} + +// RegistryAftermarketDeviceAddressReset represents a AftermarketDeviceAddressReset event raised by the Registry contract. +type RegistryAftermarketDeviceAddressReset struct { + ManufacturerId *big.Int + TokenId *big.Int + AftermarketDeviceAddress common.Address + Raw *types.Log // Blockchain specific contextual infos +} + +const RegistryAftermarketDeviceAddressResetEventName = "AftermarketDeviceAddressReset" + +// ContractEventName returns the user-defined event name. +func (RegistryAftermarketDeviceAddressReset) ContractEventName() string { + return RegistryAftermarketDeviceAddressResetEventName +} + +// UnpackAftermarketDeviceAddressResetEvent is the Go binding that unpacks the event data emitted +// by contract. +// +// Solidity: event AftermarketDeviceAddressReset(uint256 indexed manufacturerId, uint256 indexed tokenId, address indexed aftermarketDeviceAddress) +func (registry *Registry) UnpackAftermarketDeviceAddressResetEvent(log *types.Log) (*RegistryAftermarketDeviceAddressReset, error) { + event := "AftermarketDeviceAddressReset" + if len(log.Topics) == 0 || log.Topics[0] != registry.abi.Events[event].ID { + return nil, errors.New("event signature mismatch") + } + out := new(RegistryAftermarketDeviceAddressReset) + if len(log.Data) > 0 { + if err := registry.abi.UnpackIntoInterface(out, event, log.Data); err != nil { + return nil, err + } + } + var indexed abi.Arguments + for _, arg := range registry.abi.Events[event].Inputs { + if arg.Indexed { + indexed = append(indexed, arg) + } + } + if err := abi.ParseTopics(out, indexed, log.Topics[1:]); err != nil { + return nil, err + } + out.Raw = log + return out, nil +} + +// RegistryAftermarketDeviceAttributeAdded represents a AftermarketDeviceAttributeAdded event raised by the Registry contract. +type RegistryAftermarketDeviceAttributeAdded struct { + Attribute string + Raw *types.Log // Blockchain specific contextual infos +} + +const RegistryAftermarketDeviceAttributeAddedEventName = "AftermarketDeviceAttributeAdded" + +// ContractEventName returns the user-defined event name. +func (RegistryAftermarketDeviceAttributeAdded) ContractEventName() string { + return RegistryAftermarketDeviceAttributeAddedEventName +} + +// UnpackAftermarketDeviceAttributeAddedEvent is the Go binding that unpacks the event data emitted +// by contract. +// +// Solidity: event AftermarketDeviceAttributeAdded(string attribute) +func (registry *Registry) UnpackAftermarketDeviceAttributeAddedEvent(log *types.Log) (*RegistryAftermarketDeviceAttributeAdded, error) { + event := "AftermarketDeviceAttributeAdded" + if len(log.Topics) == 0 || log.Topics[0] != registry.abi.Events[event].ID { + return nil, errors.New("event signature mismatch") + } + out := new(RegistryAftermarketDeviceAttributeAdded) + if len(log.Data) > 0 { + if err := registry.abi.UnpackIntoInterface(out, event, log.Data); err != nil { + return nil, err + } + } + var indexed abi.Arguments + for _, arg := range registry.abi.Events[event].Inputs { + if arg.Indexed { + indexed = append(indexed, arg) + } + } + if err := abi.ParseTopics(out, indexed, log.Topics[1:]); err != nil { + return nil, err + } + out.Raw = log + return out, nil +} + +// RegistryAftermarketDeviceAttributeSet represents a AftermarketDeviceAttributeSet event raised by the Registry contract. +type RegistryAftermarketDeviceAttributeSet struct { + TokenId *big.Int + Attribute string + Info string + Raw *types.Log // Blockchain specific contextual infos +} + +const RegistryAftermarketDeviceAttributeSetEventName = "AftermarketDeviceAttributeSet" + +// ContractEventName returns the user-defined event name. +func (RegistryAftermarketDeviceAttributeSet) ContractEventName() string { + return RegistryAftermarketDeviceAttributeSetEventName +} + +// UnpackAftermarketDeviceAttributeSetEvent is the Go binding that unpacks the event data emitted +// by contract. +// +// Solidity: event AftermarketDeviceAttributeSet(uint256 tokenId, string attribute, string info) +func (registry *Registry) UnpackAftermarketDeviceAttributeSetEvent(log *types.Log) (*RegistryAftermarketDeviceAttributeSet, error) { + event := "AftermarketDeviceAttributeSet" + if len(log.Topics) == 0 || log.Topics[0] != registry.abi.Events[event].ID { + return nil, errors.New("event signature mismatch") + } + out := new(RegistryAftermarketDeviceAttributeSet) + if len(log.Data) > 0 { + if err := registry.abi.UnpackIntoInterface(out, event, log.Data); err != nil { + return nil, err + } + } + var indexed abi.Arguments + for _, arg := range registry.abi.Events[event].Inputs { + if arg.Indexed { + indexed = append(indexed, arg) + } + } + if err := abi.ParseTopics(out, indexed, log.Topics[1:]); err != nil { + return nil, err + } + out.Raw = log + return out, nil +} + +// RegistryAftermarketDeviceClaimed represents a AftermarketDeviceClaimed event raised by the Registry contract. +type RegistryAftermarketDeviceClaimed struct { + AftermarketDeviceNode *big.Int + Owner common.Address + Raw *types.Log // Blockchain specific contextual infos +} + +const RegistryAftermarketDeviceClaimedEventName = "AftermarketDeviceClaimed" + +// ContractEventName returns the user-defined event name. +func (RegistryAftermarketDeviceClaimed) ContractEventName() string { + return RegistryAftermarketDeviceClaimedEventName +} + +// UnpackAftermarketDeviceClaimedEvent is the Go binding that unpacks the event data emitted +// by contract. +// +// Solidity: event AftermarketDeviceClaimed(uint256 aftermarketDeviceNode, address indexed owner) +func (registry *Registry) UnpackAftermarketDeviceClaimedEvent(log *types.Log) (*RegistryAftermarketDeviceClaimed, error) { + event := "AftermarketDeviceClaimed" + if len(log.Topics) == 0 || log.Topics[0] != registry.abi.Events[event].ID { + return nil, errors.New("event signature mismatch") + } + out := new(RegistryAftermarketDeviceClaimed) + if len(log.Data) > 0 { + if err := registry.abi.UnpackIntoInterface(out, event, log.Data); err != nil { + return nil, err + } + } + var indexed abi.Arguments + for _, arg := range registry.abi.Events[event].Inputs { + if arg.Indexed { + indexed = append(indexed, arg) + } + } + if err := abi.ParseTopics(out, indexed, log.Topics[1:]); err != nil { + return nil, err + } + out.Raw = log + return out, nil +} + +// RegistryAftermarketDeviceIdProxySet represents a AftermarketDeviceIdProxySet event raised by the Registry contract. +type RegistryAftermarketDeviceIdProxySet struct { + Proxy common.Address + Raw *types.Log // Blockchain specific contextual infos +} + +const RegistryAftermarketDeviceIdProxySetEventName = "AftermarketDeviceIdProxySet" + +// ContractEventName returns the user-defined event name. +func (RegistryAftermarketDeviceIdProxySet) ContractEventName() string { + return RegistryAftermarketDeviceIdProxySetEventName +} + +// UnpackAftermarketDeviceIdProxySetEvent is the Go binding that unpacks the event data emitted +// by contract. +// +// Solidity: event AftermarketDeviceIdProxySet(address indexed proxy) +func (registry *Registry) UnpackAftermarketDeviceIdProxySetEvent(log *types.Log) (*RegistryAftermarketDeviceIdProxySet, error) { + event := "AftermarketDeviceIdProxySet" + if len(log.Topics) == 0 || log.Topics[0] != registry.abi.Events[event].ID { + return nil, errors.New("event signature mismatch") + } + out := new(RegistryAftermarketDeviceIdProxySet) + if len(log.Data) > 0 { + if err := registry.abi.UnpackIntoInterface(out, event, log.Data); err != nil { + return nil, err + } + } + var indexed abi.Arguments + for _, arg := range registry.abi.Events[event].Inputs { + if arg.Indexed { + indexed = append(indexed, arg) + } + } + if err := abi.ParseTopics(out, indexed, log.Topics[1:]); err != nil { + return nil, err + } + out.Raw = log + return out, nil +} + +// RegistryAftermarketDeviceNodeBurned represents a AftermarketDeviceNodeBurned event raised by the Registry contract. +type RegistryAftermarketDeviceNodeBurned struct { + TokenId *big.Int + Owner common.Address + Raw *types.Log // Blockchain specific contextual infos +} + +const RegistryAftermarketDeviceNodeBurnedEventName = "AftermarketDeviceNodeBurned" + +// ContractEventName returns the user-defined event name. +func (RegistryAftermarketDeviceNodeBurned) ContractEventName() string { + return RegistryAftermarketDeviceNodeBurnedEventName +} + +// UnpackAftermarketDeviceNodeBurnedEvent is the Go binding that unpacks the event data emitted +// by contract. +// +// Solidity: event AftermarketDeviceNodeBurned(uint256 indexed tokenId, address indexed owner) +func (registry *Registry) UnpackAftermarketDeviceNodeBurnedEvent(log *types.Log) (*RegistryAftermarketDeviceNodeBurned, error) { + event := "AftermarketDeviceNodeBurned" + if len(log.Topics) == 0 || log.Topics[0] != registry.abi.Events[event].ID { + return nil, errors.New("event signature mismatch") + } + out := new(RegistryAftermarketDeviceNodeBurned) + if len(log.Data) > 0 { + if err := registry.abi.UnpackIntoInterface(out, event, log.Data); err != nil { + return nil, err + } + } + var indexed abi.Arguments + for _, arg := range registry.abi.Events[event].Inputs { + if arg.Indexed { + indexed = append(indexed, arg) + } + } + if err := abi.ParseTopics(out, indexed, log.Topics[1:]); err != nil { + return nil, err + } + out.Raw = log + return out, nil +} + +// RegistryAftermarketDeviceNodeMinted represents a AftermarketDeviceNodeMinted event raised by the Registry contract. +type RegistryAftermarketDeviceNodeMinted struct { + ManufacturerId *big.Int + TokenId *big.Int + AftermarketDeviceAddress common.Address + Owner common.Address + Raw *types.Log // Blockchain specific contextual infos +} + +const RegistryAftermarketDeviceNodeMintedEventName = "AftermarketDeviceNodeMinted" + +// ContractEventName returns the user-defined event name. +func (RegistryAftermarketDeviceNodeMinted) ContractEventName() string { + return RegistryAftermarketDeviceNodeMintedEventName +} + +// UnpackAftermarketDeviceNodeMintedEvent is the Go binding that unpacks the event data emitted +// by contract. +// +// Solidity: event AftermarketDeviceNodeMinted(uint256 indexed manufacturerId, uint256 tokenId, address indexed aftermarketDeviceAddress, address indexed owner) +func (registry *Registry) UnpackAftermarketDeviceNodeMintedEvent(log *types.Log) (*RegistryAftermarketDeviceNodeMinted, error) { + event := "AftermarketDeviceNodeMinted" + if len(log.Topics) == 0 || log.Topics[0] != registry.abi.Events[event].ID { + return nil, errors.New("event signature mismatch") + } + out := new(RegistryAftermarketDeviceNodeMinted) + if len(log.Data) > 0 { + if err := registry.abi.UnpackIntoInterface(out, event, log.Data); err != nil { + return nil, err + } + } + var indexed abi.Arguments + for _, arg := range registry.abi.Events[event].Inputs { + if arg.Indexed { + indexed = append(indexed, arg) + } + } + if err := abi.ParseTopics(out, indexed, log.Topics[1:]); err != nil { + return nil, err + } + out.Raw = log + return out, nil +} + +// RegistryAftermarketDevicePaired represents a AftermarketDevicePaired event raised by the Registry contract. +type RegistryAftermarketDevicePaired struct { + AftermarketDeviceNode *big.Int + VehicleNode *big.Int + Owner common.Address + Raw *types.Log // Blockchain specific contextual infos +} + +const RegistryAftermarketDevicePairedEventName = "AftermarketDevicePaired" + +// ContractEventName returns the user-defined event name. +func (RegistryAftermarketDevicePaired) ContractEventName() string { + return RegistryAftermarketDevicePairedEventName +} + +// UnpackAftermarketDevicePairedEvent is the Go binding that unpacks the event data emitted +// by contract. +// +// Solidity: event AftermarketDevicePaired(uint256 aftermarketDeviceNode, uint256 vehicleNode, address indexed owner) +func (registry *Registry) UnpackAftermarketDevicePairedEvent(log *types.Log) (*RegistryAftermarketDevicePaired, error) { + event := "AftermarketDevicePaired" + if len(log.Topics) == 0 || log.Topics[0] != registry.abi.Events[event].ID { + return nil, errors.New("event signature mismatch") + } + out := new(RegistryAftermarketDevicePaired) + if len(log.Data) > 0 { + if err := registry.abi.UnpackIntoInterface(out, event, log.Data); err != nil { + return nil, err + } + } + var indexed abi.Arguments + for _, arg := range registry.abi.Events[event].Inputs { + if arg.Indexed { + indexed = append(indexed, arg) + } + } + if err := abi.ParseTopics(out, indexed, log.Topics[1:]); err != nil { + return nil, err + } + out.Raw = log + return out, nil +} + +// RegistryAftermarketDeviceTransferred represents a AftermarketDeviceTransferred event raised by the Registry contract. +type RegistryAftermarketDeviceTransferred struct { + AftermarketDeviceNode *big.Int + OldOwner common.Address + NewOwner common.Address + Raw *types.Log // Blockchain specific contextual infos +} + +const RegistryAftermarketDeviceTransferredEventName = "AftermarketDeviceTransferred" + +// ContractEventName returns the user-defined event name. +func (RegistryAftermarketDeviceTransferred) ContractEventName() string { + return RegistryAftermarketDeviceTransferredEventName +} + +// UnpackAftermarketDeviceTransferredEvent is the Go binding that unpacks the event data emitted +// by contract. +// +// Solidity: event AftermarketDeviceTransferred(uint256 indexed aftermarketDeviceNode, address indexed oldOwner, address indexed newOwner) +func (registry *Registry) UnpackAftermarketDeviceTransferredEvent(log *types.Log) (*RegistryAftermarketDeviceTransferred, error) { + event := "AftermarketDeviceTransferred" + if len(log.Topics) == 0 || log.Topics[0] != registry.abi.Events[event].ID { + return nil, errors.New("event signature mismatch") + } + out := new(RegistryAftermarketDeviceTransferred) + if len(log.Data) > 0 { + if err := registry.abi.UnpackIntoInterface(out, event, log.Data); err != nil { + return nil, err + } + } + var indexed abi.Arguments + for _, arg := range registry.abi.Events[event].Inputs { + if arg.Indexed { + indexed = append(indexed, arg) + } + } + if err := abi.ParseTopics(out, indexed, log.Topics[1:]); err != nil { + return nil, err + } + out.Raw = log + return out, nil +} + +// RegistryAftermarketDeviceUnclaimed represents a AftermarketDeviceUnclaimed event raised by the Registry contract. +type RegistryAftermarketDeviceUnclaimed struct { + AftermarketDeviceNode *big.Int + Raw *types.Log // Blockchain specific contextual infos +} + +const RegistryAftermarketDeviceUnclaimedEventName = "AftermarketDeviceUnclaimed" + +// ContractEventName returns the user-defined event name. +func (RegistryAftermarketDeviceUnclaimed) ContractEventName() string { + return RegistryAftermarketDeviceUnclaimedEventName +} + +// UnpackAftermarketDeviceUnclaimedEvent is the Go binding that unpacks the event data emitted +// by contract. +// +// Solidity: event AftermarketDeviceUnclaimed(uint256 indexed aftermarketDeviceNode) +func (registry *Registry) UnpackAftermarketDeviceUnclaimedEvent(log *types.Log) (*RegistryAftermarketDeviceUnclaimed, error) { + event := "AftermarketDeviceUnclaimed" + if len(log.Topics) == 0 || log.Topics[0] != registry.abi.Events[event].ID { + return nil, errors.New("event signature mismatch") + } + out := new(RegistryAftermarketDeviceUnclaimed) + if len(log.Data) > 0 { + if err := registry.abi.UnpackIntoInterface(out, event, log.Data); err != nil { + return nil, err + } + } + var indexed abi.Arguments + for _, arg := range registry.abi.Events[event].Inputs { + if arg.Indexed { + indexed = append(indexed, arg) + } + } + if err := abi.ParseTopics(out, indexed, log.Topics[1:]); err != nil { + return nil, err + } + out.Raw = log + return out, nil +} + +// RegistryAftermarketDeviceUnclaimed0 represents a AftermarketDeviceUnclaimed0 event raised by the Registry contract. +type RegistryAftermarketDeviceUnclaimed0 struct { + AftermarketDeviceNode *big.Int + Owner common.Address + Raw *types.Log // Blockchain specific contextual infos +} + +const RegistryAftermarketDeviceUnclaimed0EventName = "AftermarketDeviceUnclaimed0" + +// ContractEventName returns the user-defined event name. +func (RegistryAftermarketDeviceUnclaimed0) ContractEventName() string { + return RegistryAftermarketDeviceUnclaimed0EventName +} + +// UnpackAftermarketDeviceUnclaimed0Event is the Go binding that unpacks the event data emitted +// by contract. +// +// Solidity: event AftermarketDeviceUnclaimed(uint256 indexed aftermarketDeviceNode, address indexed owner) +func (registry *Registry) UnpackAftermarketDeviceUnclaimed0Event(log *types.Log) (*RegistryAftermarketDeviceUnclaimed0, error) { + event := "AftermarketDeviceUnclaimed0" + if len(log.Topics) == 0 || log.Topics[0] != registry.abi.Events[event].ID { + return nil, errors.New("event signature mismatch") + } + out := new(RegistryAftermarketDeviceUnclaimed0) + if len(log.Data) > 0 { + if err := registry.abi.UnpackIntoInterface(out, event, log.Data); err != nil { + return nil, err + } + } + var indexed abi.Arguments + for _, arg := range registry.abi.Events[event].Inputs { + if arg.Indexed { + indexed = append(indexed, arg) + } + } + if err := abi.ParseTopics(out, indexed, log.Topics[1:]); err != nil { + return nil, err + } + out.Raw = log + return out, nil +} + +// RegistryAftermarketDeviceUnpaired represents a AftermarketDeviceUnpaired event raised by the Registry contract. +type RegistryAftermarketDeviceUnpaired struct { + AftermarketDeviceNode *big.Int + VehicleNode *big.Int + Owner common.Address + Raw *types.Log // Blockchain specific contextual infos +} + +const RegistryAftermarketDeviceUnpairedEventName = "AftermarketDeviceUnpaired" + +// ContractEventName returns the user-defined event name. +func (RegistryAftermarketDeviceUnpaired) ContractEventName() string { + return RegistryAftermarketDeviceUnpairedEventName +} + +// UnpackAftermarketDeviceUnpairedEvent is the Go binding that unpacks the event data emitted +// by contract. +// +// Solidity: event AftermarketDeviceUnpaired(uint256 aftermarketDeviceNode, uint256 vehicleNode, address indexed owner) +func (registry *Registry) UnpackAftermarketDeviceUnpairedEvent(log *types.Log) (*RegistryAftermarketDeviceUnpaired, error) { + event := "AftermarketDeviceUnpaired" + if len(log.Topics) == 0 || log.Topics[0] != registry.abi.Events[event].ID { + return nil, errors.New("event signature mismatch") + } + out := new(RegistryAftermarketDeviceUnpaired) + if len(log.Data) > 0 { + if err := registry.abi.UnpackIntoInterface(out, event, log.Data); err != nil { + return nil, err + } + } + var indexed abi.Arguments + for _, arg := range registry.abi.Events[event].Inputs { + if arg.Indexed { + indexed = append(indexed, arg) + } + } + if err := abi.ParseTopics(out, indexed, log.Topics[1:]); err != nil { + return nil, err + } + out.Raw = log + return out, nil +} + +// RegistryBeneficiarySet represents a BeneficiarySet event raised by the Registry contract. +type RegistryBeneficiarySet struct { + IdProxyAddress common.Address + NodeId *big.Int + Beneficiary common.Address + Raw *types.Log // Blockchain specific contextual infos +} + +const RegistryBeneficiarySetEventName = "BeneficiarySet" + +// ContractEventName returns the user-defined event name. +func (RegistryBeneficiarySet) ContractEventName() string { + return RegistryBeneficiarySetEventName +} + +// UnpackBeneficiarySetEvent is the Go binding that unpacks the event data emitted +// by contract. +// +// Solidity: event BeneficiarySet(address indexed idProxyAddress, uint256 indexed nodeId, address indexed beneficiary) +func (registry *Registry) UnpackBeneficiarySetEvent(log *types.Log) (*RegistryBeneficiarySet, error) { + event := "BeneficiarySet" + if len(log.Topics) == 0 || log.Topics[0] != registry.abi.Events[event].ID { + return nil, errors.New("event signature mismatch") + } + out := new(RegistryBeneficiarySet) + if len(log.Data) > 0 { + if err := registry.abi.UnpackIntoInterface(out, event, log.Data); err != nil { + return nil, err + } + } + var indexed abi.Arguments + for _, arg := range registry.abi.Events[event].Inputs { + if arg.Indexed { + indexed = append(indexed, arg) + } + } + if err := abi.ParseTopics(out, indexed, log.Topics[1:]); err != nil { + return nil, err + } + out.Raw = log + return out, nil +} + +// RegistryConnectionsManagerSet represents a ConnectionsManagerSet event raised by the Registry contract. +type RegistryConnectionsManagerSet struct { + ConnectionsManager common.Address + Raw *types.Log // Blockchain specific contextual infos +} + +const RegistryConnectionsManagerSetEventName = "ConnectionsManagerSet" + +// ContractEventName returns the user-defined event name. +func (RegistryConnectionsManagerSet) ContractEventName() string { + return RegistryConnectionsManagerSetEventName +} + +// UnpackConnectionsManagerSetEvent is the Go binding that unpacks the event data emitted +// by contract. +// +// Solidity: event ConnectionsManagerSet(address indexed connectionsManager) +func (registry *Registry) UnpackConnectionsManagerSetEvent(log *types.Log) (*RegistryConnectionsManagerSet, error) { + event := "ConnectionsManagerSet" + if len(log.Topics) == 0 || log.Topics[0] != registry.abi.Events[event].ID { + return nil, errors.New("event signature mismatch") + } + out := new(RegistryConnectionsManagerSet) + if len(log.Data) > 0 { + if err := registry.abi.UnpackIntoInterface(out, event, log.Data); err != nil { + return nil, err + } + } + var indexed abi.Arguments + for _, arg := range registry.abi.Events[event].Inputs { + if arg.Indexed { + indexed = append(indexed, arg) + } + } + if err := abi.ParseTopics(out, indexed, log.Topics[1:]); err != nil { + return nil, err + } + out.Raw = log + return out, nil +} + +// RegistryControllerSet represents a ControllerSet event raised by the Registry contract. +type RegistryControllerSet struct { + Controller common.Address + Raw *types.Log // Blockchain specific contextual infos +} + +const RegistryControllerSetEventName = "ControllerSet" + +// ContractEventName returns the user-defined event name. +func (RegistryControllerSet) ContractEventName() string { + return RegistryControllerSetEventName +} + +// UnpackControllerSetEvent is the Go binding that unpacks the event data emitted +// by contract. +// +// Solidity: event ControllerSet(address indexed controller) +func (registry *Registry) UnpackControllerSetEvent(log *types.Log) (*RegistryControllerSet, error) { + event := "ControllerSet" + if len(log.Topics) == 0 || log.Topics[0] != registry.abi.Events[event].ID { + return nil, errors.New("event signature mismatch") + } + out := new(RegistryControllerSet) + if len(log.Data) > 0 { + if err := registry.abi.UnpackIntoInterface(out, event, log.Data); err != nil { + return nil, err + } + } + var indexed abi.Arguments + for _, arg := range registry.abi.Events[event].Inputs { + if arg.Indexed { + indexed = append(indexed, arg) + } + } + if err := abi.ParseTopics(out, indexed, log.Topics[1:]); err != nil { + return nil, err + } + out.Raw = log + return out, nil +} + +// RegistryDeviceDefinitionDeleted represents a DeviceDefinitionDeleted event raised by the Registry contract. +type RegistryDeviceDefinitionDeleted struct { + TableId *big.Int + Id string + Raw *types.Log // Blockchain specific contextual infos +} + +const RegistryDeviceDefinitionDeletedEventName = "DeviceDefinitionDeleted" + +// ContractEventName returns the user-defined event name. +func (RegistryDeviceDefinitionDeleted) ContractEventName() string { + return RegistryDeviceDefinitionDeletedEventName +} + +// UnpackDeviceDefinitionDeletedEvent is the Go binding that unpacks the event data emitted +// by contract. +// +// Solidity: event DeviceDefinitionDeleted(uint256 indexed tableId, string id) +func (registry *Registry) UnpackDeviceDefinitionDeletedEvent(log *types.Log) (*RegistryDeviceDefinitionDeleted, error) { + event := "DeviceDefinitionDeleted" + if len(log.Topics) == 0 || log.Topics[0] != registry.abi.Events[event].ID { + return nil, errors.New("event signature mismatch") + } + out := new(RegistryDeviceDefinitionDeleted) + if len(log.Data) > 0 { + if err := registry.abi.UnpackIntoInterface(out, event, log.Data); err != nil { + return nil, err + } + } + var indexed abi.Arguments + for _, arg := range registry.abi.Events[event].Inputs { + if arg.Indexed { + indexed = append(indexed, arg) + } + } + if err := abi.ParseTopics(out, indexed, log.Topics[1:]); err != nil { + return nil, err + } + out.Raw = log + return out, nil +} + +// RegistryDeviceDefinitionIdSet represents a DeviceDefinitionIdSet event raised by the Registry contract. +type RegistryDeviceDefinitionIdSet struct { + VehicleId *big.Int + DdId string + Raw *types.Log // Blockchain specific contextual infos +} + +const RegistryDeviceDefinitionIdSetEventName = "DeviceDefinitionIdSet" + +// ContractEventName returns the user-defined event name. +func (RegistryDeviceDefinitionIdSet) ContractEventName() string { + return RegistryDeviceDefinitionIdSetEventName +} + +// UnpackDeviceDefinitionIdSetEvent is the Go binding that unpacks the event data emitted +// by contract. +// +// Solidity: event DeviceDefinitionIdSet(uint256 indexed vehicleId, string ddId) +func (registry *Registry) UnpackDeviceDefinitionIdSetEvent(log *types.Log) (*RegistryDeviceDefinitionIdSet, error) { + event := "DeviceDefinitionIdSet" + if len(log.Topics) == 0 || log.Topics[0] != registry.abi.Events[event].ID { + return nil, errors.New("event signature mismatch") + } + out := new(RegistryDeviceDefinitionIdSet) + if len(log.Data) > 0 { + if err := registry.abi.UnpackIntoInterface(out, event, log.Data); err != nil { + return nil, err + } + } + var indexed abi.Arguments + for _, arg := range registry.abi.Events[event].Inputs { + if arg.Indexed { + indexed = append(indexed, arg) + } + } + if err := abi.ParseTopics(out, indexed, log.Topics[1:]); err != nil { + return nil, err + } + out.Raw = log + return out, nil +} + +// RegistryDeviceDefinitionInserted represents a DeviceDefinitionInserted event raised by the Registry contract. +type RegistryDeviceDefinitionInserted struct { + TableId *big.Int + Id string + Model string + Year *big.Int + Raw *types.Log // Blockchain specific contextual infos +} + +const RegistryDeviceDefinitionInsertedEventName = "DeviceDefinitionInserted" + +// ContractEventName returns the user-defined event name. +func (RegistryDeviceDefinitionInserted) ContractEventName() string { + return RegistryDeviceDefinitionInsertedEventName +} + +// UnpackDeviceDefinitionInsertedEvent is the Go binding that unpacks the event data emitted +// by contract. +// +// Solidity: event DeviceDefinitionInserted(uint256 indexed tableId, string id, string model, uint256 year) +func (registry *Registry) UnpackDeviceDefinitionInsertedEvent(log *types.Log) (*RegistryDeviceDefinitionInserted, error) { + event := "DeviceDefinitionInserted" + if len(log.Topics) == 0 || log.Topics[0] != registry.abi.Events[event].ID { + return nil, errors.New("event signature mismatch") + } + out := new(RegistryDeviceDefinitionInserted) + if len(log.Data) > 0 { + if err := registry.abi.UnpackIntoInterface(out, event, log.Data); err != nil { + return nil, err + } + } + var indexed abi.Arguments + for _, arg := range registry.abi.Events[event].Inputs { + if arg.Indexed { + indexed = append(indexed, arg) + } + } + if err := abi.ParseTopics(out, indexed, log.Topics[1:]); err != nil { + return nil, err + } + out.Raw = log + return out, nil +} + +// RegistryDeviceDefinitionTableCreated represents a DeviceDefinitionTableCreated event raised by the Registry contract. +type RegistryDeviceDefinitionTableCreated struct { + TableOwner common.Address + ManufacturerId *big.Int + TableId *big.Int + Raw *types.Log // Blockchain specific contextual infos +} + +const RegistryDeviceDefinitionTableCreatedEventName = "DeviceDefinitionTableCreated" + +// ContractEventName returns the user-defined event name. +func (RegistryDeviceDefinitionTableCreated) ContractEventName() string { + return RegistryDeviceDefinitionTableCreatedEventName +} + +// UnpackDeviceDefinitionTableCreatedEvent is the Go binding that unpacks the event data emitted +// by contract. +// +// Solidity: event DeviceDefinitionTableCreated(address indexed tableOwner, uint256 indexed manufacturerId, uint256 indexed tableId) +func (registry *Registry) UnpackDeviceDefinitionTableCreatedEvent(log *types.Log) (*RegistryDeviceDefinitionTableCreated, error) { + event := "DeviceDefinitionTableCreated" + if len(log.Topics) == 0 || log.Topics[0] != registry.abi.Events[event].ID { + return nil, errors.New("event signature mismatch") + } + out := new(RegistryDeviceDefinitionTableCreated) + if len(log.Data) > 0 { + if err := registry.abi.UnpackIntoInterface(out, event, log.Data); err != nil { + return nil, err + } + } + var indexed abi.Arguments + for _, arg := range registry.abi.Events[event].Inputs { + if arg.Indexed { + indexed = append(indexed, arg) + } + } + if err := abi.ParseTopics(out, indexed, log.Topics[1:]); err != nil { + return nil, err + } + out.Raw = log + return out, nil +} + +// RegistryDeviceDefinitionUpdated represents a DeviceDefinitionUpdated event raised by the Registry contract. +type RegistryDeviceDefinitionUpdated struct { + TableId *big.Int + Id string + Raw *types.Log // Blockchain specific contextual infos +} + +const RegistryDeviceDefinitionUpdatedEventName = "DeviceDefinitionUpdated" + +// ContractEventName returns the user-defined event name. +func (RegistryDeviceDefinitionUpdated) ContractEventName() string { + return RegistryDeviceDefinitionUpdatedEventName +} + +// UnpackDeviceDefinitionUpdatedEvent is the Go binding that unpacks the event data emitted +// by contract. +// +// Solidity: event DeviceDefinitionUpdated(uint256 indexed tableId, string id) +func (registry *Registry) UnpackDeviceDefinitionUpdatedEvent(log *types.Log) (*RegistryDeviceDefinitionUpdated, error) { + event := "DeviceDefinitionUpdated" + if len(log.Topics) == 0 || log.Topics[0] != registry.abi.Events[event].ID { + return nil, errors.New("event signature mismatch") + } + out := new(RegistryDeviceDefinitionUpdated) + if len(log.Data) > 0 { + if err := registry.abi.UnpackIntoInterface(out, event, log.Data); err != nil { + return nil, err + } + } + var indexed abi.Arguments + for _, arg := range registry.abi.Events[event].Inputs { + if arg.Indexed { + indexed = append(indexed, arg) + } + } + if err := abi.ParseTopics(out, indexed, log.Topics[1:]); err != nil { + return nil, err + } + out.Raw = log + return out, nil +} + +// RegistryDimoCreditSet represents a DimoCreditSet event raised by the Registry contract. +type RegistryDimoCreditSet struct { + DimoCredit common.Address + Raw *types.Log // Blockchain specific contextual infos +} + +const RegistryDimoCreditSetEventName = "DimoCreditSet" + +// ContractEventName returns the user-defined event name. +func (RegistryDimoCreditSet) ContractEventName() string { + return RegistryDimoCreditSetEventName +} + +// UnpackDimoCreditSetEvent is the Go binding that unpacks the event data emitted +// by contract. +// +// Solidity: event DimoCreditSet(address indexed dimoCredit) +func (registry *Registry) UnpackDimoCreditSetEvent(log *types.Log) (*RegistryDimoCreditSet, error) { + event := "DimoCreditSet" + if len(log.Topics) == 0 || log.Topics[0] != registry.abi.Events[event].ID { + return nil, errors.New("event signature mismatch") + } + out := new(RegistryDimoCreditSet) + if len(log.Data) > 0 { + if err := registry.abi.UnpackIntoInterface(out, event, log.Data); err != nil { + return nil, err + } + } + var indexed abi.Arguments + for _, arg := range registry.abi.Events[event].Inputs { + if arg.Indexed { + indexed = append(indexed, arg) + } + } + if err := abi.ParseTopics(out, indexed, log.Topics[1:]); err != nil { + return nil, err + } + out.Raw = log + return out, nil +} + +// RegistryDimoStreamrEnsSet represents a DimoStreamrEnsSet event raised by the Registry contract. +type RegistryDimoStreamrEnsSet struct { + DimoStreamrEns string + Raw *types.Log // Blockchain specific contextual infos +} + +const RegistryDimoStreamrEnsSetEventName = "DimoStreamrEnsSet" + +// ContractEventName returns the user-defined event name. +func (RegistryDimoStreamrEnsSet) ContractEventName() string { + return RegistryDimoStreamrEnsSetEventName +} + +// UnpackDimoStreamrEnsSetEvent is the Go binding that unpacks the event data emitted +// by contract. +// +// Solidity: event DimoStreamrEnsSet(string dimoStreamrEns) +func (registry *Registry) UnpackDimoStreamrEnsSetEvent(log *types.Log) (*RegistryDimoStreamrEnsSet, error) { + event := "DimoStreamrEnsSet" + if len(log.Topics) == 0 || log.Topics[0] != registry.abi.Events[event].ID { + return nil, errors.New("event signature mismatch") + } + out := new(RegistryDimoStreamrEnsSet) + if len(log.Data) > 0 { + if err := registry.abi.UnpackIntoInterface(out, event, log.Data); err != nil { + return nil, err + } + } + var indexed abi.Arguments + for _, arg := range registry.abi.Events[event].Inputs { + if arg.Indexed { + indexed = append(indexed, arg) + } + } + if err := abi.ParseTopics(out, indexed, log.Topics[1:]); err != nil { + return nil, err + } + out.Raw = log + return out, nil +} + +// RegistryDimoStreamrNodeSet represents a DimoStreamrNodeSet event raised by the Registry contract. +type RegistryDimoStreamrNodeSet struct { + DimoStreamrNode common.Address + Raw *types.Log // Blockchain specific contextual infos +} + +const RegistryDimoStreamrNodeSetEventName = "DimoStreamrNodeSet" + +// ContractEventName returns the user-defined event name. +func (RegistryDimoStreamrNodeSet) ContractEventName() string { + return RegistryDimoStreamrNodeSetEventName +} + +// UnpackDimoStreamrNodeSetEvent is the Go binding that unpacks the event data emitted +// by contract. +// +// Solidity: event DimoStreamrNodeSet(address dimoStreamrNode) +func (registry *Registry) UnpackDimoStreamrNodeSetEvent(log *types.Log) (*RegistryDimoStreamrNodeSet, error) { + event := "DimoStreamrNodeSet" + if len(log.Topics) == 0 || log.Topics[0] != registry.abi.Events[event].ID { + return nil, errors.New("event signature mismatch") + } + out := new(RegistryDimoStreamrNodeSet) + if len(log.Data) > 0 { + if err := registry.abi.UnpackIntoInterface(out, event, log.Data); err != nil { + return nil, err + } + } + var indexed abi.Arguments + for _, arg := range registry.abi.Events[event].Inputs { + if arg.Indexed { + indexed = append(indexed, arg) + } + } + if err := abi.ParseTopics(out, indexed, log.Topics[1:]); err != nil { + return nil, err + } + out.Raw = log + return out, nil +} + +// RegistryDimoTokenSet represents a DimoTokenSet event raised by the Registry contract. +type RegistryDimoTokenSet struct { + DimoToken common.Address + Raw *types.Log // Blockchain specific contextual infos +} + +const RegistryDimoTokenSetEventName = "DimoTokenSet" + +// ContractEventName returns the user-defined event name. +func (RegistryDimoTokenSet) ContractEventName() string { + return RegistryDimoTokenSetEventName +} + +// UnpackDimoTokenSetEvent is the Go binding that unpacks the event data emitted +// by contract. +// +// Solidity: event DimoTokenSet(address indexed dimoToken) +func (registry *Registry) UnpackDimoTokenSetEvent(log *types.Log) (*RegistryDimoTokenSet, error) { + event := "DimoTokenSet" + if len(log.Topics) == 0 || log.Topics[0] != registry.abi.Events[event].ID { + return nil, errors.New("event signature mismatch") + } + out := new(RegistryDimoTokenSet) + if len(log.Data) > 0 { + if err := registry.abi.UnpackIntoInterface(out, event, log.Data); err != nil { + return nil, err + } + } + var indexed abi.Arguments + for _, arg := range registry.abi.Events[event].Inputs { + if arg.Indexed { + indexed = append(indexed, arg) + } + } + if err := abi.ParseTopics(out, indexed, log.Topics[1:]); err != nil { + return nil, err + } + out.Raw = log + return out, nil +} + +// RegistryFoundationSet represents a FoundationSet event raised by the Registry contract. +type RegistryFoundationSet struct { + Foundation common.Address + Raw *types.Log // Blockchain specific contextual infos +} + +const RegistryFoundationSetEventName = "FoundationSet" + +// ContractEventName returns the user-defined event name. +func (RegistryFoundationSet) ContractEventName() string { + return RegistryFoundationSetEventName +} + +// UnpackFoundationSetEvent is the Go binding that unpacks the event data emitted +// by contract. +// +// Solidity: event FoundationSet(address indexed foundation) +func (registry *Registry) UnpackFoundationSetEvent(log *types.Log) (*RegistryFoundationSet, error) { + event := "FoundationSet" + if len(log.Topics) == 0 || log.Topics[0] != registry.abi.Events[event].ID { + return nil, errors.New("event signature mismatch") + } + out := new(RegistryFoundationSet) + if len(log.Data) > 0 { + if err := registry.abi.UnpackIntoInterface(out, event, log.Data); err != nil { + return nil, err + } + } + var indexed abi.Arguments + for _, arg := range registry.abi.Events[event].Inputs { + if arg.Indexed { + indexed = append(indexed, arg) + } + } + if err := abi.ParseTopics(out, indexed, log.Topics[1:]); err != nil { + return nil, err + } + out.Raw = log + return out, nil +} + +// RegistryManufacturerAttributeAdded represents a ManufacturerAttributeAdded event raised by the Registry contract. +type RegistryManufacturerAttributeAdded struct { + Attribute string + Raw *types.Log // Blockchain specific contextual infos +} + +const RegistryManufacturerAttributeAddedEventName = "ManufacturerAttributeAdded" + +// ContractEventName returns the user-defined event name. +func (RegistryManufacturerAttributeAdded) ContractEventName() string { + return RegistryManufacturerAttributeAddedEventName +} + +// UnpackManufacturerAttributeAddedEvent is the Go binding that unpacks the event data emitted +// by contract. +// +// Solidity: event ManufacturerAttributeAdded(string attribute) +func (registry *Registry) UnpackManufacturerAttributeAddedEvent(log *types.Log) (*RegistryManufacturerAttributeAdded, error) { + event := "ManufacturerAttributeAdded" + if len(log.Topics) == 0 || log.Topics[0] != registry.abi.Events[event].ID { + return nil, errors.New("event signature mismatch") + } + out := new(RegistryManufacturerAttributeAdded) + if len(log.Data) > 0 { + if err := registry.abi.UnpackIntoInterface(out, event, log.Data); err != nil { + return nil, err + } + } + var indexed abi.Arguments + for _, arg := range registry.abi.Events[event].Inputs { + if arg.Indexed { + indexed = append(indexed, arg) + } + } + if err := abi.ParseTopics(out, indexed, log.Topics[1:]); err != nil { + return nil, err + } + out.Raw = log + return out, nil +} + +// RegistryManufacturerAttributeSet represents a ManufacturerAttributeSet event raised by the Registry contract. +type RegistryManufacturerAttributeSet struct { + TokenId *big.Int + Attribute string + Info string + Raw *types.Log // Blockchain specific contextual infos +} + +const RegistryManufacturerAttributeSetEventName = "ManufacturerAttributeSet" + +// ContractEventName returns the user-defined event name. +func (RegistryManufacturerAttributeSet) ContractEventName() string { + return RegistryManufacturerAttributeSetEventName +} + +// UnpackManufacturerAttributeSetEvent is the Go binding that unpacks the event data emitted +// by contract. +// +// Solidity: event ManufacturerAttributeSet(uint256 tokenId, string attribute, string info) +func (registry *Registry) UnpackManufacturerAttributeSetEvent(log *types.Log) (*RegistryManufacturerAttributeSet, error) { + event := "ManufacturerAttributeSet" + if len(log.Topics) == 0 || log.Topics[0] != registry.abi.Events[event].ID { + return nil, errors.New("event signature mismatch") + } + out := new(RegistryManufacturerAttributeSet) + if len(log.Data) > 0 { + if err := registry.abi.UnpackIntoInterface(out, event, log.Data); err != nil { + return nil, err + } + } + var indexed abi.Arguments + for _, arg := range registry.abi.Events[event].Inputs { + if arg.Indexed { + indexed = append(indexed, arg) + } + } + if err := abi.ParseTopics(out, indexed, log.Topics[1:]); err != nil { + return nil, err + } + out.Raw = log + return out, nil +} + +// RegistryManufacturerIdProxySet represents a ManufacturerIdProxySet event raised by the Registry contract. +type RegistryManufacturerIdProxySet struct { + Proxy common.Address + Raw *types.Log // Blockchain specific contextual infos +} + +const RegistryManufacturerIdProxySetEventName = "ManufacturerIdProxySet" + +// ContractEventName returns the user-defined event name. +func (RegistryManufacturerIdProxySet) ContractEventName() string { + return RegistryManufacturerIdProxySetEventName +} + +// UnpackManufacturerIdProxySetEvent is the Go binding that unpacks the event data emitted +// by contract. +// +// Solidity: event ManufacturerIdProxySet(address indexed proxy) +func (registry *Registry) UnpackManufacturerIdProxySetEvent(log *types.Log) (*RegistryManufacturerIdProxySet, error) { + event := "ManufacturerIdProxySet" + if len(log.Topics) == 0 || log.Topics[0] != registry.abi.Events[event].ID { + return nil, errors.New("event signature mismatch") + } + out := new(RegistryManufacturerIdProxySet) + if len(log.Data) > 0 { + if err := registry.abi.UnpackIntoInterface(out, event, log.Data); err != nil { + return nil, err + } + } + var indexed abi.Arguments + for _, arg := range registry.abi.Events[event].Inputs { + if arg.Indexed { + indexed = append(indexed, arg) + } + } + if err := abi.ParseTopics(out, indexed, log.Topics[1:]); err != nil { + return nil, err + } + out.Raw = log + return out, nil +} + +// RegistryManufacturerLicenseSet represents a ManufacturerLicenseSet event raised by the Registry contract. +type RegistryManufacturerLicenseSet struct { + ManufacturerLicense common.Address + Raw *types.Log // Blockchain specific contextual infos +} + +const RegistryManufacturerLicenseSetEventName = "ManufacturerLicenseSet" + +// ContractEventName returns the user-defined event name. +func (RegistryManufacturerLicenseSet) ContractEventName() string { + return RegistryManufacturerLicenseSetEventName +} + +// UnpackManufacturerLicenseSetEvent is the Go binding that unpacks the event data emitted +// by contract. +// +// Solidity: event ManufacturerLicenseSet(address indexed manufacturerLicense) +func (registry *Registry) UnpackManufacturerLicenseSetEvent(log *types.Log) (*RegistryManufacturerLicenseSet, error) { + event := "ManufacturerLicenseSet" + if len(log.Topics) == 0 || log.Topics[0] != registry.abi.Events[event].ID { + return nil, errors.New("event signature mismatch") + } + out := new(RegistryManufacturerLicenseSet) + if len(log.Data) > 0 { + if err := registry.abi.UnpackIntoInterface(out, event, log.Data); err != nil { + return nil, err + } + } + var indexed abi.Arguments + for _, arg := range registry.abi.Events[event].Inputs { + if arg.Indexed { + indexed = append(indexed, arg) + } + } + if err := abi.ParseTopics(out, indexed, log.Topics[1:]); err != nil { + return nil, err + } + out.Raw = log + return out, nil +} + +// RegistryManufacturerNodeMinted represents a ManufacturerNodeMinted event raised by the Registry contract. +type RegistryManufacturerNodeMinted struct { + Name string + TokenId *big.Int + Owner common.Address + Raw *types.Log // Blockchain specific contextual infos +} + +const RegistryManufacturerNodeMintedEventName = "ManufacturerNodeMinted" + +// ContractEventName returns the user-defined event name. +func (RegistryManufacturerNodeMinted) ContractEventName() string { + return RegistryManufacturerNodeMintedEventName +} + +// UnpackManufacturerNodeMintedEvent is the Go binding that unpacks the event data emitted +// by contract. +// +// Solidity: event ManufacturerNodeMinted(string name, uint256 tokenId, address indexed owner) +func (registry *Registry) UnpackManufacturerNodeMintedEvent(log *types.Log) (*RegistryManufacturerNodeMinted, error) { + event := "ManufacturerNodeMinted" + if len(log.Topics) == 0 || log.Topics[0] != registry.abi.Events[event].ID { + return nil, errors.New("event signature mismatch") + } + out := new(RegistryManufacturerNodeMinted) + if len(log.Data) > 0 { + if err := registry.abi.UnpackIntoInterface(out, event, log.Data); err != nil { + return nil, err + } + } + var indexed abi.Arguments + for _, arg := range registry.abi.Events[event].Inputs { + if arg.Indexed { + indexed = append(indexed, arg) + } + } + if err := abi.ParseTopics(out, indexed, log.Topics[1:]); err != nil { + return nil, err + } + out.Raw = log + return out, nil +} + +// RegistryManufacturerTableSet represents a ManufacturerTableSet event raised by the Registry contract. +type RegistryManufacturerTableSet struct { + ManufacturerId *big.Int + TableId *big.Int + Raw *types.Log // Blockchain specific contextual infos +} + +const RegistryManufacturerTableSetEventName = "ManufacturerTableSet" + +// ContractEventName returns the user-defined event name. +func (RegistryManufacturerTableSet) ContractEventName() string { + return RegistryManufacturerTableSetEventName +} + +// UnpackManufacturerTableSetEvent is the Go binding that unpacks the event data emitted +// by contract. +// +// Solidity: event ManufacturerTableSet(uint256 indexed manufacturerId, uint256 indexed tableId) +func (registry *Registry) UnpackManufacturerTableSetEvent(log *types.Log) (*RegistryManufacturerTableSet, error) { + event := "ManufacturerTableSet" + if len(log.Topics) == 0 || log.Topics[0] != registry.abi.Events[event].ID { + return nil, errors.New("event signature mismatch") + } + out := new(RegistryManufacturerTableSet) + if len(log.Data) > 0 { + if err := registry.abi.UnpackIntoInterface(out, event, log.Data); err != nil { + return nil, err + } + } + var indexed abi.Arguments + for _, arg := range registry.abi.Events[event].Inputs { + if arg.Indexed { + indexed = append(indexed, arg) + } + } + if err := abi.ParseTopics(out, indexed, log.Topics[1:]); err != nil { + return nil, err + } + out.Raw = log + return out, nil +} + +// RegistryModuleAdded represents a ModuleAdded event raised by the Registry contract. +type RegistryModuleAdded struct { + ModuleAddr common.Address + Selectors [][4]byte + Raw *types.Log // Blockchain specific contextual infos +} + +const RegistryModuleAddedEventName = "ModuleAdded" + +// ContractEventName returns the user-defined event name. +func (RegistryModuleAdded) ContractEventName() string { + return RegistryModuleAddedEventName +} + +// UnpackModuleAddedEvent is the Go binding that unpacks the event data emitted +// by contract. +// +// Solidity: event ModuleAdded(address indexed moduleAddr, bytes4[] selectors) +func (registry *Registry) UnpackModuleAddedEvent(log *types.Log) (*RegistryModuleAdded, error) { + event := "ModuleAdded" + if len(log.Topics) == 0 || log.Topics[0] != registry.abi.Events[event].ID { + return nil, errors.New("event signature mismatch") + } + out := new(RegistryModuleAdded) + if len(log.Data) > 0 { + if err := registry.abi.UnpackIntoInterface(out, event, log.Data); err != nil { + return nil, err + } + } + var indexed abi.Arguments + for _, arg := range registry.abi.Events[event].Inputs { + if arg.Indexed { + indexed = append(indexed, arg) + } + } + if err := abi.ParseTopics(out, indexed, log.Topics[1:]); err != nil { + return nil, err + } + out.Raw = log + return out, nil +} + +// RegistryModuleRemoved represents a ModuleRemoved event raised by the Registry contract. +type RegistryModuleRemoved struct { + ModuleAddr common.Address + Selectors [][4]byte + Raw *types.Log // Blockchain specific contextual infos +} + +const RegistryModuleRemovedEventName = "ModuleRemoved" + +// ContractEventName returns the user-defined event name. +func (RegistryModuleRemoved) ContractEventName() string { + return RegistryModuleRemovedEventName +} + +// UnpackModuleRemovedEvent is the Go binding that unpacks the event data emitted +// by contract. +// +// Solidity: event ModuleRemoved(address indexed moduleAddr, bytes4[] selectors) +func (registry *Registry) UnpackModuleRemovedEvent(log *types.Log) (*RegistryModuleRemoved, error) { + event := "ModuleRemoved" + if len(log.Topics) == 0 || log.Topics[0] != registry.abi.Events[event].ID { + return nil, errors.New("event signature mismatch") + } + out := new(RegistryModuleRemoved) + if len(log.Data) > 0 { + if err := registry.abi.UnpackIntoInterface(out, event, log.Data); err != nil { + return nil, err + } + } + var indexed abi.Arguments + for _, arg := range registry.abi.Events[event].Inputs { + if arg.Indexed { + indexed = append(indexed, arg) + } + } + if err := abi.ParseTopics(out, indexed, log.Topics[1:]); err != nil { + return nil, err + } + out.Raw = log + return out, nil +} + +// RegistryModuleUpdated represents a ModuleUpdated event raised by the Registry contract. +type RegistryModuleUpdated struct { + OldImplementation common.Address + NewImplementation common.Address + OldSelectors [][4]byte + NewSelectors [][4]byte + Raw *types.Log // Blockchain specific contextual infos +} + +const RegistryModuleUpdatedEventName = "ModuleUpdated" + +// ContractEventName returns the user-defined event name. +func (RegistryModuleUpdated) ContractEventName() string { + return RegistryModuleUpdatedEventName +} + +// UnpackModuleUpdatedEvent is the Go binding that unpacks the event data emitted +// by contract. +// +// Solidity: event ModuleUpdated(address indexed oldImplementation, address indexed newImplementation, bytes4[] oldSelectors, bytes4[] newSelectors) +func (registry *Registry) UnpackModuleUpdatedEvent(log *types.Log) (*RegistryModuleUpdated, error) { + event := "ModuleUpdated" + if len(log.Topics) == 0 || log.Topics[0] != registry.abi.Events[event].ID { + return nil, errors.New("event signature mismatch") + } + out := new(RegistryModuleUpdated) + if len(log.Data) > 0 { + if err := registry.abi.UnpackIntoInterface(out, event, log.Data); err != nil { + return nil, err + } + } + var indexed abi.Arguments + for _, arg := range registry.abi.Events[event].Inputs { + if arg.Indexed { + indexed = append(indexed, arg) + } + } + if err := abi.ParseTopics(out, indexed, log.Topics[1:]); err != nil { + return nil, err + } + out.Raw = log + return out, nil +} + +// RegistryOperationCostSet represents a OperationCostSet event raised by the Registry contract. +type RegistryOperationCostSet struct { + Operation [32]byte + Cost *big.Int + Raw *types.Log // Blockchain specific contextual infos +} + +const RegistryOperationCostSetEventName = "OperationCostSet" + +// ContractEventName returns the user-defined event name. +func (RegistryOperationCostSet) ContractEventName() string { + return RegistryOperationCostSetEventName +} + +// UnpackOperationCostSetEvent is the Go binding that unpacks the event data emitted +// by contract. +// +// Solidity: event OperationCostSet(bytes32 operation, uint256 cost) +func (registry *Registry) UnpackOperationCostSetEvent(log *types.Log) (*RegistryOperationCostSet, error) { + event := "OperationCostSet" + if len(log.Topics) == 0 || log.Topics[0] != registry.abi.Events[event].ID { + return nil, errors.New("event signature mismatch") + } + out := new(RegistryOperationCostSet) + if len(log.Data) > 0 { + if err := registry.abi.UnpackIntoInterface(out, event, log.Data); err != nil { + return nil, err + } + } + var indexed abi.Arguments + for _, arg := range registry.abi.Events[event].Inputs { + if arg.Indexed { + indexed = append(indexed, arg) + } + } + if err := abi.ParseTopics(out, indexed, log.Topics[1:]); err != nil { + return nil, err + } + out.Raw = log + return out, nil +} + +// RegistryRoleAdminChanged represents a RoleAdminChanged event raised by the Registry contract. +type RegistryRoleAdminChanged struct { + Role [32]byte + PreviousAdminRole [32]byte + NewAdminRole [32]byte + Raw *types.Log // Blockchain specific contextual infos +} + +const RegistryRoleAdminChangedEventName = "RoleAdminChanged" + +// ContractEventName returns the user-defined event name. +func (RegistryRoleAdminChanged) ContractEventName() string { + return RegistryRoleAdminChangedEventName +} + +// UnpackRoleAdminChangedEvent is the Go binding that unpacks the event data emitted +// by contract. +// +// Solidity: event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole) +func (registry *Registry) UnpackRoleAdminChangedEvent(log *types.Log) (*RegistryRoleAdminChanged, error) { + event := "RoleAdminChanged" + if len(log.Topics) == 0 || log.Topics[0] != registry.abi.Events[event].ID { + return nil, errors.New("event signature mismatch") + } + out := new(RegistryRoleAdminChanged) + if len(log.Data) > 0 { + if err := registry.abi.UnpackIntoInterface(out, event, log.Data); err != nil { + return nil, err + } + } + var indexed abi.Arguments + for _, arg := range registry.abi.Events[event].Inputs { + if arg.Indexed { + indexed = append(indexed, arg) + } + } + if err := abi.ParseTopics(out, indexed, log.Topics[1:]); err != nil { + return nil, err + } + out.Raw = log + return out, nil +} + +// RegistryRoleGranted represents a RoleGranted event raised by the Registry contract. +type RegistryRoleGranted struct { + Role [32]byte + Account common.Address + Sender common.Address + Raw *types.Log // Blockchain specific contextual infos +} + +const RegistryRoleGrantedEventName = "RoleGranted" + +// ContractEventName returns the user-defined event name. +func (RegistryRoleGranted) ContractEventName() string { + return RegistryRoleGrantedEventName +} + +// UnpackRoleGrantedEvent is the Go binding that unpacks the event data emitted +// by contract. +// +// Solidity: event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender) +func (registry *Registry) UnpackRoleGrantedEvent(log *types.Log) (*RegistryRoleGranted, error) { + event := "RoleGranted" + if len(log.Topics) == 0 || log.Topics[0] != registry.abi.Events[event].ID { + return nil, errors.New("event signature mismatch") + } + out := new(RegistryRoleGranted) + if len(log.Data) > 0 { + if err := registry.abi.UnpackIntoInterface(out, event, log.Data); err != nil { + return nil, err + } + } + var indexed abi.Arguments + for _, arg := range registry.abi.Events[event].Inputs { + if arg.Indexed { + indexed = append(indexed, arg) + } + } + if err := abi.ParseTopics(out, indexed, log.Topics[1:]); err != nil { + return nil, err + } + out.Raw = log + return out, nil +} + +// RegistryRoleRevoked represents a RoleRevoked event raised by the Registry contract. +type RegistryRoleRevoked struct { + Role [32]byte + Account common.Address + Sender common.Address + Raw *types.Log // Blockchain specific contextual infos +} + +const RegistryRoleRevokedEventName = "RoleRevoked" + +// ContractEventName returns the user-defined event name. +func (RegistryRoleRevoked) ContractEventName() string { + return RegistryRoleRevokedEventName +} + +// UnpackRoleRevokedEvent is the Go binding that unpacks the event data emitted +// by contract. +// +// Solidity: event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender) +func (registry *Registry) UnpackRoleRevokedEvent(log *types.Log) (*RegistryRoleRevoked, error) { + event := "RoleRevoked" + if len(log.Topics) == 0 || log.Topics[0] != registry.abi.Events[event].ID { + return nil, errors.New("event signature mismatch") + } + out := new(RegistryRoleRevoked) + if len(log.Data) > 0 { + if err := registry.abi.UnpackIntoInterface(out, event, log.Data); err != nil { + return nil, err + } + } + var indexed abi.Arguments + for _, arg := range registry.abi.Events[event].Inputs { + if arg.Indexed { + indexed = append(indexed, arg) + } + } + if err := abi.ParseTopics(out, indexed, log.Topics[1:]); err != nil { + return nil, err + } + out.Raw = log + return out, nil +} + +// RegistrySacdSet represents a SacdSet event raised by the Registry contract. +type RegistrySacdSet struct { + Sacd common.Address + Raw *types.Log // Blockchain specific contextual infos +} + +const RegistrySacdSetEventName = "SacdSet" + +// ContractEventName returns the user-defined event name. +func (RegistrySacdSet) ContractEventName() string { + return RegistrySacdSetEventName +} + +// UnpackSacdSetEvent is the Go binding that unpacks the event data emitted +// by contract. +// +// Solidity: event SacdSet(address indexed sacd) +func (registry *Registry) UnpackSacdSetEvent(log *types.Log) (*RegistrySacdSet, error) { + event := "SacdSet" + if len(log.Topics) == 0 || log.Topics[0] != registry.abi.Events[event].ID { + return nil, errors.New("event signature mismatch") + } + out := new(RegistrySacdSet) + if len(log.Data) > 0 { + if err := registry.abi.UnpackIntoInterface(out, event, log.Data); err != nil { + return nil, err + } + } + var indexed abi.Arguments + for _, arg := range registry.abi.Events[event].Inputs { + if arg.Indexed { + indexed = append(indexed, arg) + } + } + if err := abi.ParseTopics(out, indexed, log.Topics[1:]); err != nil { + return nil, err + } + out.Raw = log + return out, nil +} + +// RegistryStorageNodeSet represents a StorageNodeSet event raised by the Registry contract. +type RegistryStorageNodeSet struct { + StorageNode common.Address + Raw *types.Log // Blockchain specific contextual infos +} + +const RegistryStorageNodeSetEventName = "StorageNodeSet" + +// ContractEventName returns the user-defined event name. +func (RegistryStorageNodeSet) ContractEventName() string { + return RegistryStorageNodeSetEventName +} + +// UnpackStorageNodeSetEvent is the Go binding that unpacks the event data emitted +// by contract. +// +// Solidity: event StorageNodeSet(address indexed storageNode) +func (registry *Registry) UnpackStorageNodeSetEvent(log *types.Log) (*RegistryStorageNodeSet, error) { + event := "StorageNodeSet" + if len(log.Topics) == 0 || log.Topics[0] != registry.abi.Events[event].ID { + return nil, errors.New("event signature mismatch") + } + out := new(RegistryStorageNodeSet) + if len(log.Data) > 0 { + if err := registry.abi.UnpackIntoInterface(out, event, log.Data); err != nil { + return nil, err + } + } + var indexed abi.Arguments + for _, arg := range registry.abi.Events[event].Inputs { + if arg.Indexed { + indexed = append(indexed, arg) + } + } + if err := abi.ParseTopics(out, indexed, log.Topics[1:]); err != nil { + return nil, err + } + out.Raw = log + return out, nil +} + +// RegistryStreamRegistrySet represents a StreamRegistrySet event raised by the Registry contract. +type RegistryStreamRegistrySet struct { + StreamRegistry common.Address + Raw *types.Log // Blockchain specific contextual infos +} + +const RegistryStreamRegistrySetEventName = "StreamRegistrySet" + +// ContractEventName returns the user-defined event name. +func (RegistryStreamRegistrySet) ContractEventName() string { + return RegistryStreamRegistrySetEventName +} + +// UnpackStreamRegistrySetEvent is the Go binding that unpacks the event data emitted +// by contract. +// +// Solidity: event StreamRegistrySet(address streamRegistry) +func (registry *Registry) UnpackStreamRegistrySetEvent(log *types.Log) (*RegistryStreamRegistrySet, error) { + event := "StreamRegistrySet" + if len(log.Topics) == 0 || log.Topics[0] != registry.abi.Events[event].ID { + return nil, errors.New("event signature mismatch") + } + out := new(RegistryStreamRegistrySet) + if len(log.Data) > 0 { + if err := registry.abi.UnpackIntoInterface(out, event, log.Data); err != nil { + return nil, err + } + } + var indexed abi.Arguments + for _, arg := range registry.abi.Events[event].Inputs { + if arg.Indexed { + indexed = append(indexed, arg) + } + } + if err := abi.ParseTopics(out, indexed, log.Topics[1:]); err != nil { + return nil, err + } + out.Raw = log + return out, nil +} + +// RegistrySubscribedToVehicleStream represents a SubscribedToVehicleStream event raised by the Registry contract. +type RegistrySubscribedToVehicleStream struct { + StreamId string + Subscriber common.Address + ExpirationTime *big.Int + Raw *types.Log // Blockchain specific contextual infos +} + +const RegistrySubscribedToVehicleStreamEventName = "SubscribedToVehicleStream" + +// ContractEventName returns the user-defined event name. +func (RegistrySubscribedToVehicleStream) ContractEventName() string { + return RegistrySubscribedToVehicleStreamEventName +} + +// UnpackSubscribedToVehicleStreamEvent is the Go binding that unpacks the event data emitted +// by contract. +// +// Solidity: event SubscribedToVehicleStream(string streamId, address indexed subscriber, uint256 expirationTime) +func (registry *Registry) UnpackSubscribedToVehicleStreamEvent(log *types.Log) (*RegistrySubscribedToVehicleStream, error) { + event := "SubscribedToVehicleStream" + if len(log.Topics) == 0 || log.Topics[0] != registry.abi.Events[event].ID { + return nil, errors.New("event signature mismatch") + } + out := new(RegistrySubscribedToVehicleStream) + if len(log.Data) > 0 { + if err := registry.abi.UnpackIntoInterface(out, event, log.Data); err != nil { + return nil, err + } + } + var indexed abi.Arguments + for _, arg := range registry.abi.Events[event].Inputs { + if arg.Indexed { + indexed = append(indexed, arg) + } + } + if err := abi.ParseTopics(out, indexed, log.Topics[1:]); err != nil { + return nil, err + } + out.Raw = log + return out, nil +} + +// RegistrySyntheticDeviceAttributeAdded represents a SyntheticDeviceAttributeAdded event raised by the Registry contract. +type RegistrySyntheticDeviceAttributeAdded struct { + Attribute string + Raw *types.Log // Blockchain specific contextual infos +} + +const RegistrySyntheticDeviceAttributeAddedEventName = "SyntheticDeviceAttributeAdded" + +// ContractEventName returns the user-defined event name. +func (RegistrySyntheticDeviceAttributeAdded) ContractEventName() string { + return RegistrySyntheticDeviceAttributeAddedEventName +} + +// UnpackSyntheticDeviceAttributeAddedEvent is the Go binding that unpacks the event data emitted +// by contract. +// +// Solidity: event SyntheticDeviceAttributeAdded(string attribute) +func (registry *Registry) UnpackSyntheticDeviceAttributeAddedEvent(log *types.Log) (*RegistrySyntheticDeviceAttributeAdded, error) { + event := "SyntheticDeviceAttributeAdded" + if len(log.Topics) == 0 || log.Topics[0] != registry.abi.Events[event].ID { + return nil, errors.New("event signature mismatch") + } + out := new(RegistrySyntheticDeviceAttributeAdded) + if len(log.Data) > 0 { + if err := registry.abi.UnpackIntoInterface(out, event, log.Data); err != nil { + return nil, err + } + } + var indexed abi.Arguments + for _, arg := range registry.abi.Events[event].Inputs { + if arg.Indexed { + indexed = append(indexed, arg) + } + } + if err := abi.ParseTopics(out, indexed, log.Topics[1:]); err != nil { + return nil, err + } + out.Raw = log + return out, nil +} + +// RegistrySyntheticDeviceAttributeSet represents a SyntheticDeviceAttributeSet event raised by the Registry contract. +type RegistrySyntheticDeviceAttributeSet struct { + TokenId *big.Int + Attribute string + Info string + Raw *types.Log // Blockchain specific contextual infos +} + +const RegistrySyntheticDeviceAttributeSetEventName = "SyntheticDeviceAttributeSet" + +// ContractEventName returns the user-defined event name. +func (RegistrySyntheticDeviceAttributeSet) ContractEventName() string { + return RegistrySyntheticDeviceAttributeSetEventName +} + +// UnpackSyntheticDeviceAttributeSetEvent is the Go binding that unpacks the event data emitted +// by contract. +// +// Solidity: event SyntheticDeviceAttributeSet(uint256 indexed tokenId, string attribute, string info) +func (registry *Registry) UnpackSyntheticDeviceAttributeSetEvent(log *types.Log) (*RegistrySyntheticDeviceAttributeSet, error) { + event := "SyntheticDeviceAttributeSet" + if len(log.Topics) == 0 || log.Topics[0] != registry.abi.Events[event].ID { + return nil, errors.New("event signature mismatch") + } + out := new(RegistrySyntheticDeviceAttributeSet) + if len(log.Data) > 0 { + if err := registry.abi.UnpackIntoInterface(out, event, log.Data); err != nil { + return nil, err + } + } + var indexed abi.Arguments + for _, arg := range registry.abi.Events[event].Inputs { + if arg.Indexed { + indexed = append(indexed, arg) + } + } + if err := abi.ParseTopics(out, indexed, log.Topics[1:]); err != nil { + return nil, err + } + out.Raw = log + return out, nil +} + +// RegistrySyntheticDeviceIdProxySet represents a SyntheticDeviceIdProxySet event raised by the Registry contract. +type RegistrySyntheticDeviceIdProxySet struct { + Proxy common.Address + Raw *types.Log // Blockchain specific contextual infos +} + +const RegistrySyntheticDeviceIdProxySetEventName = "SyntheticDeviceIdProxySet" + +// ContractEventName returns the user-defined event name. +func (RegistrySyntheticDeviceIdProxySet) ContractEventName() string { + return RegistrySyntheticDeviceIdProxySetEventName +} + +// UnpackSyntheticDeviceIdProxySetEvent is the Go binding that unpacks the event data emitted +// by contract. +// +// Solidity: event SyntheticDeviceIdProxySet(address proxy) +func (registry *Registry) UnpackSyntheticDeviceIdProxySetEvent(log *types.Log) (*RegistrySyntheticDeviceIdProxySet, error) { + event := "SyntheticDeviceIdProxySet" + if len(log.Topics) == 0 || log.Topics[0] != registry.abi.Events[event].ID { + return nil, errors.New("event signature mismatch") + } + out := new(RegistrySyntheticDeviceIdProxySet) + if len(log.Data) > 0 { + if err := registry.abi.UnpackIntoInterface(out, event, log.Data); err != nil { + return nil, err + } + } + var indexed abi.Arguments + for _, arg := range registry.abi.Events[event].Inputs { + if arg.Indexed { + indexed = append(indexed, arg) + } + } + if err := abi.ParseTopics(out, indexed, log.Topics[1:]); err != nil { + return nil, err + } + out.Raw = log + return out, nil +} + +// RegistrySyntheticDeviceNodeBurned represents a SyntheticDeviceNodeBurned event raised by the Registry contract. +type RegistrySyntheticDeviceNodeBurned struct { + SyntheticDeviceNode *big.Int + VehicleNode *big.Int + Owner common.Address + Raw *types.Log // Blockchain specific contextual infos +} + +const RegistrySyntheticDeviceNodeBurnedEventName = "SyntheticDeviceNodeBurned" + +// ContractEventName returns the user-defined event name. +func (RegistrySyntheticDeviceNodeBurned) ContractEventName() string { + return RegistrySyntheticDeviceNodeBurnedEventName +} + +// UnpackSyntheticDeviceNodeBurnedEvent is the Go binding that unpacks the event data emitted +// by contract. +// +// Solidity: event SyntheticDeviceNodeBurned(uint256 indexed syntheticDeviceNode, uint256 indexed vehicleNode, address indexed owner) +func (registry *Registry) UnpackSyntheticDeviceNodeBurnedEvent(log *types.Log) (*RegistrySyntheticDeviceNodeBurned, error) { + event := "SyntheticDeviceNodeBurned" + if len(log.Topics) == 0 || log.Topics[0] != registry.abi.Events[event].ID { + return nil, errors.New("event signature mismatch") + } + out := new(RegistrySyntheticDeviceNodeBurned) + if len(log.Data) > 0 { + if err := registry.abi.UnpackIntoInterface(out, event, log.Data); err != nil { + return nil, err + } + } + var indexed abi.Arguments + for _, arg := range registry.abi.Events[event].Inputs { + if arg.Indexed { + indexed = append(indexed, arg) + } + } + if err := abi.ParseTopics(out, indexed, log.Topics[1:]); err != nil { + return nil, err + } + out.Raw = log + return out, nil +} + +// RegistrySyntheticDeviceNodeMinted represents a SyntheticDeviceNodeMinted event raised by the Registry contract. +type RegistrySyntheticDeviceNodeMinted struct { + ConnectionId *big.Int + SyntheticDeviceNode *big.Int + VehicleNode *big.Int + SyntheticDeviceAddress common.Address + Owner common.Address + Raw *types.Log // Blockchain specific contextual infos +} + +const RegistrySyntheticDeviceNodeMintedEventName = "SyntheticDeviceNodeMinted" + +// ContractEventName returns the user-defined event name. +func (RegistrySyntheticDeviceNodeMinted) ContractEventName() string { + return RegistrySyntheticDeviceNodeMintedEventName +} + +// UnpackSyntheticDeviceNodeMintedEvent is the Go binding that unpacks the event data emitted +// by contract. +// +// Solidity: event SyntheticDeviceNodeMinted(uint256 connectionId, uint256 syntheticDeviceNode, uint256 indexed vehicleNode, address indexed syntheticDeviceAddress, address indexed owner) +func (registry *Registry) UnpackSyntheticDeviceNodeMintedEvent(log *types.Log) (*RegistrySyntheticDeviceNodeMinted, error) { + event := "SyntheticDeviceNodeMinted" + if len(log.Topics) == 0 || log.Topics[0] != registry.abi.Events[event].ID { + return nil, errors.New("event signature mismatch") + } + out := new(RegistrySyntheticDeviceNodeMinted) + if len(log.Data) > 0 { + if err := registry.abi.UnpackIntoInterface(out, event, log.Data); err != nil { + return nil, err + } + } + var indexed abi.Arguments + for _, arg := range registry.abi.Events[event].Inputs { + if arg.Indexed { + indexed = append(indexed, arg) + } + } + if err := abi.ParseTopics(out, indexed, log.Topics[1:]); err != nil { + return nil, err + } + out.Raw = log + return out, nil +} + +// RegistryVehicleAttributeAdded represents a VehicleAttributeAdded event raised by the Registry contract. +type RegistryVehicleAttributeAdded struct { + Attribute string + Raw *types.Log // Blockchain specific contextual infos +} + +const RegistryVehicleAttributeAddedEventName = "VehicleAttributeAdded" + +// ContractEventName returns the user-defined event name. +func (RegistryVehicleAttributeAdded) ContractEventName() string { + return RegistryVehicleAttributeAddedEventName +} + +// UnpackVehicleAttributeAddedEvent is the Go binding that unpacks the event data emitted +// by contract. +// +// Solidity: event VehicleAttributeAdded(string attribute) +func (registry *Registry) UnpackVehicleAttributeAddedEvent(log *types.Log) (*RegistryVehicleAttributeAdded, error) { + event := "VehicleAttributeAdded" + if len(log.Topics) == 0 || log.Topics[0] != registry.abi.Events[event].ID { + return nil, errors.New("event signature mismatch") + } + out := new(RegistryVehicleAttributeAdded) + if len(log.Data) > 0 { + if err := registry.abi.UnpackIntoInterface(out, event, log.Data); err != nil { + return nil, err + } + } + var indexed abi.Arguments + for _, arg := range registry.abi.Events[event].Inputs { + if arg.Indexed { + indexed = append(indexed, arg) + } + } + if err := abi.ParseTopics(out, indexed, log.Topics[1:]); err != nil { + return nil, err + } + out.Raw = log + return out, nil +} + +// RegistryVehicleAttributeRemoved represents a VehicleAttributeRemoved event raised by the Registry contract. +type RegistryVehicleAttributeRemoved struct { + Attribute string + Raw *types.Log // Blockchain specific contextual infos +} + +const RegistryVehicleAttributeRemovedEventName = "VehicleAttributeRemoved" + +// ContractEventName returns the user-defined event name. +func (RegistryVehicleAttributeRemoved) ContractEventName() string { + return RegistryVehicleAttributeRemovedEventName +} + +// UnpackVehicleAttributeRemovedEvent is the Go binding that unpacks the event data emitted +// by contract. +// +// Solidity: event VehicleAttributeRemoved(string attribute) +func (registry *Registry) UnpackVehicleAttributeRemovedEvent(log *types.Log) (*RegistryVehicleAttributeRemoved, error) { + event := "VehicleAttributeRemoved" + if len(log.Topics) == 0 || log.Topics[0] != registry.abi.Events[event].ID { + return nil, errors.New("event signature mismatch") + } + out := new(RegistryVehicleAttributeRemoved) + if len(log.Data) > 0 { + if err := registry.abi.UnpackIntoInterface(out, event, log.Data); err != nil { + return nil, err + } + } + var indexed abi.Arguments + for _, arg := range registry.abi.Events[event].Inputs { + if arg.Indexed { + indexed = append(indexed, arg) + } + } + if err := abi.ParseTopics(out, indexed, log.Topics[1:]); err != nil { + return nil, err + } + out.Raw = log + return out, nil +} + +// RegistryVehicleAttributeSet represents a VehicleAttributeSet event raised by the Registry contract. +type RegistryVehicleAttributeSet struct { + TokenId *big.Int + Attribute string + Info string + Raw *types.Log // Blockchain specific contextual infos +} + +const RegistryVehicleAttributeSetEventName = "VehicleAttributeSet" + +// ContractEventName returns the user-defined event name. +func (RegistryVehicleAttributeSet) ContractEventName() string { + return RegistryVehicleAttributeSetEventName +} + +// UnpackVehicleAttributeSetEvent is the Go binding that unpacks the event data emitted +// by contract. +// +// Solidity: event VehicleAttributeSet(uint256 tokenId, string attribute, string info) +func (registry *Registry) UnpackVehicleAttributeSetEvent(log *types.Log) (*RegistryVehicleAttributeSet, error) { + event := "VehicleAttributeSet" + if len(log.Topics) == 0 || log.Topics[0] != registry.abi.Events[event].ID { + return nil, errors.New("event signature mismatch") + } + out := new(RegistryVehicleAttributeSet) + if len(log.Data) > 0 { + if err := registry.abi.UnpackIntoInterface(out, event, log.Data); err != nil { + return nil, err + } + } + var indexed abi.Arguments + for _, arg := range registry.abi.Events[event].Inputs { + if arg.Indexed { + indexed = append(indexed, arg) + } + } + if err := abi.ParseTopics(out, indexed, log.Topics[1:]); err != nil { + return nil, err + } + out.Raw = log + return out, nil +} + +// RegistryVehicleIdProxySet represents a VehicleIdProxySet event raised by the Registry contract. +type RegistryVehicleIdProxySet struct { + Proxy common.Address + Raw *types.Log // Blockchain specific contextual infos +} + +const RegistryVehicleIdProxySetEventName = "VehicleIdProxySet" + +// ContractEventName returns the user-defined event name. +func (RegistryVehicleIdProxySet) ContractEventName() string { + return RegistryVehicleIdProxySetEventName +} + +// UnpackVehicleIdProxySetEvent is the Go binding that unpacks the event data emitted +// by contract. +// +// Solidity: event VehicleIdProxySet(address indexed proxy) +func (registry *Registry) UnpackVehicleIdProxySetEvent(log *types.Log) (*RegistryVehicleIdProxySet, error) { + event := "VehicleIdProxySet" + if len(log.Topics) == 0 || log.Topics[0] != registry.abi.Events[event].ID { + return nil, errors.New("event signature mismatch") + } + out := new(RegistryVehicleIdProxySet) + if len(log.Data) > 0 { + if err := registry.abi.UnpackIntoInterface(out, event, log.Data); err != nil { + return nil, err + } + } + var indexed abi.Arguments + for _, arg := range registry.abi.Events[event].Inputs { + if arg.Indexed { + indexed = append(indexed, arg) + } + } + if err := abi.ParseTopics(out, indexed, log.Topics[1:]); err != nil { + return nil, err + } + out.Raw = log + return out, nil +} + +// RegistryVehicleNodeBurned represents a VehicleNodeBurned event raised by the Registry contract. +type RegistryVehicleNodeBurned struct { + VehicleNode *big.Int + Owner common.Address + Raw *types.Log // Blockchain specific contextual infos +} + +const RegistryVehicleNodeBurnedEventName = "VehicleNodeBurned" + +// ContractEventName returns the user-defined event name. +func (RegistryVehicleNodeBurned) ContractEventName() string { + return RegistryVehicleNodeBurnedEventName +} + +// UnpackVehicleNodeBurnedEvent is the Go binding that unpacks the event data emitted +// by contract. +// +// Solidity: event VehicleNodeBurned(uint256 indexed vehicleNode, address indexed owner) +func (registry *Registry) UnpackVehicleNodeBurnedEvent(log *types.Log) (*RegistryVehicleNodeBurned, error) { + event := "VehicleNodeBurned" + if len(log.Topics) == 0 || log.Topics[0] != registry.abi.Events[event].ID { + return nil, errors.New("event signature mismatch") + } + out := new(RegistryVehicleNodeBurned) + if len(log.Data) > 0 { + if err := registry.abi.UnpackIntoInterface(out, event, log.Data); err != nil { + return nil, err + } + } + var indexed abi.Arguments + for _, arg := range registry.abi.Events[event].Inputs { + if arg.Indexed { + indexed = append(indexed, arg) + } + } + if err := abi.ParseTopics(out, indexed, log.Topics[1:]); err != nil { + return nil, err + } + out.Raw = log + return out, nil +} + +// RegistryVehicleNodeMinted represents a VehicleNodeMinted event raised by the Registry contract. +type RegistryVehicleNodeMinted struct { + ManufacturerNode *big.Int + TokenId *big.Int + Owner common.Address + Raw *types.Log // Blockchain specific contextual infos +} + +const RegistryVehicleNodeMintedEventName = "VehicleNodeMinted" + +// ContractEventName returns the user-defined event name. +func (RegistryVehicleNodeMinted) ContractEventName() string { + return RegistryVehicleNodeMintedEventName +} + +// UnpackVehicleNodeMintedEvent is the Go binding that unpacks the event data emitted +// by contract. +// +// Solidity: event VehicleNodeMinted(uint256 manufacturerNode, uint256 tokenId, address owner) +func (registry *Registry) UnpackVehicleNodeMintedEvent(log *types.Log) (*RegistryVehicleNodeMinted, error) { + event := "VehicleNodeMinted" + if len(log.Topics) == 0 || log.Topics[0] != registry.abi.Events[event].ID { + return nil, errors.New("event signature mismatch") + } + out := new(RegistryVehicleNodeMinted) + if len(log.Data) > 0 { + if err := registry.abi.UnpackIntoInterface(out, event, log.Data); err != nil { + return nil, err + } + } + var indexed abi.Arguments + for _, arg := range registry.abi.Events[event].Inputs { + if arg.Indexed { + indexed = append(indexed, arg) + } + } + if err := abi.ParseTopics(out, indexed, log.Topics[1:]); err != nil { + return nil, err + } + out.Raw = log + return out, nil +} + +// RegistryVehicleStorageNodeIdSet represents a VehicleStorageNodeIdSet event raised by the Registry contract. +type RegistryVehicleStorageNodeIdSet struct { + VehicleId *big.Int + StorageNodeId *big.Int + Raw *types.Log // Blockchain specific contextual infos +} + +const RegistryVehicleStorageNodeIdSetEventName = "VehicleStorageNodeIdSet" + +// ContractEventName returns the user-defined event name. +func (RegistryVehicleStorageNodeIdSet) ContractEventName() string { + return RegistryVehicleStorageNodeIdSetEventName +} + +// UnpackVehicleStorageNodeIdSetEvent is the Go binding that unpacks the event data emitted +// by contract. +// +// Solidity: event VehicleStorageNodeIdSet(uint256 indexed vehicleId, uint256 indexed storageNodeId) +func (registry *Registry) UnpackVehicleStorageNodeIdSetEvent(log *types.Log) (*RegistryVehicleStorageNodeIdSet, error) { + event := "VehicleStorageNodeIdSet" + if len(log.Topics) == 0 || log.Topics[0] != registry.abi.Events[event].ID { + return nil, errors.New("event signature mismatch") + } + out := new(RegistryVehicleStorageNodeIdSet) + if len(log.Data) > 0 { + if err := registry.abi.UnpackIntoInterface(out, event, log.Data); err != nil { + return nil, err + } + } + var indexed abi.Arguments + for _, arg := range registry.abi.Events[event].Inputs { + if arg.Indexed { + indexed = append(indexed, arg) + } + } + if err := abi.ParseTopics(out, indexed, log.Topics[1:]); err != nil { + return nil, err + } + out.Raw = log + return out, nil +} + +// RegistryVehicleStreamSet represents a VehicleStreamSet event raised by the Registry contract. +type RegistryVehicleStreamSet struct { + VehicleId *big.Int + StreamId string + Raw *types.Log // Blockchain specific contextual infos +} + +const RegistryVehicleStreamSetEventName = "VehicleStreamSet" + +// ContractEventName returns the user-defined event name. +func (RegistryVehicleStreamSet) ContractEventName() string { + return RegistryVehicleStreamSetEventName +} + +// UnpackVehicleStreamSetEvent is the Go binding that unpacks the event data emitted +// by contract. +// +// Solidity: event VehicleStreamSet(uint256 indexed vehicleId, string streamId) +func (registry *Registry) UnpackVehicleStreamSetEvent(log *types.Log) (*RegistryVehicleStreamSet, error) { + event := "VehicleStreamSet" + if len(log.Topics) == 0 || log.Topics[0] != registry.abi.Events[event].ID { + return nil, errors.New("event signature mismatch") + } + out := new(RegistryVehicleStreamSet) + if len(log.Data) > 0 { + if err := registry.abi.UnpackIntoInterface(out, event, log.Data); err != nil { + return nil, err + } + } + var indexed abi.Arguments + for _, arg := range registry.abi.Events[event].Inputs { + if arg.Indexed { + indexed = append(indexed, arg) + } + } + if err := abi.ParseTopics(out, indexed, log.Topics[1:]); err != nil { + return nil, err + } + out.Raw = log + return out, nil +} + +// RegistryVehicleStreamUnset represents a VehicleStreamUnset event raised by the Registry contract. +type RegistryVehicleStreamUnset struct { + VehicleId *big.Int + StreamId string + Raw *types.Log // Blockchain specific contextual infos +} + +const RegistryVehicleStreamUnsetEventName = "VehicleStreamUnset" + +// ContractEventName returns the user-defined event name. +func (RegistryVehicleStreamUnset) ContractEventName() string { + return RegistryVehicleStreamUnsetEventName +} + +// UnpackVehicleStreamUnsetEvent is the Go binding that unpacks the event data emitted +// by contract. +// +// Solidity: event VehicleStreamUnset(uint256 indexed vehicleId, string streamId) +func (registry *Registry) UnpackVehicleStreamUnsetEvent(log *types.Log) (*RegistryVehicleStreamUnset, error) { + event := "VehicleStreamUnset" + if len(log.Topics) == 0 || log.Topics[0] != registry.abi.Events[event].ID { + return nil, errors.New("event signature mismatch") + } + out := new(RegistryVehicleStreamUnset) + if len(log.Data) > 0 { + if err := registry.abi.UnpackIntoInterface(out, event, log.Data); err != nil { + return nil, err + } + } + var indexed abi.Arguments + for _, arg := range registry.abi.Events[event].Inputs { + if arg.Indexed { + indexed = append(indexed, arg) + } + } + if err := abi.ParseTopics(out, indexed, log.Topics[1:]); err != nil { + return nil, err + } + out.Raw = log + return out, nil +} + +// UnpackError attempts to decode the provided error data using user-defined +// error definitions. +func (registry *Registry) UnpackError(raw []byte) (any, error) { + if bytes.Equal(raw[:4], registry.abi.Errors["AdNotClaimed"].ID.Bytes()[:4]) { + return registry.UnpackAdNotClaimedError(raw[4:]) + } + if bytes.Equal(raw[:4], registry.abi.Errors["AdNotPaired"].ID.Bytes()[:4]) { + return registry.UnpackAdNotPairedError(raw[4:]) + } + if bytes.Equal(raw[:4], registry.abi.Errors["AdPaired"].ID.Bytes()[:4]) { + return registry.UnpackAdPairedError(raw[4:]) + } + if bytes.Equal(raw[:4], registry.abi.Errors["AttributeExists"].ID.Bytes()[:4]) { + return registry.UnpackAttributeExistsError(raw[4:]) + } + if bytes.Equal(raw[:4], registry.abi.Errors["AttributeNotWhitelisted"].ID.Bytes()[:4]) { + return registry.UnpackAttributeNotWhitelistedError(raw[4:]) + } + if bytes.Equal(raw[:4], registry.abi.Errors["ChainNotSupported"].ID.Bytes()[:4]) { + return registry.UnpackChainNotSupportedError(raw[4:]) + } + if bytes.Equal(raw[:4], registry.abi.Errors["DeviceAlreadyClaimed"].ID.Bytes()[:4]) { + return registry.UnpackDeviceAlreadyClaimedError(raw[4:]) + } + if bytes.Equal(raw[:4], registry.abi.Errors["DeviceAlreadyRegistered"].ID.Bytes()[:4]) { + return registry.UnpackDeviceAlreadyRegisteredError(raw[4:]) + } + if bytes.Equal(raw[:4], registry.abi.Errors["InvalidAdSignature"].ID.Bytes()[:4]) { + return registry.UnpackInvalidAdSignatureError(raw[4:]) + } + if bytes.Equal(raw[:4], registry.abi.Errors["InvalidLicense"].ID.Bytes()[:4]) { + return registry.UnpackInvalidLicenseError(raw[4:]) + } + if bytes.Equal(raw[:4], registry.abi.Errors["InvalidManufacturerId"].ID.Bytes()[:4]) { + return registry.UnpackInvalidManufacturerIdError(raw[4:]) + } + if bytes.Equal(raw[:4], registry.abi.Errors["InvalidNode"].ID.Bytes()[:4]) { + return registry.UnpackInvalidNodeError(raw[4:]) + } + if bytes.Equal(raw[:4], registry.abi.Errors["InvalidOwnerSignature"].ID.Bytes()[:4]) { + return registry.UnpackInvalidOwnerSignatureError(raw[4:]) + } + if bytes.Equal(raw[:4], registry.abi.Errors["InvalidParentNode"].ID.Bytes()[:4]) { + return registry.UnpackInvalidParentNodeError(raw[4:]) + } + if bytes.Equal(raw[:4], registry.abi.Errors["InvalidSdSignature"].ID.Bytes()[:4]) { + return registry.UnpackInvalidSdSignatureError(raw[4:]) + } + if bytes.Equal(raw[:4], registry.abi.Errors["InvalidSigner"].ID.Bytes()[:4]) { + return registry.UnpackInvalidSignerError(raw[4:]) + } + if bytes.Equal(raw[:4], registry.abi.Errors["InvalidStorageNode"].ID.Bytes()[:4]) { + return registry.UnpackInvalidStorageNodeError(raw[4:]) + } + if bytes.Equal(raw[:4], registry.abi.Errors["NoStreamrPermission"].ID.Bytes()[:4]) { + return registry.UnpackNoStreamrPermissionError(raw[4:]) + } + if bytes.Equal(raw[:4], registry.abi.Errors["OnlyNftProxy"].ID.Bytes()[:4]) { + return registry.UnpackOnlyNftProxyError(raw[4:]) + } + if bytes.Equal(raw[:4], registry.abi.Errors["OwnersDoNotMatch"].ID.Bytes()[:4]) { + return registry.UnpackOwnersDoNotMatchError(raw[4:]) + } + if bytes.Equal(raw[:4], registry.abi.Errors["StreamDoesNotExist"].ID.Bytes()[:4]) { + return registry.UnpackStreamDoesNotExistError(raw[4:]) + } + if bytes.Equal(raw[:4], registry.abi.Errors["TableAlreadyExists"].ID.Bytes()[:4]) { + return registry.UnpackTableAlreadyExistsError(raw[4:]) + } + if bytes.Equal(raw[:4], registry.abi.Errors["TableDoesNotExist"].ID.Bytes()[:4]) { + return registry.UnpackTableDoesNotExistError(raw[4:]) + } + if bytes.Equal(raw[:4], registry.abi.Errors["UintUtilsInsufficientHexLength"].ID.Bytes()[:4]) { + return registry.UnpackUintUtilsInsufficientHexLengthError(raw[4:]) + } + if bytes.Equal(raw[:4], registry.abi.Errors["Unauthorized"].ID.Bytes()[:4]) { + return registry.UnpackUnauthorizedError(raw[4:]) + } + if bytes.Equal(raw[:4], registry.abi.Errors["VehicleNotPaired"].ID.Bytes()[:4]) { + return registry.UnpackVehicleNotPairedError(raw[4:]) + } + if bytes.Equal(raw[:4], registry.abi.Errors["VehiclePaired"].ID.Bytes()[:4]) { + return registry.UnpackVehiclePairedError(raw[4:]) + } + if bytes.Equal(raw[:4], registry.abi.Errors["VehicleStreamAlreadySet"].ID.Bytes()[:4]) { + return registry.UnpackVehicleStreamAlreadySetError(raw[4:]) + } + if bytes.Equal(raw[:4], registry.abi.Errors["VehicleStreamNotSet"].ID.Bytes()[:4]) { + return registry.UnpackVehicleStreamNotSetError(raw[4:]) + } + if bytes.Equal(raw[:4], registry.abi.Errors["ZeroAddress"].ID.Bytes()[:4]) { + return registry.UnpackZeroAddressError(raw[4:]) + } + return nil, errors.New("Unknown error") +} + +// RegistryAdNotClaimed represents a AdNotClaimed error raised by the Registry contract. +type RegistryAdNotClaimed struct { + Id *big.Int +} + +// ErrorID returns the hash of canonical representation of the error's signature. +// +// Solidity: error AdNotClaimed(uint256 id) +func RegistryAdNotClaimedErrorID() common.Hash { + return common.HexToHash("0x15bdaac1be0e2a0c9761011917ddec5f4cf98a973f9ab2f15d5d48956befe371") +} + +// UnpackAdNotClaimedError is the Go binding used to decode the provided +// error data into the corresponding Go error struct. +// +// Solidity: error AdNotClaimed(uint256 id) +func (registry *Registry) UnpackAdNotClaimedError(raw []byte) (*RegistryAdNotClaimed, error) { + out := new(RegistryAdNotClaimed) + if err := registry.abi.UnpackIntoInterface(out, "AdNotClaimed", raw); err != nil { + return nil, err + } + return out, nil +} + +// RegistryAdNotPaired represents a AdNotPaired error raised by the Registry contract. +type RegistryAdNotPaired struct { + Id *big.Int +} + +// ErrorID returns the hash of canonical representation of the error's signature. +// +// Solidity: error AdNotPaired(uint256 id) +func RegistryAdNotPairedErrorID() common.Hash { + return common.HexToHash("0xd11e35b4971dae42662570b97c37946171bb77e9a71b0a1d04b690f6406b76c4") +} + +// UnpackAdNotPairedError is the Go binding used to decode the provided +// error data into the corresponding Go error struct. +// +// Solidity: error AdNotPaired(uint256 id) +func (registry *Registry) UnpackAdNotPairedError(raw []byte) (*RegistryAdNotPaired, error) { + out := new(RegistryAdNotPaired) + if err := registry.abi.UnpackIntoInterface(out, "AdNotPaired", raw); err != nil { + return nil, err + } + return out, nil +} + +// RegistryAdPaired represents a AdPaired error raised by the Registry contract. +type RegistryAdPaired struct { + Id *big.Int +} + +// ErrorID returns the hash of canonical representation of the error's signature. +// +// Solidity: error AdPaired(uint256 id) +func RegistryAdPairedErrorID() common.Hash { + return common.HexToHash("0x762116ae8a8b930724aeeb5909dbc1cea9ec682c699c9518147b46ec45e97ac2") +} + +// UnpackAdPairedError is the Go binding used to decode the provided +// error data into the corresponding Go error struct. +// +// Solidity: error AdPaired(uint256 id) +func (registry *Registry) UnpackAdPairedError(raw []byte) (*RegistryAdPaired, error) { + out := new(RegistryAdPaired) + if err := registry.abi.UnpackIntoInterface(out, "AdPaired", raw); err != nil { + return nil, err + } + return out, nil +} + +// RegistryAttributeExists represents a AttributeExists error raised by the Registry contract. +type RegistryAttributeExists struct { + Attr string +} + +// ErrorID returns the hash of canonical representation of the error's signature. +// +// Solidity: error AttributeExists(string attr) +func RegistryAttributeExistsErrorID() common.Hash { + return common.HexToHash("0x130e2668a02eb11e486d84a088394487a46ff95792d0b0ad51374d76189d2c60") +} + +// UnpackAttributeExistsError is the Go binding used to decode the provided +// error data into the corresponding Go error struct. +// +// Solidity: error AttributeExists(string attr) +func (registry *Registry) UnpackAttributeExistsError(raw []byte) (*RegistryAttributeExists, error) { + out := new(RegistryAttributeExists) + if err := registry.abi.UnpackIntoInterface(out, "AttributeExists", raw); err != nil { + return nil, err + } + return out, nil +} + +// RegistryAttributeNotWhitelisted represents a AttributeNotWhitelisted error raised by the Registry contract. +type RegistryAttributeNotWhitelisted struct { + Attr string +} + +// ErrorID returns the hash of canonical representation of the error's signature. +// +// Solidity: error AttributeNotWhitelisted(string attr) +func RegistryAttributeNotWhitelistedErrorID() common.Hash { + return common.HexToHash("0x1c48d49ec8bb0555686dae5e6beabbade4ccfaa91112fba47f56ed431697cb12") +} + +// UnpackAttributeNotWhitelistedError is the Go binding used to decode the provided +// error data into the corresponding Go error struct. +// +// Solidity: error AttributeNotWhitelisted(string attr) +func (registry *Registry) UnpackAttributeNotWhitelistedError(raw []byte) (*RegistryAttributeNotWhitelisted, error) { + out := new(RegistryAttributeNotWhitelisted) + if err := registry.abi.UnpackIntoInterface(out, "AttributeNotWhitelisted", raw); err != nil { + return nil, err + } + return out, nil +} + +// RegistryChainNotSupported represents a ChainNotSupported error raised by the Registry contract. +type RegistryChainNotSupported struct { + Chainid *big.Int +} + +// ErrorID returns the hash of canonical representation of the error's signature. +// +// Solidity: error ChainNotSupported(uint256 chainid) +func RegistryChainNotSupportedErrorID() common.Hash { + return common.HexToHash("0x264e42cf014c265c433be0c2e7b5e850eda0125d911783f80532591a387c1077") +} + +// UnpackChainNotSupportedError is the Go binding used to decode the provided +// error data into the corresponding Go error struct. +// +// Solidity: error ChainNotSupported(uint256 chainid) +func (registry *Registry) UnpackChainNotSupportedError(raw []byte) (*RegistryChainNotSupported, error) { + out := new(RegistryChainNotSupported) + if err := registry.abi.UnpackIntoInterface(out, "ChainNotSupported", raw); err != nil { + return nil, err + } + return out, nil +} + +// RegistryDeviceAlreadyClaimed represents a DeviceAlreadyClaimed error raised by the Registry contract. +type RegistryDeviceAlreadyClaimed struct { + Id *big.Int +} + +// ErrorID returns the hash of canonical representation of the error's signature. +// +// Solidity: error DeviceAlreadyClaimed(uint256 id) +func RegistryDeviceAlreadyClaimedErrorID() common.Hash { + return common.HexToHash("0x4dec88eb0d830c1ca9d95404eb1837ffe3aae8bf45755195dba9682826bb8fd2") +} + +// UnpackDeviceAlreadyClaimedError is the Go binding used to decode the provided +// error data into the corresponding Go error struct. +// +// Solidity: error DeviceAlreadyClaimed(uint256 id) +func (registry *Registry) UnpackDeviceAlreadyClaimedError(raw []byte) (*RegistryDeviceAlreadyClaimed, error) { + out := new(RegistryDeviceAlreadyClaimed) + if err := registry.abi.UnpackIntoInterface(out, "DeviceAlreadyClaimed", raw); err != nil { + return nil, err + } + return out, nil +} + +// RegistryDeviceAlreadyRegistered represents a DeviceAlreadyRegistered error raised by the Registry contract. +type RegistryDeviceAlreadyRegistered struct { + Addr common.Address +} + +// ErrorID returns the hash of canonical representation of the error's signature. +// +// Solidity: error DeviceAlreadyRegistered(address addr) +func RegistryDeviceAlreadyRegisteredErrorID() common.Hash { + return common.HexToHash("0xcd76e8452330cdbbbf9509933000c6f133cc88a5a3d566b798d9edcc155d0418") +} + +// UnpackDeviceAlreadyRegisteredError is the Go binding used to decode the provided +// error data into the corresponding Go error struct. +// +// Solidity: error DeviceAlreadyRegistered(address addr) +func (registry *Registry) UnpackDeviceAlreadyRegisteredError(raw []byte) (*RegistryDeviceAlreadyRegistered, error) { + out := new(RegistryDeviceAlreadyRegistered) + if err := registry.abi.UnpackIntoInterface(out, "DeviceAlreadyRegistered", raw); err != nil { + return nil, err + } + return out, nil +} + +// RegistryInvalidAdSignature represents a InvalidAdSignature error raised by the Registry contract. +type RegistryInvalidAdSignature struct { +} + +// ErrorID returns the hash of canonical representation of the error's signature. +// +// Solidity: error InvalidAdSignature() +func RegistryInvalidAdSignatureErrorID() common.Hash { + return common.HexToHash("0xdbe5383bdecd4a5402df73a3bf3051995cd71fa7360ed566cd1144b08e2679b4") +} + +// UnpackInvalidAdSignatureError is the Go binding used to decode the provided +// error data into the corresponding Go error struct. +// +// Solidity: error InvalidAdSignature() +func (registry *Registry) UnpackInvalidAdSignatureError(raw []byte) (*RegistryInvalidAdSignature, error) { + out := new(RegistryInvalidAdSignature) + if err := registry.abi.UnpackIntoInterface(out, "InvalidAdSignature", raw); err != nil { + return nil, err + } + return out, nil +} + +// RegistryInvalidLicense represents a InvalidLicense error raised by the Registry contract. +type RegistryInvalidLicense struct { +} + +// ErrorID returns the hash of canonical representation of the error's signature. +// +// Solidity: error InvalidLicense() +func RegistryInvalidLicenseErrorID() common.Hash { + return common.HexToHash("0x5d6085194bcb0cc07849b946a0dd77e25c61745c7e0cad558ffd9367e5e80dcd") +} + +// UnpackInvalidLicenseError is the Go binding used to decode the provided +// error data into the corresponding Go error struct. +// +// Solidity: error InvalidLicense() +func (registry *Registry) UnpackInvalidLicenseError(raw []byte) (*RegistryInvalidLicense, error) { + out := new(RegistryInvalidLicense) + if err := registry.abi.UnpackIntoInterface(out, "InvalidLicense", raw); err != nil { + return nil, err + } + return out, nil +} + +// RegistryInvalidManufacturerId represents a InvalidManufacturerId error raised by the Registry contract. +type RegistryInvalidManufacturerId struct { + Id *big.Int +} + +// ErrorID returns the hash of canonical representation of the error's signature. +// +// Solidity: error InvalidManufacturerId(uint256 id) +func RegistryInvalidManufacturerIdErrorID() common.Hash { + return common.HexToHash("0xa25b0cf94058dc9615c073cf4383515615a235aaee7f1df35c97ae52ac0a1101") +} + +// UnpackInvalidManufacturerIdError is the Go binding used to decode the provided +// error data into the corresponding Go error struct. +// +// Solidity: error InvalidManufacturerId(uint256 id) +func (registry *Registry) UnpackInvalidManufacturerIdError(raw []byte) (*RegistryInvalidManufacturerId, error) { + out := new(RegistryInvalidManufacturerId) + if err := registry.abi.UnpackIntoInterface(out, "InvalidManufacturerId", raw); err != nil { + return nil, err + } + return out, nil +} + +// RegistryInvalidNode represents a InvalidNode error raised by the Registry contract. +type RegistryInvalidNode struct { + Proxy common.Address + Id *big.Int +} + +// ErrorID returns the hash of canonical representation of the error's signature. +// +// Solidity: error InvalidNode(address proxy, uint256 id) +func RegistryInvalidNodeErrorID() common.Hash { + return common.HexToHash("0xe3ca963973068fb7498ab3ab9f953baf821d09dc7e032c626537dbebf1b155cc") +} + +// UnpackInvalidNodeError is the Go binding used to decode the provided +// error data into the corresponding Go error struct. +// +// Solidity: error InvalidNode(address proxy, uint256 id) +func (registry *Registry) UnpackInvalidNodeError(raw []byte) (*RegistryInvalidNode, error) { + out := new(RegistryInvalidNode) + if err := registry.abi.UnpackIntoInterface(out, "InvalidNode", raw); err != nil { + return nil, err + } + return out, nil +} + +// RegistryInvalidOwnerSignature represents a InvalidOwnerSignature error raised by the Registry contract. +type RegistryInvalidOwnerSignature struct { +} + +// ErrorID returns the hash of canonical representation of the error's signature. +// +// Solidity: error InvalidOwnerSignature() +func RegistryInvalidOwnerSignatureErrorID() common.Hash { + return common.HexToHash("0x38a85a8de553ff50a410d75418f20d721cda64b2bff141e621600541fd25cd8b") +} + +// UnpackInvalidOwnerSignatureError is the Go binding used to decode the provided +// error data into the corresponding Go error struct. +// +// Solidity: error InvalidOwnerSignature() +func (registry *Registry) UnpackInvalidOwnerSignatureError(raw []byte) (*RegistryInvalidOwnerSignature, error) { + out := new(RegistryInvalidOwnerSignature) + if err := registry.abi.UnpackIntoInterface(out, "InvalidOwnerSignature", raw); err != nil { + return nil, err + } + return out, nil +} + +// RegistryInvalidParentNode represents a InvalidParentNode error raised by the Registry contract. +type RegistryInvalidParentNode struct { + Id *big.Int +} + +// ErrorID returns the hash of canonical representation of the error's signature. +// +// Solidity: error InvalidParentNode(uint256 id) +func RegistryInvalidParentNodeErrorID() common.Hash { + return common.HexToHash("0x5299bab74f41ef2a254c9e5e70f4be90fe6e9303bf5d6a2055645af31970a34c") +} + +// UnpackInvalidParentNodeError is the Go binding used to decode the provided +// error data into the corresponding Go error struct. +// +// Solidity: error InvalidParentNode(uint256 id) +func (registry *Registry) UnpackInvalidParentNodeError(raw []byte) (*RegistryInvalidParentNode, error) { + out := new(RegistryInvalidParentNode) + if err := registry.abi.UnpackIntoInterface(out, "InvalidParentNode", raw); err != nil { + return nil, err + } + return out, nil +} + +// RegistryInvalidSdSignature represents a InvalidSdSignature error raised by the Registry contract. +type RegistryInvalidSdSignature struct { +} + +// ErrorID returns the hash of canonical representation of the error's signature. +// +// Solidity: error InvalidSdSignature() +func RegistryInvalidSdSignatureErrorID() common.Hash { + return common.HexToHash("0xf8e95d55bfc0be096004b9233ca2cb04261693197ff83b908710d35ac9418943") +} + +// UnpackInvalidSdSignatureError is the Go binding used to decode the provided +// error data into the corresponding Go error struct. +// +// Solidity: error InvalidSdSignature() +func (registry *Registry) UnpackInvalidSdSignatureError(raw []byte) (*RegistryInvalidSdSignature, error) { + out := new(RegistryInvalidSdSignature) + if err := registry.abi.UnpackIntoInterface(out, "InvalidSdSignature", raw); err != nil { + return nil, err + } + return out, nil +} + +// RegistryInvalidSigner represents a InvalidSigner error raised by the Registry contract. +type RegistryInvalidSigner struct { +} + +// ErrorID returns the hash of canonical representation of the error's signature. +// +// Solidity: error InvalidSigner() +func RegistryInvalidSignerErrorID() common.Hash { + return common.HexToHash("0x815e1d64efb74fbe314c20a2b8a2335d18bce12a19165e447fa36bcb35959528") +} + +// UnpackInvalidSignerError is the Go binding used to decode the provided +// error data into the corresponding Go error struct. +// +// Solidity: error InvalidSigner() +func (registry *Registry) UnpackInvalidSignerError(raw []byte) (*RegistryInvalidSigner, error) { + out := new(RegistryInvalidSigner) + if err := registry.abi.UnpackIntoInterface(out, "InvalidSigner", raw); err != nil { + return nil, err + } + return out, nil +} + +// RegistryInvalidStorageNode represents a InvalidStorageNode error raised by the Registry contract. +type RegistryInvalidStorageNode struct { + StorageNodeId *big.Int +} + +// ErrorID returns the hash of canonical representation of the error's signature. +// +// Solidity: error InvalidStorageNode(uint256 storageNodeId) +func RegistryInvalidStorageNodeErrorID() common.Hash { + return common.HexToHash("0x65745f79c5d0bb62a0725993661b73ba477e33a665bb90b94f80e32e1a53fa91") +} + +// UnpackInvalidStorageNodeError is the Go binding used to decode the provided +// error data into the corresponding Go error struct. +// +// Solidity: error InvalidStorageNode(uint256 storageNodeId) +func (registry *Registry) UnpackInvalidStorageNodeError(raw []byte) (*RegistryInvalidStorageNode, error) { + out := new(RegistryInvalidStorageNode) + if err := registry.abi.UnpackIntoInterface(out, "InvalidStorageNode", raw); err != nil { + return nil, err + } + return out, nil +} + +// RegistryNoStreamrPermission represents a NoStreamrPermission error raised by the Registry contract. +type RegistryNoStreamrPermission struct { + User common.Address + PermissionType uint8 +} + +// ErrorID returns the hash of canonical representation of the error's signature. +// +// Solidity: error NoStreamrPermission(address user, uint8 permissionType) +func RegistryNoStreamrPermissionErrorID() common.Hash { + return common.HexToHash("0xc8093930947f5ecc4dbef3fa0c4f508b8943f94279a0d964828c34e8edca3643") +} + +// UnpackNoStreamrPermissionError is the Go binding used to decode the provided +// error data into the corresponding Go error struct. +// +// Solidity: error NoStreamrPermission(address user, uint8 permissionType) +func (registry *Registry) UnpackNoStreamrPermissionError(raw []byte) (*RegistryNoStreamrPermission, error) { + out := new(RegistryNoStreamrPermission) + if err := registry.abi.UnpackIntoInterface(out, "NoStreamrPermission", raw); err != nil { + return nil, err + } + return out, nil +} + +// RegistryOnlyNftProxy represents a OnlyNftProxy error raised by the Registry contract. +type RegistryOnlyNftProxy struct { +} + +// ErrorID returns the hash of canonical representation of the error's signature. +// +// Solidity: error OnlyNftProxy() +func RegistryOnlyNftProxyErrorID() common.Hash { + return common.HexToHash("0x87e6ac10b28949367025eba1127c31f21c7b31476813cf4e87a0a58098b6c93e") +} + +// UnpackOnlyNftProxyError is the Go binding used to decode the provided +// error data into the corresponding Go error struct. +// +// Solidity: error OnlyNftProxy() +func (registry *Registry) UnpackOnlyNftProxyError(raw []byte) (*RegistryOnlyNftProxy, error) { + out := new(RegistryOnlyNftProxy) + if err := registry.abi.UnpackIntoInterface(out, "OnlyNftProxy", raw); err != nil { + return nil, err + } + return out, nil +} + +// RegistryOwnersDoNotMatch represents a OwnersDoNotMatch error raised by the Registry contract. +type RegistryOwnersDoNotMatch struct { +} + +// ErrorID returns the hash of canonical representation of the error's signature. +// +// Solidity: error OwnersDoNotMatch() +func RegistryOwnersDoNotMatchErrorID() common.Hash { + return common.HexToHash("0x4fc280abbda3061871aa8c4cad5982371174654cf418a6cf99253cba25a94ccc") +} + +// UnpackOwnersDoNotMatchError is the Go binding used to decode the provided +// error data into the corresponding Go error struct. +// +// Solidity: error OwnersDoNotMatch() +func (registry *Registry) UnpackOwnersDoNotMatchError(raw []byte) (*RegistryOwnersDoNotMatch, error) { + out := new(RegistryOwnersDoNotMatch) + if err := registry.abi.UnpackIntoInterface(out, "OwnersDoNotMatch", raw); err != nil { + return nil, err + } + return out, nil +} + +// RegistryStreamDoesNotExist represents a StreamDoesNotExist error raised by the Registry contract. +type RegistryStreamDoesNotExist struct { + StreamId string +} + +// ErrorID returns the hash of canonical representation of the error's signature. +// +// Solidity: error StreamDoesNotExist(string streamId) +func RegistryStreamDoesNotExistErrorID() common.Hash { + return common.HexToHash("0xa3f1925ad9ba3e696280acf57ce6b28d27bad007f96b0df84e2795ac494c3dcc") +} + +// UnpackStreamDoesNotExistError is the Go binding used to decode the provided +// error data into the corresponding Go error struct. +// +// Solidity: error StreamDoesNotExist(string streamId) +func (registry *Registry) UnpackStreamDoesNotExistError(raw []byte) (*RegistryStreamDoesNotExist, error) { + out := new(RegistryStreamDoesNotExist) + if err := registry.abi.UnpackIntoInterface(out, "StreamDoesNotExist", raw); err != nil { + return nil, err + } + return out, nil +} + +// RegistryTableAlreadyExists represents a TableAlreadyExists error raised by the Registry contract. +type RegistryTableAlreadyExists struct { + ManufacturerId *big.Int +} + +// ErrorID returns the hash of canonical representation of the error's signature. +// +// Solidity: error TableAlreadyExists(uint256 manufacturerId) +func RegistryTableAlreadyExistsErrorID() common.Hash { + return common.HexToHash("0x3784d0a9c3a107b8ee59f40b224472dcb1fbef99a8da4205a255dc53eb6dc1c1") +} + +// UnpackTableAlreadyExistsError is the Go binding used to decode the provided +// error data into the corresponding Go error struct. +// +// Solidity: error TableAlreadyExists(uint256 manufacturerId) +func (registry *Registry) UnpackTableAlreadyExistsError(raw []byte) (*RegistryTableAlreadyExists, error) { + out := new(RegistryTableAlreadyExists) + if err := registry.abi.UnpackIntoInterface(out, "TableAlreadyExists", raw); err != nil { + return nil, err + } + return out, nil +} + +// RegistryTableDoesNotExist represents a TableDoesNotExist error raised by the Registry contract. +type RegistryTableDoesNotExist struct { + TableId *big.Int +} + +// ErrorID returns the hash of canonical representation of the error's signature. +// +// Solidity: error TableDoesNotExist(uint256 tableId) +func RegistryTableDoesNotExistErrorID() common.Hash { + return common.HexToHash("0x45cbe5ece2f056835d1a16680e0a590bbeab039ea3a2ed4a66ffc8529e509bec") +} + +// UnpackTableDoesNotExistError is the Go binding used to decode the provided +// error data into the corresponding Go error struct. +// +// Solidity: error TableDoesNotExist(uint256 tableId) +func (registry *Registry) UnpackTableDoesNotExistError(raw []byte) (*RegistryTableDoesNotExist, error) { + out := new(RegistryTableDoesNotExist) + if err := registry.abi.UnpackIntoInterface(out, "TableDoesNotExist", raw); err != nil { + return nil, err + } + return out, nil +} + +// RegistryUintUtilsInsufficientHexLength represents a UintUtils__InsufficientHexLength error raised by the Registry contract. +type RegistryUintUtilsInsufficientHexLength struct { +} + +// ErrorID returns the hash of canonical representation of the error's signature. +// +// Solidity: error UintUtils__InsufficientHexLength() +func RegistryUintUtilsInsufficientHexLengthErrorID() common.Hash { + return common.HexToHash("0xc9134785d3cbe2b640cac727ffdeab73ad3cd3ee091343c660e1fcfea682c654") +} + +// UnpackUintUtilsInsufficientHexLengthError is the Go binding used to decode the provided +// error data into the corresponding Go error struct. +// +// Solidity: error UintUtils__InsufficientHexLength() +func (registry *Registry) UnpackUintUtilsInsufficientHexLengthError(raw []byte) (*RegistryUintUtilsInsufficientHexLength, error) { + out := new(RegistryUintUtilsInsufficientHexLength) + if err := registry.abi.UnpackIntoInterface(out, "UintUtilsInsufficientHexLength", raw); err != nil { + return nil, err + } + return out, nil +} + +// RegistryUnauthorized represents a Unauthorized error raised by the Registry contract. +type RegistryUnauthorized struct { + Caller common.Address +} + +// ErrorID returns the hash of canonical representation of the error's signature. +// +// Solidity: error Unauthorized(address caller) +func RegistryUnauthorizedErrorID() common.Hash { + return common.HexToHash("0x8e4a23d6a5d81f013eca4bc92aeb9214ccafcaebd1f097c350c922d6e19122d5") +} + +// UnpackUnauthorizedError is the Go binding used to decode the provided +// error data into the corresponding Go error struct. +// +// Solidity: error Unauthorized(address caller) +func (registry *Registry) UnpackUnauthorizedError(raw []byte) (*RegistryUnauthorized, error) { + out := new(RegistryUnauthorized) + if err := registry.abi.UnpackIntoInterface(out, "Unauthorized", raw); err != nil { + return nil, err + } + return out, nil +} + +// RegistryVehicleNotPaired represents a VehicleNotPaired error raised by the Registry contract. +type RegistryVehicleNotPaired struct { + Id *big.Int +} + +// ErrorID returns the hash of canonical representation of the error's signature. +// +// Solidity: error VehicleNotPaired(uint256 id) +func RegistryVehicleNotPairedErrorID() common.Hash { + return common.HexToHash("0x2d91fcb5497041df8ae21845cca8912e2d59c0151eebbc0f6c20d33479efaec5") +} + +// UnpackVehicleNotPairedError is the Go binding used to decode the provided +// error data into the corresponding Go error struct. +// +// Solidity: error VehicleNotPaired(uint256 id) +func (registry *Registry) UnpackVehicleNotPairedError(raw []byte) (*RegistryVehicleNotPaired, error) { + out := new(RegistryVehicleNotPaired) + if err := registry.abi.UnpackIntoInterface(out, "VehicleNotPaired", raw); err != nil { + return nil, err + } + return out, nil +} + +// RegistryVehiclePaired represents a VehiclePaired error raised by the Registry contract. +type RegistryVehiclePaired struct { + Id *big.Int +} + +// ErrorID returns the hash of canonical representation of the error's signature. +// +// Solidity: error VehiclePaired(uint256 id) +func RegistryVehiclePairedErrorID() common.Hash { + return common.HexToHash("0xc46a516889a8aec276b120978da7bd9b43a972a8400e7328398077b0c2ccf612") +} + +// UnpackVehiclePairedError is the Go binding used to decode the provided +// error data into the corresponding Go error struct. +// +// Solidity: error VehiclePaired(uint256 id) +func (registry *Registry) UnpackVehiclePairedError(raw []byte) (*RegistryVehiclePaired, error) { + out := new(RegistryVehiclePaired) + if err := registry.abi.UnpackIntoInterface(out, "VehiclePaired", raw); err != nil { + return nil, err + } + return out, nil +} + +// RegistryVehicleStreamAlreadySet represents a VehicleStreamAlreadySet error raised by the Registry contract. +type RegistryVehicleStreamAlreadySet struct { + VehicleId *big.Int + StreamId string +} + +// ErrorID returns the hash of canonical representation of the error's signature. +// +// Solidity: error VehicleStreamAlreadySet(uint256 vehicleId, string streamId) +func RegistryVehicleStreamAlreadySetErrorID() common.Hash { + return common.HexToHash("0xf7959f9ec3a8654f8c7eae9e4d645ba04042d9d15e594135952938ea2a927643") +} + +// UnpackVehicleStreamAlreadySetError is the Go binding used to decode the provided +// error data into the corresponding Go error struct. +// +// Solidity: error VehicleStreamAlreadySet(uint256 vehicleId, string streamId) +func (registry *Registry) UnpackVehicleStreamAlreadySetError(raw []byte) (*RegistryVehicleStreamAlreadySet, error) { + out := new(RegistryVehicleStreamAlreadySet) + if err := registry.abi.UnpackIntoInterface(out, "VehicleStreamAlreadySet", raw); err != nil { + return nil, err + } + return out, nil +} + +// RegistryVehicleStreamNotSet represents a VehicleStreamNotSet error raised by the Registry contract. +type RegistryVehicleStreamNotSet struct { + VehicleId *big.Int +} + +// ErrorID returns the hash of canonical representation of the error's signature. +// +// Solidity: error VehicleStreamNotSet(uint256 vehicleId) +func RegistryVehicleStreamNotSetErrorID() common.Hash { + return common.HexToHash("0x42e5dbbefdd82cdf234a5aa432b115f629a3bfb4b3a80c0795388c57d3542636") +} + +// UnpackVehicleStreamNotSetError is the Go binding used to decode the provided +// error data into the corresponding Go error struct. +// +// Solidity: error VehicleStreamNotSet(uint256 vehicleId) +func (registry *Registry) UnpackVehicleStreamNotSetError(raw []byte) (*RegistryVehicleStreamNotSet, error) { + out := new(RegistryVehicleStreamNotSet) + if err := registry.abi.UnpackIntoInterface(out, "VehicleStreamNotSet", raw); err != nil { + return nil, err + } + return out, nil +} + +// RegistryZeroAddress represents a ZeroAddress error raised by the Registry contract. +type RegistryZeroAddress struct { +} + +// ErrorID returns the hash of canonical representation of the error's signature. +// +// Solidity: error ZeroAddress() +func RegistryZeroAddressErrorID() common.Hash { + return common.HexToHash("0xd92e233df2717d4a40030e20904abd27b68fcbeede117eaaccbbdac9618c8c73") +} + +// UnpackZeroAddressError is the Go binding used to decode the provided +// error data into the corresponding Go error struct. +// +// Solidity: error ZeroAddress() +func (registry *Registry) UnpackZeroAddressError(raw []byte) (*RegistryZeroAddress, error) { + out := new(RegistryZeroAddress) + if err := registry.abi.UnpackIntoInterface(out, "ZeroAddress", raw); err != nil { + return nil, err + } + return out, nil +} diff --git a/bindings/syntheticDeviceId/syntheticDeviceId.go b/bindings/syntheticDeviceId/syntheticDeviceId.go new file mode 100644 index 00000000..de24d55c --- /dev/null +++ b/bindings/syntheticDeviceId/syntheticDeviceId.go @@ -0,0 +1,2187 @@ +// Code generated via abigen V2 - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package syntheticDeviceId + +import ( + "bytes" + "errors" + "math/big" + + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/accounts/abi/bind/v2" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" +) + +// Reference imports to suppress errors if they are not otherwise used. +var ( + _ = bytes.Equal + _ = errors.New + _ = big.NewInt + _ = common.Big1 + _ = types.BloomLookup + _ = abi.ConvertType +) + +// MultiPrivilegeSetPrivilegeData is an auto generated low-level Go binding around an user-defined struct. +type MultiPrivilegeSetPrivilegeData struct { + TokenId *big.Int + PrivId *big.Int + User common.Address + Expires *big.Int +} + +// SyntheticDeviceIdMetaData contains all meta data concerning the SyntheticDeviceId contract. +var SyntheticDeviceIdMetaData = bind.MetaData{ + ABI: "[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"Unauthorized\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroAddress\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AdminChanged\",\"type\":\"event\"},{\"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\":false,\"internalType\":\"uint256\",\"name\":\"_fromTokenId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_toTokenId\",\"type\":\"uint256\"}],\"name\":\"BatchMetadataUpdate\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"beacon\",\"type\":\"address\"}],\"name\":\"BeaconUpgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_tokenId\",\"type\":\"uint256\"}],\"name\":\"MetadataUpdate\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"privilegeId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"enabled\",\"type\":\"bool\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"description\",\"type\":\"string\"}],\"name\":\"PrivilegeCreated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"privilegeId\",\"type\":\"uint256\"}],\"name\":\"PrivilegeDisabled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"privilegeId\",\"type\":\"uint256\"}],\"name\":\"PrivilegeEnabled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"version\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"privId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"expires\",\"type\":\"uint256\"}],\"name\":\"PrivilegeSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"previousAdminRole\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"newAdminRole\",\"type\":\"bytes32\"}],\"name\":\"RoleAdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleGranted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleRevoked\",\"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\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"BURNER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MINTER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"TRANSFERER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"UPGRADER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"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\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"burn\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"enabled\",\"type\":\"bool\"},{\"internalType\":\"string\",\"name\":\"description\",\"type\":\"string\"}],\"name\":\"createPrivilege\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"dimoRegistry\",\"outputs\":[{\"internalType\":\"contractIDimoRegistry\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"privId\",\"type\":\"uint256\"}],\"name\":\"disablePrivilege\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"privId\",\"type\":\"uint256\"}],\"name\":\"enablePrivilege\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"exists\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"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\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleAdmin\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"grantRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"privId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"}],\"name\":\"hasPrivilege\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"hasRole\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"name_\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"symbol_\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"baseUri_\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"dimoRegistry_\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"trustedForwarders_\",\"type\":\"address[]\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"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\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"privilegeEntry\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"privId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"}],\"name\":\"privilegeExpiresAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"privilegeRecord\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"enabled\",\"type\":\"bool\"},{\"internalType\":\"string\",\"name\":\"description\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"proxiableUUID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"renounceRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"revokeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"safeMint\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"uri\",\"type\":\"string\"}],\"name\":\"safeMint\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"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\":\"string\",\"name\":\"baseURI_\",\"type\":\"string\"}],\"name\":\"setBaseURI\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"dimoRegistry_\",\"type\":\"address\"}],\"name\":\"setDimoRegistryAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"privId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"expires\",\"type\":\"uint256\"}],\"name\":\"setPrivilege\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"privId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"expires\",\"type\":\"uint256\"}],\"internalType\":\"structMultiPrivilege.SetPrivilegeData[]\",\"name\":\"privData\",\"type\":\"tuple[]\"}],\"name\":\"setPrivileges\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"trusted\",\"type\":\"bool\"}],\"name\":\"setTrustedForwarder\",\"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\":\"\",\"type\":\"uint256\"}],\"name\":\"tokenIdToVersion\",\"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\":[{\"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\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"trustedForwarders\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"}]", + ID: "SyntheticDeviceId", +} + +// SyntheticDeviceId is an auto generated Go binding around an Ethereum contract. +type SyntheticDeviceId struct { + abi abi.ABI +} + +// NewSyntheticDeviceId creates a new instance of SyntheticDeviceId. +func NewSyntheticDeviceId() *SyntheticDeviceId { + parsed, err := SyntheticDeviceIdMetaData.ParseABI() + if err != nil { + panic(errors.New("invalid ABI: " + err.Error())) + } + return &SyntheticDeviceId{abi: *parsed} +} + +// Instance creates a wrapper for a deployed contract instance at the given address. +// Use this to create the instance object passed to abigen v2 library functions Call, Transact, etc. +func (c *SyntheticDeviceId) Instance(backend bind.ContractBackend, addr common.Address) *bind.BoundContract { + return bind.NewBoundContract(addr, c.abi, backend, backend, backend) +} + +// PackADMINROLE is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x75b238fc. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function ADMIN_ROLE() view returns(bytes32) +func (syntheticDeviceId *SyntheticDeviceId) PackADMINROLE() []byte { + enc, err := syntheticDeviceId.abi.Pack("ADMIN_ROLE") + if err != nil { + panic(err) + } + return enc +} + +// TryPackADMINROLE is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x75b238fc. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function ADMIN_ROLE() view returns(bytes32) +func (syntheticDeviceId *SyntheticDeviceId) TryPackADMINROLE() ([]byte, error) { + return syntheticDeviceId.abi.Pack("ADMIN_ROLE") +} + +// UnpackADMINROLE is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0x75b238fc. +// +// Solidity: function ADMIN_ROLE() view returns(bytes32) +func (syntheticDeviceId *SyntheticDeviceId) UnpackADMINROLE(data []byte) ([32]byte, error) { + out, err := syntheticDeviceId.abi.Unpack("ADMIN_ROLE", data) + if err != nil { + return *new([32]byte), err + } + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + return out0, nil +} + +// PackBURNERROLE is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x282c51f3. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function BURNER_ROLE() view returns(bytes32) +func (syntheticDeviceId *SyntheticDeviceId) PackBURNERROLE() []byte { + enc, err := syntheticDeviceId.abi.Pack("BURNER_ROLE") + if err != nil { + panic(err) + } + return enc +} + +// TryPackBURNERROLE is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x282c51f3. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function BURNER_ROLE() view returns(bytes32) +func (syntheticDeviceId *SyntheticDeviceId) TryPackBURNERROLE() ([]byte, error) { + return syntheticDeviceId.abi.Pack("BURNER_ROLE") +} + +// UnpackBURNERROLE is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0x282c51f3. +// +// Solidity: function BURNER_ROLE() view returns(bytes32) +func (syntheticDeviceId *SyntheticDeviceId) UnpackBURNERROLE(data []byte) ([32]byte, error) { + out, err := syntheticDeviceId.abi.Unpack("BURNER_ROLE", data) + if err != nil { + return *new([32]byte), err + } + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + return out0, nil +} + +// PackDEFAULTADMINROLE is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xa217fddf. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function DEFAULT_ADMIN_ROLE() view returns(bytes32) +func (syntheticDeviceId *SyntheticDeviceId) PackDEFAULTADMINROLE() []byte { + enc, err := syntheticDeviceId.abi.Pack("DEFAULT_ADMIN_ROLE") + if err != nil { + panic(err) + } + return enc +} + +// TryPackDEFAULTADMINROLE is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xa217fddf. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function DEFAULT_ADMIN_ROLE() view returns(bytes32) +func (syntheticDeviceId *SyntheticDeviceId) TryPackDEFAULTADMINROLE() ([]byte, error) { + return syntheticDeviceId.abi.Pack("DEFAULT_ADMIN_ROLE") +} + +// UnpackDEFAULTADMINROLE is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0xa217fddf. +// +// Solidity: function DEFAULT_ADMIN_ROLE() view returns(bytes32) +func (syntheticDeviceId *SyntheticDeviceId) UnpackDEFAULTADMINROLE(data []byte) ([32]byte, error) { + out, err := syntheticDeviceId.abi.Unpack("DEFAULT_ADMIN_ROLE", data) + if err != nil { + return *new([32]byte), err + } + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + return out0, nil +} + +// PackMINTERROLE is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xd5391393. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function MINTER_ROLE() view returns(bytes32) +func (syntheticDeviceId *SyntheticDeviceId) PackMINTERROLE() []byte { + enc, err := syntheticDeviceId.abi.Pack("MINTER_ROLE") + if err != nil { + panic(err) + } + return enc +} + +// TryPackMINTERROLE is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xd5391393. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function MINTER_ROLE() view returns(bytes32) +func (syntheticDeviceId *SyntheticDeviceId) TryPackMINTERROLE() ([]byte, error) { + return syntheticDeviceId.abi.Pack("MINTER_ROLE") +} + +// UnpackMINTERROLE is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0xd5391393. +// +// Solidity: function MINTER_ROLE() view returns(bytes32) +func (syntheticDeviceId *SyntheticDeviceId) UnpackMINTERROLE(data []byte) ([32]byte, error) { + out, err := syntheticDeviceId.abi.Unpack("MINTER_ROLE", data) + if err != nil { + return *new([32]byte), err + } + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + return out0, nil +} + +// PackTRANSFERERROLE is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x0ade7dc1. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function TRANSFERER_ROLE() view returns(bytes32) +func (syntheticDeviceId *SyntheticDeviceId) PackTRANSFERERROLE() []byte { + enc, err := syntheticDeviceId.abi.Pack("TRANSFERER_ROLE") + if err != nil { + panic(err) + } + return enc +} + +// TryPackTRANSFERERROLE is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x0ade7dc1. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function TRANSFERER_ROLE() view returns(bytes32) +func (syntheticDeviceId *SyntheticDeviceId) TryPackTRANSFERERROLE() ([]byte, error) { + return syntheticDeviceId.abi.Pack("TRANSFERER_ROLE") +} + +// UnpackTRANSFERERROLE is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0x0ade7dc1. +// +// Solidity: function TRANSFERER_ROLE() view returns(bytes32) +func (syntheticDeviceId *SyntheticDeviceId) UnpackTRANSFERERROLE(data []byte) ([32]byte, error) { + out, err := syntheticDeviceId.abi.Unpack("TRANSFERER_ROLE", data) + if err != nil { + return *new([32]byte), err + } + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + return out0, nil +} + +// PackUPGRADERROLE is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xf72c0d8b. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function UPGRADER_ROLE() view returns(bytes32) +func (syntheticDeviceId *SyntheticDeviceId) PackUPGRADERROLE() []byte { + enc, err := syntheticDeviceId.abi.Pack("UPGRADER_ROLE") + if err != nil { + panic(err) + } + return enc +} + +// TryPackUPGRADERROLE is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xf72c0d8b. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function UPGRADER_ROLE() view returns(bytes32) +func (syntheticDeviceId *SyntheticDeviceId) TryPackUPGRADERROLE() ([]byte, error) { + return syntheticDeviceId.abi.Pack("UPGRADER_ROLE") +} + +// UnpackUPGRADERROLE is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0xf72c0d8b. +// +// Solidity: function UPGRADER_ROLE() view returns(bytes32) +func (syntheticDeviceId *SyntheticDeviceId) UnpackUPGRADERROLE(data []byte) ([32]byte, error) { + out, err := syntheticDeviceId.abi.Unpack("UPGRADER_ROLE", data) + if err != nil { + return *new([32]byte), err + } + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + return out0, nil +} + +// PackApprove is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x095ea7b3. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function approve(address to, uint256 tokenId) returns() +func (syntheticDeviceId *SyntheticDeviceId) PackApprove(to common.Address, tokenId *big.Int) []byte { + enc, err := syntheticDeviceId.abi.Pack("approve", to, tokenId) + if err != nil { + panic(err) + } + return enc +} + +// TryPackApprove is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x095ea7b3. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function approve(address to, uint256 tokenId) returns() +func (syntheticDeviceId *SyntheticDeviceId) TryPackApprove(to common.Address, tokenId *big.Int) ([]byte, error) { + return syntheticDeviceId.abi.Pack("approve", to, tokenId) +} + +// PackBalanceOf is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x70a08231. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function balanceOf(address owner) view returns(uint256) +func (syntheticDeviceId *SyntheticDeviceId) PackBalanceOf(owner common.Address) []byte { + enc, err := syntheticDeviceId.abi.Pack("balanceOf", owner) + if err != nil { + panic(err) + } + return enc +} + +// TryPackBalanceOf is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x70a08231. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function balanceOf(address owner) view returns(uint256) +func (syntheticDeviceId *SyntheticDeviceId) TryPackBalanceOf(owner common.Address) ([]byte, error) { + return syntheticDeviceId.abi.Pack("balanceOf", owner) +} + +// UnpackBalanceOf is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0x70a08231. +// +// Solidity: function balanceOf(address owner) view returns(uint256) +func (syntheticDeviceId *SyntheticDeviceId) UnpackBalanceOf(data []byte) (*big.Int, error) { + out, err := syntheticDeviceId.abi.Unpack("balanceOf", data) + if err != nil { + return new(big.Int), err + } + out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int) + return out0, nil +} + +// PackBurn is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x42966c68. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function burn(uint256 tokenId) returns() +func (syntheticDeviceId *SyntheticDeviceId) PackBurn(tokenId *big.Int) []byte { + enc, err := syntheticDeviceId.abi.Pack("burn", tokenId) + if err != nil { + panic(err) + } + return enc +} + +// TryPackBurn is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x42966c68. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function burn(uint256 tokenId) returns() +func (syntheticDeviceId *SyntheticDeviceId) TryPackBurn(tokenId *big.Int) ([]byte, error) { + return syntheticDeviceId.abi.Pack("burn", tokenId) +} + +// PackCreatePrivilege is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xc1d58b3b. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function createPrivilege(bool enabled, string description) returns() +func (syntheticDeviceId *SyntheticDeviceId) PackCreatePrivilege(enabled bool, description string) []byte { + enc, err := syntheticDeviceId.abi.Pack("createPrivilege", enabled, description) + if err != nil { + panic(err) + } + return enc +} + +// TryPackCreatePrivilege is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xc1d58b3b. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function createPrivilege(bool enabled, string description) returns() +func (syntheticDeviceId *SyntheticDeviceId) TryPackCreatePrivilege(enabled bool, description string) ([]byte, error) { + return syntheticDeviceId.abi.Pack("createPrivilege", enabled, description) +} + +// PackDimoRegistry is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x20678275. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function dimoRegistry() view returns(address) +func (syntheticDeviceId *SyntheticDeviceId) PackDimoRegistry() []byte { + enc, err := syntheticDeviceId.abi.Pack("dimoRegistry") + if err != nil { + panic(err) + } + return enc +} + +// TryPackDimoRegistry is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x20678275. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function dimoRegistry() view returns(address) +func (syntheticDeviceId *SyntheticDeviceId) TryPackDimoRegistry() ([]byte, error) { + return syntheticDeviceId.abi.Pack("dimoRegistry") +} + +// UnpackDimoRegistry is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0x20678275. +// +// Solidity: function dimoRegistry() view returns(address) +func (syntheticDeviceId *SyntheticDeviceId) UnpackDimoRegistry(data []byte) (common.Address, error) { + out, err := syntheticDeviceId.abi.Unpack("dimoRegistry", data) + if err != nil { + return *new(common.Address), err + } + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + return out0, nil +} + +// PackDisablePrivilege is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x1a153ed0. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function disablePrivilege(uint256 privId) returns() +func (syntheticDeviceId *SyntheticDeviceId) PackDisablePrivilege(privId *big.Int) []byte { + enc, err := syntheticDeviceId.abi.Pack("disablePrivilege", privId) + if err != nil { + panic(err) + } + return enc +} + +// TryPackDisablePrivilege is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x1a153ed0. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function disablePrivilege(uint256 privId) returns() +func (syntheticDeviceId *SyntheticDeviceId) TryPackDisablePrivilege(privId *big.Int) ([]byte, error) { + return syntheticDeviceId.abi.Pack("disablePrivilege", privId) +} + +// PackEnablePrivilege is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x831ba696. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function enablePrivilege(uint256 privId) returns() +func (syntheticDeviceId *SyntheticDeviceId) PackEnablePrivilege(privId *big.Int) []byte { + enc, err := syntheticDeviceId.abi.Pack("enablePrivilege", privId) + if err != nil { + panic(err) + } + return enc +} + +// TryPackEnablePrivilege is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x831ba696. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function enablePrivilege(uint256 privId) returns() +func (syntheticDeviceId *SyntheticDeviceId) TryPackEnablePrivilege(privId *big.Int) ([]byte, error) { + return syntheticDeviceId.abi.Pack("enablePrivilege", privId) +} + +// PackExists is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x4f558e79. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function exists(uint256 tokenId) view returns(bool) +func (syntheticDeviceId *SyntheticDeviceId) PackExists(tokenId *big.Int) []byte { + enc, err := syntheticDeviceId.abi.Pack("exists", tokenId) + if err != nil { + panic(err) + } + return enc +} + +// TryPackExists is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x4f558e79. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function exists(uint256 tokenId) view returns(bool) +func (syntheticDeviceId *SyntheticDeviceId) TryPackExists(tokenId *big.Int) ([]byte, error) { + return syntheticDeviceId.abi.Pack("exists", tokenId) +} + +// UnpackExists is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0x4f558e79. +// +// Solidity: function exists(uint256 tokenId) view returns(bool) +func (syntheticDeviceId *SyntheticDeviceId) UnpackExists(data []byte) (bool, error) { + out, err := syntheticDeviceId.abi.Unpack("exists", data) + if err != nil { + return *new(bool), err + } + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + return out0, nil +} + +// PackGetApproved is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x081812fc. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function getApproved(uint256 tokenId) view returns(address) +func (syntheticDeviceId *SyntheticDeviceId) PackGetApproved(tokenId *big.Int) []byte { + enc, err := syntheticDeviceId.abi.Pack("getApproved", tokenId) + if err != nil { + panic(err) + } + return enc +} + +// TryPackGetApproved is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x081812fc. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function getApproved(uint256 tokenId) view returns(address) +func (syntheticDeviceId *SyntheticDeviceId) TryPackGetApproved(tokenId *big.Int) ([]byte, error) { + return syntheticDeviceId.abi.Pack("getApproved", tokenId) +} + +// UnpackGetApproved is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0x081812fc. +// +// Solidity: function getApproved(uint256 tokenId) view returns(address) +func (syntheticDeviceId *SyntheticDeviceId) UnpackGetApproved(data []byte) (common.Address, error) { + out, err := syntheticDeviceId.abi.Unpack("getApproved", data) + if err != nil { + return *new(common.Address), err + } + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + return out0, nil +} + +// PackGetRoleAdmin is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x248a9ca3. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function getRoleAdmin(bytes32 role) view returns(bytes32) +func (syntheticDeviceId *SyntheticDeviceId) PackGetRoleAdmin(role [32]byte) []byte { + enc, err := syntheticDeviceId.abi.Pack("getRoleAdmin", role) + if err != nil { + panic(err) + } + return enc +} + +// TryPackGetRoleAdmin is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x248a9ca3. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function getRoleAdmin(bytes32 role) view returns(bytes32) +func (syntheticDeviceId *SyntheticDeviceId) TryPackGetRoleAdmin(role [32]byte) ([]byte, error) { + return syntheticDeviceId.abi.Pack("getRoleAdmin", role) +} + +// UnpackGetRoleAdmin is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0x248a9ca3. +// +// Solidity: function getRoleAdmin(bytes32 role) view returns(bytes32) +func (syntheticDeviceId *SyntheticDeviceId) UnpackGetRoleAdmin(data []byte) ([32]byte, error) { + out, err := syntheticDeviceId.abi.Unpack("getRoleAdmin", data) + if err != nil { + return *new([32]byte), err + } + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + return out0, nil +} + +// PackGrantRole is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x2f2ff15d. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function grantRole(bytes32 role, address account) returns() +func (syntheticDeviceId *SyntheticDeviceId) PackGrantRole(role [32]byte, account common.Address) []byte { + enc, err := syntheticDeviceId.abi.Pack("grantRole", role, account) + if err != nil { + panic(err) + } + return enc +} + +// TryPackGrantRole is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x2f2ff15d. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function grantRole(bytes32 role, address account) returns() +func (syntheticDeviceId *SyntheticDeviceId) TryPackGrantRole(role [32]byte, account common.Address) ([]byte, error) { + return syntheticDeviceId.abi.Pack("grantRole", role, account) +} + +// PackHasPrivilege is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x05d80b00. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function hasPrivilege(uint256 tokenId, uint256 privId, address user) view returns(bool) +func (syntheticDeviceId *SyntheticDeviceId) PackHasPrivilege(tokenId *big.Int, privId *big.Int, user common.Address) []byte { + enc, err := syntheticDeviceId.abi.Pack("hasPrivilege", tokenId, privId, user) + if err != nil { + panic(err) + } + return enc +} + +// TryPackHasPrivilege is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x05d80b00. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function hasPrivilege(uint256 tokenId, uint256 privId, address user) view returns(bool) +func (syntheticDeviceId *SyntheticDeviceId) TryPackHasPrivilege(tokenId *big.Int, privId *big.Int, user common.Address) ([]byte, error) { + return syntheticDeviceId.abi.Pack("hasPrivilege", tokenId, privId, user) +} + +// UnpackHasPrivilege is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0x05d80b00. +// +// Solidity: function hasPrivilege(uint256 tokenId, uint256 privId, address user) view returns(bool) +func (syntheticDeviceId *SyntheticDeviceId) UnpackHasPrivilege(data []byte) (bool, error) { + out, err := syntheticDeviceId.abi.Unpack("hasPrivilege", data) + if err != nil { + return *new(bool), err + } + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + return out0, nil +} + +// PackHasRole is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x91d14854. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function hasRole(bytes32 role, address account) view returns(bool) +func (syntheticDeviceId *SyntheticDeviceId) PackHasRole(role [32]byte, account common.Address) []byte { + enc, err := syntheticDeviceId.abi.Pack("hasRole", role, account) + if err != nil { + panic(err) + } + return enc +} + +// TryPackHasRole is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x91d14854. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function hasRole(bytes32 role, address account) view returns(bool) +func (syntheticDeviceId *SyntheticDeviceId) TryPackHasRole(role [32]byte, account common.Address) ([]byte, error) { + return syntheticDeviceId.abi.Pack("hasRole", role, account) +} + +// UnpackHasRole is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0x91d14854. +// +// Solidity: function hasRole(bytes32 role, address account) view returns(bool) +func (syntheticDeviceId *SyntheticDeviceId) UnpackHasRole(data []byte) (bool, error) { + out, err := syntheticDeviceId.abi.Unpack("hasRole", data) + if err != nil { + return *new(bool), err + } + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + return out0, nil +} + +// PackInitialize is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x2cd0213f. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function initialize(string name_, string symbol_, string baseUri_, address dimoRegistry_, address[] trustedForwarders_) returns() +func (syntheticDeviceId *SyntheticDeviceId) PackInitialize(name string, symbol string, baseUri string, dimoRegistry common.Address, trustedForwarders []common.Address) []byte { + enc, err := syntheticDeviceId.abi.Pack("initialize", name, symbol, baseUri, dimoRegistry, trustedForwarders) + if err != nil { + panic(err) + } + return enc +} + +// TryPackInitialize is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x2cd0213f. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function initialize(string name_, string symbol_, string baseUri_, address dimoRegistry_, address[] trustedForwarders_) returns() +func (syntheticDeviceId *SyntheticDeviceId) TryPackInitialize(name string, symbol string, baseUri string, dimoRegistry common.Address, trustedForwarders []common.Address) ([]byte, error) { + return syntheticDeviceId.abi.Pack("initialize", name, symbol, baseUri, dimoRegistry, trustedForwarders) +} + +// PackIsApprovedForAll is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xe985e9c5. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function isApprovedForAll(address owner, address operator) view returns(bool) +func (syntheticDeviceId *SyntheticDeviceId) PackIsApprovedForAll(owner common.Address, operator common.Address) []byte { + enc, err := syntheticDeviceId.abi.Pack("isApprovedForAll", owner, operator) + if err != nil { + panic(err) + } + return enc +} + +// TryPackIsApprovedForAll is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xe985e9c5. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function isApprovedForAll(address owner, address operator) view returns(bool) +func (syntheticDeviceId *SyntheticDeviceId) TryPackIsApprovedForAll(owner common.Address, operator common.Address) ([]byte, error) { + return syntheticDeviceId.abi.Pack("isApprovedForAll", owner, operator) +} + +// UnpackIsApprovedForAll is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0xe985e9c5. +// +// Solidity: function isApprovedForAll(address owner, address operator) view returns(bool) +func (syntheticDeviceId *SyntheticDeviceId) UnpackIsApprovedForAll(data []byte) (bool, error) { + out, err := syntheticDeviceId.abi.Unpack("isApprovedForAll", data) + if err != nil { + return *new(bool), err + } + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + return out0, nil +} + +// PackName is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x06fdde03. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function name() view returns(string) +func (syntheticDeviceId *SyntheticDeviceId) PackName() []byte { + enc, err := syntheticDeviceId.abi.Pack("name") + if err != nil { + panic(err) + } + return enc +} + +// TryPackName is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x06fdde03. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function name() view returns(string) +func (syntheticDeviceId *SyntheticDeviceId) TryPackName() ([]byte, error) { + return syntheticDeviceId.abi.Pack("name") +} + +// UnpackName is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0x06fdde03. +// +// Solidity: function name() view returns(string) +func (syntheticDeviceId *SyntheticDeviceId) UnpackName(data []byte) (string, error) { + out, err := syntheticDeviceId.abi.Unpack("name", data) + if err != nil { + return *new(string), err + } + out0 := *abi.ConvertType(out[0], new(string)).(*string) + return out0, nil +} + +// PackOwnerOf is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x6352211e. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function ownerOf(uint256 tokenId) view returns(address) +func (syntheticDeviceId *SyntheticDeviceId) PackOwnerOf(tokenId *big.Int) []byte { + enc, err := syntheticDeviceId.abi.Pack("ownerOf", tokenId) + if err != nil { + panic(err) + } + return enc +} + +// TryPackOwnerOf is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x6352211e. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function ownerOf(uint256 tokenId) view returns(address) +func (syntheticDeviceId *SyntheticDeviceId) TryPackOwnerOf(tokenId *big.Int) ([]byte, error) { + return syntheticDeviceId.abi.Pack("ownerOf", tokenId) +} + +// UnpackOwnerOf is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0x6352211e. +// +// Solidity: function ownerOf(uint256 tokenId) view returns(address) +func (syntheticDeviceId *SyntheticDeviceId) UnpackOwnerOf(data []byte) (common.Address, error) { + out, err := syntheticDeviceId.abi.Unpack("ownerOf", data) + if err != nil { + return *new(common.Address), err + } + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + return out0, nil +} + +// PackPrivilegeEntry is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x48db4640. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function privilegeEntry(uint256 , uint256 , uint256 , address ) view returns(uint256) +func (syntheticDeviceId *SyntheticDeviceId) PackPrivilegeEntry(arg0 *big.Int, arg1 *big.Int, arg2 *big.Int, arg3 common.Address) []byte { + enc, err := syntheticDeviceId.abi.Pack("privilegeEntry", arg0, arg1, arg2, arg3) + if err != nil { + panic(err) + } + return enc +} + +// TryPackPrivilegeEntry is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x48db4640. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function privilegeEntry(uint256 , uint256 , uint256 , address ) view returns(uint256) +func (syntheticDeviceId *SyntheticDeviceId) TryPackPrivilegeEntry(arg0 *big.Int, arg1 *big.Int, arg2 *big.Int, arg3 common.Address) ([]byte, error) { + return syntheticDeviceId.abi.Pack("privilegeEntry", arg0, arg1, arg2, arg3) +} + +// UnpackPrivilegeEntry is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0x48db4640. +// +// Solidity: function privilegeEntry(uint256 , uint256 , uint256 , address ) view returns(uint256) +func (syntheticDeviceId *SyntheticDeviceId) UnpackPrivilegeEntry(data []byte) (*big.Int, error) { + out, err := syntheticDeviceId.abi.Unpack("privilegeEntry", data) + if err != nil { + return new(big.Int), err + } + out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int) + return out0, nil +} + +// PackPrivilegeExpiresAt is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xd0f8f5f6. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function privilegeExpiresAt(uint256 tokenId, uint256 privId, address user) view returns(uint256) +func (syntheticDeviceId *SyntheticDeviceId) PackPrivilegeExpiresAt(tokenId *big.Int, privId *big.Int, user common.Address) []byte { + enc, err := syntheticDeviceId.abi.Pack("privilegeExpiresAt", tokenId, privId, user) + if err != nil { + panic(err) + } + return enc +} + +// TryPackPrivilegeExpiresAt is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xd0f8f5f6. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function privilegeExpiresAt(uint256 tokenId, uint256 privId, address user) view returns(uint256) +func (syntheticDeviceId *SyntheticDeviceId) TryPackPrivilegeExpiresAt(tokenId *big.Int, privId *big.Int, user common.Address) ([]byte, error) { + return syntheticDeviceId.abi.Pack("privilegeExpiresAt", tokenId, privId, user) +} + +// UnpackPrivilegeExpiresAt is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0xd0f8f5f6. +// +// Solidity: function privilegeExpiresAt(uint256 tokenId, uint256 privId, address user) view returns(uint256) +func (syntheticDeviceId *SyntheticDeviceId) UnpackPrivilegeExpiresAt(data []byte) (*big.Int, error) { + out, err := syntheticDeviceId.abi.Unpack("privilegeExpiresAt", data) + if err != nil { + return new(big.Int), err + } + out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int) + return out0, nil +} + +// PackPrivilegeRecord is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xf9ad3efe. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function privilegeRecord(uint256 ) view returns(bool enabled, string description) +func (syntheticDeviceId *SyntheticDeviceId) PackPrivilegeRecord(arg0 *big.Int) []byte { + enc, err := syntheticDeviceId.abi.Pack("privilegeRecord", arg0) + if err != nil { + panic(err) + } + return enc +} + +// TryPackPrivilegeRecord is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xf9ad3efe. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function privilegeRecord(uint256 ) view returns(bool enabled, string description) +func (syntheticDeviceId *SyntheticDeviceId) TryPackPrivilegeRecord(arg0 *big.Int) ([]byte, error) { + return syntheticDeviceId.abi.Pack("privilegeRecord", arg0) +} + +// PrivilegeRecordOutput serves as a container for the return parameters of contract +// method PrivilegeRecord. +type PrivilegeRecordOutput struct { + Enabled bool + Description string +} + +// UnpackPrivilegeRecord is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0xf9ad3efe. +// +// Solidity: function privilegeRecord(uint256 ) view returns(bool enabled, string description) +func (syntheticDeviceId *SyntheticDeviceId) UnpackPrivilegeRecord(data []byte) (PrivilegeRecordOutput, error) { + out, err := syntheticDeviceId.abi.Unpack("privilegeRecord", data) + outstruct := new(PrivilegeRecordOutput) + if err != nil { + return *outstruct, err + } + outstruct.Enabled = *abi.ConvertType(out[0], new(bool)).(*bool) + outstruct.Description = *abi.ConvertType(out[1], new(string)).(*string) + return *outstruct, nil +} + +// PackProxiableUUID is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x52d1902d. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function proxiableUUID() view returns(bytes32) +func (syntheticDeviceId *SyntheticDeviceId) PackProxiableUUID() []byte { + enc, err := syntheticDeviceId.abi.Pack("proxiableUUID") + if err != nil { + panic(err) + } + return enc +} + +// TryPackProxiableUUID is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x52d1902d. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function proxiableUUID() view returns(bytes32) +func (syntheticDeviceId *SyntheticDeviceId) TryPackProxiableUUID() ([]byte, error) { + return syntheticDeviceId.abi.Pack("proxiableUUID") +} + +// UnpackProxiableUUID is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0x52d1902d. +// +// Solidity: function proxiableUUID() view returns(bytes32) +func (syntheticDeviceId *SyntheticDeviceId) UnpackProxiableUUID(data []byte) ([32]byte, error) { + out, err := syntheticDeviceId.abi.Unpack("proxiableUUID", data) + if err != nil { + return *new([32]byte), err + } + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + return out0, nil +} + +// PackRenounceRole is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x36568abe. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function renounceRole(bytes32 role, address account) returns() +func (syntheticDeviceId *SyntheticDeviceId) PackRenounceRole(role [32]byte, account common.Address) []byte { + enc, err := syntheticDeviceId.abi.Pack("renounceRole", role, account) + if err != nil { + panic(err) + } + return enc +} + +// TryPackRenounceRole is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x36568abe. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function renounceRole(bytes32 role, address account) returns() +func (syntheticDeviceId *SyntheticDeviceId) TryPackRenounceRole(role [32]byte, account common.Address) ([]byte, error) { + return syntheticDeviceId.abi.Pack("renounceRole", role, account) +} + +// PackRevokeRole is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xd547741f. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function revokeRole(bytes32 role, address account) returns() +func (syntheticDeviceId *SyntheticDeviceId) PackRevokeRole(role [32]byte, account common.Address) []byte { + enc, err := syntheticDeviceId.abi.Pack("revokeRole", role, account) + if err != nil { + panic(err) + } + return enc +} + +// TryPackRevokeRole is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xd547741f. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function revokeRole(bytes32 role, address account) returns() +func (syntheticDeviceId *SyntheticDeviceId) TryPackRevokeRole(role [32]byte, account common.Address) ([]byte, error) { + return syntheticDeviceId.abi.Pack("revokeRole", role, account) +} + +// PackSafeMint is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x40d097c3. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function safeMint(address to) returns(uint256 tokenId) +func (syntheticDeviceId *SyntheticDeviceId) PackSafeMint(to common.Address) []byte { + enc, err := syntheticDeviceId.abi.Pack("safeMint", to) + if err != nil { + panic(err) + } + return enc +} + +// TryPackSafeMint is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x40d097c3. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function safeMint(address to) returns(uint256 tokenId) +func (syntheticDeviceId *SyntheticDeviceId) TryPackSafeMint(to common.Address) ([]byte, error) { + return syntheticDeviceId.abi.Pack("safeMint", to) +} + +// UnpackSafeMint is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0x40d097c3. +// +// Solidity: function safeMint(address to) returns(uint256 tokenId) +func (syntheticDeviceId *SyntheticDeviceId) UnpackSafeMint(data []byte) (*big.Int, error) { + out, err := syntheticDeviceId.abi.Unpack("safeMint", data) + if err != nil { + return new(big.Int), err + } + out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int) + return out0, nil +} + +// PackSafeMint0 is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xd204c45e. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function safeMint(address to, string uri) returns(uint256 tokenId) +func (syntheticDeviceId *SyntheticDeviceId) PackSafeMint0(to common.Address, uri string) []byte { + enc, err := syntheticDeviceId.abi.Pack("safeMint0", to, uri) + if err != nil { + panic(err) + } + return enc +} + +// TryPackSafeMint0 is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xd204c45e. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function safeMint(address to, string uri) returns(uint256 tokenId) +func (syntheticDeviceId *SyntheticDeviceId) TryPackSafeMint0(to common.Address, uri string) ([]byte, error) { + return syntheticDeviceId.abi.Pack("safeMint0", to, uri) +} + +// UnpackSafeMint0 is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0xd204c45e. +// +// Solidity: function safeMint(address to, string uri) returns(uint256 tokenId) +func (syntheticDeviceId *SyntheticDeviceId) UnpackSafeMint0(data []byte) (*big.Int, error) { + out, err := syntheticDeviceId.abi.Unpack("safeMint0", data) + if err != nil { + return new(big.Int), err + } + out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int) + return out0, nil +} + +// PackSafeTransferFrom is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x42842e0e. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function safeTransferFrom(address from, address to, uint256 tokenId) returns() +func (syntheticDeviceId *SyntheticDeviceId) PackSafeTransferFrom(from common.Address, to common.Address, tokenId *big.Int) []byte { + enc, err := syntheticDeviceId.abi.Pack("safeTransferFrom", from, to, tokenId) + if err != nil { + panic(err) + } + return enc +} + +// TryPackSafeTransferFrom is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x42842e0e. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function safeTransferFrom(address from, address to, uint256 tokenId) returns() +func (syntheticDeviceId *SyntheticDeviceId) TryPackSafeTransferFrom(from common.Address, to common.Address, tokenId *big.Int) ([]byte, error) { + return syntheticDeviceId.abi.Pack("safeTransferFrom", from, to, tokenId) +} + +// PackSafeTransferFrom0 is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xb88d4fde. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function safeTransferFrom(address from, address to, uint256 tokenId, bytes data) returns() +func (syntheticDeviceId *SyntheticDeviceId) PackSafeTransferFrom0(from common.Address, to common.Address, tokenId *big.Int, data []byte) []byte { + enc, err := syntheticDeviceId.abi.Pack("safeTransferFrom0", from, to, tokenId, data) + if err != nil { + panic(err) + } + return enc +} + +// TryPackSafeTransferFrom0 is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xb88d4fde. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function safeTransferFrom(address from, address to, uint256 tokenId, bytes data) returns() +func (syntheticDeviceId *SyntheticDeviceId) TryPackSafeTransferFrom0(from common.Address, to common.Address, tokenId *big.Int, data []byte) ([]byte, error) { + return syntheticDeviceId.abi.Pack("safeTransferFrom0", from, to, tokenId, data) +} + +// PackSetApprovalForAll is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xa22cb465. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function setApprovalForAll(address operator, bool approved) returns() +func (syntheticDeviceId *SyntheticDeviceId) PackSetApprovalForAll(operator common.Address, approved bool) []byte { + enc, err := syntheticDeviceId.abi.Pack("setApprovalForAll", operator, approved) + if err != nil { + panic(err) + } + return enc +} + +// TryPackSetApprovalForAll is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xa22cb465. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function setApprovalForAll(address operator, bool approved) returns() +func (syntheticDeviceId *SyntheticDeviceId) TryPackSetApprovalForAll(operator common.Address, approved bool) ([]byte, error) { + return syntheticDeviceId.abi.Pack("setApprovalForAll", operator, approved) +} + +// PackSetBaseURI is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x55f804b3. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function setBaseURI(string baseURI_) returns() +func (syntheticDeviceId *SyntheticDeviceId) PackSetBaseURI(baseURI string) []byte { + enc, err := syntheticDeviceId.abi.Pack("setBaseURI", baseURI) + if err != nil { + panic(err) + } + return enc +} + +// TryPackSetBaseURI is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x55f804b3. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function setBaseURI(string baseURI_) returns() +func (syntheticDeviceId *SyntheticDeviceId) TryPackSetBaseURI(baseURI string) ([]byte, error) { + return syntheticDeviceId.abi.Pack("setBaseURI", baseURI) +} + +// PackSetDimoRegistryAddress is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x0db857ea. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function setDimoRegistryAddress(address dimoRegistry_) returns() +func (syntheticDeviceId *SyntheticDeviceId) PackSetDimoRegistryAddress(dimoRegistry common.Address) []byte { + enc, err := syntheticDeviceId.abi.Pack("setDimoRegistryAddress", dimoRegistry) + if err != nil { + panic(err) + } + return enc +} + +// TryPackSetDimoRegistryAddress is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x0db857ea. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function setDimoRegistryAddress(address dimoRegistry_) returns() +func (syntheticDeviceId *SyntheticDeviceId) TryPackSetDimoRegistryAddress(dimoRegistry common.Address) ([]byte, error) { + return syntheticDeviceId.abi.Pack("setDimoRegistryAddress", dimoRegistry) +} + +// PackSetPrivilege is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xeca3221a. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function setPrivilege(uint256 tokenId, uint256 privId, address user, uint256 expires) returns() +func (syntheticDeviceId *SyntheticDeviceId) PackSetPrivilege(tokenId *big.Int, privId *big.Int, user common.Address, expires *big.Int) []byte { + enc, err := syntheticDeviceId.abi.Pack("setPrivilege", tokenId, privId, user, expires) + if err != nil { + panic(err) + } + return enc +} + +// TryPackSetPrivilege is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xeca3221a. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function setPrivilege(uint256 tokenId, uint256 privId, address user, uint256 expires) returns() +func (syntheticDeviceId *SyntheticDeviceId) TryPackSetPrivilege(tokenId *big.Int, privId *big.Int, user common.Address, expires *big.Int) ([]byte, error) { + return syntheticDeviceId.abi.Pack("setPrivilege", tokenId, privId, user, expires) +} + +// PackSetPrivileges is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x57ae9754. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function setPrivileges((uint256,uint256,address,uint256)[] privData) returns() +func (syntheticDeviceId *SyntheticDeviceId) PackSetPrivileges(privData []MultiPrivilegeSetPrivilegeData) []byte { + enc, err := syntheticDeviceId.abi.Pack("setPrivileges", privData) + if err != nil { + panic(err) + } + return enc +} + +// TryPackSetPrivileges is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x57ae9754. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function setPrivileges((uint256,uint256,address,uint256)[] privData) returns() +func (syntheticDeviceId *SyntheticDeviceId) TryPackSetPrivileges(privData []MultiPrivilegeSetPrivilegeData) ([]byte, error) { + return syntheticDeviceId.abi.Pack("setPrivileges", privData) +} + +// PackSetTrustedForwarder is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xe691d03b. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function setTrustedForwarder(address addr, bool trusted) returns() +func (syntheticDeviceId *SyntheticDeviceId) PackSetTrustedForwarder(addr common.Address, trusted bool) []byte { + enc, err := syntheticDeviceId.abi.Pack("setTrustedForwarder", addr, trusted) + if err != nil { + panic(err) + } + return enc +} + +// TryPackSetTrustedForwarder is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xe691d03b. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function setTrustedForwarder(address addr, bool trusted) returns() +func (syntheticDeviceId *SyntheticDeviceId) TryPackSetTrustedForwarder(addr common.Address, trusted bool) ([]byte, error) { + return syntheticDeviceId.abi.Pack("setTrustedForwarder", addr, trusted) +} + +// PackSupportsInterface is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x01ffc9a7. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function supportsInterface(bytes4 interfaceId) view returns(bool) +func (syntheticDeviceId *SyntheticDeviceId) PackSupportsInterface(interfaceId [4]byte) []byte { + enc, err := syntheticDeviceId.abi.Pack("supportsInterface", interfaceId) + if err != nil { + panic(err) + } + return enc +} + +// TryPackSupportsInterface is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x01ffc9a7. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function supportsInterface(bytes4 interfaceId) view returns(bool) +func (syntheticDeviceId *SyntheticDeviceId) TryPackSupportsInterface(interfaceId [4]byte) ([]byte, error) { + return syntheticDeviceId.abi.Pack("supportsInterface", interfaceId) +} + +// UnpackSupportsInterface is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0x01ffc9a7. +// +// Solidity: function supportsInterface(bytes4 interfaceId) view returns(bool) +func (syntheticDeviceId *SyntheticDeviceId) UnpackSupportsInterface(data []byte) (bool, error) { + out, err := syntheticDeviceId.abi.Unpack("supportsInterface", data) + if err != nil { + return *new(bool), err + } + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + return out0, nil +} + +// PackSymbol is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x95d89b41. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function symbol() view returns(string) +func (syntheticDeviceId *SyntheticDeviceId) PackSymbol() []byte { + enc, err := syntheticDeviceId.abi.Pack("symbol") + if err != nil { + panic(err) + } + return enc +} + +// TryPackSymbol is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x95d89b41. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function symbol() view returns(string) +func (syntheticDeviceId *SyntheticDeviceId) TryPackSymbol() ([]byte, error) { + return syntheticDeviceId.abi.Pack("symbol") +} + +// UnpackSymbol is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0x95d89b41. +// +// Solidity: function symbol() view returns(string) +func (syntheticDeviceId *SyntheticDeviceId) UnpackSymbol(data []byte) (string, error) { + out, err := syntheticDeviceId.abi.Unpack("symbol", data) + if err != nil { + return *new(string), err + } + out0 := *abi.ConvertType(out[0], new(string)).(*string) + return out0, nil +} + +// PackTokenIdToVersion is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xf1a9d41c. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function tokenIdToVersion(uint256 ) view returns(uint256) +func (syntheticDeviceId *SyntheticDeviceId) PackTokenIdToVersion(arg0 *big.Int) []byte { + enc, err := syntheticDeviceId.abi.Pack("tokenIdToVersion", arg0) + if err != nil { + panic(err) + } + return enc +} + +// TryPackTokenIdToVersion is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xf1a9d41c. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function tokenIdToVersion(uint256 ) view returns(uint256) +func (syntheticDeviceId *SyntheticDeviceId) TryPackTokenIdToVersion(arg0 *big.Int) ([]byte, error) { + return syntheticDeviceId.abi.Pack("tokenIdToVersion", arg0) +} + +// UnpackTokenIdToVersion is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0xf1a9d41c. +// +// Solidity: function tokenIdToVersion(uint256 ) view returns(uint256) +func (syntheticDeviceId *SyntheticDeviceId) UnpackTokenIdToVersion(data []byte) (*big.Int, error) { + out, err := syntheticDeviceId.abi.Unpack("tokenIdToVersion", data) + if err != nil { + return new(big.Int), err + } + out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int) + return out0, nil +} + +// PackTokenURI is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xc87b56dd. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function tokenURI(uint256 tokenId) view returns(string) +func (syntheticDeviceId *SyntheticDeviceId) PackTokenURI(tokenId *big.Int) []byte { + enc, err := syntheticDeviceId.abi.Pack("tokenURI", tokenId) + if err != nil { + panic(err) + } + return enc +} + +// TryPackTokenURI is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xc87b56dd. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function tokenURI(uint256 tokenId) view returns(string) +func (syntheticDeviceId *SyntheticDeviceId) TryPackTokenURI(tokenId *big.Int) ([]byte, error) { + return syntheticDeviceId.abi.Pack("tokenURI", tokenId) +} + +// UnpackTokenURI is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0xc87b56dd. +// +// Solidity: function tokenURI(uint256 tokenId) view returns(string) +func (syntheticDeviceId *SyntheticDeviceId) UnpackTokenURI(data []byte) (string, error) { + out, err := syntheticDeviceId.abi.Unpack("tokenURI", data) + if err != nil { + return *new(string), err + } + out0 := *abi.ConvertType(out[0], new(string)).(*string) + return out0, nil +} + +// PackTransferFrom is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x23b872dd. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function transferFrom(address from, address to, uint256 tokenId) returns() +func (syntheticDeviceId *SyntheticDeviceId) PackTransferFrom(from common.Address, to common.Address, tokenId *big.Int) []byte { + enc, err := syntheticDeviceId.abi.Pack("transferFrom", from, to, tokenId) + if err != nil { + panic(err) + } + return enc +} + +// TryPackTransferFrom is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x23b872dd. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function transferFrom(address from, address to, uint256 tokenId) returns() +func (syntheticDeviceId *SyntheticDeviceId) TryPackTransferFrom(from common.Address, to common.Address, tokenId *big.Int) ([]byte, error) { + return syntheticDeviceId.abi.Pack("transferFrom", from, to, tokenId) +} + +// PackTrustedForwarders is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x54776bb9. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function trustedForwarders(address ) view returns(bool) +func (syntheticDeviceId *SyntheticDeviceId) PackTrustedForwarders(arg0 common.Address) []byte { + enc, err := syntheticDeviceId.abi.Pack("trustedForwarders", arg0) + if err != nil { + panic(err) + } + return enc +} + +// TryPackTrustedForwarders is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x54776bb9. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function trustedForwarders(address ) view returns(bool) +func (syntheticDeviceId *SyntheticDeviceId) TryPackTrustedForwarders(arg0 common.Address) ([]byte, error) { + return syntheticDeviceId.abi.Pack("trustedForwarders", arg0) +} + +// UnpackTrustedForwarders is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0x54776bb9. +// +// Solidity: function trustedForwarders(address ) view returns(bool) +func (syntheticDeviceId *SyntheticDeviceId) UnpackTrustedForwarders(data []byte) (bool, error) { + out, err := syntheticDeviceId.abi.Unpack("trustedForwarders", data) + if err != nil { + return *new(bool), err + } + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + return out0, nil +} + +// PackUpgradeTo is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x3659cfe6. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function upgradeTo(address newImplementation) returns() +func (syntheticDeviceId *SyntheticDeviceId) PackUpgradeTo(newImplementation common.Address) []byte { + enc, err := syntheticDeviceId.abi.Pack("upgradeTo", newImplementation) + if err != nil { + panic(err) + } + return enc +} + +// TryPackUpgradeTo is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x3659cfe6. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function upgradeTo(address newImplementation) returns() +func (syntheticDeviceId *SyntheticDeviceId) TryPackUpgradeTo(newImplementation common.Address) ([]byte, error) { + return syntheticDeviceId.abi.Pack("upgradeTo", newImplementation) +} + +// PackUpgradeToAndCall is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x4f1ef286. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function upgradeToAndCall(address newImplementation, bytes data) payable returns() +func (syntheticDeviceId *SyntheticDeviceId) PackUpgradeToAndCall(newImplementation common.Address, data []byte) []byte { + enc, err := syntheticDeviceId.abi.Pack("upgradeToAndCall", newImplementation, data) + if err != nil { + panic(err) + } + return enc +} + +// TryPackUpgradeToAndCall is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x4f1ef286. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function upgradeToAndCall(address newImplementation, bytes data) payable returns() +func (syntheticDeviceId *SyntheticDeviceId) TryPackUpgradeToAndCall(newImplementation common.Address, data []byte) ([]byte, error) { + return syntheticDeviceId.abi.Pack("upgradeToAndCall", newImplementation, data) +} + +// SyntheticDeviceIdAdminChanged represents a AdminChanged event raised by the SyntheticDeviceId contract. +type SyntheticDeviceIdAdminChanged struct { + PreviousAdmin common.Address + NewAdmin common.Address + Raw *types.Log // Blockchain specific contextual infos +} + +const SyntheticDeviceIdAdminChangedEventName = "AdminChanged" + +// ContractEventName returns the user-defined event name. +func (SyntheticDeviceIdAdminChanged) ContractEventName() string { + return SyntheticDeviceIdAdminChangedEventName +} + +// UnpackAdminChangedEvent is the Go binding that unpacks the event data emitted +// by contract. +// +// Solidity: event AdminChanged(address previousAdmin, address newAdmin) +func (syntheticDeviceId *SyntheticDeviceId) UnpackAdminChangedEvent(log *types.Log) (*SyntheticDeviceIdAdminChanged, error) { + event := "AdminChanged" + if len(log.Topics) == 0 || log.Topics[0] != syntheticDeviceId.abi.Events[event].ID { + return nil, errors.New("event signature mismatch") + } + out := new(SyntheticDeviceIdAdminChanged) + if len(log.Data) > 0 { + if err := syntheticDeviceId.abi.UnpackIntoInterface(out, event, log.Data); err != nil { + return nil, err + } + } + var indexed abi.Arguments + for _, arg := range syntheticDeviceId.abi.Events[event].Inputs { + if arg.Indexed { + indexed = append(indexed, arg) + } + } + if err := abi.ParseTopics(out, indexed, log.Topics[1:]); err != nil { + return nil, err + } + out.Raw = log + return out, nil +} + +// SyntheticDeviceIdApproval represents a Approval event raised by the SyntheticDeviceId contract. +type SyntheticDeviceIdApproval struct { + Owner common.Address + Approved common.Address + TokenId *big.Int + Raw *types.Log // Blockchain specific contextual infos +} + +const SyntheticDeviceIdApprovalEventName = "Approval" + +// ContractEventName returns the user-defined event name. +func (SyntheticDeviceIdApproval) ContractEventName() string { + return SyntheticDeviceIdApprovalEventName +} + +// UnpackApprovalEvent is the Go binding that unpacks the event data emitted +// by contract. +// +// Solidity: event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId) +func (syntheticDeviceId *SyntheticDeviceId) UnpackApprovalEvent(log *types.Log) (*SyntheticDeviceIdApproval, error) { + event := "Approval" + if len(log.Topics) == 0 || log.Topics[0] != syntheticDeviceId.abi.Events[event].ID { + return nil, errors.New("event signature mismatch") + } + out := new(SyntheticDeviceIdApproval) + if len(log.Data) > 0 { + if err := syntheticDeviceId.abi.UnpackIntoInterface(out, event, log.Data); err != nil { + return nil, err + } + } + var indexed abi.Arguments + for _, arg := range syntheticDeviceId.abi.Events[event].Inputs { + if arg.Indexed { + indexed = append(indexed, arg) + } + } + if err := abi.ParseTopics(out, indexed, log.Topics[1:]); err != nil { + return nil, err + } + out.Raw = log + return out, nil +} + +// SyntheticDeviceIdApprovalForAll represents a ApprovalForAll event raised by the SyntheticDeviceId contract. +type SyntheticDeviceIdApprovalForAll struct { + Owner common.Address + Operator common.Address + Approved bool + Raw *types.Log // Blockchain specific contextual infos +} + +const SyntheticDeviceIdApprovalForAllEventName = "ApprovalForAll" + +// ContractEventName returns the user-defined event name. +func (SyntheticDeviceIdApprovalForAll) ContractEventName() string { + return SyntheticDeviceIdApprovalForAllEventName +} + +// UnpackApprovalForAllEvent is the Go binding that unpacks the event data emitted +// by contract. +// +// Solidity: event ApprovalForAll(address indexed owner, address indexed operator, bool approved) +func (syntheticDeviceId *SyntheticDeviceId) UnpackApprovalForAllEvent(log *types.Log) (*SyntheticDeviceIdApprovalForAll, error) { + event := "ApprovalForAll" + if len(log.Topics) == 0 || log.Topics[0] != syntheticDeviceId.abi.Events[event].ID { + return nil, errors.New("event signature mismatch") + } + out := new(SyntheticDeviceIdApprovalForAll) + if len(log.Data) > 0 { + if err := syntheticDeviceId.abi.UnpackIntoInterface(out, event, log.Data); err != nil { + return nil, err + } + } + var indexed abi.Arguments + for _, arg := range syntheticDeviceId.abi.Events[event].Inputs { + if arg.Indexed { + indexed = append(indexed, arg) + } + } + if err := abi.ParseTopics(out, indexed, log.Topics[1:]); err != nil { + return nil, err + } + out.Raw = log + return out, nil +} + +// SyntheticDeviceIdBatchMetadataUpdate represents a BatchMetadataUpdate event raised by the SyntheticDeviceId contract. +type SyntheticDeviceIdBatchMetadataUpdate struct { + FromTokenId *big.Int + ToTokenId *big.Int + Raw *types.Log // Blockchain specific contextual infos +} + +const SyntheticDeviceIdBatchMetadataUpdateEventName = "BatchMetadataUpdate" + +// ContractEventName returns the user-defined event name. +func (SyntheticDeviceIdBatchMetadataUpdate) ContractEventName() string { + return SyntheticDeviceIdBatchMetadataUpdateEventName +} + +// UnpackBatchMetadataUpdateEvent is the Go binding that unpacks the event data emitted +// by contract. +// +// Solidity: event BatchMetadataUpdate(uint256 _fromTokenId, uint256 _toTokenId) +func (syntheticDeviceId *SyntheticDeviceId) UnpackBatchMetadataUpdateEvent(log *types.Log) (*SyntheticDeviceIdBatchMetadataUpdate, error) { + event := "BatchMetadataUpdate" + if len(log.Topics) == 0 || log.Topics[0] != syntheticDeviceId.abi.Events[event].ID { + return nil, errors.New("event signature mismatch") + } + out := new(SyntheticDeviceIdBatchMetadataUpdate) + if len(log.Data) > 0 { + if err := syntheticDeviceId.abi.UnpackIntoInterface(out, event, log.Data); err != nil { + return nil, err + } + } + var indexed abi.Arguments + for _, arg := range syntheticDeviceId.abi.Events[event].Inputs { + if arg.Indexed { + indexed = append(indexed, arg) + } + } + if err := abi.ParseTopics(out, indexed, log.Topics[1:]); err != nil { + return nil, err + } + out.Raw = log + return out, nil +} + +// SyntheticDeviceIdBeaconUpgraded represents a BeaconUpgraded event raised by the SyntheticDeviceId contract. +type SyntheticDeviceIdBeaconUpgraded struct { + Beacon common.Address + Raw *types.Log // Blockchain specific contextual infos +} + +const SyntheticDeviceIdBeaconUpgradedEventName = "BeaconUpgraded" + +// ContractEventName returns the user-defined event name. +func (SyntheticDeviceIdBeaconUpgraded) ContractEventName() string { + return SyntheticDeviceIdBeaconUpgradedEventName +} + +// UnpackBeaconUpgradedEvent is the Go binding that unpacks the event data emitted +// by contract. +// +// Solidity: event BeaconUpgraded(address indexed beacon) +func (syntheticDeviceId *SyntheticDeviceId) UnpackBeaconUpgradedEvent(log *types.Log) (*SyntheticDeviceIdBeaconUpgraded, error) { + event := "BeaconUpgraded" + if len(log.Topics) == 0 || log.Topics[0] != syntheticDeviceId.abi.Events[event].ID { + return nil, errors.New("event signature mismatch") + } + out := new(SyntheticDeviceIdBeaconUpgraded) + if len(log.Data) > 0 { + if err := syntheticDeviceId.abi.UnpackIntoInterface(out, event, log.Data); err != nil { + return nil, err + } + } + var indexed abi.Arguments + for _, arg := range syntheticDeviceId.abi.Events[event].Inputs { + if arg.Indexed { + indexed = append(indexed, arg) + } + } + if err := abi.ParseTopics(out, indexed, log.Topics[1:]); err != nil { + return nil, err + } + out.Raw = log + return out, nil +} + +// SyntheticDeviceIdInitialized represents a Initialized event raised by the SyntheticDeviceId contract. +type SyntheticDeviceIdInitialized struct { + Version uint8 + Raw *types.Log // Blockchain specific contextual infos +} + +const SyntheticDeviceIdInitializedEventName = "Initialized" + +// ContractEventName returns the user-defined event name. +func (SyntheticDeviceIdInitialized) ContractEventName() string { + return SyntheticDeviceIdInitializedEventName +} + +// UnpackInitializedEvent is the Go binding that unpacks the event data emitted +// by contract. +// +// Solidity: event Initialized(uint8 version) +func (syntheticDeviceId *SyntheticDeviceId) UnpackInitializedEvent(log *types.Log) (*SyntheticDeviceIdInitialized, error) { + event := "Initialized" + if len(log.Topics) == 0 || log.Topics[0] != syntheticDeviceId.abi.Events[event].ID { + return nil, errors.New("event signature mismatch") + } + out := new(SyntheticDeviceIdInitialized) + if len(log.Data) > 0 { + if err := syntheticDeviceId.abi.UnpackIntoInterface(out, event, log.Data); err != nil { + return nil, err + } + } + var indexed abi.Arguments + for _, arg := range syntheticDeviceId.abi.Events[event].Inputs { + if arg.Indexed { + indexed = append(indexed, arg) + } + } + if err := abi.ParseTopics(out, indexed, log.Topics[1:]); err != nil { + return nil, err + } + out.Raw = log + return out, nil +} + +// SyntheticDeviceIdMetadataUpdate represents a MetadataUpdate event raised by the SyntheticDeviceId contract. +type SyntheticDeviceIdMetadataUpdate struct { + TokenId *big.Int + Raw *types.Log // Blockchain specific contextual infos +} + +const SyntheticDeviceIdMetadataUpdateEventName = "MetadataUpdate" + +// ContractEventName returns the user-defined event name. +func (SyntheticDeviceIdMetadataUpdate) ContractEventName() string { + return SyntheticDeviceIdMetadataUpdateEventName +} + +// UnpackMetadataUpdateEvent is the Go binding that unpacks the event data emitted +// by contract. +// +// Solidity: event MetadataUpdate(uint256 _tokenId) +func (syntheticDeviceId *SyntheticDeviceId) UnpackMetadataUpdateEvent(log *types.Log) (*SyntheticDeviceIdMetadataUpdate, error) { + event := "MetadataUpdate" + if len(log.Topics) == 0 || log.Topics[0] != syntheticDeviceId.abi.Events[event].ID { + return nil, errors.New("event signature mismatch") + } + out := new(SyntheticDeviceIdMetadataUpdate) + if len(log.Data) > 0 { + if err := syntheticDeviceId.abi.UnpackIntoInterface(out, event, log.Data); err != nil { + return nil, err + } + } + var indexed abi.Arguments + for _, arg := range syntheticDeviceId.abi.Events[event].Inputs { + if arg.Indexed { + indexed = append(indexed, arg) + } + } + if err := abi.ParseTopics(out, indexed, log.Topics[1:]); err != nil { + return nil, err + } + out.Raw = log + return out, nil +} + +// SyntheticDeviceIdPrivilegeCreated represents a PrivilegeCreated event raised by the SyntheticDeviceId contract. +type SyntheticDeviceIdPrivilegeCreated struct { + PrivilegeId *big.Int + Enabled bool + Description string + Raw *types.Log // Blockchain specific contextual infos +} + +const SyntheticDeviceIdPrivilegeCreatedEventName = "PrivilegeCreated" + +// ContractEventName returns the user-defined event name. +func (SyntheticDeviceIdPrivilegeCreated) ContractEventName() string { + return SyntheticDeviceIdPrivilegeCreatedEventName +} + +// UnpackPrivilegeCreatedEvent is the Go binding that unpacks the event data emitted +// by contract. +// +// Solidity: event PrivilegeCreated(uint256 indexed privilegeId, bool enabled, string description) +func (syntheticDeviceId *SyntheticDeviceId) UnpackPrivilegeCreatedEvent(log *types.Log) (*SyntheticDeviceIdPrivilegeCreated, error) { + event := "PrivilegeCreated" + if len(log.Topics) == 0 || log.Topics[0] != syntheticDeviceId.abi.Events[event].ID { + return nil, errors.New("event signature mismatch") + } + out := new(SyntheticDeviceIdPrivilegeCreated) + if len(log.Data) > 0 { + if err := syntheticDeviceId.abi.UnpackIntoInterface(out, event, log.Data); err != nil { + return nil, err + } + } + var indexed abi.Arguments + for _, arg := range syntheticDeviceId.abi.Events[event].Inputs { + if arg.Indexed { + indexed = append(indexed, arg) + } + } + if err := abi.ParseTopics(out, indexed, log.Topics[1:]); err != nil { + return nil, err + } + out.Raw = log + return out, nil +} + +// SyntheticDeviceIdPrivilegeDisabled represents a PrivilegeDisabled event raised by the SyntheticDeviceId contract. +type SyntheticDeviceIdPrivilegeDisabled struct { + PrivilegeId *big.Int + Raw *types.Log // Blockchain specific contextual infos +} + +const SyntheticDeviceIdPrivilegeDisabledEventName = "PrivilegeDisabled" + +// ContractEventName returns the user-defined event name. +func (SyntheticDeviceIdPrivilegeDisabled) ContractEventName() string { + return SyntheticDeviceIdPrivilegeDisabledEventName +} + +// UnpackPrivilegeDisabledEvent is the Go binding that unpacks the event data emitted +// by contract. +// +// Solidity: event PrivilegeDisabled(uint256 indexed privilegeId) +func (syntheticDeviceId *SyntheticDeviceId) UnpackPrivilegeDisabledEvent(log *types.Log) (*SyntheticDeviceIdPrivilegeDisabled, error) { + event := "PrivilegeDisabled" + if len(log.Topics) == 0 || log.Topics[0] != syntheticDeviceId.abi.Events[event].ID { + return nil, errors.New("event signature mismatch") + } + out := new(SyntheticDeviceIdPrivilegeDisabled) + if len(log.Data) > 0 { + if err := syntheticDeviceId.abi.UnpackIntoInterface(out, event, log.Data); err != nil { + return nil, err + } + } + var indexed abi.Arguments + for _, arg := range syntheticDeviceId.abi.Events[event].Inputs { + if arg.Indexed { + indexed = append(indexed, arg) + } + } + if err := abi.ParseTopics(out, indexed, log.Topics[1:]); err != nil { + return nil, err + } + out.Raw = log + return out, nil +} + +// SyntheticDeviceIdPrivilegeEnabled represents a PrivilegeEnabled event raised by the SyntheticDeviceId contract. +type SyntheticDeviceIdPrivilegeEnabled struct { + PrivilegeId *big.Int + Raw *types.Log // Blockchain specific contextual infos +} + +const SyntheticDeviceIdPrivilegeEnabledEventName = "PrivilegeEnabled" + +// ContractEventName returns the user-defined event name. +func (SyntheticDeviceIdPrivilegeEnabled) ContractEventName() string { + return SyntheticDeviceIdPrivilegeEnabledEventName +} + +// UnpackPrivilegeEnabledEvent is the Go binding that unpacks the event data emitted +// by contract. +// +// Solidity: event PrivilegeEnabled(uint256 indexed privilegeId) +func (syntheticDeviceId *SyntheticDeviceId) UnpackPrivilegeEnabledEvent(log *types.Log) (*SyntheticDeviceIdPrivilegeEnabled, error) { + event := "PrivilegeEnabled" + if len(log.Topics) == 0 || log.Topics[0] != syntheticDeviceId.abi.Events[event].ID { + return nil, errors.New("event signature mismatch") + } + out := new(SyntheticDeviceIdPrivilegeEnabled) + if len(log.Data) > 0 { + if err := syntheticDeviceId.abi.UnpackIntoInterface(out, event, log.Data); err != nil { + return nil, err + } + } + var indexed abi.Arguments + for _, arg := range syntheticDeviceId.abi.Events[event].Inputs { + if arg.Indexed { + indexed = append(indexed, arg) + } + } + if err := abi.ParseTopics(out, indexed, log.Topics[1:]); err != nil { + return nil, err + } + out.Raw = log + return out, nil +} + +// SyntheticDeviceIdPrivilegeSet represents a PrivilegeSet event raised by the SyntheticDeviceId contract. +type SyntheticDeviceIdPrivilegeSet struct { + TokenId *big.Int + Version *big.Int + PrivId *big.Int + User common.Address + Expires *big.Int + Raw *types.Log // Blockchain specific contextual infos +} + +const SyntheticDeviceIdPrivilegeSetEventName = "PrivilegeSet" + +// ContractEventName returns the user-defined event name. +func (SyntheticDeviceIdPrivilegeSet) ContractEventName() string { + return SyntheticDeviceIdPrivilegeSetEventName +} + +// UnpackPrivilegeSetEvent is the Go binding that unpacks the event data emitted +// by contract. +// +// Solidity: event PrivilegeSet(uint256 indexed tokenId, uint256 version, uint256 indexed privId, address indexed user, uint256 expires) +func (syntheticDeviceId *SyntheticDeviceId) UnpackPrivilegeSetEvent(log *types.Log) (*SyntheticDeviceIdPrivilegeSet, error) { + event := "PrivilegeSet" + if len(log.Topics) == 0 || log.Topics[0] != syntheticDeviceId.abi.Events[event].ID { + return nil, errors.New("event signature mismatch") + } + out := new(SyntheticDeviceIdPrivilegeSet) + if len(log.Data) > 0 { + if err := syntheticDeviceId.abi.UnpackIntoInterface(out, event, log.Data); err != nil { + return nil, err + } + } + var indexed abi.Arguments + for _, arg := range syntheticDeviceId.abi.Events[event].Inputs { + if arg.Indexed { + indexed = append(indexed, arg) + } + } + if err := abi.ParseTopics(out, indexed, log.Topics[1:]); err != nil { + return nil, err + } + out.Raw = log + return out, nil +} + +// SyntheticDeviceIdRoleAdminChanged represents a RoleAdminChanged event raised by the SyntheticDeviceId contract. +type SyntheticDeviceIdRoleAdminChanged struct { + Role [32]byte + PreviousAdminRole [32]byte + NewAdminRole [32]byte + Raw *types.Log // Blockchain specific contextual infos +} + +const SyntheticDeviceIdRoleAdminChangedEventName = "RoleAdminChanged" + +// ContractEventName returns the user-defined event name. +func (SyntheticDeviceIdRoleAdminChanged) ContractEventName() string { + return SyntheticDeviceIdRoleAdminChangedEventName +} + +// UnpackRoleAdminChangedEvent is the Go binding that unpacks the event data emitted +// by contract. +// +// Solidity: event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole) +func (syntheticDeviceId *SyntheticDeviceId) UnpackRoleAdminChangedEvent(log *types.Log) (*SyntheticDeviceIdRoleAdminChanged, error) { + event := "RoleAdminChanged" + if len(log.Topics) == 0 || log.Topics[0] != syntheticDeviceId.abi.Events[event].ID { + return nil, errors.New("event signature mismatch") + } + out := new(SyntheticDeviceIdRoleAdminChanged) + if len(log.Data) > 0 { + if err := syntheticDeviceId.abi.UnpackIntoInterface(out, event, log.Data); err != nil { + return nil, err + } + } + var indexed abi.Arguments + for _, arg := range syntheticDeviceId.abi.Events[event].Inputs { + if arg.Indexed { + indexed = append(indexed, arg) + } + } + if err := abi.ParseTopics(out, indexed, log.Topics[1:]); err != nil { + return nil, err + } + out.Raw = log + return out, nil +} + +// SyntheticDeviceIdRoleGranted represents a RoleGranted event raised by the SyntheticDeviceId contract. +type SyntheticDeviceIdRoleGranted struct { + Role [32]byte + Account common.Address + Sender common.Address + Raw *types.Log // Blockchain specific contextual infos +} + +const SyntheticDeviceIdRoleGrantedEventName = "RoleGranted" + +// ContractEventName returns the user-defined event name. +func (SyntheticDeviceIdRoleGranted) ContractEventName() string { + return SyntheticDeviceIdRoleGrantedEventName +} + +// UnpackRoleGrantedEvent is the Go binding that unpacks the event data emitted +// by contract. +// +// Solidity: event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender) +func (syntheticDeviceId *SyntheticDeviceId) UnpackRoleGrantedEvent(log *types.Log) (*SyntheticDeviceIdRoleGranted, error) { + event := "RoleGranted" + if len(log.Topics) == 0 || log.Topics[0] != syntheticDeviceId.abi.Events[event].ID { + return nil, errors.New("event signature mismatch") + } + out := new(SyntheticDeviceIdRoleGranted) + if len(log.Data) > 0 { + if err := syntheticDeviceId.abi.UnpackIntoInterface(out, event, log.Data); err != nil { + return nil, err + } + } + var indexed abi.Arguments + for _, arg := range syntheticDeviceId.abi.Events[event].Inputs { + if arg.Indexed { + indexed = append(indexed, arg) + } + } + if err := abi.ParseTopics(out, indexed, log.Topics[1:]); err != nil { + return nil, err + } + out.Raw = log + return out, nil +} + +// SyntheticDeviceIdRoleRevoked represents a RoleRevoked event raised by the SyntheticDeviceId contract. +type SyntheticDeviceIdRoleRevoked struct { + Role [32]byte + Account common.Address + Sender common.Address + Raw *types.Log // Blockchain specific contextual infos +} + +const SyntheticDeviceIdRoleRevokedEventName = "RoleRevoked" + +// ContractEventName returns the user-defined event name. +func (SyntheticDeviceIdRoleRevoked) ContractEventName() string { + return SyntheticDeviceIdRoleRevokedEventName +} + +// UnpackRoleRevokedEvent is the Go binding that unpacks the event data emitted +// by contract. +// +// Solidity: event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender) +func (syntheticDeviceId *SyntheticDeviceId) UnpackRoleRevokedEvent(log *types.Log) (*SyntheticDeviceIdRoleRevoked, error) { + event := "RoleRevoked" + if len(log.Topics) == 0 || log.Topics[0] != syntheticDeviceId.abi.Events[event].ID { + return nil, errors.New("event signature mismatch") + } + out := new(SyntheticDeviceIdRoleRevoked) + if len(log.Data) > 0 { + if err := syntheticDeviceId.abi.UnpackIntoInterface(out, event, log.Data); err != nil { + return nil, err + } + } + var indexed abi.Arguments + for _, arg := range syntheticDeviceId.abi.Events[event].Inputs { + if arg.Indexed { + indexed = append(indexed, arg) + } + } + if err := abi.ParseTopics(out, indexed, log.Topics[1:]); err != nil { + return nil, err + } + out.Raw = log + return out, nil +} + +// SyntheticDeviceIdTransfer represents a Transfer event raised by the SyntheticDeviceId contract. +type SyntheticDeviceIdTransfer struct { + From common.Address + To common.Address + TokenId *big.Int + Raw *types.Log // Blockchain specific contextual infos +} + +const SyntheticDeviceIdTransferEventName = "Transfer" + +// ContractEventName returns the user-defined event name. +func (SyntheticDeviceIdTransfer) ContractEventName() string { + return SyntheticDeviceIdTransferEventName +} + +// UnpackTransferEvent is the Go binding that unpacks the event data emitted +// by contract. +// +// Solidity: event Transfer(address indexed from, address indexed to, uint256 indexed tokenId) +func (syntheticDeviceId *SyntheticDeviceId) UnpackTransferEvent(log *types.Log) (*SyntheticDeviceIdTransfer, error) { + event := "Transfer" + if len(log.Topics) == 0 || log.Topics[0] != syntheticDeviceId.abi.Events[event].ID { + return nil, errors.New("event signature mismatch") + } + out := new(SyntheticDeviceIdTransfer) + if len(log.Data) > 0 { + if err := syntheticDeviceId.abi.UnpackIntoInterface(out, event, log.Data); err != nil { + return nil, err + } + } + var indexed abi.Arguments + for _, arg := range syntheticDeviceId.abi.Events[event].Inputs { + if arg.Indexed { + indexed = append(indexed, arg) + } + } + if err := abi.ParseTopics(out, indexed, log.Topics[1:]); err != nil { + return nil, err + } + out.Raw = log + return out, nil +} + +// SyntheticDeviceIdUpgraded represents a Upgraded event raised by the SyntheticDeviceId contract. +type SyntheticDeviceIdUpgraded struct { + Implementation common.Address + Raw *types.Log // Blockchain specific contextual infos +} + +const SyntheticDeviceIdUpgradedEventName = "Upgraded" + +// ContractEventName returns the user-defined event name. +func (SyntheticDeviceIdUpgraded) ContractEventName() string { + return SyntheticDeviceIdUpgradedEventName +} + +// UnpackUpgradedEvent is the Go binding that unpacks the event data emitted +// by contract. +// +// Solidity: event Upgraded(address indexed implementation) +func (syntheticDeviceId *SyntheticDeviceId) UnpackUpgradedEvent(log *types.Log) (*SyntheticDeviceIdUpgraded, error) { + event := "Upgraded" + if len(log.Topics) == 0 || log.Topics[0] != syntheticDeviceId.abi.Events[event].ID { + return nil, errors.New("event signature mismatch") + } + out := new(SyntheticDeviceIdUpgraded) + if len(log.Data) > 0 { + if err := syntheticDeviceId.abi.UnpackIntoInterface(out, event, log.Data); err != nil { + return nil, err + } + } + var indexed abi.Arguments + for _, arg := range syntheticDeviceId.abi.Events[event].Inputs { + if arg.Indexed { + indexed = append(indexed, arg) + } + } + if err := abi.ParseTopics(out, indexed, log.Topics[1:]); err != nil { + return nil, err + } + out.Raw = log + return out, nil +} + +// UnpackError attempts to decode the provided error data using user-defined +// error definitions. +func (syntheticDeviceId *SyntheticDeviceId) UnpackError(raw []byte) (any, error) { + if bytes.Equal(raw[:4], syntheticDeviceId.abi.Errors["Unauthorized"].ID.Bytes()[:4]) { + return syntheticDeviceId.UnpackUnauthorizedError(raw[4:]) + } + if bytes.Equal(raw[:4], syntheticDeviceId.abi.Errors["ZeroAddress"].ID.Bytes()[:4]) { + return syntheticDeviceId.UnpackZeroAddressError(raw[4:]) + } + return nil, errors.New("Unknown error") +} + +// SyntheticDeviceIdUnauthorized represents a Unauthorized error raised by the SyntheticDeviceId contract. +type SyntheticDeviceIdUnauthorized struct { +} + +// ErrorID returns the hash of canonical representation of the error's signature. +// +// Solidity: error Unauthorized() +func SyntheticDeviceIdUnauthorizedErrorID() common.Hash { + return common.HexToHash("0x82b4290015f7ec7256ca2a6247d3c2a89c4865c0e791456df195f40ad0a81367") +} + +// UnpackUnauthorizedError is the Go binding used to decode the provided +// error data into the corresponding Go error struct. +// +// Solidity: error Unauthorized() +func (syntheticDeviceId *SyntheticDeviceId) UnpackUnauthorizedError(raw []byte) (*SyntheticDeviceIdUnauthorized, error) { + out := new(SyntheticDeviceIdUnauthorized) + if err := syntheticDeviceId.abi.UnpackIntoInterface(out, "Unauthorized", raw); err != nil { + return nil, err + } + return out, nil +} + +// SyntheticDeviceIdZeroAddress represents a ZeroAddress error raised by the SyntheticDeviceId contract. +type SyntheticDeviceIdZeroAddress struct { +} + +// ErrorID returns the hash of canonical representation of the error's signature. +// +// Solidity: error ZeroAddress() +func SyntheticDeviceIdZeroAddressErrorID() common.Hash { + return common.HexToHash("0xd92e233df2717d4a40030e20904abd27b68fcbeede117eaaccbbdac9618c8c73") +} + +// UnpackZeroAddressError is the Go binding used to decode the provided +// error data into the corresponding Go error struct. +// +// Solidity: error ZeroAddress() +func (syntheticDeviceId *SyntheticDeviceId) UnpackZeroAddressError(raw []byte) (*SyntheticDeviceIdZeroAddress, error) { + out := new(SyntheticDeviceIdZeroAddress) + if err := syntheticDeviceId.abi.UnpackIntoInterface(out, "ZeroAddress", raw); err != nil { + return nil, err + } + return out, nil +} diff --git a/bindings/vehicleId/vehicleId.go b/bindings/vehicleId/vehicleId.go new file mode 100644 index 00000000..f2afde51 --- /dev/null +++ b/bindings/vehicleId/vehicleId.go @@ -0,0 +1,2430 @@ +// Code generated via abigen V2 - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package vehicleId + +import ( + "bytes" + "errors" + "math/big" + + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/accounts/abi/bind/v2" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" +) + +// Reference imports to suppress errors if they are not otherwise used. +var ( + _ = bytes.Equal + _ = errors.New + _ = big.NewInt + _ = common.Big1 + _ = types.BloomLookup + _ = abi.ConvertType +) + +// MultiPrivilegeSetPrivilegeData is an auto generated low-level Go binding around an user-defined struct. +type MultiPrivilegeSetPrivilegeData struct { + TokenId *big.Int + PrivId *big.Int + User common.Address + Expires *big.Int +} + +// VehicleIdSacdInput is an auto generated low-level Go binding around an user-defined struct. +type VehicleIdSacdInput struct { + Grantee common.Address + Permissions *big.Int + Expiration *big.Int + Source string +} + +// VehicleIdMetaData contains all meta data concerning the VehicleId contract. +var VehicleIdMetaData = bind.MetaData{ + ABI: "[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"idProxy\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"errorMessage\",\"type\":\"string\"}],\"name\":\"TransferFailed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"Unauthorized\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroAddress\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AdminChanged\",\"type\":\"event\"},{\"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\":false,\"internalType\":\"uint256\",\"name\":\"_fromTokenId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_toTokenId\",\"type\":\"uint256\"}],\"name\":\"BatchMetadataUpdate\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"beacon\",\"type\":\"address\"}],\"name\":\"BeaconUpgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_tokenId\",\"type\":\"uint256\"}],\"name\":\"MetadataUpdate\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"privilegeId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"enabled\",\"type\":\"bool\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"description\",\"type\":\"string\"}],\"name\":\"PrivilegeCreated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"privilegeId\",\"type\":\"uint256\"}],\"name\":\"PrivilegeDisabled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"privilegeId\",\"type\":\"uint256\"}],\"name\":\"PrivilegeEnabled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"version\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"privId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"expires\",\"type\":\"uint256\"}],\"name\":\"PrivilegeSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"previousAdminRole\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"newAdminRole\",\"type\":\"bytes32\"}],\"name\":\"RoleAdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleGranted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleRevoked\",\"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\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"BURNER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MINTER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"SAFE_TRANSFER_FROM\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"TRANSFERER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"UPGRADER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"_dimoRegistry\",\"outputs\":[{\"internalType\":\"contractIDimoRegistry\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"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\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"burn\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"enabled\",\"type\":\"bool\"},{\"internalType\":\"string\",\"name\":\"description\",\"type\":\"string\"}],\"name\":\"createPrivilege\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"privId\",\"type\":\"uint256\"}],\"name\":\"disablePrivilege\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"privId\",\"type\":\"uint256\"}],\"name\":\"enablePrivilege\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"exists\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"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\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"getDefinitionURI\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"definitionURI\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleAdmin\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"grantRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"privId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"}],\"name\":\"hasPrivilege\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"hasRole\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"name_\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"symbol_\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"baseUri_\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"dimoRegistry_\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"syntheticDeviceId_\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"sacd_\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"trustedForwarders_\",\"type\":\"address[]\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"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\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"privilegeEntry\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"privId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"}],\"name\":\"privilegeExpiresAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"privilegeRecord\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"enabled\",\"type\":\"bool\"},{\"internalType\":\"string\",\"name\":\"description\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"proxiableUUID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"renounceRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"revokeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sacd\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"safeMint\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"uri\",\"type\":\"string\"}],\"name\":\"safeMint\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"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\":\"string\",\"name\":\"baseURI_\",\"type\":\"string\"}],\"name\":\"setBaseURI\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"setDimoRegistryAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"privId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"expires\",\"type\":\"uint256\"}],\"name\":\"setPrivilege\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"privId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"expires\",\"type\":\"uint256\"}],\"internalType\":\"structMultiPrivilege.SetPrivilegeData[]\",\"name\":\"privData\",\"type\":\"tuple[]\"}],\"name\":\"setPrivileges\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"grantee\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"permissions\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiration\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"source\",\"type\":\"string\"}],\"internalType\":\"structVehicleId.SacdInput\",\"name\":\"sacdInput\",\"type\":\"tuple\"}],\"name\":\"setSacd\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"setSacdAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"setSyntheticDeviceIdAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"trusted\",\"type\":\"bool\"}],\"name\":\"setTrustedForwarder\",\"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\":[],\"name\":\"syntheticDeviceId\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"tokenIdToVersion\",\"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\":[{\"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\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"trustedForwarders\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"}]", + ID: "VehicleId", +} + +// VehicleId is an auto generated Go binding around an Ethereum contract. +type VehicleId struct { + abi abi.ABI +} + +// NewVehicleId creates a new instance of VehicleId. +func NewVehicleId() *VehicleId { + parsed, err := VehicleIdMetaData.ParseABI() + if err != nil { + panic(errors.New("invalid ABI: " + err.Error())) + } + return &VehicleId{abi: *parsed} +} + +// Instance creates a wrapper for a deployed contract instance at the given address. +// Use this to create the instance object passed to abigen v2 library functions Call, Transact, etc. +func (c *VehicleId) Instance(backend bind.ContractBackend, addr common.Address) *bind.BoundContract { + return bind.NewBoundContract(addr, c.abi, backend, backend, backend) +} + +// PackADMINROLE is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x75b238fc. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function ADMIN_ROLE() view returns(bytes32) +func (vehicleId *VehicleId) PackADMINROLE() []byte { + enc, err := vehicleId.abi.Pack("ADMIN_ROLE") + if err != nil { + panic(err) + } + return enc +} + +// TryPackADMINROLE is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x75b238fc. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function ADMIN_ROLE() view returns(bytes32) +func (vehicleId *VehicleId) TryPackADMINROLE() ([]byte, error) { + return vehicleId.abi.Pack("ADMIN_ROLE") +} + +// UnpackADMINROLE is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0x75b238fc. +// +// Solidity: function ADMIN_ROLE() view returns(bytes32) +func (vehicleId *VehicleId) UnpackADMINROLE(data []byte) ([32]byte, error) { + out, err := vehicleId.abi.Unpack("ADMIN_ROLE", data) + if err != nil { + return *new([32]byte), err + } + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + return out0, nil +} + +// PackBURNERROLE is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x282c51f3. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function BURNER_ROLE() view returns(bytes32) +func (vehicleId *VehicleId) PackBURNERROLE() []byte { + enc, err := vehicleId.abi.Pack("BURNER_ROLE") + if err != nil { + panic(err) + } + return enc +} + +// TryPackBURNERROLE is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x282c51f3. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function BURNER_ROLE() view returns(bytes32) +func (vehicleId *VehicleId) TryPackBURNERROLE() ([]byte, error) { + return vehicleId.abi.Pack("BURNER_ROLE") +} + +// UnpackBURNERROLE is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0x282c51f3. +// +// Solidity: function BURNER_ROLE() view returns(bytes32) +func (vehicleId *VehicleId) UnpackBURNERROLE(data []byte) ([32]byte, error) { + out, err := vehicleId.abi.Unpack("BURNER_ROLE", data) + if err != nil { + return *new([32]byte), err + } + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + return out0, nil +} + +// PackDEFAULTADMINROLE is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xa217fddf. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function DEFAULT_ADMIN_ROLE() view returns(bytes32) +func (vehicleId *VehicleId) PackDEFAULTADMINROLE() []byte { + enc, err := vehicleId.abi.Pack("DEFAULT_ADMIN_ROLE") + if err != nil { + panic(err) + } + return enc +} + +// TryPackDEFAULTADMINROLE is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xa217fddf. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function DEFAULT_ADMIN_ROLE() view returns(bytes32) +func (vehicleId *VehicleId) TryPackDEFAULTADMINROLE() ([]byte, error) { + return vehicleId.abi.Pack("DEFAULT_ADMIN_ROLE") +} + +// UnpackDEFAULTADMINROLE is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0xa217fddf. +// +// Solidity: function DEFAULT_ADMIN_ROLE() view returns(bytes32) +func (vehicleId *VehicleId) UnpackDEFAULTADMINROLE(data []byte) ([32]byte, error) { + out, err := vehicleId.abi.Unpack("DEFAULT_ADMIN_ROLE", data) + if err != nil { + return *new([32]byte), err + } + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + return out0, nil +} + +// PackMINTERROLE is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xd5391393. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function MINTER_ROLE() view returns(bytes32) +func (vehicleId *VehicleId) PackMINTERROLE() []byte { + enc, err := vehicleId.abi.Pack("MINTER_ROLE") + if err != nil { + panic(err) + } + return enc +} + +// TryPackMINTERROLE is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xd5391393. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function MINTER_ROLE() view returns(bytes32) +func (vehicleId *VehicleId) TryPackMINTERROLE() ([]byte, error) { + return vehicleId.abi.Pack("MINTER_ROLE") +} + +// UnpackMINTERROLE is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0xd5391393. +// +// Solidity: function MINTER_ROLE() view returns(bytes32) +func (vehicleId *VehicleId) UnpackMINTERROLE(data []byte) ([32]byte, error) { + out, err := vehicleId.abi.Unpack("MINTER_ROLE", data) + if err != nil { + return *new([32]byte), err + } + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + return out0, nil +} + +// PackSAFETRANSFERFROM is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xe4cdbfdb. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function SAFE_TRANSFER_FROM() view returns(bytes4) +func (vehicleId *VehicleId) PackSAFETRANSFERFROM() []byte { + enc, err := vehicleId.abi.Pack("SAFE_TRANSFER_FROM") + if err != nil { + panic(err) + } + return enc +} + +// TryPackSAFETRANSFERFROM is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xe4cdbfdb. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function SAFE_TRANSFER_FROM() view returns(bytes4) +func (vehicleId *VehicleId) TryPackSAFETRANSFERFROM() ([]byte, error) { + return vehicleId.abi.Pack("SAFE_TRANSFER_FROM") +} + +// UnpackSAFETRANSFERFROM is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0xe4cdbfdb. +// +// Solidity: function SAFE_TRANSFER_FROM() view returns(bytes4) +func (vehicleId *VehicleId) UnpackSAFETRANSFERFROM(data []byte) ([4]byte, error) { + out, err := vehicleId.abi.Unpack("SAFE_TRANSFER_FROM", data) + if err != nil { + return *new([4]byte), err + } + out0 := *abi.ConvertType(out[0], new([4]byte)).(*[4]byte) + return out0, nil +} + +// PackTRANSFERERROLE is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x0ade7dc1. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function TRANSFERER_ROLE() view returns(bytes32) +func (vehicleId *VehicleId) PackTRANSFERERROLE() []byte { + enc, err := vehicleId.abi.Pack("TRANSFERER_ROLE") + if err != nil { + panic(err) + } + return enc +} + +// TryPackTRANSFERERROLE is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x0ade7dc1. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function TRANSFERER_ROLE() view returns(bytes32) +func (vehicleId *VehicleId) TryPackTRANSFERERROLE() ([]byte, error) { + return vehicleId.abi.Pack("TRANSFERER_ROLE") +} + +// UnpackTRANSFERERROLE is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0x0ade7dc1. +// +// Solidity: function TRANSFERER_ROLE() view returns(bytes32) +func (vehicleId *VehicleId) UnpackTRANSFERERROLE(data []byte) ([32]byte, error) { + out, err := vehicleId.abi.Unpack("TRANSFERER_ROLE", data) + if err != nil { + return *new([32]byte), err + } + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + return out0, nil +} + +// PackUPGRADERROLE is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xf72c0d8b. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function UPGRADER_ROLE() view returns(bytes32) +func (vehicleId *VehicleId) PackUPGRADERROLE() []byte { + enc, err := vehicleId.abi.Pack("UPGRADER_ROLE") + if err != nil { + panic(err) + } + return enc +} + +// TryPackUPGRADERROLE is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xf72c0d8b. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function UPGRADER_ROLE() view returns(bytes32) +func (vehicleId *VehicleId) TryPackUPGRADERROLE() ([]byte, error) { + return vehicleId.abi.Pack("UPGRADER_ROLE") +} + +// UnpackUPGRADERROLE is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0xf72c0d8b. +// +// Solidity: function UPGRADER_ROLE() view returns(bytes32) +func (vehicleId *VehicleId) UnpackUPGRADERROLE(data []byte) ([32]byte, error) { + out, err := vehicleId.abi.Unpack("UPGRADER_ROLE", data) + if err != nil { + return *new([32]byte), err + } + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + return out0, nil +} + +// PackDimoRegistry is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x7625c605. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function _dimoRegistry() view returns(address) +func (vehicleId *VehicleId) PackDimoRegistry() []byte { + enc, err := vehicleId.abi.Pack("_dimoRegistry") + if err != nil { + panic(err) + } + return enc +} + +// TryPackDimoRegistry is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x7625c605. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function _dimoRegistry() view returns(address) +func (vehicleId *VehicleId) TryPackDimoRegistry() ([]byte, error) { + return vehicleId.abi.Pack("_dimoRegistry") +} + +// UnpackDimoRegistry is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0x7625c605. +// +// Solidity: function _dimoRegistry() view returns(address) +func (vehicleId *VehicleId) UnpackDimoRegistry(data []byte) (common.Address, error) { + out, err := vehicleId.abi.Unpack("_dimoRegistry", data) + if err != nil { + return *new(common.Address), err + } + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + return out0, nil +} + +// PackApprove is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x095ea7b3. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function approve(address to, uint256 tokenId) returns() +func (vehicleId *VehicleId) PackApprove(to common.Address, tokenId *big.Int) []byte { + enc, err := vehicleId.abi.Pack("approve", to, tokenId) + if err != nil { + panic(err) + } + return enc +} + +// TryPackApprove is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x095ea7b3. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function approve(address to, uint256 tokenId) returns() +func (vehicleId *VehicleId) TryPackApprove(to common.Address, tokenId *big.Int) ([]byte, error) { + return vehicleId.abi.Pack("approve", to, tokenId) +} + +// PackBalanceOf is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x70a08231. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function balanceOf(address owner) view returns(uint256) +func (vehicleId *VehicleId) PackBalanceOf(owner common.Address) []byte { + enc, err := vehicleId.abi.Pack("balanceOf", owner) + if err != nil { + panic(err) + } + return enc +} + +// TryPackBalanceOf is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x70a08231. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function balanceOf(address owner) view returns(uint256) +func (vehicleId *VehicleId) TryPackBalanceOf(owner common.Address) ([]byte, error) { + return vehicleId.abi.Pack("balanceOf", owner) +} + +// UnpackBalanceOf is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0x70a08231. +// +// Solidity: function balanceOf(address owner) view returns(uint256) +func (vehicleId *VehicleId) UnpackBalanceOf(data []byte) (*big.Int, error) { + out, err := vehicleId.abi.Unpack("balanceOf", data) + if err != nil { + return new(big.Int), err + } + out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int) + return out0, nil +} + +// PackBurn is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x42966c68. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function burn(uint256 tokenId) returns() +func (vehicleId *VehicleId) PackBurn(tokenId *big.Int) []byte { + enc, err := vehicleId.abi.Pack("burn", tokenId) + if err != nil { + panic(err) + } + return enc +} + +// TryPackBurn is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x42966c68. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function burn(uint256 tokenId) returns() +func (vehicleId *VehicleId) TryPackBurn(tokenId *big.Int) ([]byte, error) { + return vehicleId.abi.Pack("burn", tokenId) +} + +// PackCreatePrivilege is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xc1d58b3b. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function createPrivilege(bool enabled, string description) returns() +func (vehicleId *VehicleId) PackCreatePrivilege(enabled bool, description string) []byte { + enc, err := vehicleId.abi.Pack("createPrivilege", enabled, description) + if err != nil { + panic(err) + } + return enc +} + +// TryPackCreatePrivilege is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xc1d58b3b. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function createPrivilege(bool enabled, string description) returns() +func (vehicleId *VehicleId) TryPackCreatePrivilege(enabled bool, description string) ([]byte, error) { + return vehicleId.abi.Pack("createPrivilege", enabled, description) +} + +// PackDisablePrivilege is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x1a153ed0. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function disablePrivilege(uint256 privId) returns() +func (vehicleId *VehicleId) PackDisablePrivilege(privId *big.Int) []byte { + enc, err := vehicleId.abi.Pack("disablePrivilege", privId) + if err != nil { + panic(err) + } + return enc +} + +// TryPackDisablePrivilege is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x1a153ed0. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function disablePrivilege(uint256 privId) returns() +func (vehicleId *VehicleId) TryPackDisablePrivilege(privId *big.Int) ([]byte, error) { + return vehicleId.abi.Pack("disablePrivilege", privId) +} + +// PackEnablePrivilege is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x831ba696. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function enablePrivilege(uint256 privId) returns() +func (vehicleId *VehicleId) PackEnablePrivilege(privId *big.Int) []byte { + enc, err := vehicleId.abi.Pack("enablePrivilege", privId) + if err != nil { + panic(err) + } + return enc +} + +// TryPackEnablePrivilege is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x831ba696. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function enablePrivilege(uint256 privId) returns() +func (vehicleId *VehicleId) TryPackEnablePrivilege(privId *big.Int) ([]byte, error) { + return vehicleId.abi.Pack("enablePrivilege", privId) +} + +// PackExists is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x4f558e79. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function exists(uint256 tokenId) view returns(bool) +func (vehicleId *VehicleId) PackExists(tokenId *big.Int) []byte { + enc, err := vehicleId.abi.Pack("exists", tokenId) + if err != nil { + panic(err) + } + return enc +} + +// TryPackExists is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x4f558e79. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function exists(uint256 tokenId) view returns(bool) +func (vehicleId *VehicleId) TryPackExists(tokenId *big.Int) ([]byte, error) { + return vehicleId.abi.Pack("exists", tokenId) +} + +// UnpackExists is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0x4f558e79. +// +// Solidity: function exists(uint256 tokenId) view returns(bool) +func (vehicleId *VehicleId) UnpackExists(data []byte) (bool, error) { + out, err := vehicleId.abi.Unpack("exists", data) + if err != nil { + return *new(bool), err + } + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + return out0, nil +} + +// PackGetApproved is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x081812fc. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function getApproved(uint256 tokenId) view returns(address) +func (vehicleId *VehicleId) PackGetApproved(tokenId *big.Int) []byte { + enc, err := vehicleId.abi.Pack("getApproved", tokenId) + if err != nil { + panic(err) + } + return enc +} + +// TryPackGetApproved is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x081812fc. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function getApproved(uint256 tokenId) view returns(address) +func (vehicleId *VehicleId) TryPackGetApproved(tokenId *big.Int) ([]byte, error) { + return vehicleId.abi.Pack("getApproved", tokenId) +} + +// UnpackGetApproved is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0x081812fc. +// +// Solidity: function getApproved(uint256 tokenId) view returns(address) +func (vehicleId *VehicleId) UnpackGetApproved(data []byte) (common.Address, error) { + out, err := vehicleId.abi.Unpack("getApproved", data) + if err != nil { + return *new(common.Address), err + } + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + return out0, nil +} + +// PackGetDefinitionURI is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x9b12f1c9. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function getDefinitionURI(uint256 tokenId) view returns(string definitionURI) +func (vehicleId *VehicleId) PackGetDefinitionURI(tokenId *big.Int) []byte { + enc, err := vehicleId.abi.Pack("getDefinitionURI", tokenId) + if err != nil { + panic(err) + } + return enc +} + +// TryPackGetDefinitionURI is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x9b12f1c9. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function getDefinitionURI(uint256 tokenId) view returns(string definitionURI) +func (vehicleId *VehicleId) TryPackGetDefinitionURI(tokenId *big.Int) ([]byte, error) { + return vehicleId.abi.Pack("getDefinitionURI", tokenId) +} + +// UnpackGetDefinitionURI is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0x9b12f1c9. +// +// Solidity: function getDefinitionURI(uint256 tokenId) view returns(string definitionURI) +func (vehicleId *VehicleId) UnpackGetDefinitionURI(data []byte) (string, error) { + out, err := vehicleId.abi.Unpack("getDefinitionURI", data) + if err != nil { + return *new(string), err + } + out0 := *abi.ConvertType(out[0], new(string)).(*string) + return out0, nil +} + +// PackGetRoleAdmin is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x248a9ca3. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function getRoleAdmin(bytes32 role) view returns(bytes32) +func (vehicleId *VehicleId) PackGetRoleAdmin(role [32]byte) []byte { + enc, err := vehicleId.abi.Pack("getRoleAdmin", role) + if err != nil { + panic(err) + } + return enc +} + +// TryPackGetRoleAdmin is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x248a9ca3. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function getRoleAdmin(bytes32 role) view returns(bytes32) +func (vehicleId *VehicleId) TryPackGetRoleAdmin(role [32]byte) ([]byte, error) { + return vehicleId.abi.Pack("getRoleAdmin", role) +} + +// UnpackGetRoleAdmin is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0x248a9ca3. +// +// Solidity: function getRoleAdmin(bytes32 role) view returns(bytes32) +func (vehicleId *VehicleId) UnpackGetRoleAdmin(data []byte) ([32]byte, error) { + out, err := vehicleId.abi.Unpack("getRoleAdmin", data) + if err != nil { + return *new([32]byte), err + } + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + return out0, nil +} + +// PackGrantRole is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x2f2ff15d. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function grantRole(bytes32 role, address account) returns() +func (vehicleId *VehicleId) PackGrantRole(role [32]byte, account common.Address) []byte { + enc, err := vehicleId.abi.Pack("grantRole", role, account) + if err != nil { + panic(err) + } + return enc +} + +// TryPackGrantRole is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x2f2ff15d. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function grantRole(bytes32 role, address account) returns() +func (vehicleId *VehicleId) TryPackGrantRole(role [32]byte, account common.Address) ([]byte, error) { + return vehicleId.abi.Pack("grantRole", role, account) +} + +// PackHasPrivilege is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x05d80b00. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function hasPrivilege(uint256 tokenId, uint256 privId, address user) view returns(bool) +func (vehicleId *VehicleId) PackHasPrivilege(tokenId *big.Int, privId *big.Int, user common.Address) []byte { + enc, err := vehicleId.abi.Pack("hasPrivilege", tokenId, privId, user) + if err != nil { + panic(err) + } + return enc +} + +// TryPackHasPrivilege is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x05d80b00. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function hasPrivilege(uint256 tokenId, uint256 privId, address user) view returns(bool) +func (vehicleId *VehicleId) TryPackHasPrivilege(tokenId *big.Int, privId *big.Int, user common.Address) ([]byte, error) { + return vehicleId.abi.Pack("hasPrivilege", tokenId, privId, user) +} + +// UnpackHasPrivilege is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0x05d80b00. +// +// Solidity: function hasPrivilege(uint256 tokenId, uint256 privId, address user) view returns(bool) +func (vehicleId *VehicleId) UnpackHasPrivilege(data []byte) (bool, error) { + out, err := vehicleId.abi.Unpack("hasPrivilege", data) + if err != nil { + return *new(bool), err + } + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + return out0, nil +} + +// PackHasRole is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x91d14854. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function hasRole(bytes32 role, address account) view returns(bool) +func (vehicleId *VehicleId) PackHasRole(role [32]byte, account common.Address) []byte { + enc, err := vehicleId.abi.Pack("hasRole", role, account) + if err != nil { + panic(err) + } + return enc +} + +// TryPackHasRole is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x91d14854. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function hasRole(bytes32 role, address account) view returns(bool) +func (vehicleId *VehicleId) TryPackHasRole(role [32]byte, account common.Address) ([]byte, error) { + return vehicleId.abi.Pack("hasRole", role, account) +} + +// UnpackHasRole is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0x91d14854. +// +// Solidity: function hasRole(bytes32 role, address account) view returns(bool) +func (vehicleId *VehicleId) UnpackHasRole(data []byte) (bool, error) { + out, err := vehicleId.abi.Unpack("hasRole", data) + if err != nil { + return *new(bool), err + } + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + return out0, nil +} + +// PackInitialize is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x6b2ab28a. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function initialize(string name_, string symbol_, string baseUri_, address dimoRegistry_, address syntheticDeviceId_, address sacd_, address[] trustedForwarders_) returns() +func (vehicleId *VehicleId) PackInitialize(name string, symbol string, baseUri string, dimoRegistry common.Address, syntheticDeviceId common.Address, sacd common.Address, trustedForwarders []common.Address) []byte { + enc, err := vehicleId.abi.Pack("initialize", name, symbol, baseUri, dimoRegistry, syntheticDeviceId, sacd, trustedForwarders) + if err != nil { + panic(err) + } + return enc +} + +// TryPackInitialize is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x6b2ab28a. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function initialize(string name_, string symbol_, string baseUri_, address dimoRegistry_, address syntheticDeviceId_, address sacd_, address[] trustedForwarders_) returns() +func (vehicleId *VehicleId) TryPackInitialize(name string, symbol string, baseUri string, dimoRegistry common.Address, syntheticDeviceId common.Address, sacd common.Address, trustedForwarders []common.Address) ([]byte, error) { + return vehicleId.abi.Pack("initialize", name, symbol, baseUri, dimoRegistry, syntheticDeviceId, sacd, trustedForwarders) +} + +// PackIsApprovedForAll is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xe985e9c5. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function isApprovedForAll(address owner, address operator) view returns(bool) +func (vehicleId *VehicleId) PackIsApprovedForAll(owner common.Address, operator common.Address) []byte { + enc, err := vehicleId.abi.Pack("isApprovedForAll", owner, operator) + if err != nil { + panic(err) + } + return enc +} + +// TryPackIsApprovedForAll is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xe985e9c5. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function isApprovedForAll(address owner, address operator) view returns(bool) +func (vehicleId *VehicleId) TryPackIsApprovedForAll(owner common.Address, operator common.Address) ([]byte, error) { + return vehicleId.abi.Pack("isApprovedForAll", owner, operator) +} + +// UnpackIsApprovedForAll is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0xe985e9c5. +// +// Solidity: function isApprovedForAll(address owner, address operator) view returns(bool) +func (vehicleId *VehicleId) UnpackIsApprovedForAll(data []byte) (bool, error) { + out, err := vehicleId.abi.Unpack("isApprovedForAll", data) + if err != nil { + return *new(bool), err + } + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + return out0, nil +} + +// PackName is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x06fdde03. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function name() view returns(string) +func (vehicleId *VehicleId) PackName() []byte { + enc, err := vehicleId.abi.Pack("name") + if err != nil { + panic(err) + } + return enc +} + +// TryPackName is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x06fdde03. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function name() view returns(string) +func (vehicleId *VehicleId) TryPackName() ([]byte, error) { + return vehicleId.abi.Pack("name") +} + +// UnpackName is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0x06fdde03. +// +// Solidity: function name() view returns(string) +func (vehicleId *VehicleId) UnpackName(data []byte) (string, error) { + out, err := vehicleId.abi.Unpack("name", data) + if err != nil { + return *new(string), err + } + out0 := *abi.ConvertType(out[0], new(string)).(*string) + return out0, nil +} + +// PackOwnerOf is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x6352211e. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function ownerOf(uint256 tokenId) view returns(address) +func (vehicleId *VehicleId) PackOwnerOf(tokenId *big.Int) []byte { + enc, err := vehicleId.abi.Pack("ownerOf", tokenId) + if err != nil { + panic(err) + } + return enc +} + +// TryPackOwnerOf is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x6352211e. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function ownerOf(uint256 tokenId) view returns(address) +func (vehicleId *VehicleId) TryPackOwnerOf(tokenId *big.Int) ([]byte, error) { + return vehicleId.abi.Pack("ownerOf", tokenId) +} + +// UnpackOwnerOf is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0x6352211e. +// +// Solidity: function ownerOf(uint256 tokenId) view returns(address) +func (vehicleId *VehicleId) UnpackOwnerOf(data []byte) (common.Address, error) { + out, err := vehicleId.abi.Unpack("ownerOf", data) + if err != nil { + return *new(common.Address), err + } + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + return out0, nil +} + +// PackPrivilegeEntry is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x48db4640. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function privilegeEntry(uint256 , uint256 , uint256 , address ) view returns(uint256) +func (vehicleId *VehicleId) PackPrivilegeEntry(arg0 *big.Int, arg1 *big.Int, arg2 *big.Int, arg3 common.Address) []byte { + enc, err := vehicleId.abi.Pack("privilegeEntry", arg0, arg1, arg2, arg3) + if err != nil { + panic(err) + } + return enc +} + +// TryPackPrivilegeEntry is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x48db4640. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function privilegeEntry(uint256 , uint256 , uint256 , address ) view returns(uint256) +func (vehicleId *VehicleId) TryPackPrivilegeEntry(arg0 *big.Int, arg1 *big.Int, arg2 *big.Int, arg3 common.Address) ([]byte, error) { + return vehicleId.abi.Pack("privilegeEntry", arg0, arg1, arg2, arg3) +} + +// UnpackPrivilegeEntry is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0x48db4640. +// +// Solidity: function privilegeEntry(uint256 , uint256 , uint256 , address ) view returns(uint256) +func (vehicleId *VehicleId) UnpackPrivilegeEntry(data []byte) (*big.Int, error) { + out, err := vehicleId.abi.Unpack("privilegeEntry", data) + if err != nil { + return new(big.Int), err + } + out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int) + return out0, nil +} + +// PackPrivilegeExpiresAt is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xd0f8f5f6. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function privilegeExpiresAt(uint256 tokenId, uint256 privId, address user) view returns(uint256) +func (vehicleId *VehicleId) PackPrivilegeExpiresAt(tokenId *big.Int, privId *big.Int, user common.Address) []byte { + enc, err := vehicleId.abi.Pack("privilegeExpiresAt", tokenId, privId, user) + if err != nil { + panic(err) + } + return enc +} + +// TryPackPrivilegeExpiresAt is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xd0f8f5f6. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function privilegeExpiresAt(uint256 tokenId, uint256 privId, address user) view returns(uint256) +func (vehicleId *VehicleId) TryPackPrivilegeExpiresAt(tokenId *big.Int, privId *big.Int, user common.Address) ([]byte, error) { + return vehicleId.abi.Pack("privilegeExpiresAt", tokenId, privId, user) +} + +// UnpackPrivilegeExpiresAt is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0xd0f8f5f6. +// +// Solidity: function privilegeExpiresAt(uint256 tokenId, uint256 privId, address user) view returns(uint256) +func (vehicleId *VehicleId) UnpackPrivilegeExpiresAt(data []byte) (*big.Int, error) { + out, err := vehicleId.abi.Unpack("privilegeExpiresAt", data) + if err != nil { + return new(big.Int), err + } + out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int) + return out0, nil +} + +// PackPrivilegeRecord is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xf9ad3efe. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function privilegeRecord(uint256 ) view returns(bool enabled, string description) +func (vehicleId *VehicleId) PackPrivilegeRecord(arg0 *big.Int) []byte { + enc, err := vehicleId.abi.Pack("privilegeRecord", arg0) + if err != nil { + panic(err) + } + return enc +} + +// TryPackPrivilegeRecord is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xf9ad3efe. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function privilegeRecord(uint256 ) view returns(bool enabled, string description) +func (vehicleId *VehicleId) TryPackPrivilegeRecord(arg0 *big.Int) ([]byte, error) { + return vehicleId.abi.Pack("privilegeRecord", arg0) +} + +// PrivilegeRecordOutput serves as a container for the return parameters of contract +// method PrivilegeRecord. +type PrivilegeRecordOutput struct { + Enabled bool + Description string +} + +// UnpackPrivilegeRecord is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0xf9ad3efe. +// +// Solidity: function privilegeRecord(uint256 ) view returns(bool enabled, string description) +func (vehicleId *VehicleId) UnpackPrivilegeRecord(data []byte) (PrivilegeRecordOutput, error) { + out, err := vehicleId.abi.Unpack("privilegeRecord", data) + outstruct := new(PrivilegeRecordOutput) + if err != nil { + return *outstruct, err + } + outstruct.Enabled = *abi.ConvertType(out[0], new(bool)).(*bool) + outstruct.Description = *abi.ConvertType(out[1], new(string)).(*string) + return *outstruct, nil +} + +// PackProxiableUUID is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x52d1902d. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function proxiableUUID() view returns(bytes32) +func (vehicleId *VehicleId) PackProxiableUUID() []byte { + enc, err := vehicleId.abi.Pack("proxiableUUID") + if err != nil { + panic(err) + } + return enc +} + +// TryPackProxiableUUID is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x52d1902d. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function proxiableUUID() view returns(bytes32) +func (vehicleId *VehicleId) TryPackProxiableUUID() ([]byte, error) { + return vehicleId.abi.Pack("proxiableUUID") +} + +// UnpackProxiableUUID is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0x52d1902d. +// +// Solidity: function proxiableUUID() view returns(bytes32) +func (vehicleId *VehicleId) UnpackProxiableUUID(data []byte) ([32]byte, error) { + out, err := vehicleId.abi.Unpack("proxiableUUID", data) + if err != nil { + return *new([32]byte), err + } + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + return out0, nil +} + +// PackRenounceRole is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x36568abe. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function renounceRole(bytes32 role, address account) returns() +func (vehicleId *VehicleId) PackRenounceRole(role [32]byte, account common.Address) []byte { + enc, err := vehicleId.abi.Pack("renounceRole", role, account) + if err != nil { + panic(err) + } + return enc +} + +// TryPackRenounceRole is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x36568abe. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function renounceRole(bytes32 role, address account) returns() +func (vehicleId *VehicleId) TryPackRenounceRole(role [32]byte, account common.Address) ([]byte, error) { + return vehicleId.abi.Pack("renounceRole", role, account) +} + +// PackRevokeRole is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xd547741f. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function revokeRole(bytes32 role, address account) returns() +func (vehicleId *VehicleId) PackRevokeRole(role [32]byte, account common.Address) []byte { + enc, err := vehicleId.abi.Pack("revokeRole", role, account) + if err != nil { + panic(err) + } + return enc +} + +// TryPackRevokeRole is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xd547741f. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function revokeRole(bytes32 role, address account) returns() +func (vehicleId *VehicleId) TryPackRevokeRole(role [32]byte, account common.Address) ([]byte, error) { + return vehicleId.abi.Pack("revokeRole", role, account) +} + +// PackSacd is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x18973db8. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function sacd() view returns(address) +func (vehicleId *VehicleId) PackSacd() []byte { + enc, err := vehicleId.abi.Pack("sacd") + if err != nil { + panic(err) + } + return enc +} + +// TryPackSacd is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x18973db8. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function sacd() view returns(address) +func (vehicleId *VehicleId) TryPackSacd() ([]byte, error) { + return vehicleId.abi.Pack("sacd") +} + +// UnpackSacd is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0x18973db8. +// +// Solidity: function sacd() view returns(address) +func (vehicleId *VehicleId) UnpackSacd(data []byte) (common.Address, error) { + out, err := vehicleId.abi.Unpack("sacd", data) + if err != nil { + return *new(common.Address), err + } + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + return out0, nil +} + +// PackSafeMint is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x40d097c3. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function safeMint(address to) returns(uint256 tokenId) +func (vehicleId *VehicleId) PackSafeMint(to common.Address) []byte { + enc, err := vehicleId.abi.Pack("safeMint", to) + if err != nil { + panic(err) + } + return enc +} + +// TryPackSafeMint is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x40d097c3. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function safeMint(address to) returns(uint256 tokenId) +func (vehicleId *VehicleId) TryPackSafeMint(to common.Address) ([]byte, error) { + return vehicleId.abi.Pack("safeMint", to) +} + +// UnpackSafeMint is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0x40d097c3. +// +// Solidity: function safeMint(address to) returns(uint256 tokenId) +func (vehicleId *VehicleId) UnpackSafeMint(data []byte) (*big.Int, error) { + out, err := vehicleId.abi.Unpack("safeMint", data) + if err != nil { + return new(big.Int), err + } + out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int) + return out0, nil +} + +// PackSafeMint0 is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xd204c45e. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function safeMint(address to, string uri) returns(uint256 tokenId) +func (vehicleId *VehicleId) PackSafeMint0(to common.Address, uri string) []byte { + enc, err := vehicleId.abi.Pack("safeMint0", to, uri) + if err != nil { + panic(err) + } + return enc +} + +// TryPackSafeMint0 is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xd204c45e. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function safeMint(address to, string uri) returns(uint256 tokenId) +func (vehicleId *VehicleId) TryPackSafeMint0(to common.Address, uri string) ([]byte, error) { + return vehicleId.abi.Pack("safeMint0", to, uri) +} + +// UnpackSafeMint0 is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0xd204c45e. +// +// Solidity: function safeMint(address to, string uri) returns(uint256 tokenId) +func (vehicleId *VehicleId) UnpackSafeMint0(data []byte) (*big.Int, error) { + out, err := vehicleId.abi.Unpack("safeMint0", data) + if err != nil { + return new(big.Int), err + } + out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int) + return out0, nil +} + +// PackSafeTransferFrom is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x42842e0e. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function safeTransferFrom(address from, address to, uint256 tokenId) returns() +func (vehicleId *VehicleId) PackSafeTransferFrom(from common.Address, to common.Address, tokenId *big.Int) []byte { + enc, err := vehicleId.abi.Pack("safeTransferFrom", from, to, tokenId) + if err != nil { + panic(err) + } + return enc +} + +// TryPackSafeTransferFrom is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x42842e0e. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function safeTransferFrom(address from, address to, uint256 tokenId) returns() +func (vehicleId *VehicleId) TryPackSafeTransferFrom(from common.Address, to common.Address, tokenId *big.Int) ([]byte, error) { + return vehicleId.abi.Pack("safeTransferFrom", from, to, tokenId) +} + +// PackSafeTransferFrom0 is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xb88d4fde. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function safeTransferFrom(address from, address to, uint256 tokenId, bytes data) returns() +func (vehicleId *VehicleId) PackSafeTransferFrom0(from common.Address, to common.Address, tokenId *big.Int, data []byte) []byte { + enc, err := vehicleId.abi.Pack("safeTransferFrom0", from, to, tokenId, data) + if err != nil { + panic(err) + } + return enc +} + +// TryPackSafeTransferFrom0 is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xb88d4fde. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function safeTransferFrom(address from, address to, uint256 tokenId, bytes data) returns() +func (vehicleId *VehicleId) TryPackSafeTransferFrom0(from common.Address, to common.Address, tokenId *big.Int, data []byte) ([]byte, error) { + return vehicleId.abi.Pack("safeTransferFrom0", from, to, tokenId, data) +} + +// PackSetApprovalForAll is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xa22cb465. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function setApprovalForAll(address operator, bool approved) returns() +func (vehicleId *VehicleId) PackSetApprovalForAll(operator common.Address, approved bool) []byte { + enc, err := vehicleId.abi.Pack("setApprovalForAll", operator, approved) + if err != nil { + panic(err) + } + return enc +} + +// TryPackSetApprovalForAll is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xa22cb465. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function setApprovalForAll(address operator, bool approved) returns() +func (vehicleId *VehicleId) TryPackSetApprovalForAll(operator common.Address, approved bool) ([]byte, error) { + return vehicleId.abi.Pack("setApprovalForAll", operator, approved) +} + +// PackSetBaseURI is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x55f804b3. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function setBaseURI(string baseURI_) returns() +func (vehicleId *VehicleId) PackSetBaseURI(baseURI string) []byte { + enc, err := vehicleId.abi.Pack("setBaseURI", baseURI) + if err != nil { + panic(err) + } + return enc +} + +// TryPackSetBaseURI is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x55f804b3. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function setBaseURI(string baseURI_) returns() +func (vehicleId *VehicleId) TryPackSetBaseURI(baseURI string) ([]byte, error) { + return vehicleId.abi.Pack("setBaseURI", baseURI) +} + +// PackSetDimoRegistryAddress is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x0db857ea. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function setDimoRegistryAddress(address addr) returns() +func (vehicleId *VehicleId) PackSetDimoRegistryAddress(addr common.Address) []byte { + enc, err := vehicleId.abi.Pack("setDimoRegistryAddress", addr) + if err != nil { + panic(err) + } + return enc +} + +// TryPackSetDimoRegistryAddress is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x0db857ea. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function setDimoRegistryAddress(address addr) returns() +func (vehicleId *VehicleId) TryPackSetDimoRegistryAddress(addr common.Address) ([]byte, error) { + return vehicleId.abi.Pack("setDimoRegistryAddress", addr) +} + +// PackSetPrivilege is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xeca3221a. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function setPrivilege(uint256 tokenId, uint256 privId, address user, uint256 expires) returns() +func (vehicleId *VehicleId) PackSetPrivilege(tokenId *big.Int, privId *big.Int, user common.Address, expires *big.Int) []byte { + enc, err := vehicleId.abi.Pack("setPrivilege", tokenId, privId, user, expires) + if err != nil { + panic(err) + } + return enc +} + +// TryPackSetPrivilege is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xeca3221a. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function setPrivilege(uint256 tokenId, uint256 privId, address user, uint256 expires) returns() +func (vehicleId *VehicleId) TryPackSetPrivilege(tokenId *big.Int, privId *big.Int, user common.Address, expires *big.Int) ([]byte, error) { + return vehicleId.abi.Pack("setPrivilege", tokenId, privId, user, expires) +} + +// PackSetPrivileges is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x57ae9754. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function setPrivileges((uint256,uint256,address,uint256)[] privData) returns() +func (vehicleId *VehicleId) PackSetPrivileges(privData []MultiPrivilegeSetPrivilegeData) []byte { + enc, err := vehicleId.abi.Pack("setPrivileges", privData) + if err != nil { + panic(err) + } + return enc +} + +// TryPackSetPrivileges is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x57ae9754. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function setPrivileges((uint256,uint256,address,uint256)[] privData) returns() +func (vehicleId *VehicleId) TryPackSetPrivileges(privData []MultiPrivilegeSetPrivilegeData) ([]byte, error) { + return vehicleId.abi.Pack("setPrivileges", privData) +} + +// PackSetSacd is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x75209e38. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function setSacd(uint256 tokenId, (address,uint256,uint256,string) sacdInput) returns() +func (vehicleId *VehicleId) PackSetSacd(tokenId *big.Int, sacdInput VehicleIdSacdInput) []byte { + enc, err := vehicleId.abi.Pack("setSacd", tokenId, sacdInput) + if err != nil { + panic(err) + } + return enc +} + +// TryPackSetSacd is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x75209e38. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function setSacd(uint256 tokenId, (address,uint256,uint256,string) sacdInput) returns() +func (vehicleId *VehicleId) TryPackSetSacd(tokenId *big.Int, sacdInput VehicleIdSacdInput) ([]byte, error) { + return vehicleId.abi.Pack("setSacd", tokenId, sacdInput) +} + +// PackSetSacdAddress is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x555b4c8a. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function setSacdAddress(address addr) returns() +func (vehicleId *VehicleId) PackSetSacdAddress(addr common.Address) []byte { + enc, err := vehicleId.abi.Pack("setSacdAddress", addr) + if err != nil { + panic(err) + } + return enc +} + +// TryPackSetSacdAddress is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x555b4c8a. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function setSacdAddress(address addr) returns() +func (vehicleId *VehicleId) TryPackSetSacdAddress(addr common.Address) ([]byte, error) { + return vehicleId.abi.Pack("setSacdAddress", addr) +} + +// PackSetSyntheticDeviceIdAddress is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xaa531530. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function setSyntheticDeviceIdAddress(address addr) returns() +func (vehicleId *VehicleId) PackSetSyntheticDeviceIdAddress(addr common.Address) []byte { + enc, err := vehicleId.abi.Pack("setSyntheticDeviceIdAddress", addr) + if err != nil { + panic(err) + } + return enc +} + +// TryPackSetSyntheticDeviceIdAddress is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xaa531530. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function setSyntheticDeviceIdAddress(address addr) returns() +func (vehicleId *VehicleId) TryPackSetSyntheticDeviceIdAddress(addr common.Address) ([]byte, error) { + return vehicleId.abi.Pack("setSyntheticDeviceIdAddress", addr) +} + +// PackSetTrustedForwarder is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xe691d03b. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function setTrustedForwarder(address addr, bool trusted) returns() +func (vehicleId *VehicleId) PackSetTrustedForwarder(addr common.Address, trusted bool) []byte { + enc, err := vehicleId.abi.Pack("setTrustedForwarder", addr, trusted) + if err != nil { + panic(err) + } + return enc +} + +// TryPackSetTrustedForwarder is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xe691d03b. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function setTrustedForwarder(address addr, bool trusted) returns() +func (vehicleId *VehicleId) TryPackSetTrustedForwarder(addr common.Address, trusted bool) ([]byte, error) { + return vehicleId.abi.Pack("setTrustedForwarder", addr, trusted) +} + +// PackSupportsInterface is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x01ffc9a7. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function supportsInterface(bytes4 interfaceId) view returns(bool) +func (vehicleId *VehicleId) PackSupportsInterface(interfaceId [4]byte) []byte { + enc, err := vehicleId.abi.Pack("supportsInterface", interfaceId) + if err != nil { + panic(err) + } + return enc +} + +// TryPackSupportsInterface is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x01ffc9a7. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function supportsInterface(bytes4 interfaceId) view returns(bool) +func (vehicleId *VehicleId) TryPackSupportsInterface(interfaceId [4]byte) ([]byte, error) { + return vehicleId.abi.Pack("supportsInterface", interfaceId) +} + +// UnpackSupportsInterface is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0x01ffc9a7. +// +// Solidity: function supportsInterface(bytes4 interfaceId) view returns(bool) +func (vehicleId *VehicleId) UnpackSupportsInterface(data []byte) (bool, error) { + out, err := vehicleId.abi.Unpack("supportsInterface", data) + if err != nil { + return *new(bool), err + } + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + return out0, nil +} + +// PackSymbol is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x95d89b41. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function symbol() view returns(string) +func (vehicleId *VehicleId) PackSymbol() []byte { + enc, err := vehicleId.abi.Pack("symbol") + if err != nil { + panic(err) + } + return enc +} + +// TryPackSymbol is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x95d89b41. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function symbol() view returns(string) +func (vehicleId *VehicleId) TryPackSymbol() ([]byte, error) { + return vehicleId.abi.Pack("symbol") +} + +// UnpackSymbol is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0x95d89b41. +// +// Solidity: function symbol() view returns(string) +func (vehicleId *VehicleId) UnpackSymbol(data []byte) (string, error) { + out, err := vehicleId.abi.Unpack("symbol", data) + if err != nil { + return *new(string), err + } + out0 := *abi.ConvertType(out[0], new(string)).(*string) + return out0, nil +} + +// PackSyntheticDeviceId is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x8ea5f4cd. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function syntheticDeviceId() view returns(address) +func (vehicleId *VehicleId) PackSyntheticDeviceId() []byte { + enc, err := vehicleId.abi.Pack("syntheticDeviceId") + if err != nil { + panic(err) + } + return enc +} + +// TryPackSyntheticDeviceId is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x8ea5f4cd. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function syntheticDeviceId() view returns(address) +func (vehicleId *VehicleId) TryPackSyntheticDeviceId() ([]byte, error) { + return vehicleId.abi.Pack("syntheticDeviceId") +} + +// UnpackSyntheticDeviceId is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0x8ea5f4cd. +// +// Solidity: function syntheticDeviceId() view returns(address) +func (vehicleId *VehicleId) UnpackSyntheticDeviceId(data []byte) (common.Address, error) { + out, err := vehicleId.abi.Unpack("syntheticDeviceId", data) + if err != nil { + return *new(common.Address), err + } + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + return out0, nil +} + +// PackTokenIdToVersion is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xf1a9d41c. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function tokenIdToVersion(uint256 ) view returns(uint256) +func (vehicleId *VehicleId) PackTokenIdToVersion(arg0 *big.Int) []byte { + enc, err := vehicleId.abi.Pack("tokenIdToVersion", arg0) + if err != nil { + panic(err) + } + return enc +} + +// TryPackTokenIdToVersion is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xf1a9d41c. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function tokenIdToVersion(uint256 ) view returns(uint256) +func (vehicleId *VehicleId) TryPackTokenIdToVersion(arg0 *big.Int) ([]byte, error) { + return vehicleId.abi.Pack("tokenIdToVersion", arg0) +} + +// UnpackTokenIdToVersion is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0xf1a9d41c. +// +// Solidity: function tokenIdToVersion(uint256 ) view returns(uint256) +func (vehicleId *VehicleId) UnpackTokenIdToVersion(data []byte) (*big.Int, error) { + out, err := vehicleId.abi.Unpack("tokenIdToVersion", data) + if err != nil { + return new(big.Int), err + } + out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int) + return out0, nil +} + +// PackTokenURI is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xc87b56dd. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function tokenURI(uint256 tokenId) view returns(string) +func (vehicleId *VehicleId) PackTokenURI(tokenId *big.Int) []byte { + enc, err := vehicleId.abi.Pack("tokenURI", tokenId) + if err != nil { + panic(err) + } + return enc +} + +// TryPackTokenURI is the Go binding used to pack the parameters required for calling +// the contract method with ID 0xc87b56dd. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function tokenURI(uint256 tokenId) view returns(string) +func (vehicleId *VehicleId) TryPackTokenURI(tokenId *big.Int) ([]byte, error) { + return vehicleId.abi.Pack("tokenURI", tokenId) +} + +// UnpackTokenURI is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0xc87b56dd. +// +// Solidity: function tokenURI(uint256 tokenId) view returns(string) +func (vehicleId *VehicleId) UnpackTokenURI(data []byte) (string, error) { + out, err := vehicleId.abi.Unpack("tokenURI", data) + if err != nil { + return *new(string), err + } + out0 := *abi.ConvertType(out[0], new(string)).(*string) + return out0, nil +} + +// PackTransferFrom is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x23b872dd. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function transferFrom(address from, address to, uint256 tokenId) returns() +func (vehicleId *VehicleId) PackTransferFrom(from common.Address, to common.Address, tokenId *big.Int) []byte { + enc, err := vehicleId.abi.Pack("transferFrom", from, to, tokenId) + if err != nil { + panic(err) + } + return enc +} + +// TryPackTransferFrom is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x23b872dd. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function transferFrom(address from, address to, uint256 tokenId) returns() +func (vehicleId *VehicleId) TryPackTransferFrom(from common.Address, to common.Address, tokenId *big.Int) ([]byte, error) { + return vehicleId.abi.Pack("transferFrom", from, to, tokenId) +} + +// PackTrustedForwarders is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x54776bb9. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function trustedForwarders(address ) view returns(bool) +func (vehicleId *VehicleId) PackTrustedForwarders(arg0 common.Address) []byte { + enc, err := vehicleId.abi.Pack("trustedForwarders", arg0) + if err != nil { + panic(err) + } + return enc +} + +// TryPackTrustedForwarders is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x54776bb9. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function trustedForwarders(address ) view returns(bool) +func (vehicleId *VehicleId) TryPackTrustedForwarders(arg0 common.Address) ([]byte, error) { + return vehicleId.abi.Pack("trustedForwarders", arg0) +} + +// UnpackTrustedForwarders is the Go binding that unpacks the parameters returned +// from invoking the contract method with ID 0x54776bb9. +// +// Solidity: function trustedForwarders(address ) view returns(bool) +func (vehicleId *VehicleId) UnpackTrustedForwarders(data []byte) (bool, error) { + out, err := vehicleId.abi.Unpack("trustedForwarders", data) + if err != nil { + return *new(bool), err + } + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + return out0, nil +} + +// PackUpgradeTo is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x3659cfe6. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function upgradeTo(address newImplementation) returns() +func (vehicleId *VehicleId) PackUpgradeTo(newImplementation common.Address) []byte { + enc, err := vehicleId.abi.Pack("upgradeTo", newImplementation) + if err != nil { + panic(err) + } + return enc +} + +// TryPackUpgradeTo is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x3659cfe6. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function upgradeTo(address newImplementation) returns() +func (vehicleId *VehicleId) TryPackUpgradeTo(newImplementation common.Address) ([]byte, error) { + return vehicleId.abi.Pack("upgradeTo", newImplementation) +} + +// PackUpgradeToAndCall is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x4f1ef286. This method will panic if any +// invalid/nil inputs are passed. +// +// Solidity: function upgradeToAndCall(address newImplementation, bytes data) payable returns() +func (vehicleId *VehicleId) PackUpgradeToAndCall(newImplementation common.Address, data []byte) []byte { + enc, err := vehicleId.abi.Pack("upgradeToAndCall", newImplementation, data) + if err != nil { + panic(err) + } + return enc +} + +// TryPackUpgradeToAndCall is the Go binding used to pack the parameters required for calling +// the contract method with ID 0x4f1ef286. This method will return an error +// if any inputs are invalid/nil. +// +// Solidity: function upgradeToAndCall(address newImplementation, bytes data) payable returns() +func (vehicleId *VehicleId) TryPackUpgradeToAndCall(newImplementation common.Address, data []byte) ([]byte, error) { + return vehicleId.abi.Pack("upgradeToAndCall", newImplementation, data) +} + +// VehicleIdAdminChanged represents a AdminChanged event raised by the VehicleId contract. +type VehicleIdAdminChanged struct { + PreviousAdmin common.Address + NewAdmin common.Address + Raw *types.Log // Blockchain specific contextual infos +} + +const VehicleIdAdminChangedEventName = "AdminChanged" + +// ContractEventName returns the user-defined event name. +func (VehicleIdAdminChanged) ContractEventName() string { + return VehicleIdAdminChangedEventName +} + +// UnpackAdminChangedEvent is the Go binding that unpacks the event data emitted +// by contract. +// +// Solidity: event AdminChanged(address previousAdmin, address newAdmin) +func (vehicleId *VehicleId) UnpackAdminChangedEvent(log *types.Log) (*VehicleIdAdminChanged, error) { + event := "AdminChanged" + if len(log.Topics) == 0 || log.Topics[0] != vehicleId.abi.Events[event].ID { + return nil, errors.New("event signature mismatch") + } + out := new(VehicleIdAdminChanged) + if len(log.Data) > 0 { + if err := vehicleId.abi.UnpackIntoInterface(out, event, log.Data); err != nil { + return nil, err + } + } + var indexed abi.Arguments + for _, arg := range vehicleId.abi.Events[event].Inputs { + if arg.Indexed { + indexed = append(indexed, arg) + } + } + if err := abi.ParseTopics(out, indexed, log.Topics[1:]); err != nil { + return nil, err + } + out.Raw = log + return out, nil +} + +// VehicleIdApproval represents a Approval event raised by the VehicleId contract. +type VehicleIdApproval struct { + Owner common.Address + Approved common.Address + TokenId *big.Int + Raw *types.Log // Blockchain specific contextual infos +} + +const VehicleIdApprovalEventName = "Approval" + +// ContractEventName returns the user-defined event name. +func (VehicleIdApproval) ContractEventName() string { + return VehicleIdApprovalEventName +} + +// UnpackApprovalEvent is the Go binding that unpacks the event data emitted +// by contract. +// +// Solidity: event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId) +func (vehicleId *VehicleId) UnpackApprovalEvent(log *types.Log) (*VehicleIdApproval, error) { + event := "Approval" + if len(log.Topics) == 0 || log.Topics[0] != vehicleId.abi.Events[event].ID { + return nil, errors.New("event signature mismatch") + } + out := new(VehicleIdApproval) + if len(log.Data) > 0 { + if err := vehicleId.abi.UnpackIntoInterface(out, event, log.Data); err != nil { + return nil, err + } + } + var indexed abi.Arguments + for _, arg := range vehicleId.abi.Events[event].Inputs { + if arg.Indexed { + indexed = append(indexed, arg) + } + } + if err := abi.ParseTopics(out, indexed, log.Topics[1:]); err != nil { + return nil, err + } + out.Raw = log + return out, nil +} + +// VehicleIdApprovalForAll represents a ApprovalForAll event raised by the VehicleId contract. +type VehicleIdApprovalForAll struct { + Owner common.Address + Operator common.Address + Approved bool + Raw *types.Log // Blockchain specific contextual infos +} + +const VehicleIdApprovalForAllEventName = "ApprovalForAll" + +// ContractEventName returns the user-defined event name. +func (VehicleIdApprovalForAll) ContractEventName() string { + return VehicleIdApprovalForAllEventName +} + +// UnpackApprovalForAllEvent is the Go binding that unpacks the event data emitted +// by contract. +// +// Solidity: event ApprovalForAll(address indexed owner, address indexed operator, bool approved) +func (vehicleId *VehicleId) UnpackApprovalForAllEvent(log *types.Log) (*VehicleIdApprovalForAll, error) { + event := "ApprovalForAll" + if len(log.Topics) == 0 || log.Topics[0] != vehicleId.abi.Events[event].ID { + return nil, errors.New("event signature mismatch") + } + out := new(VehicleIdApprovalForAll) + if len(log.Data) > 0 { + if err := vehicleId.abi.UnpackIntoInterface(out, event, log.Data); err != nil { + return nil, err + } + } + var indexed abi.Arguments + for _, arg := range vehicleId.abi.Events[event].Inputs { + if arg.Indexed { + indexed = append(indexed, arg) + } + } + if err := abi.ParseTopics(out, indexed, log.Topics[1:]); err != nil { + return nil, err + } + out.Raw = log + return out, nil +} + +// VehicleIdBatchMetadataUpdate represents a BatchMetadataUpdate event raised by the VehicleId contract. +type VehicleIdBatchMetadataUpdate struct { + FromTokenId *big.Int + ToTokenId *big.Int + Raw *types.Log // Blockchain specific contextual infos +} + +const VehicleIdBatchMetadataUpdateEventName = "BatchMetadataUpdate" + +// ContractEventName returns the user-defined event name. +func (VehicleIdBatchMetadataUpdate) ContractEventName() string { + return VehicleIdBatchMetadataUpdateEventName +} + +// UnpackBatchMetadataUpdateEvent is the Go binding that unpacks the event data emitted +// by contract. +// +// Solidity: event BatchMetadataUpdate(uint256 _fromTokenId, uint256 _toTokenId) +func (vehicleId *VehicleId) UnpackBatchMetadataUpdateEvent(log *types.Log) (*VehicleIdBatchMetadataUpdate, error) { + event := "BatchMetadataUpdate" + if len(log.Topics) == 0 || log.Topics[0] != vehicleId.abi.Events[event].ID { + return nil, errors.New("event signature mismatch") + } + out := new(VehicleIdBatchMetadataUpdate) + if len(log.Data) > 0 { + if err := vehicleId.abi.UnpackIntoInterface(out, event, log.Data); err != nil { + return nil, err + } + } + var indexed abi.Arguments + for _, arg := range vehicleId.abi.Events[event].Inputs { + if arg.Indexed { + indexed = append(indexed, arg) + } + } + if err := abi.ParseTopics(out, indexed, log.Topics[1:]); err != nil { + return nil, err + } + out.Raw = log + return out, nil +} + +// VehicleIdBeaconUpgraded represents a BeaconUpgraded event raised by the VehicleId contract. +type VehicleIdBeaconUpgraded struct { + Beacon common.Address + Raw *types.Log // Blockchain specific contextual infos +} + +const VehicleIdBeaconUpgradedEventName = "BeaconUpgraded" + +// ContractEventName returns the user-defined event name. +func (VehicleIdBeaconUpgraded) ContractEventName() string { + return VehicleIdBeaconUpgradedEventName +} + +// UnpackBeaconUpgradedEvent is the Go binding that unpacks the event data emitted +// by contract. +// +// Solidity: event BeaconUpgraded(address indexed beacon) +func (vehicleId *VehicleId) UnpackBeaconUpgradedEvent(log *types.Log) (*VehicleIdBeaconUpgraded, error) { + event := "BeaconUpgraded" + if len(log.Topics) == 0 || log.Topics[0] != vehicleId.abi.Events[event].ID { + return nil, errors.New("event signature mismatch") + } + out := new(VehicleIdBeaconUpgraded) + if len(log.Data) > 0 { + if err := vehicleId.abi.UnpackIntoInterface(out, event, log.Data); err != nil { + return nil, err + } + } + var indexed abi.Arguments + for _, arg := range vehicleId.abi.Events[event].Inputs { + if arg.Indexed { + indexed = append(indexed, arg) + } + } + if err := abi.ParseTopics(out, indexed, log.Topics[1:]); err != nil { + return nil, err + } + out.Raw = log + return out, nil +} + +// VehicleIdInitialized represents a Initialized event raised by the VehicleId contract. +type VehicleIdInitialized struct { + Version uint8 + Raw *types.Log // Blockchain specific contextual infos +} + +const VehicleIdInitializedEventName = "Initialized" + +// ContractEventName returns the user-defined event name. +func (VehicleIdInitialized) ContractEventName() string { + return VehicleIdInitializedEventName +} + +// UnpackInitializedEvent is the Go binding that unpacks the event data emitted +// by contract. +// +// Solidity: event Initialized(uint8 version) +func (vehicleId *VehicleId) UnpackInitializedEvent(log *types.Log) (*VehicleIdInitialized, error) { + event := "Initialized" + if len(log.Topics) == 0 || log.Topics[0] != vehicleId.abi.Events[event].ID { + return nil, errors.New("event signature mismatch") + } + out := new(VehicleIdInitialized) + if len(log.Data) > 0 { + if err := vehicleId.abi.UnpackIntoInterface(out, event, log.Data); err != nil { + return nil, err + } + } + var indexed abi.Arguments + for _, arg := range vehicleId.abi.Events[event].Inputs { + if arg.Indexed { + indexed = append(indexed, arg) + } + } + if err := abi.ParseTopics(out, indexed, log.Topics[1:]); err != nil { + return nil, err + } + out.Raw = log + return out, nil +} + +// VehicleIdMetadataUpdate represents a MetadataUpdate event raised by the VehicleId contract. +type VehicleIdMetadataUpdate struct { + TokenId *big.Int + Raw *types.Log // Blockchain specific contextual infos +} + +const VehicleIdMetadataUpdateEventName = "MetadataUpdate" + +// ContractEventName returns the user-defined event name. +func (VehicleIdMetadataUpdate) ContractEventName() string { + return VehicleIdMetadataUpdateEventName +} + +// UnpackMetadataUpdateEvent is the Go binding that unpacks the event data emitted +// by contract. +// +// Solidity: event MetadataUpdate(uint256 _tokenId) +func (vehicleId *VehicleId) UnpackMetadataUpdateEvent(log *types.Log) (*VehicleIdMetadataUpdate, error) { + event := "MetadataUpdate" + if len(log.Topics) == 0 || log.Topics[0] != vehicleId.abi.Events[event].ID { + return nil, errors.New("event signature mismatch") + } + out := new(VehicleIdMetadataUpdate) + if len(log.Data) > 0 { + if err := vehicleId.abi.UnpackIntoInterface(out, event, log.Data); err != nil { + return nil, err + } + } + var indexed abi.Arguments + for _, arg := range vehicleId.abi.Events[event].Inputs { + if arg.Indexed { + indexed = append(indexed, arg) + } + } + if err := abi.ParseTopics(out, indexed, log.Topics[1:]); err != nil { + return nil, err + } + out.Raw = log + return out, nil +} + +// VehicleIdPrivilegeCreated represents a PrivilegeCreated event raised by the VehicleId contract. +type VehicleIdPrivilegeCreated struct { + PrivilegeId *big.Int + Enabled bool + Description string + Raw *types.Log // Blockchain specific contextual infos +} + +const VehicleIdPrivilegeCreatedEventName = "PrivilegeCreated" + +// ContractEventName returns the user-defined event name. +func (VehicleIdPrivilegeCreated) ContractEventName() string { + return VehicleIdPrivilegeCreatedEventName +} + +// UnpackPrivilegeCreatedEvent is the Go binding that unpacks the event data emitted +// by contract. +// +// Solidity: event PrivilegeCreated(uint256 indexed privilegeId, bool enabled, string description) +func (vehicleId *VehicleId) UnpackPrivilegeCreatedEvent(log *types.Log) (*VehicleIdPrivilegeCreated, error) { + event := "PrivilegeCreated" + if len(log.Topics) == 0 || log.Topics[0] != vehicleId.abi.Events[event].ID { + return nil, errors.New("event signature mismatch") + } + out := new(VehicleIdPrivilegeCreated) + if len(log.Data) > 0 { + if err := vehicleId.abi.UnpackIntoInterface(out, event, log.Data); err != nil { + return nil, err + } + } + var indexed abi.Arguments + for _, arg := range vehicleId.abi.Events[event].Inputs { + if arg.Indexed { + indexed = append(indexed, arg) + } + } + if err := abi.ParseTopics(out, indexed, log.Topics[1:]); err != nil { + return nil, err + } + out.Raw = log + return out, nil +} + +// VehicleIdPrivilegeDisabled represents a PrivilegeDisabled event raised by the VehicleId contract. +type VehicleIdPrivilegeDisabled struct { + PrivilegeId *big.Int + Raw *types.Log // Blockchain specific contextual infos +} + +const VehicleIdPrivilegeDisabledEventName = "PrivilegeDisabled" + +// ContractEventName returns the user-defined event name. +func (VehicleIdPrivilegeDisabled) ContractEventName() string { + return VehicleIdPrivilegeDisabledEventName +} + +// UnpackPrivilegeDisabledEvent is the Go binding that unpacks the event data emitted +// by contract. +// +// Solidity: event PrivilegeDisabled(uint256 indexed privilegeId) +func (vehicleId *VehicleId) UnpackPrivilegeDisabledEvent(log *types.Log) (*VehicleIdPrivilegeDisabled, error) { + event := "PrivilegeDisabled" + if len(log.Topics) == 0 || log.Topics[0] != vehicleId.abi.Events[event].ID { + return nil, errors.New("event signature mismatch") + } + out := new(VehicleIdPrivilegeDisabled) + if len(log.Data) > 0 { + if err := vehicleId.abi.UnpackIntoInterface(out, event, log.Data); err != nil { + return nil, err + } + } + var indexed abi.Arguments + for _, arg := range vehicleId.abi.Events[event].Inputs { + if arg.Indexed { + indexed = append(indexed, arg) + } + } + if err := abi.ParseTopics(out, indexed, log.Topics[1:]); err != nil { + return nil, err + } + out.Raw = log + return out, nil +} + +// VehicleIdPrivilegeEnabled represents a PrivilegeEnabled event raised by the VehicleId contract. +type VehicleIdPrivilegeEnabled struct { + PrivilegeId *big.Int + Raw *types.Log // Blockchain specific contextual infos +} + +const VehicleIdPrivilegeEnabledEventName = "PrivilegeEnabled" + +// ContractEventName returns the user-defined event name. +func (VehicleIdPrivilegeEnabled) ContractEventName() string { + return VehicleIdPrivilegeEnabledEventName +} + +// UnpackPrivilegeEnabledEvent is the Go binding that unpacks the event data emitted +// by contract. +// +// Solidity: event PrivilegeEnabled(uint256 indexed privilegeId) +func (vehicleId *VehicleId) UnpackPrivilegeEnabledEvent(log *types.Log) (*VehicleIdPrivilegeEnabled, error) { + event := "PrivilegeEnabled" + if len(log.Topics) == 0 || log.Topics[0] != vehicleId.abi.Events[event].ID { + return nil, errors.New("event signature mismatch") + } + out := new(VehicleIdPrivilegeEnabled) + if len(log.Data) > 0 { + if err := vehicleId.abi.UnpackIntoInterface(out, event, log.Data); err != nil { + return nil, err + } + } + var indexed abi.Arguments + for _, arg := range vehicleId.abi.Events[event].Inputs { + if arg.Indexed { + indexed = append(indexed, arg) + } + } + if err := abi.ParseTopics(out, indexed, log.Topics[1:]); err != nil { + return nil, err + } + out.Raw = log + return out, nil +} + +// VehicleIdPrivilegeSet represents a PrivilegeSet event raised by the VehicleId contract. +type VehicleIdPrivilegeSet struct { + TokenId *big.Int + Version *big.Int + PrivId *big.Int + User common.Address + Expires *big.Int + Raw *types.Log // Blockchain specific contextual infos +} + +const VehicleIdPrivilegeSetEventName = "PrivilegeSet" + +// ContractEventName returns the user-defined event name. +func (VehicleIdPrivilegeSet) ContractEventName() string { + return VehicleIdPrivilegeSetEventName +} + +// UnpackPrivilegeSetEvent is the Go binding that unpacks the event data emitted +// by contract. +// +// Solidity: event PrivilegeSet(uint256 indexed tokenId, uint256 version, uint256 indexed privId, address indexed user, uint256 expires) +func (vehicleId *VehicleId) UnpackPrivilegeSetEvent(log *types.Log) (*VehicleIdPrivilegeSet, error) { + event := "PrivilegeSet" + if len(log.Topics) == 0 || log.Topics[0] != vehicleId.abi.Events[event].ID { + return nil, errors.New("event signature mismatch") + } + out := new(VehicleIdPrivilegeSet) + if len(log.Data) > 0 { + if err := vehicleId.abi.UnpackIntoInterface(out, event, log.Data); err != nil { + return nil, err + } + } + var indexed abi.Arguments + for _, arg := range vehicleId.abi.Events[event].Inputs { + if arg.Indexed { + indexed = append(indexed, arg) + } + } + if err := abi.ParseTopics(out, indexed, log.Topics[1:]); err != nil { + return nil, err + } + out.Raw = log + return out, nil +} + +// VehicleIdRoleAdminChanged represents a RoleAdminChanged event raised by the VehicleId contract. +type VehicleIdRoleAdminChanged struct { + Role [32]byte + PreviousAdminRole [32]byte + NewAdminRole [32]byte + Raw *types.Log // Blockchain specific contextual infos +} + +const VehicleIdRoleAdminChangedEventName = "RoleAdminChanged" + +// ContractEventName returns the user-defined event name. +func (VehicleIdRoleAdminChanged) ContractEventName() string { + return VehicleIdRoleAdminChangedEventName +} + +// UnpackRoleAdminChangedEvent is the Go binding that unpacks the event data emitted +// by contract. +// +// Solidity: event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole) +func (vehicleId *VehicleId) UnpackRoleAdminChangedEvent(log *types.Log) (*VehicleIdRoleAdminChanged, error) { + event := "RoleAdminChanged" + if len(log.Topics) == 0 || log.Topics[0] != vehicleId.abi.Events[event].ID { + return nil, errors.New("event signature mismatch") + } + out := new(VehicleIdRoleAdminChanged) + if len(log.Data) > 0 { + if err := vehicleId.abi.UnpackIntoInterface(out, event, log.Data); err != nil { + return nil, err + } + } + var indexed abi.Arguments + for _, arg := range vehicleId.abi.Events[event].Inputs { + if arg.Indexed { + indexed = append(indexed, arg) + } + } + if err := abi.ParseTopics(out, indexed, log.Topics[1:]); err != nil { + return nil, err + } + out.Raw = log + return out, nil +} + +// VehicleIdRoleGranted represents a RoleGranted event raised by the VehicleId contract. +type VehicleIdRoleGranted struct { + Role [32]byte + Account common.Address + Sender common.Address + Raw *types.Log // Blockchain specific contextual infos +} + +const VehicleIdRoleGrantedEventName = "RoleGranted" + +// ContractEventName returns the user-defined event name. +func (VehicleIdRoleGranted) ContractEventName() string { + return VehicleIdRoleGrantedEventName +} + +// UnpackRoleGrantedEvent is the Go binding that unpacks the event data emitted +// by contract. +// +// Solidity: event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender) +func (vehicleId *VehicleId) UnpackRoleGrantedEvent(log *types.Log) (*VehicleIdRoleGranted, error) { + event := "RoleGranted" + if len(log.Topics) == 0 || log.Topics[0] != vehicleId.abi.Events[event].ID { + return nil, errors.New("event signature mismatch") + } + out := new(VehicleIdRoleGranted) + if len(log.Data) > 0 { + if err := vehicleId.abi.UnpackIntoInterface(out, event, log.Data); err != nil { + return nil, err + } + } + var indexed abi.Arguments + for _, arg := range vehicleId.abi.Events[event].Inputs { + if arg.Indexed { + indexed = append(indexed, arg) + } + } + if err := abi.ParseTopics(out, indexed, log.Topics[1:]); err != nil { + return nil, err + } + out.Raw = log + return out, nil +} + +// VehicleIdRoleRevoked represents a RoleRevoked event raised by the VehicleId contract. +type VehicleIdRoleRevoked struct { + Role [32]byte + Account common.Address + Sender common.Address + Raw *types.Log // Blockchain specific contextual infos +} + +const VehicleIdRoleRevokedEventName = "RoleRevoked" + +// ContractEventName returns the user-defined event name. +func (VehicleIdRoleRevoked) ContractEventName() string { + return VehicleIdRoleRevokedEventName +} + +// UnpackRoleRevokedEvent is the Go binding that unpacks the event data emitted +// by contract. +// +// Solidity: event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender) +func (vehicleId *VehicleId) UnpackRoleRevokedEvent(log *types.Log) (*VehicleIdRoleRevoked, error) { + event := "RoleRevoked" + if len(log.Topics) == 0 || log.Topics[0] != vehicleId.abi.Events[event].ID { + return nil, errors.New("event signature mismatch") + } + out := new(VehicleIdRoleRevoked) + if len(log.Data) > 0 { + if err := vehicleId.abi.UnpackIntoInterface(out, event, log.Data); err != nil { + return nil, err + } + } + var indexed abi.Arguments + for _, arg := range vehicleId.abi.Events[event].Inputs { + if arg.Indexed { + indexed = append(indexed, arg) + } + } + if err := abi.ParseTopics(out, indexed, log.Topics[1:]); err != nil { + return nil, err + } + out.Raw = log + return out, nil +} + +// VehicleIdTransfer represents a Transfer event raised by the VehicleId contract. +type VehicleIdTransfer struct { + From common.Address + To common.Address + TokenId *big.Int + Raw *types.Log // Blockchain specific contextual infos +} + +const VehicleIdTransferEventName = "Transfer" + +// ContractEventName returns the user-defined event name. +func (VehicleIdTransfer) ContractEventName() string { + return VehicleIdTransferEventName +} + +// UnpackTransferEvent is the Go binding that unpacks the event data emitted +// by contract. +// +// Solidity: event Transfer(address indexed from, address indexed to, uint256 indexed tokenId) +func (vehicleId *VehicleId) UnpackTransferEvent(log *types.Log) (*VehicleIdTransfer, error) { + event := "Transfer" + if len(log.Topics) == 0 || log.Topics[0] != vehicleId.abi.Events[event].ID { + return nil, errors.New("event signature mismatch") + } + out := new(VehicleIdTransfer) + if len(log.Data) > 0 { + if err := vehicleId.abi.UnpackIntoInterface(out, event, log.Data); err != nil { + return nil, err + } + } + var indexed abi.Arguments + for _, arg := range vehicleId.abi.Events[event].Inputs { + if arg.Indexed { + indexed = append(indexed, arg) + } + } + if err := abi.ParseTopics(out, indexed, log.Topics[1:]); err != nil { + return nil, err + } + out.Raw = log + return out, nil +} + +// VehicleIdUpgraded represents a Upgraded event raised by the VehicleId contract. +type VehicleIdUpgraded struct { + Implementation common.Address + Raw *types.Log // Blockchain specific contextual infos +} + +const VehicleIdUpgradedEventName = "Upgraded" + +// ContractEventName returns the user-defined event name. +func (VehicleIdUpgraded) ContractEventName() string { + return VehicleIdUpgradedEventName +} + +// UnpackUpgradedEvent is the Go binding that unpacks the event data emitted +// by contract. +// +// Solidity: event Upgraded(address indexed implementation) +func (vehicleId *VehicleId) UnpackUpgradedEvent(log *types.Log) (*VehicleIdUpgraded, error) { + event := "Upgraded" + if len(log.Topics) == 0 || log.Topics[0] != vehicleId.abi.Events[event].ID { + return nil, errors.New("event signature mismatch") + } + out := new(VehicleIdUpgraded) + if len(log.Data) > 0 { + if err := vehicleId.abi.UnpackIntoInterface(out, event, log.Data); err != nil { + return nil, err + } + } + var indexed abi.Arguments + for _, arg := range vehicleId.abi.Events[event].Inputs { + if arg.Indexed { + indexed = append(indexed, arg) + } + } + if err := abi.ParseTopics(out, indexed, log.Topics[1:]); err != nil { + return nil, err + } + out.Raw = log + return out, nil +} + +// UnpackError attempts to decode the provided error data using user-defined +// error definitions. +func (vehicleId *VehicleId) UnpackError(raw []byte) (any, error) { + if bytes.Equal(raw[:4], vehicleId.abi.Errors["TransferFailed"].ID.Bytes()[:4]) { + return vehicleId.UnpackTransferFailedError(raw[4:]) + } + if bytes.Equal(raw[:4], vehicleId.abi.Errors["Unauthorized"].ID.Bytes()[:4]) { + return vehicleId.UnpackUnauthorizedError(raw[4:]) + } + if bytes.Equal(raw[:4], vehicleId.abi.Errors["ZeroAddress"].ID.Bytes()[:4]) { + return vehicleId.UnpackZeroAddressError(raw[4:]) + } + return nil, errors.New("Unknown error") +} + +// VehicleIdTransferFailed represents a TransferFailed error raised by the VehicleId contract. +type VehicleIdTransferFailed struct { + IdProxy common.Address + Id *big.Int + ErrorMessage string +} + +// ErrorID returns the hash of canonical representation of the error's signature. +// +// Solidity: error TransferFailed(address idProxy, uint256 id, string errorMessage) +func VehicleIdTransferFailedErrorID() common.Hash { + return common.HexToHash("0x32bd04fba17e3a4e042de2ca40e007e3f7478948cb07937b3e2059d4be9486e0") +} + +// UnpackTransferFailedError is the Go binding used to decode the provided +// error data into the corresponding Go error struct. +// +// Solidity: error TransferFailed(address idProxy, uint256 id, string errorMessage) +func (vehicleId *VehicleId) UnpackTransferFailedError(raw []byte) (*VehicleIdTransferFailed, error) { + out := new(VehicleIdTransferFailed) + if err := vehicleId.abi.UnpackIntoInterface(out, "TransferFailed", raw); err != nil { + return nil, err + } + return out, nil +} + +// VehicleIdUnauthorized represents a Unauthorized error raised by the VehicleId contract. +type VehicleIdUnauthorized struct { +} + +// ErrorID returns the hash of canonical representation of the error's signature. +// +// Solidity: error Unauthorized() +func VehicleIdUnauthorizedErrorID() common.Hash { + return common.HexToHash("0x82b4290015f7ec7256ca2a6247d3c2a89c4865c0e791456df195f40ad0a81367") +} + +// UnpackUnauthorizedError is the Go binding used to decode the provided +// error data into the corresponding Go error struct. +// +// Solidity: error Unauthorized() +func (vehicleId *VehicleId) UnpackUnauthorizedError(raw []byte) (*VehicleIdUnauthorized, error) { + out := new(VehicleIdUnauthorized) + if err := vehicleId.abi.UnpackIntoInterface(out, "Unauthorized", raw); err != nil { + return nil, err + } + return out, nil +} + +// VehicleIdZeroAddress represents a ZeroAddress error raised by the VehicleId contract. +type VehicleIdZeroAddress struct { +} + +// ErrorID returns the hash of canonical representation of the error's signature. +// +// Solidity: error ZeroAddress() +func VehicleIdZeroAddressErrorID() common.Hash { + return common.HexToHash("0xd92e233df2717d4a40030e20904abd27b68fcbeede117eaaccbbdac9618c8c73") +} + +// UnpackZeroAddressError is the Go binding used to decode the provided +// error data into the corresponding Go error struct. +// +// Solidity: error ZeroAddress() +func (vehicleId *VehicleId) UnpackZeroAddressError(raw []byte) (*VehicleIdZeroAddress, error) { + out := new(VehicleIdZeroAddress) + if err := vehicleId.abi.UnpackIntoInterface(out, "ZeroAddress", raw); err != nil { + return nil, err + } + return out, nil +} From 822ed82d55d9c3d7b7db9face48ae3806f3e7196 Mon Sep 17 00:00:00 2001 From: Dylan Moreland Date: Sat, 2 May 2026 12:09:00 -0400 Subject: [PATCH 8/9] =?UTF-8?q?Fix=20this=20test=20type:=20SdId=20?= =?UTF-8?q?=E2=86=92=20SnId?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- registry.go | 11918 ---------------------------------- test/MultipleMinter.test.ts | 10 +- utils/types.ts | 4 +- 3 files changed, 7 insertions(+), 11925 deletions(-) delete mode 100644 registry.go diff --git a/registry.go b/registry.go deleted file mode 100644 index 3b209647..00000000 --- a/registry.go +++ /dev/null @@ -1,11918 +0,0 @@ -// Code generated - DO NOT EDIT. -// This file is a generated binding and any manual changes will be lost. - -package contracts - -import ( - "errors" - "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 ( - _ = errors.New - _ = big.NewInt - _ = strings.NewReader - _ = ethereum.NotFound - _ = bind.Bind - _ = common.Big1 - _ = types.BloomLookup - _ = event.NewSubscription - _ = abi.ConvertType -) - -// AftermarketDeviceIdAddressPair is an auto generated low-level Go binding around an user-defined struct. -type AftermarketDeviceIdAddressPair struct { - AftermarketDeviceNodeId *big.Int - DeviceAddress common.Address -} - -// AftermarketDeviceInfos is an auto generated low-level Go binding around an user-defined struct. -type AftermarketDeviceInfos struct { - Addr common.Address - AttrInfoPairs []AttributeInfoPair -} - -// AftermarketDeviceOwnerPair is an auto generated low-level Go binding around an user-defined struct. -type AftermarketDeviceOwnerPair struct { - AftermarketDeviceNodeId *big.Int - Owner common.Address -} - -// AttributeInfoPair is an auto generated low-level Go binding around an user-defined struct. -type AttributeInfoPair struct { - Attribute string - Info string -} - -// DevAdminIdManufacturerName is an auto generated low-level Go binding around an user-defined struct. -type DevAdminIdManufacturerName struct { - TokenId *big.Int - Name string -} - -// DevAdminVehicleIdDeviceDefinitionId is an auto generated low-level Go binding around an user-defined struct. -type DevAdminVehicleIdDeviceDefinitionId struct { - VehicleId *big.Int - DeviceDefinitionId string -} - -// DeviceDefinitionInput is an auto generated low-level Go binding around an user-defined struct. -type DeviceDefinitionInput struct { - Id string - Model string - Year *big.Int - Metadata string - Ksuid string - DeviceType string - ImageURI string -} - -// DeviceDefinitionUpdateInput is an auto generated low-level Go binding around an user-defined struct. -type DeviceDefinitionUpdateInput struct { - Id string - Metadata string - Ksuid string - DeviceType string - ImageURI string -} - -// MintSyntheticDeviceBatchInput is an auto generated low-level Go binding around an user-defined struct. -type MintSyntheticDeviceBatchInput struct { - VehicleNode *big.Int - SyntheticDeviceAddr common.Address - AttrInfoPairs []AttributeInfoPair -} - -// MintSyntheticDeviceInput is an auto generated low-level Go binding around an user-defined struct. -type MintSyntheticDeviceInput struct { - ConnectionId *big.Int - VehicleNode *big.Int - SyntheticDeviceSig []byte - VehicleOwnerSig []byte - SyntheticDeviceAddr common.Address - AttrInfoPairs []AttributeInfoPair -} - -// MintVehicleAndSdInput is an auto generated low-level Go binding around an user-defined struct. -type MintVehicleAndSdInput struct { - ManufacturerNode *big.Int - Owner common.Address - AttrInfoPairsVehicle []AttributeInfoPair - ConnectionId *big.Int - VehicleOwnerSig []byte - SyntheticDeviceSig []byte - SyntheticDeviceAddr common.Address - AttrInfoPairsDevice []AttributeInfoPair -} - -// MintVehicleAndSdInputWithSnId is an auto generated low-level Go binding around an user-defined struct. -type MintVehicleAndSdInputWithSnId struct { - ManufacturerNode *big.Int - Owner common.Address - StorageNodeId *big.Int - AttrInfoPairsVehicle []AttributeInfoPair - ConnectionId *big.Int - VehicleOwnerSig []byte - SyntheticDeviceSig []byte - SyntheticDeviceAddr common.Address - AttrInfoPairsDevice []AttributeInfoPair -} - -// MintVehicleAndSdWithDdInput is an auto generated low-level Go binding around an user-defined struct. -type MintVehicleAndSdWithDdInput struct { - ManufacturerNode *big.Int - Owner common.Address - DeviceDefinitionId string - AttrInfoPairsVehicle []AttributeInfoPair - ConnectionId *big.Int - VehicleOwnerSig []byte - SyntheticDeviceSig []byte - SyntheticDeviceAddr common.Address - AttrInfoPairsDevice []AttributeInfoPair -} - -// MintVehicleAndSdWithDdInputBatch is an auto generated low-level Go binding around an user-defined struct. -type MintVehicleAndSdWithDdInputBatch struct { - ManufacturerNode *big.Int - Owner common.Address - DeviceDefinitionId string - AttrInfoPairsVehicle []AttributeInfoPair - ConnectionId *big.Int - VehicleOwnerSig []byte - SyntheticDeviceSig []byte - SyntheticDeviceAddr common.Address - AttrInfoPairsDevice []AttributeInfoPair - SacdInput SacdInput -} - -// MintVehicleAndSdWithDdInputWithSnId is an auto generated low-level Go binding around an user-defined struct. -type MintVehicleAndSdWithDdInputWithSnId struct { - ManufacturerNode *big.Int - Owner common.Address - DeviceDefinitionId string - StorageNodeId *big.Int - AttrInfoPairsVehicle []AttributeInfoPair - ConnectionId *big.Int - VehicleOwnerSig []byte - SyntheticDeviceSig []byte - SyntheticDeviceAddr common.Address - AttrInfoPairsDevice []AttributeInfoPair -} - -// MintVehicleAndSdWithDdInputWithSnIdBatch is an auto generated low-level Go binding around an user-defined struct. -type MintVehicleAndSdWithDdInputWithSnIdBatch struct { - ManufacturerNode *big.Int - Owner common.Address - DeviceDefinitionId string - StorageNodeId *big.Int - AttrInfoPairsVehicle []AttributeInfoPair - ConnectionId *big.Int - VehicleOwnerSig []byte - SyntheticDeviceSig []byte - SyntheticDeviceAddr common.Address - AttrInfoPairsDevice []AttributeInfoPair - SacdInput SacdInput -} - -// SacdInput is an auto generated low-level Go binding around an user-defined struct. -type SacdInput struct { - Grantee common.Address - Permissions *big.Int - Expiration *big.Int - Source string -} - -// TablelandPolicy is an auto generated low-level Go binding around an user-defined struct. -type TablelandPolicy struct { - AllowInsert bool - AllowUpdate bool - AllowDelete bool - WhereClause string - WithCheck string - UpdatableColumns []string -} - -// RegistryMetaData contains all meta data concerning the Registry contract. -var RegistryMetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"UintUtils__InsufficientHexLength\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"moduleAddr\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes4[]\",\"name\":\"selectors\",\"type\":\"bytes4[]\"}],\"name\":\"ModuleAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"moduleAddr\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes4[]\",\"name\":\"selectors\",\"type\":\"bytes4[]\"}],\"name\":\"ModuleRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"oldImplementation\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes4[]\",\"name\":\"oldSelectors\",\"type\":\"bytes4[]\"},{\"indexed\":false,\"internalType\":\"bytes4[]\",\"name\":\"newSelectors\",\"type\":\"bytes4[]\"}],\"name\":\"ModuleUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"previousAdminRole\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"newAdminRole\",\"type\":\"bytes32\"}],\"name\":\"RoleAdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleGranted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleRevoked\",\"type\":\"event\"},{\"stateMutability\":\"nonpayable\",\"type\":\"fallback\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"},{\"internalType\":\"bytes4[]\",\"name\":\"selectors\",\"type\":\"bytes4[]\"}],\"name\":\"addModule\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"},{\"internalType\":\"bytes4[]\",\"name\":\"selectors\",\"type\":\"bytes4[]\"}],\"name\":\"removeModule\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"oldImplementation\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes4[]\",\"name\":\"oldSelectors\",\"type\":\"bytes4[]\"},{\"internalType\":\"bytes4[]\",\"name\":\"newSelectors\",\"type\":\"bytes4[]\"}],\"name\":\"updateModule\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"AdNotClaimed\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"AdPaired\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"proxy\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"InvalidNode\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"storageNodeId\",\"type\":\"uint256\"}],\"name\":\"InvalidStorageNode\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"VehiclePaired\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"attribute\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"info\",\"type\":\"string\"}],\"name\":\"AftermarketDeviceAttributeSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"AftermarketDeviceNodeBurned\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"aftermarketDeviceNode\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"vehicleNode\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"AftermarketDevicePaired\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"aftermarketDeviceNode\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"oldOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"AftermarketDeviceTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"aftermarketDeviceNode\",\"type\":\"uint256\"}],\"name\":\"AftermarketDeviceUnclaimed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"aftermarketDeviceNode\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"vehicleNode\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"AftermarketDeviceUnpaired\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"vehicleId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"ddId\",\"type\":\"string\"}],\"name\":\"DeviceDefinitionIdSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"attribute\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"info\",\"type\":\"string\"}],\"name\":\"SyntheticDeviceAttributeSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"syntheticDeviceNode\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"vehicleNode\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"SyntheticDeviceNodeBurned\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"attribute\",\"type\":\"string\"}],\"name\":\"VehicleAttributeRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"attribute\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"info\",\"type\":\"string\"}],\"name\":\"VehicleAttributeSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"vehicleNode\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"VehicleNodeBurned\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"vehicleId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"storageNodeId\",\"type\":\"uint256\"}],\"name\":\"VehicleStorageNodeIdSet\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"uint256[]\",\"name\":\"tokenIds\",\"type\":\"uint256[]\"}],\"name\":\"adminBurnAftermarketDevices\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256[]\",\"name\":\"tokenIds\",\"type\":\"uint256[]\"}],\"name\":\"adminBurnAftermarketDevicesAndDeletePairings\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256[]\",\"name\":\"tokenIds\",\"type\":\"uint256[]\"}],\"name\":\"adminBurnSyntheticDevicesAndDeletePairings\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256[]\",\"name\":\"tokenIds\",\"type\":\"uint256[]\"}],\"name\":\"adminBurnVehicles\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256[]\",\"name\":\"tokenIds\",\"type\":\"uint256[]\"}],\"name\":\"adminBurnVehiclesAndDeletePairings\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"adminCacheDimoStreamrEns\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"newParentNode\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"idProxyAddress\",\"type\":\"address\"},{\"internalType\":\"uint256[]\",\"name\":\"nodeIdList\",\"type\":\"uint256[]\"}],\"name\":\"adminChangeParentNode\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"aftermarketDeviceNode\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"vehicleNode\",\"type\":\"uint256\"}],\"name\":\"adminPairAftermarketDevice\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"attribute\",\"type\":\"string\"}],\"name\":\"adminRemoveVehicleAttribute\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256[]\",\"name\":\"vehicleIds\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256\",\"name\":\"storageNodeId\",\"type\":\"uint256\"}],\"name\":\"adminSetStorageNodeIdForVehicleIds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"vehicleId\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"deviceDefinitionId\",\"type\":\"string\"}],\"internalType\":\"structDevAdmin.VehicleIdDeviceDefinitionId[]\",\"name\":\"vehicleIdDdId\",\"type\":\"tuple[]\"}],\"name\":\"adminSetVehicleDDs\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"internalType\":\"structDevAdmin.IdManufacturerName[]\",\"name\":\"idManufacturerNames\",\"type\":\"tuple[]\"}],\"name\":\"renameManufacturers\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"aftermarketDeviceNode\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferAftermarketDeviceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256[]\",\"name\":\"aftermarketDeviceNodes\",\"type\":\"uint256[]\"}],\"name\":\"unclaimAftermarketDeviceNode\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256[]\",\"name\":\"aftermarketDeviceNodes\",\"type\":\"uint256[]\"}],\"name\":\"unpairAftermarketDeviceByDeviceNode\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256[]\",\"name\":\"vehicleNodes\",\"type\":\"uint256[]\"}],\"name\":\"unpairAftermarketDeviceByVehicleNode\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleAdmin\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"grantRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"hasRole\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"renounceRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"revokeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"version\",\"type\":\"string\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes[]\",\"name\":\"data\",\"type\":\"bytes[]\"}],\"name\":\"multiDelegateCall\",\"outputs\":[{\"internalType\":\"bytes[]\",\"name\":\"results\",\"type\":\"bytes[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes[]\",\"name\":\"data\",\"type\":\"bytes[]\"}],\"name\":\"multiStaticCall\",\"outputs\":[{\"internalType\":\"bytes[]\",\"name\":\"results\",\"type\":\"bytes[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"onERC721Received\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"AdNotPaired\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"attr\",\"type\":\"string\"}],\"name\":\"AttributeExists\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"attr\",\"type\":\"string\"}],\"name\":\"AttributeNotWhitelisted\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"DeviceAlreadyClaimed\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"DeviceAlreadyRegistered\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidAdSignature\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidLicense\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidOwnerSignature\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"InvalidParentNode\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidSigner\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OwnersDoNotMatch\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"Unauthorized\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"VehicleNotPaired\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroAddress\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"manufacturerId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"aftermarketDeviceAddress\",\"type\":\"address\"}],\"name\":\"AftermarketDeviceAddressReset\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"attribute\",\"type\":\"string\"}],\"name\":\"AftermarketDeviceAttributeAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"aftermarketDeviceNode\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"AftermarketDeviceClaimed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"proxy\",\"type\":\"address\"}],\"name\":\"AftermarketDeviceIdProxySet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"manufacturerId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"aftermarketDeviceAddress\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"AftermarketDeviceNodeMinted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"aftermarketDeviceNode\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"AftermarketDeviceUnclaimed\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"attribute\",\"type\":\"string\"}],\"name\":\"addAftermarketDeviceAttribute\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"aftermarketDeviceNode\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"aftermarketDeviceSig\",\"type\":\"bytes\"}],\"name\":\"claimAftermarketDevice\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"aftermarketDeviceNodeId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"internalType\":\"structAftermarketDeviceOwnerPair[]\",\"name\":\"adOwnerPair\",\"type\":\"tuple[]\"}],\"name\":\"claimAftermarketDeviceBatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"aftermarketDeviceNode\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"ownerSig\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"aftermarketDeviceSig\",\"type\":\"bytes\"}],\"name\":\"claimAftermarketDeviceSign\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"nodeId\",\"type\":\"uint256\"}],\"name\":\"getAftermarketDeviceAddressById\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"getAftermarketDeviceIdByAddress\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"nodeId\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"nodeId\",\"type\":\"uint256\"}],\"name\":\"isAftermarketDeviceClaimed\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"isClaimed\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"manufacturerNode\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"string\",\"name\":\"attribute\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"info\",\"type\":\"string\"}],\"internalType\":\"structAttributeInfoPair[]\",\"name\":\"attrInfoPairs\",\"type\":\"tuple[]\"}],\"internalType\":\"structAftermarketDeviceInfos[]\",\"name\":\"adInfos\",\"type\":\"tuple[]\"}],\"name\":\"mintAftermarketDeviceByManufacturerBatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"aftermarketDeviceNode\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"vehicleNode\",\"type\":\"uint256\"}],\"name\":\"pairAftermarketDevice\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"aftermarketDeviceNode\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"vehicleNode\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"aftermarketDeviceSig\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"vehicleOwnerSig\",\"type\":\"bytes\"}],\"name\":\"pairAftermarketDeviceSign\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"aftermarketDeviceNode\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"vehicleNode\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"signature\",\"type\":\"bytes\"}],\"name\":\"pairAftermarketDeviceSign\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"aftermarketDeviceNode\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"vehicleNode\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"aftermarketDeviceSig\",\"type\":\"bytes\"}],\"name\":\"pairAftermarketDeviceWithAdSig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256[]\",\"name\":\"aftermarketDeviceNodeList\",\"type\":\"uint256[]\"}],\"name\":\"reprovisionAftermarketDeviceByManufacturerBatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"aftermarketDeviceNodeId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"deviceAddress\",\"type\":\"address\"}],\"internalType\":\"structAftermarketDeviceIdAddressPair[]\",\"name\":\"adIdAddrs\",\"type\":\"tuple[]\"}],\"name\":\"resetAftermarketDeviceAddressByManufacturerBatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"aftermarketDeviceNode\",\"type\":\"uint256\"}],\"name\":\"resetAftermarketDeviceForClaiming\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"setAftermarketDeviceIdProxyAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"string\",\"name\":\"attribute\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"info\",\"type\":\"string\"}],\"internalType\":\"structAttributeInfoPair[]\",\"name\":\"attrInfo\",\"type\":\"tuple[]\"}],\"name\":\"setAftermarketDeviceInfo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"aftermarketDeviceNode\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"vehicleNode\",\"type\":\"uint256\"}],\"name\":\"unpairAftermarketDevice\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"aftermarketDeviceNode\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"vehicleNode\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"signature\",\"type\":\"bytes\"}],\"name\":\"unpairAftermarketDeviceSign\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"controller\",\"type\":\"address\"}],\"name\":\"ControllerSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"attribute\",\"type\":\"string\"}],\"name\":\"ManufacturerAttributeAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"attribute\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"info\",\"type\":\"string\"}],\"name\":\"ManufacturerAttributeSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"proxy\",\"type\":\"address\"}],\"name\":\"ManufacturerIdProxySet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"ManufacturerNodeMinted\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"attribute\",\"type\":\"string\"}],\"name\":\"addManufacturerAttribute\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"name\":\"getManufacturerIdByName\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"nodeId\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"getManufacturerNameById\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"isAllowedToOwnManufacturerNode\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"_isAllowed\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"isController\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"_isController\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"isManufacturerMinted\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"_isManufacturerMinted\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"components\":[{\"internalType\":\"string\",\"name\":\"attribute\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"info\",\"type\":\"string\"}],\"internalType\":\"structAttributeInfoPair[]\",\"name\":\"attrInfoPairList\",\"type\":\"tuple[]\"}],\"name\":\"mintManufacturer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"string[]\",\"name\":\"names\",\"type\":\"string[]\"}],\"name\":\"mintManufacturerBatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_controller\",\"type\":\"address\"}],\"name\":\"setController\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"setManufacturerIdProxyAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"string\",\"name\":\"attribute\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"info\",\"type\":\"string\"}],\"internalType\":\"structAttributeInfoPair[]\",\"name\":\"attrInfoList\",\"type\":\"tuple[]\"}],\"name\":\"setManufacturerInfo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"updateManufacturerMinted\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"InvalidSdSignature\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyNftProxy\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"attribute\",\"type\":\"string\"}],\"name\":\"SyntheticDeviceAttributeAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"proxy\",\"type\":\"address\"}],\"name\":\"SyntheticDeviceIdProxySet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"connectionId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"syntheticDeviceNode\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"vehicleNode\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"syntheticDeviceAddress\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"SyntheticDeviceNodeMinted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"manufacturerNode\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"VehicleNodeMinted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"manufacturerId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"vehicleId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"deviceDefinitionId\",\"type\":\"string\"}],\"name\":\"VehicleNodeMintedWithDeviceDefinition\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"attribute\",\"type\":\"string\"}],\"name\":\"addSyntheticDeviceAttribute\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"vehicleNode\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"syntheticDeviceNode\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"ownerSig\",\"type\":\"bytes\"}],\"name\":\"burnSyntheticDeviceSign\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"nodeId\",\"type\":\"uint256\"}],\"name\":\"getSyntheticDeviceAddressById\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"getSyntheticDeviceIdByAddress\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"nodeId\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"connectionId\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"vehicleNode\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"syntheticDeviceAddr\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"string\",\"name\":\"attribute\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"info\",\"type\":\"string\"}],\"internalType\":\"structAttributeInfoPair[]\",\"name\":\"attrInfoPairs\",\"type\":\"tuple[]\"}],\"internalType\":\"structMintSyntheticDeviceBatchInput[]\",\"name\":\"data\",\"type\":\"tuple[]\"}],\"name\":\"mintSyntheticDeviceBatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"connectionId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"vehicleNode\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"syntheticDeviceSig\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"vehicleOwnerSig\",\"type\":\"bytes\"},{\"internalType\":\"address\",\"name\":\"syntheticDeviceAddr\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"string\",\"name\":\"attribute\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"info\",\"type\":\"string\"}],\"internalType\":\"structAttributeInfoPair[]\",\"name\":\"attrInfoPairs\",\"type\":\"tuple[]\"}],\"internalType\":\"structMintSyntheticDeviceInput\",\"name\":\"data\",\"type\":\"tuple\"}],\"name\":\"mintSyntheticDeviceSign\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"setSyntheticDeviceIdProxyAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"string\",\"name\":\"attribute\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"info\",\"type\":\"string\"}],\"internalType\":\"structAttributeInfoPair[]\",\"name\":\"attrInfo\",\"type\":\"tuple[]\"}],\"name\":\"setSyntheticDeviceInfo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"validateSdBurnAndResetNode\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"attribute\",\"type\":\"string\"}],\"name\":\"VehicleAttributeAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"proxy\",\"type\":\"address\"}],\"name\":\"VehicleIdProxySet\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"attribute\",\"type\":\"string\"}],\"name\":\"addVehicleAttribute\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"ownerSig\",\"type\":\"bytes\"}],\"name\":\"burnVehicleSign\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"vehicleId\",\"type\":\"uint256\"}],\"name\":\"getDeviceDefinitionIdByVehicleId\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"ddId\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"manufacturerNode\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"storageNodeId\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"deviceDefinitionId\",\"type\":\"string\"},{\"components\":[{\"internalType\":\"string\",\"name\":\"attribute\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"info\",\"type\":\"string\"}],\"internalType\":\"structAttributeInfoPair[]\",\"name\":\"attrInfo\",\"type\":\"tuple[]\"}],\"name\":\"mintVehicleWithDeviceDefinition\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"manufacturerNode\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"storageNodeId\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"deviceDefinitionId\",\"type\":\"string\"},{\"components\":[{\"internalType\":\"string\",\"name\":\"attribute\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"info\",\"type\":\"string\"}],\"internalType\":\"structAttributeInfoPair[]\",\"name\":\"attrInfo\",\"type\":\"tuple[]\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"grantee\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"permissions\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiration\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"source\",\"type\":\"string\"}],\"internalType\":\"structSacdInput\",\"name\":\"sacdInput\",\"type\":\"tuple\"}],\"name\":\"mintVehicleWithDeviceDefinition\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"manufacturerNode\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"deviceDefinitionId\",\"type\":\"string\"},{\"components\":[{\"internalType\":\"string\",\"name\":\"attribute\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"info\",\"type\":\"string\"}],\"internalType\":\"structAttributeInfoPair[]\",\"name\":\"attrInfo\",\"type\":\"tuple[]\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"grantee\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"permissions\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiration\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"source\",\"type\":\"string\"}],\"internalType\":\"structSacdInput\",\"name\":\"sacdInput\",\"type\":\"tuple\"}],\"name\":\"mintVehicleWithDeviceDefinition\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"manufacturerNode\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"deviceDefinitionId\",\"type\":\"string\"},{\"components\":[{\"internalType\":\"string\",\"name\":\"attribute\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"info\",\"type\":\"string\"}],\"internalType\":\"structAttributeInfoPair[]\",\"name\":\"attrInfo\",\"type\":\"tuple[]\"}],\"name\":\"mintVehicleWithDeviceDefinition\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"manufacturerNode\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"storageNodeId\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"deviceDefinitionId\",\"type\":\"string\"},{\"components\":[{\"internalType\":\"string\",\"name\":\"attribute\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"info\",\"type\":\"string\"}],\"internalType\":\"structAttributeInfoPair[]\",\"name\":\"attrInfo\",\"type\":\"tuple[]\"},{\"internalType\":\"bytes\",\"name\":\"signature\",\"type\":\"bytes\"}],\"name\":\"mintVehicleWithDeviceDefinitionSign\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"manufacturerNode\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"deviceDefinitionId\",\"type\":\"string\"},{\"components\":[{\"internalType\":\"string\",\"name\":\"attribute\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"info\",\"type\":\"string\"}],\"internalType\":\"structAttributeInfoPair[]\",\"name\":\"attrInfo\",\"type\":\"tuple[]\"},{\"internalType\":\"bytes\",\"name\":\"signature\",\"type\":\"bytes\"}],\"name\":\"mintVehicleWithDeviceDefinitionSign\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"setVehicleIdProxyAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"string\",\"name\":\"attribute\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"info\",\"type\":\"string\"}],\"internalType\":\"structAttributeInfoPair[]\",\"name\":\"attrInfo\",\"type\":\"tuple[]\"}],\"name\":\"setVehicleInfo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"validateBurnAndResetNode\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"idProxyAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"attribute\",\"type\":\"string\"}],\"name\":\"getInfo\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"info\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"idProxyAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"getParentNode\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"parentNode\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"idProxyAddress\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"nodeId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"beneficiary\",\"type\":\"address\"}],\"name\":\"BeneficiarySet\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"idProxyAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"nodeId\",\"type\":\"uint256\"}],\"name\":\"getBeneficiary\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"beneficiary\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"idProxyAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"sourceNode\",\"type\":\"uint256\"}],\"name\":\"getLink\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"targetNode\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"idProxyAddressSource\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"idProxyAddressTarget\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"sourceNode\",\"type\":\"uint256\"}],\"name\":\"getNodeLink\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"targetNode\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"nodeId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"beneficiary\",\"type\":\"address\"}],\"name\":\"setAftermarketDeviceBeneficiary\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"manufacturerNode\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"storageNodeId\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"string\",\"name\":\"attribute\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"info\",\"type\":\"string\"}],\"internalType\":\"structAttributeInfoPair[]\",\"name\":\"attrInfoPairsVehicle\",\"type\":\"tuple[]\"},{\"internalType\":\"uint256\",\"name\":\"connectionId\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"vehicleOwnerSig\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"syntheticDeviceSig\",\"type\":\"bytes\"},{\"internalType\":\"address\",\"name\":\"syntheticDeviceAddr\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"string\",\"name\":\"attribute\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"info\",\"type\":\"string\"}],\"internalType\":\"structAttributeInfoPair[]\",\"name\":\"attrInfoPairsDevice\",\"type\":\"tuple[]\"}],\"internalType\":\"structMintVehicleAndSdInputWithSnId\",\"name\":\"data\",\"type\":\"tuple\"}],\"name\":\"mintVehicleAndSdSign\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"manufacturerNode\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"string\",\"name\":\"attribute\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"info\",\"type\":\"string\"}],\"internalType\":\"structAttributeInfoPair[]\",\"name\":\"attrInfoPairsVehicle\",\"type\":\"tuple[]\"},{\"internalType\":\"uint256\",\"name\":\"connectionId\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"vehicleOwnerSig\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"syntheticDeviceSig\",\"type\":\"bytes\"},{\"internalType\":\"address\",\"name\":\"syntheticDeviceAddr\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"string\",\"name\":\"attribute\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"info\",\"type\":\"string\"}],\"internalType\":\"structAttributeInfoPair[]\",\"name\":\"attrInfoPairsDevice\",\"type\":\"tuple[]\"}],\"internalType\":\"structMintVehicleAndSdInput\",\"name\":\"data\",\"type\":\"tuple\"}],\"name\":\"mintVehicleAndSdSign\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"manufacturerNode\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"deviceDefinitionId\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"storageNodeId\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"string\",\"name\":\"attribute\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"info\",\"type\":\"string\"}],\"internalType\":\"structAttributeInfoPair[]\",\"name\":\"attrInfoPairsVehicle\",\"type\":\"tuple[]\"},{\"internalType\":\"uint256\",\"name\":\"connectionId\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"vehicleOwnerSig\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"syntheticDeviceSig\",\"type\":\"bytes\"},{\"internalType\":\"address\",\"name\":\"syntheticDeviceAddr\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"string\",\"name\":\"attribute\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"info\",\"type\":\"string\"}],\"internalType\":\"structAttributeInfoPair[]\",\"name\":\"attrInfoPairsDevice\",\"type\":\"tuple[]\"}],\"internalType\":\"structMintVehicleAndSdWithDdInputWithSnId\",\"name\":\"data\",\"type\":\"tuple\"}],\"name\":\"mintVehicleAndSdWithDeviceDefinitionSign\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"manufacturerNode\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"deviceDefinitionId\",\"type\":\"string\"},{\"components\":[{\"internalType\":\"string\",\"name\":\"attribute\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"info\",\"type\":\"string\"}],\"internalType\":\"structAttributeInfoPair[]\",\"name\":\"attrInfoPairsVehicle\",\"type\":\"tuple[]\"},{\"internalType\":\"uint256\",\"name\":\"connectionId\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"vehicleOwnerSig\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"syntheticDeviceSig\",\"type\":\"bytes\"},{\"internalType\":\"address\",\"name\":\"syntheticDeviceAddr\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"string\",\"name\":\"attribute\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"info\",\"type\":\"string\"}],\"internalType\":\"structAttributeInfoPair[]\",\"name\":\"attrInfoPairsDevice\",\"type\":\"tuple[]\"}],\"internalType\":\"structMintVehicleAndSdWithDdInput\",\"name\":\"data\",\"type\":\"tuple\"}],\"name\":\"mintVehicleAndSdWithDeviceDefinitionSign\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"manufacturerNode\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"deviceDefinitionId\",\"type\":\"string\"},{\"components\":[{\"internalType\":\"string\",\"name\":\"attribute\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"info\",\"type\":\"string\"}],\"internalType\":\"structAttributeInfoPair[]\",\"name\":\"attrInfoPairsVehicle\",\"type\":\"tuple[]\"},{\"internalType\":\"uint256\",\"name\":\"connectionId\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"vehicleOwnerSig\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"syntheticDeviceSig\",\"type\":\"bytes\"},{\"internalType\":\"address\",\"name\":\"syntheticDeviceAddr\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"string\",\"name\":\"attribute\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"info\",\"type\":\"string\"}],\"internalType\":\"structAttributeInfoPair[]\",\"name\":\"attrInfoPairsDevice\",\"type\":\"tuple[]\"}],\"internalType\":\"structMintVehicleAndSdWithDdInput\",\"name\":\"data\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"grantee\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"permissions\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiration\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"source\",\"type\":\"string\"}],\"internalType\":\"structSacdInput\",\"name\":\"sacdInput\",\"type\":\"tuple\"}],\"name\":\"mintVehicleAndSdWithDeviceDefinitionSignAndSacd\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"manufacturerNode\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"deviceDefinitionId\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"storageNodeId\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"string\",\"name\":\"attribute\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"info\",\"type\":\"string\"}],\"internalType\":\"structAttributeInfoPair[]\",\"name\":\"attrInfoPairsVehicle\",\"type\":\"tuple[]\"},{\"internalType\":\"uint256\",\"name\":\"connectionId\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"vehicleOwnerSig\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"syntheticDeviceSig\",\"type\":\"bytes\"},{\"internalType\":\"address\",\"name\":\"syntheticDeviceAddr\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"string\",\"name\":\"attribute\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"info\",\"type\":\"string\"}],\"internalType\":\"structAttributeInfoPair[]\",\"name\":\"attrInfoPairsDevice\",\"type\":\"tuple[]\"}],\"internalType\":\"structMintVehicleAndSdWithDdInputWithSnId\",\"name\":\"data\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"grantee\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"permissions\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiration\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"source\",\"type\":\"string\"}],\"internalType\":\"structSacdInput\",\"name\":\"sacdInput\",\"type\":\"tuple\"}],\"name\":\"mintVehicleAndSdWithDeviceDefinitionSignAndSacd\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"manufacturerNode\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"deviceDefinitionId\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"storageNodeId\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"string\",\"name\":\"attribute\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"info\",\"type\":\"string\"}],\"internalType\":\"structAttributeInfoPair[]\",\"name\":\"attrInfoPairsVehicle\",\"type\":\"tuple[]\"},{\"internalType\":\"uint256\",\"name\":\"connectionId\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"vehicleOwnerSig\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"syntheticDeviceSig\",\"type\":\"bytes\"},{\"internalType\":\"address\",\"name\":\"syntheticDeviceAddr\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"string\",\"name\":\"attribute\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"info\",\"type\":\"string\"}],\"internalType\":\"structAttributeInfoPair[]\",\"name\":\"attrInfoPairsDevice\",\"type\":\"tuple[]\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"grantee\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"permissions\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiration\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"source\",\"type\":\"string\"}],\"internalType\":\"structSacdInput\",\"name\":\"sacdInput\",\"type\":\"tuple\"}],\"internalType\":\"structMintVehicleAndSdWithDdInputWithSnIdBatch[]\",\"name\":\"data\",\"type\":\"tuple[]\"}],\"name\":\"mintVehicleAndSdWithDeviceDefinitionSignBatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"manufacturerNode\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"deviceDefinitionId\",\"type\":\"string\"},{\"components\":[{\"internalType\":\"string\",\"name\":\"attribute\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"info\",\"type\":\"string\"}],\"internalType\":\"structAttributeInfoPair[]\",\"name\":\"attrInfoPairsVehicle\",\"type\":\"tuple[]\"},{\"internalType\":\"uint256\",\"name\":\"connectionId\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"vehicleOwnerSig\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"syntheticDeviceSig\",\"type\":\"bytes\"},{\"internalType\":\"address\",\"name\":\"syntheticDeviceAddr\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"string\",\"name\":\"attribute\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"info\",\"type\":\"string\"}],\"internalType\":\"structAttributeInfoPair[]\",\"name\":\"attrInfoPairsDevice\",\"type\":\"tuple[]\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"grantee\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"permissions\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiration\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"source\",\"type\":\"string\"}],\"internalType\":\"structSacdInput\",\"name\":\"sacdInput\",\"type\":\"tuple\"}],\"internalType\":\"structMintVehicleAndSdWithDdInputBatch[]\",\"name\":\"data\",\"type\":\"tuple[]\"}],\"name\":\"mintVehicleAndSdWithDeviceDefinitionSignBatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"connectionsManager\",\"type\":\"address\"}],\"name\":\"ConnectionsManagerSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"dimoCredit\",\"type\":\"address\"}],\"name\":\"DimoCreditSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"dimoToken\",\"type\":\"address\"}],\"name\":\"DimoTokenSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"foundation\",\"type\":\"address\"}],\"name\":\"FoundationSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"manufacturerLicense\",\"type\":\"address\"}],\"name\":\"ManufacturerLicenseSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sacd\",\"type\":\"address\"}],\"name\":\"SacdSet\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"getConnectionsManager\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"connectionsManager\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getDimoCredit\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"dimoCredit\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getDimoToken\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"dimoToken\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getFoundation\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"foundation\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getManufacturerLicense\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"manufacturerLicense\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getSacd\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"sacd\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"connectionsManager\",\"type\":\"address\"}],\"name\":\"setConnectionsManager\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"dimoCredit\",\"type\":\"address\"}],\"name\":\"setDimoCredit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"dimoToken\",\"type\":\"address\"}],\"name\":\"setDimoToken\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"foundation\",\"type\":\"address\"}],\"name\":\"setFoundation\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"manufacturerLicense\",\"type\":\"address\"}],\"name\":\"setManufacturerLicense\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sacd\",\"type\":\"address\"}],\"name\":\"setSacd\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"dimoStreamrEns\",\"type\":\"string\"}],\"name\":\"DimoStreamrEnsSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"dimoStreamrNode\",\"type\":\"address\"}],\"name\":\"DimoStreamrNodeSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"streamRegistry\",\"type\":\"address\"}],\"name\":\"StreamRegistrySet\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"dimoStreamrEns\",\"type\":\"string\"}],\"name\":\"setDimoBaseStreamId\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"dimoStreamrNode\",\"type\":\"address\"}],\"name\":\"setDimoStreamrNode\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"streamRegistry\",\"type\":\"address\"}],\"name\":\"setStreamRegistry\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"internalType\":\"enumIStreamRegistry.PermissionType\",\"name\":\"permissionType\",\"type\":\"uint8\"}],\"name\":\"NoStreamrPermission\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"streamId\",\"type\":\"string\"}],\"name\":\"StreamDoesNotExist\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"vehicleId\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"streamId\",\"type\":\"string\"}],\"name\":\"VehicleStreamAlreadySet\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"vehicleId\",\"type\":\"uint256\"}],\"name\":\"VehicleStreamNotSet\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"streamId\",\"type\":\"string\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"subscriber\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"expirationTime\",\"type\":\"uint256\"}],\"name\":\"SubscribedToVehicleStream\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"vehicleId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"streamId\",\"type\":\"string\"}],\"name\":\"VehicleStreamSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"vehicleId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"streamId\",\"type\":\"string\"}],\"name\":\"VehicleStreamUnset\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"vehicleId\",\"type\":\"uint256\"}],\"name\":\"createVehicleStream\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"vehicleId\",\"type\":\"uint256\"}],\"name\":\"getVehicleStream\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"streamId\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"vehicleId\",\"type\":\"uint256\"}],\"name\":\"onBurnVehicleStream\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"vehicleId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"subscriber\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"expirationTime\",\"type\":\"uint256\"}],\"name\":\"onSetSubscribePrivilege\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"vehicleId\",\"type\":\"uint256\"}],\"name\":\"onTransferVehicleStream\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"vehicleId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"subscriber\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"expirationTime\",\"type\":\"uint256\"}],\"name\":\"setSubscriptionToVehicleStream\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"vehicleId\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"streamId\",\"type\":\"string\"}],\"name\":\"setVehicleStream\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"vehicleId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expirationTime\",\"type\":\"uint256\"}],\"name\":\"subscribeToVehicleStream\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"vehicleId\",\"type\":\"uint256\"}],\"name\":\"unsetVehicleStream\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"chainid\",\"type\":\"uint256\"}],\"name\":\"ChainNotSupported\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"InvalidManufacturerId\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"manufacturerId\",\"type\":\"uint256\"}],\"name\":\"TableAlreadyExists\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tableId\",\"type\":\"uint256\"}],\"name\":\"TableDoesNotExist\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"}],\"name\":\"Unauthorized\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"tableId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"id\",\"type\":\"string\"}],\"name\":\"DeviceDefinitionDeleted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"tableId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"id\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"model\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"year\",\"type\":\"uint256\"}],\"name\":\"DeviceDefinitionInserted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"tableOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"manufacturerId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"tableId\",\"type\":\"uint256\"}],\"name\":\"DeviceDefinitionTableCreated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"tableId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"id\",\"type\":\"string\"}],\"name\":\"DeviceDefinitionUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"manufacturerId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"tableId\",\"type\":\"uint256\"}],\"name\":\"ManufacturerTableSet\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tableOwner\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"manufacturerId\",\"type\":\"uint256\"}],\"name\":\"createDeviceDefinitionTable\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tableOwner\",\"type\":\"address\"},{\"internalType\":\"uint256[]\",\"name\":\"manufacturerIds\",\"type\":\"uint256[]\"}],\"name\":\"createDeviceDefinitionTableBatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"manufacturerId\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"id\",\"type\":\"string\"}],\"name\":\"deleteDeviceDefinition\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"manufacturerId\",\"type\":\"uint256\"}],\"name\":\"getDeviceDefinitionTableId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"tableId\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"manufacturerId\",\"type\":\"uint256\"}],\"name\":\"getDeviceDefinitionTableName\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"tableName\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"manufacturerId\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"string\",\"name\":\"id\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"model\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"year\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"metadata\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"ksuid\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"deviceType\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"imageURI\",\"type\":\"string\"}],\"internalType\":\"structDeviceDefinitionInput\",\"name\":\"data\",\"type\":\"tuple\"}],\"name\":\"insertDeviceDefinition\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"manufacturerId\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"string\",\"name\":\"id\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"model\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"year\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"metadata\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"ksuid\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"deviceType\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"imageURI\",\"type\":\"string\"}],\"internalType\":\"structDeviceDefinitionInput[]\",\"name\":\"data\",\"type\":\"tuple[]\"}],\"name\":\"insertDeviceDefinitionBatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"manufacturerId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"tableId\",\"type\":\"uint256\"}],\"name\":\"setDeviceDefinitionTable\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"manufacturerId\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"string\",\"name\":\"id\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"metadata\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"ksuid\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"deviceType\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"imageURI\",\"type\":\"string\"}],\"internalType\":\"structDeviceDefinitionUpdateInput\",\"name\":\"data\",\"type\":\"tuple\"}],\"name\":\"updateDeviceDefinition\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"getPolicy\",\"outputs\":[{\"components\":[{\"internalType\":\"bool\",\"name\":\"allowInsert\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"allowUpdate\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"allowDelete\",\"type\":\"bool\"},{\"internalType\":\"string\",\"name\":\"whereClause\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"withCheck\",\"type\":\"string\"},{\"internalType\":\"string[]\",\"name\":\"updatableColumns\",\"type\":\"string[]\"}],\"internalType\":\"structTablelandPolicy\",\"name\":\"policy\",\"type\":\"tuple\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"operation\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"cost\",\"type\":\"uint256\"}],\"name\":\"OperationCostSet\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"operation\",\"type\":\"bytes32\"}],\"name\":\"getDcxOperationCost\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"cost\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"operation\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"cost\",\"type\":\"uint256\"}],\"name\":\"setDcxOperationCost\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"storageNode\",\"type\":\"address\"}],\"name\":\"StorageNodeSet\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"getDefaultStorageNodeId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"defaultStorageNodeId\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getStorageNode\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"storageNode\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"storageNodeId\",\"type\":\"uint256\"}],\"name\":\"setDefaultStorageNodeId\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"storageNode\",\"type\":\"address\"}],\"name\":\"setStorageNode\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"vehicleId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"storageNodeId\",\"type\":\"uint256\"}],\"name\":\"setStorageNodeIdForVehicle\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"vehicleId\",\"type\":\"uint256\"}],\"name\":\"vehicleIdToStorageNodeId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]", -} - -// RegistryABI is the input ABI used to generate the binding from. -// Deprecated: Use RegistryMetaData.ABI instead. -var RegistryABI = RegistryMetaData.ABI - -// Registry is an auto generated Go binding around an Ethereum contract. -type Registry struct { - RegistryCaller // Read-only binding to the contract - RegistryTransactor // Write-only binding to the contract - RegistryFilterer // Log filterer for contract events -} - -// RegistryCaller is an auto generated read-only Go binding around an Ethereum contract. -type RegistryCaller struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// RegistryTransactor is an auto generated write-only Go binding around an Ethereum contract. -type RegistryTransactor struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// RegistryFilterer is an auto generated log filtering Go binding around an Ethereum contract events. -type RegistryFilterer struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// RegistrySession is an auto generated Go binding around an Ethereum contract, -// with pre-set call and transact options. -type RegistrySession struct { - Contract *Registry // 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 -} - -// RegistryCallerSession is an auto generated read-only Go binding around an Ethereum contract, -// with pre-set call options. -type RegistryCallerSession struct { - Contract *RegistryCaller // Generic contract caller binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session -} - -// RegistryTransactorSession is an auto generated write-only Go binding around an Ethereum contract, -// with pre-set transact options. -type RegistryTransactorSession struct { - Contract *RegistryTransactor // Generic contract transactor binding to set the session for - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// RegistryRaw is an auto generated low-level Go binding around an Ethereum contract. -type RegistryRaw struct { - Contract *Registry // Generic contract binding to access the raw methods on -} - -// RegistryCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. -type RegistryCallerRaw struct { - Contract *RegistryCaller // Generic read-only contract binding to access the raw methods on -} - -// RegistryTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. -type RegistryTransactorRaw struct { - Contract *RegistryTransactor // Generic write-only contract binding to access the raw methods on -} - -// NewRegistry creates a new instance of Registry, bound to a specific deployed contract. -func NewRegistry(address common.Address, backend bind.ContractBackend) (*Registry, error) { - contract, err := bindRegistry(address, backend, backend, backend) - if err != nil { - return nil, err - } - return &Registry{RegistryCaller: RegistryCaller{contract: contract}, RegistryTransactor: RegistryTransactor{contract: contract}, RegistryFilterer: RegistryFilterer{contract: contract}}, nil -} - -// NewRegistryCaller creates a new read-only instance of Registry, bound to a specific deployed contract. -func NewRegistryCaller(address common.Address, caller bind.ContractCaller) (*RegistryCaller, error) { - contract, err := bindRegistry(address, caller, nil, nil) - if err != nil { - return nil, err - } - return &RegistryCaller{contract: contract}, nil -} - -// NewRegistryTransactor creates a new write-only instance of Registry, bound to a specific deployed contract. -func NewRegistryTransactor(address common.Address, transactor bind.ContractTransactor) (*RegistryTransactor, error) { - contract, err := bindRegistry(address, nil, transactor, nil) - if err != nil { - return nil, err - } - return &RegistryTransactor{contract: contract}, nil -} - -// NewRegistryFilterer creates a new log filterer instance of Registry, bound to a specific deployed contract. -func NewRegistryFilterer(address common.Address, filterer bind.ContractFilterer) (*RegistryFilterer, error) { - contract, err := bindRegistry(address, nil, nil, filterer) - if err != nil { - return nil, err - } - return &RegistryFilterer{contract: contract}, nil -} - -// bindRegistry binds a generic wrapper to an already deployed contract. -func bindRegistry(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := RegistryMetaData.GetAbi() - 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 (_Registry *RegistryRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _Registry.Contract.RegistryCaller.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 (_Registry *RegistryRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _Registry.Contract.RegistryTransactor.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_Registry *RegistryRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _Registry.Contract.RegistryTransactor.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 (_Registry *RegistryCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _Registry.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 (_Registry *RegistryTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _Registry.Contract.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_Registry *RegistryTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _Registry.Contract.contract.Transact(opts, method, params...) -} - -// GetAftermarketDeviceAddressById is a free data retrieval call binding the contract method 0x682a25e3. -// -// Solidity: function getAftermarketDeviceAddressById(uint256 nodeId) view returns(address addr) -func (_Registry *RegistryCaller) GetAftermarketDeviceAddressById(opts *bind.CallOpts, nodeId *big.Int) (common.Address, error) { - var out []interface{} - err := _Registry.contract.Call(opts, &out, "getAftermarketDeviceAddressById", nodeId) - - if err != nil { - return *new(common.Address), err - } - - out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) - - return out0, err - -} - -// GetAftermarketDeviceAddressById is a free data retrieval call binding the contract method 0x682a25e3. -// -// Solidity: function getAftermarketDeviceAddressById(uint256 nodeId) view returns(address addr) -func (_Registry *RegistrySession) GetAftermarketDeviceAddressById(nodeId *big.Int) (common.Address, error) { - return _Registry.Contract.GetAftermarketDeviceAddressById(&_Registry.CallOpts, nodeId) -} - -// GetAftermarketDeviceAddressById is a free data retrieval call binding the contract method 0x682a25e3. -// -// Solidity: function getAftermarketDeviceAddressById(uint256 nodeId) view returns(address addr) -func (_Registry *RegistryCallerSession) GetAftermarketDeviceAddressById(nodeId *big.Int) (common.Address, error) { - return _Registry.Contract.GetAftermarketDeviceAddressById(&_Registry.CallOpts, nodeId) -} - -// GetAftermarketDeviceIdByAddress is a free data retrieval call binding the contract method 0x9796cf22. -// -// Solidity: function getAftermarketDeviceIdByAddress(address addr) view returns(uint256 nodeId) -func (_Registry *RegistryCaller) GetAftermarketDeviceIdByAddress(opts *bind.CallOpts, addr common.Address) (*big.Int, error) { - var out []interface{} - err := _Registry.contract.Call(opts, &out, "getAftermarketDeviceIdByAddress", addr) - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -// GetAftermarketDeviceIdByAddress is a free data retrieval call binding the contract method 0x9796cf22. -// -// Solidity: function getAftermarketDeviceIdByAddress(address addr) view returns(uint256 nodeId) -func (_Registry *RegistrySession) GetAftermarketDeviceIdByAddress(addr common.Address) (*big.Int, error) { - return _Registry.Contract.GetAftermarketDeviceIdByAddress(&_Registry.CallOpts, addr) -} - -// GetAftermarketDeviceIdByAddress is a free data retrieval call binding the contract method 0x9796cf22. -// -// Solidity: function getAftermarketDeviceIdByAddress(address addr) view returns(uint256 nodeId) -func (_Registry *RegistryCallerSession) GetAftermarketDeviceIdByAddress(addr common.Address) (*big.Int, error) { - return _Registry.Contract.GetAftermarketDeviceIdByAddress(&_Registry.CallOpts, addr) -} - -// GetBeneficiary is a free data retrieval call binding the contract method 0x0a6cef46. -// -// Solidity: function getBeneficiary(address idProxyAddress, uint256 nodeId) view returns(address beneficiary) -func (_Registry *RegistryCaller) GetBeneficiary(opts *bind.CallOpts, idProxyAddress common.Address, nodeId *big.Int) (common.Address, error) { - var out []interface{} - err := _Registry.contract.Call(opts, &out, "getBeneficiary", idProxyAddress, nodeId) - - if err != nil { - return *new(common.Address), err - } - - out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) - - return out0, err - -} - -// GetBeneficiary is a free data retrieval call binding the contract method 0x0a6cef46. -// -// Solidity: function getBeneficiary(address idProxyAddress, uint256 nodeId) view returns(address beneficiary) -func (_Registry *RegistrySession) GetBeneficiary(idProxyAddress common.Address, nodeId *big.Int) (common.Address, error) { - return _Registry.Contract.GetBeneficiary(&_Registry.CallOpts, idProxyAddress, nodeId) -} - -// GetBeneficiary is a free data retrieval call binding the contract method 0x0a6cef46. -// -// Solidity: function getBeneficiary(address idProxyAddress, uint256 nodeId) view returns(address beneficiary) -func (_Registry *RegistryCallerSession) GetBeneficiary(idProxyAddress common.Address, nodeId *big.Int) (common.Address, error) { - return _Registry.Contract.GetBeneficiary(&_Registry.CallOpts, idProxyAddress, nodeId) -} - -// GetConnectionsManager is a free data retrieval call binding the contract method 0xb0c1d1df. -// -// Solidity: function getConnectionsManager() view returns(address connectionsManager) -func (_Registry *RegistryCaller) GetConnectionsManager(opts *bind.CallOpts) (common.Address, error) { - var out []interface{} - err := _Registry.contract.Call(opts, &out, "getConnectionsManager") - - if err != nil { - return *new(common.Address), err - } - - out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) - - return out0, err - -} - -// GetConnectionsManager is a free data retrieval call binding the contract method 0xb0c1d1df. -// -// Solidity: function getConnectionsManager() view returns(address connectionsManager) -func (_Registry *RegistrySession) GetConnectionsManager() (common.Address, error) { - return _Registry.Contract.GetConnectionsManager(&_Registry.CallOpts) -} - -// GetConnectionsManager is a free data retrieval call binding the contract method 0xb0c1d1df. -// -// Solidity: function getConnectionsManager() view returns(address connectionsManager) -func (_Registry *RegistryCallerSession) GetConnectionsManager() (common.Address, error) { - return _Registry.Contract.GetConnectionsManager(&_Registry.CallOpts) -} - -// GetDcxOperationCost is a free data retrieval call binding the contract method 0xd25f5787. -// -// Solidity: function getDcxOperationCost(bytes32 operation) view returns(uint256 cost) -func (_Registry *RegistryCaller) GetDcxOperationCost(opts *bind.CallOpts, operation [32]byte) (*big.Int, error) { - var out []interface{} - err := _Registry.contract.Call(opts, &out, "getDcxOperationCost", operation) - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -// GetDcxOperationCost is a free data retrieval call binding the contract method 0xd25f5787. -// -// Solidity: function getDcxOperationCost(bytes32 operation) view returns(uint256 cost) -func (_Registry *RegistrySession) GetDcxOperationCost(operation [32]byte) (*big.Int, error) { - return _Registry.Contract.GetDcxOperationCost(&_Registry.CallOpts, operation) -} - -// GetDcxOperationCost is a free data retrieval call binding the contract method 0xd25f5787. -// -// Solidity: function getDcxOperationCost(bytes32 operation) view returns(uint256 cost) -func (_Registry *RegistryCallerSession) GetDcxOperationCost(operation [32]byte) (*big.Int, error) { - return _Registry.Contract.GetDcxOperationCost(&_Registry.CallOpts, operation) -} - -// GetDefaultStorageNodeId is a free data retrieval call binding the contract method 0xe75745e9. -// -// Solidity: function getDefaultStorageNodeId() view returns(uint256 defaultStorageNodeId) -func (_Registry *RegistryCaller) GetDefaultStorageNodeId(opts *bind.CallOpts) (*big.Int, error) { - var out []interface{} - err := _Registry.contract.Call(opts, &out, "getDefaultStorageNodeId") - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -// GetDefaultStorageNodeId is a free data retrieval call binding the contract method 0xe75745e9. -// -// Solidity: function getDefaultStorageNodeId() view returns(uint256 defaultStorageNodeId) -func (_Registry *RegistrySession) GetDefaultStorageNodeId() (*big.Int, error) { - return _Registry.Contract.GetDefaultStorageNodeId(&_Registry.CallOpts) -} - -// GetDefaultStorageNodeId is a free data retrieval call binding the contract method 0xe75745e9. -// -// Solidity: function getDefaultStorageNodeId() view returns(uint256 defaultStorageNodeId) -func (_Registry *RegistryCallerSession) GetDefaultStorageNodeId() (*big.Int, error) { - return _Registry.Contract.GetDefaultStorageNodeId(&_Registry.CallOpts) -} - -// GetDeviceDefinitionIdByVehicleId is a free data retrieval call binding the contract method 0xb7bded95. -// -// Solidity: function getDeviceDefinitionIdByVehicleId(uint256 vehicleId) view returns(string ddId) -func (_Registry *RegistryCaller) GetDeviceDefinitionIdByVehicleId(opts *bind.CallOpts, vehicleId *big.Int) (string, error) { - var out []interface{} - err := _Registry.contract.Call(opts, &out, "getDeviceDefinitionIdByVehicleId", vehicleId) - - if err != nil { - return *new(string), err - } - - out0 := *abi.ConvertType(out[0], new(string)).(*string) - - return out0, err - -} - -// GetDeviceDefinitionIdByVehicleId is a free data retrieval call binding the contract method 0xb7bded95. -// -// Solidity: function getDeviceDefinitionIdByVehicleId(uint256 vehicleId) view returns(string ddId) -func (_Registry *RegistrySession) GetDeviceDefinitionIdByVehicleId(vehicleId *big.Int) (string, error) { - return _Registry.Contract.GetDeviceDefinitionIdByVehicleId(&_Registry.CallOpts, vehicleId) -} - -// GetDeviceDefinitionIdByVehicleId is a free data retrieval call binding the contract method 0xb7bded95. -// -// Solidity: function getDeviceDefinitionIdByVehicleId(uint256 vehicleId) view returns(string ddId) -func (_Registry *RegistryCallerSession) GetDeviceDefinitionIdByVehicleId(vehicleId *big.Int) (string, error) { - return _Registry.Contract.GetDeviceDefinitionIdByVehicleId(&_Registry.CallOpts, vehicleId) -} - -// GetDeviceDefinitionTableId is a free data retrieval call binding the contract method 0x396e5987. -// -// Solidity: function getDeviceDefinitionTableId(uint256 manufacturerId) view returns(uint256 tableId) -func (_Registry *RegistryCaller) GetDeviceDefinitionTableId(opts *bind.CallOpts, manufacturerId *big.Int) (*big.Int, error) { - var out []interface{} - err := _Registry.contract.Call(opts, &out, "getDeviceDefinitionTableId", manufacturerId) - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -// GetDeviceDefinitionTableId is a free data retrieval call binding the contract method 0x396e5987. -// -// Solidity: function getDeviceDefinitionTableId(uint256 manufacturerId) view returns(uint256 tableId) -func (_Registry *RegistrySession) GetDeviceDefinitionTableId(manufacturerId *big.Int) (*big.Int, error) { - return _Registry.Contract.GetDeviceDefinitionTableId(&_Registry.CallOpts, manufacturerId) -} - -// GetDeviceDefinitionTableId is a free data retrieval call binding the contract method 0x396e5987. -// -// Solidity: function getDeviceDefinitionTableId(uint256 manufacturerId) view returns(uint256 tableId) -func (_Registry *RegistryCallerSession) GetDeviceDefinitionTableId(manufacturerId *big.Int) (*big.Int, error) { - return _Registry.Contract.GetDeviceDefinitionTableId(&_Registry.CallOpts, manufacturerId) -} - -// GetDeviceDefinitionTableName is a free data retrieval call binding the contract method 0xa1d17941. -// -// Solidity: function getDeviceDefinitionTableName(uint256 manufacturerId) view returns(string tableName) -func (_Registry *RegistryCaller) GetDeviceDefinitionTableName(opts *bind.CallOpts, manufacturerId *big.Int) (string, error) { - var out []interface{} - err := _Registry.contract.Call(opts, &out, "getDeviceDefinitionTableName", manufacturerId) - - if err != nil { - return *new(string), err - } - - out0 := *abi.ConvertType(out[0], new(string)).(*string) - - return out0, err - -} - -// GetDeviceDefinitionTableName is a free data retrieval call binding the contract method 0xa1d17941. -// -// Solidity: function getDeviceDefinitionTableName(uint256 manufacturerId) view returns(string tableName) -func (_Registry *RegistrySession) GetDeviceDefinitionTableName(manufacturerId *big.Int) (string, error) { - return _Registry.Contract.GetDeviceDefinitionTableName(&_Registry.CallOpts, manufacturerId) -} - -// GetDeviceDefinitionTableName is a free data retrieval call binding the contract method 0xa1d17941. -// -// Solidity: function getDeviceDefinitionTableName(uint256 manufacturerId) view returns(string tableName) -func (_Registry *RegistryCallerSession) GetDeviceDefinitionTableName(manufacturerId *big.Int) (string, error) { - return _Registry.Contract.GetDeviceDefinitionTableName(&_Registry.CallOpts, manufacturerId) -} - -// GetDimoCredit is a free data retrieval call binding the contract method 0xcfe55b7d. -// -// Solidity: function getDimoCredit() view returns(address dimoCredit) -func (_Registry *RegistryCaller) GetDimoCredit(opts *bind.CallOpts) (common.Address, error) { - var out []interface{} - err := _Registry.contract.Call(opts, &out, "getDimoCredit") - - if err != nil { - return *new(common.Address), err - } - - out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) - - return out0, err - -} - -// GetDimoCredit is a free data retrieval call binding the contract method 0xcfe55b7d. -// -// Solidity: function getDimoCredit() view returns(address dimoCredit) -func (_Registry *RegistrySession) GetDimoCredit() (common.Address, error) { - return _Registry.Contract.GetDimoCredit(&_Registry.CallOpts) -} - -// GetDimoCredit is a free data retrieval call binding the contract method 0xcfe55b7d. -// -// Solidity: function getDimoCredit() view returns(address dimoCredit) -func (_Registry *RegistryCallerSession) GetDimoCredit() (common.Address, error) { - return _Registry.Contract.GetDimoCredit(&_Registry.CallOpts) -} - -// GetDimoToken is a free data retrieval call binding the contract method 0x77898251. -// -// Solidity: function getDimoToken() view returns(address dimoToken) -func (_Registry *RegistryCaller) GetDimoToken(opts *bind.CallOpts) (common.Address, error) { - var out []interface{} - err := _Registry.contract.Call(opts, &out, "getDimoToken") - - if err != nil { - return *new(common.Address), err - } - - out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) - - return out0, err - -} - -// GetDimoToken is a free data retrieval call binding the contract method 0x77898251. -// -// Solidity: function getDimoToken() view returns(address dimoToken) -func (_Registry *RegistrySession) GetDimoToken() (common.Address, error) { - return _Registry.Contract.GetDimoToken(&_Registry.CallOpts) -} - -// GetDimoToken is a free data retrieval call binding the contract method 0x77898251. -// -// Solidity: function getDimoToken() view returns(address dimoToken) -func (_Registry *RegistryCallerSession) GetDimoToken() (common.Address, error) { - return _Registry.Contract.GetDimoToken(&_Registry.CallOpts) -} - -// GetFoundation is a free data retrieval call binding the contract method 0xa2bc6cdf. -// -// Solidity: function getFoundation() view returns(address foundation) -func (_Registry *RegistryCaller) GetFoundation(opts *bind.CallOpts) (common.Address, error) { - var out []interface{} - err := _Registry.contract.Call(opts, &out, "getFoundation") - - if err != nil { - return *new(common.Address), err - } - - out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) - - return out0, err - -} - -// GetFoundation is a free data retrieval call binding the contract method 0xa2bc6cdf. -// -// Solidity: function getFoundation() view returns(address foundation) -func (_Registry *RegistrySession) GetFoundation() (common.Address, error) { - return _Registry.Contract.GetFoundation(&_Registry.CallOpts) -} - -// GetFoundation is a free data retrieval call binding the contract method 0xa2bc6cdf. -// -// Solidity: function getFoundation() view returns(address foundation) -func (_Registry *RegistryCallerSession) GetFoundation() (common.Address, error) { - return _Registry.Contract.GetFoundation(&_Registry.CallOpts) -} - -// GetInfo is a free data retrieval call binding the contract method 0xdce2f860. -// -// Solidity: function getInfo(address idProxyAddress, uint256 tokenId, string attribute) view returns(string info) -func (_Registry *RegistryCaller) GetInfo(opts *bind.CallOpts, idProxyAddress common.Address, tokenId *big.Int, attribute string) (string, error) { - var out []interface{} - err := _Registry.contract.Call(opts, &out, "getInfo", idProxyAddress, tokenId, attribute) - - if err != nil { - return *new(string), err - } - - out0 := *abi.ConvertType(out[0], new(string)).(*string) - - return out0, err - -} - -// GetInfo is a free data retrieval call binding the contract method 0xdce2f860. -// -// Solidity: function getInfo(address idProxyAddress, uint256 tokenId, string attribute) view returns(string info) -func (_Registry *RegistrySession) GetInfo(idProxyAddress common.Address, tokenId *big.Int, attribute string) (string, error) { - return _Registry.Contract.GetInfo(&_Registry.CallOpts, idProxyAddress, tokenId, attribute) -} - -// GetInfo is a free data retrieval call binding the contract method 0xdce2f860. -// -// Solidity: function getInfo(address idProxyAddress, uint256 tokenId, string attribute) view returns(string info) -func (_Registry *RegistryCallerSession) GetInfo(idProxyAddress common.Address, tokenId *big.Int, attribute string) (string, error) { - return _Registry.Contract.GetInfo(&_Registry.CallOpts, idProxyAddress, tokenId, attribute) -} - -// GetLink is a free data retrieval call binding the contract method 0x112e62a2. -// -// Solidity: function getLink(address idProxyAddress, uint256 sourceNode) view returns(uint256 targetNode) -func (_Registry *RegistryCaller) GetLink(opts *bind.CallOpts, idProxyAddress common.Address, sourceNode *big.Int) (*big.Int, error) { - var out []interface{} - err := _Registry.contract.Call(opts, &out, "getLink", idProxyAddress, sourceNode) - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -// GetLink is a free data retrieval call binding the contract method 0x112e62a2. -// -// Solidity: function getLink(address idProxyAddress, uint256 sourceNode) view returns(uint256 targetNode) -func (_Registry *RegistrySession) GetLink(idProxyAddress common.Address, sourceNode *big.Int) (*big.Int, error) { - return _Registry.Contract.GetLink(&_Registry.CallOpts, idProxyAddress, sourceNode) -} - -// GetLink is a free data retrieval call binding the contract method 0x112e62a2. -// -// Solidity: function getLink(address idProxyAddress, uint256 sourceNode) view returns(uint256 targetNode) -func (_Registry *RegistryCallerSession) GetLink(idProxyAddress common.Address, sourceNode *big.Int) (*big.Int, error) { - return _Registry.Contract.GetLink(&_Registry.CallOpts, idProxyAddress, sourceNode) -} - -// GetManufacturerIdByName is a free data retrieval call binding the contract method 0xce55aab0. -// -// Solidity: function getManufacturerIdByName(string name) view returns(uint256 nodeId) -func (_Registry *RegistryCaller) GetManufacturerIdByName(opts *bind.CallOpts, name string) (*big.Int, error) { - var out []interface{} - err := _Registry.contract.Call(opts, &out, "getManufacturerIdByName", name) - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -// GetManufacturerIdByName is a free data retrieval call binding the contract method 0xce55aab0. -// -// Solidity: function getManufacturerIdByName(string name) view returns(uint256 nodeId) -func (_Registry *RegistrySession) GetManufacturerIdByName(name string) (*big.Int, error) { - return _Registry.Contract.GetManufacturerIdByName(&_Registry.CallOpts, name) -} - -// GetManufacturerIdByName is a free data retrieval call binding the contract method 0xce55aab0. -// -// Solidity: function getManufacturerIdByName(string name) view returns(uint256 nodeId) -func (_Registry *RegistryCallerSession) GetManufacturerIdByName(name string) (*big.Int, error) { - return _Registry.Contract.GetManufacturerIdByName(&_Registry.CallOpts, name) -} - -// GetManufacturerLicense is a free data retrieval call binding the contract method 0x170e4293. -// -// Solidity: function getManufacturerLicense() view returns(address manufacturerLicense) -func (_Registry *RegistryCaller) GetManufacturerLicense(opts *bind.CallOpts) (common.Address, error) { - var out []interface{} - err := _Registry.contract.Call(opts, &out, "getManufacturerLicense") - - if err != nil { - return *new(common.Address), err - } - - out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) - - return out0, err - -} - -// GetManufacturerLicense is a free data retrieval call binding the contract method 0x170e4293. -// -// Solidity: function getManufacturerLicense() view returns(address manufacturerLicense) -func (_Registry *RegistrySession) GetManufacturerLicense() (common.Address, error) { - return _Registry.Contract.GetManufacturerLicense(&_Registry.CallOpts) -} - -// GetManufacturerLicense is a free data retrieval call binding the contract method 0x170e4293. -// -// Solidity: function getManufacturerLicense() view returns(address manufacturerLicense) -func (_Registry *RegistryCallerSession) GetManufacturerLicense() (common.Address, error) { - return _Registry.Contract.GetManufacturerLicense(&_Registry.CallOpts) -} - -// GetManufacturerNameById is a free data retrieval call binding the contract method 0x9109b30b. -// -// Solidity: function getManufacturerNameById(uint256 tokenId) view returns(string name) -func (_Registry *RegistryCaller) GetManufacturerNameById(opts *bind.CallOpts, tokenId *big.Int) (string, error) { - var out []interface{} - err := _Registry.contract.Call(opts, &out, "getManufacturerNameById", tokenId) - - if err != nil { - return *new(string), err - } - - out0 := *abi.ConvertType(out[0], new(string)).(*string) - - return out0, err - -} - -// GetManufacturerNameById is a free data retrieval call binding the contract method 0x9109b30b. -// -// Solidity: function getManufacturerNameById(uint256 tokenId) view returns(string name) -func (_Registry *RegistrySession) GetManufacturerNameById(tokenId *big.Int) (string, error) { - return _Registry.Contract.GetManufacturerNameById(&_Registry.CallOpts, tokenId) -} - -// GetManufacturerNameById is a free data retrieval call binding the contract method 0x9109b30b. -// -// Solidity: function getManufacturerNameById(uint256 tokenId) view returns(string name) -func (_Registry *RegistryCallerSession) GetManufacturerNameById(tokenId *big.Int) (string, error) { - return _Registry.Contract.GetManufacturerNameById(&_Registry.CallOpts, tokenId) -} - -// GetNodeLink is a free data retrieval call binding the contract method 0xbd2b5568. -// -// Solidity: function getNodeLink(address idProxyAddressSource, address idProxyAddressTarget, uint256 sourceNode) view returns(uint256 targetNode) -func (_Registry *RegistryCaller) GetNodeLink(opts *bind.CallOpts, idProxyAddressSource common.Address, idProxyAddressTarget common.Address, sourceNode *big.Int) (*big.Int, error) { - var out []interface{} - err := _Registry.contract.Call(opts, &out, "getNodeLink", idProxyAddressSource, idProxyAddressTarget, sourceNode) - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -// GetNodeLink is a free data retrieval call binding the contract method 0xbd2b5568. -// -// Solidity: function getNodeLink(address idProxyAddressSource, address idProxyAddressTarget, uint256 sourceNode) view returns(uint256 targetNode) -func (_Registry *RegistrySession) GetNodeLink(idProxyAddressSource common.Address, idProxyAddressTarget common.Address, sourceNode *big.Int) (*big.Int, error) { - return _Registry.Contract.GetNodeLink(&_Registry.CallOpts, idProxyAddressSource, idProxyAddressTarget, sourceNode) -} - -// GetNodeLink is a free data retrieval call binding the contract method 0xbd2b5568. -// -// Solidity: function getNodeLink(address idProxyAddressSource, address idProxyAddressTarget, uint256 sourceNode) view returns(uint256 targetNode) -func (_Registry *RegistryCallerSession) GetNodeLink(idProxyAddressSource common.Address, idProxyAddressTarget common.Address, sourceNode *big.Int) (*big.Int, error) { - return _Registry.Contract.GetNodeLink(&_Registry.CallOpts, idProxyAddressSource, idProxyAddressTarget, sourceNode) -} - -// GetParentNode is a free data retrieval call binding the contract method 0x82087d24. -// -// Solidity: function getParentNode(address idProxyAddress, uint256 tokenId) view returns(uint256 parentNode) -func (_Registry *RegistryCaller) GetParentNode(opts *bind.CallOpts, idProxyAddress common.Address, tokenId *big.Int) (*big.Int, error) { - var out []interface{} - err := _Registry.contract.Call(opts, &out, "getParentNode", idProxyAddress, tokenId) - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -// GetParentNode is a free data retrieval call binding the contract method 0x82087d24. -// -// Solidity: function getParentNode(address idProxyAddress, uint256 tokenId) view returns(uint256 parentNode) -func (_Registry *RegistrySession) GetParentNode(idProxyAddress common.Address, tokenId *big.Int) (*big.Int, error) { - return _Registry.Contract.GetParentNode(&_Registry.CallOpts, idProxyAddress, tokenId) -} - -// GetParentNode is a free data retrieval call binding the contract method 0x82087d24. -// -// Solidity: function getParentNode(address idProxyAddress, uint256 tokenId) view returns(uint256 parentNode) -func (_Registry *RegistryCallerSession) GetParentNode(idProxyAddress common.Address, tokenId *big.Int) (*big.Int, error) { - return _Registry.Contract.GetParentNode(&_Registry.CallOpts, idProxyAddress, tokenId) -} - -// GetRoleAdmin is a free data retrieval call binding the contract method 0x248a9ca3. -// -// Solidity: function getRoleAdmin(bytes32 role) view returns(bytes32) -func (_Registry *RegistryCaller) GetRoleAdmin(opts *bind.CallOpts, role [32]byte) ([32]byte, error) { - var out []interface{} - err := _Registry.contract.Call(opts, &out, "getRoleAdmin", role) - - if err != nil { - return *new([32]byte), err - } - - out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) - - return out0, err - -} - -// GetRoleAdmin is a free data retrieval call binding the contract method 0x248a9ca3. -// -// Solidity: function getRoleAdmin(bytes32 role) view returns(bytes32) -func (_Registry *RegistrySession) GetRoleAdmin(role [32]byte) ([32]byte, error) { - return _Registry.Contract.GetRoleAdmin(&_Registry.CallOpts, role) -} - -// GetRoleAdmin is a free data retrieval call binding the contract method 0x248a9ca3. -// -// Solidity: function getRoleAdmin(bytes32 role) view returns(bytes32) -func (_Registry *RegistryCallerSession) GetRoleAdmin(role [32]byte) ([32]byte, error) { - return _Registry.Contract.GetRoleAdmin(&_Registry.CallOpts, role) -} - -// GetSacd is a free data retrieval call binding the contract method 0xc3d8478c. -// -// Solidity: function getSacd() view returns(address sacd) -func (_Registry *RegistryCaller) GetSacd(opts *bind.CallOpts) (common.Address, error) { - var out []interface{} - err := _Registry.contract.Call(opts, &out, "getSacd") - - if err != nil { - return *new(common.Address), err - } - - out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) - - return out0, err - -} - -// GetSacd is a free data retrieval call binding the contract method 0xc3d8478c. -// -// Solidity: function getSacd() view returns(address sacd) -func (_Registry *RegistrySession) GetSacd() (common.Address, error) { - return _Registry.Contract.GetSacd(&_Registry.CallOpts) -} - -// GetSacd is a free data retrieval call binding the contract method 0xc3d8478c. -// -// Solidity: function getSacd() view returns(address sacd) -func (_Registry *RegistryCallerSession) GetSacd() (common.Address, error) { - return _Registry.Contract.GetSacd(&_Registry.CallOpts) -} - -// GetStorageNode is a free data retrieval call binding the contract method 0x5cc867dc. -// -// Solidity: function getStorageNode() view returns(address storageNode) -func (_Registry *RegistryCaller) GetStorageNode(opts *bind.CallOpts) (common.Address, error) { - var out []interface{} - err := _Registry.contract.Call(opts, &out, "getStorageNode") - - if err != nil { - return *new(common.Address), err - } - - out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) - - return out0, err - -} - -// GetStorageNode is a free data retrieval call binding the contract method 0x5cc867dc. -// -// Solidity: function getStorageNode() view returns(address storageNode) -func (_Registry *RegistrySession) GetStorageNode() (common.Address, error) { - return _Registry.Contract.GetStorageNode(&_Registry.CallOpts) -} - -// GetStorageNode is a free data retrieval call binding the contract method 0x5cc867dc. -// -// Solidity: function getStorageNode() view returns(address storageNode) -func (_Registry *RegistryCallerSession) GetStorageNode() (common.Address, error) { - return _Registry.Contract.GetStorageNode(&_Registry.CallOpts) -} - -// GetSyntheticDeviceAddressById is a free data retrieval call binding the contract method 0x493b27e1. -// -// Solidity: function getSyntheticDeviceAddressById(uint256 nodeId) view returns(address addr) -func (_Registry *RegistryCaller) GetSyntheticDeviceAddressById(opts *bind.CallOpts, nodeId *big.Int) (common.Address, error) { - var out []interface{} - err := _Registry.contract.Call(opts, &out, "getSyntheticDeviceAddressById", nodeId) - - if err != nil { - return *new(common.Address), err - } - - out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) - - return out0, err - -} - -// GetSyntheticDeviceAddressById is a free data retrieval call binding the contract method 0x493b27e1. -// -// Solidity: function getSyntheticDeviceAddressById(uint256 nodeId) view returns(address addr) -func (_Registry *RegistrySession) GetSyntheticDeviceAddressById(nodeId *big.Int) (common.Address, error) { - return _Registry.Contract.GetSyntheticDeviceAddressById(&_Registry.CallOpts, nodeId) -} - -// GetSyntheticDeviceAddressById is a free data retrieval call binding the contract method 0x493b27e1. -// -// Solidity: function getSyntheticDeviceAddressById(uint256 nodeId) view returns(address addr) -func (_Registry *RegistryCallerSession) GetSyntheticDeviceAddressById(nodeId *big.Int) (common.Address, error) { - return _Registry.Contract.GetSyntheticDeviceAddressById(&_Registry.CallOpts, nodeId) -} - -// GetSyntheticDeviceIdByAddress is a free data retrieval call binding the contract method 0x795b910a. -// -// Solidity: function getSyntheticDeviceIdByAddress(address addr) view returns(uint256 nodeId) -func (_Registry *RegistryCaller) GetSyntheticDeviceIdByAddress(opts *bind.CallOpts, addr common.Address) (*big.Int, error) { - var out []interface{} - err := _Registry.contract.Call(opts, &out, "getSyntheticDeviceIdByAddress", addr) - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -// GetSyntheticDeviceIdByAddress is a free data retrieval call binding the contract method 0x795b910a. -// -// Solidity: function getSyntheticDeviceIdByAddress(address addr) view returns(uint256 nodeId) -func (_Registry *RegistrySession) GetSyntheticDeviceIdByAddress(addr common.Address) (*big.Int, error) { - return _Registry.Contract.GetSyntheticDeviceIdByAddress(&_Registry.CallOpts, addr) -} - -// GetSyntheticDeviceIdByAddress is a free data retrieval call binding the contract method 0x795b910a. -// -// Solidity: function getSyntheticDeviceIdByAddress(address addr) view returns(uint256 nodeId) -func (_Registry *RegistryCallerSession) GetSyntheticDeviceIdByAddress(addr common.Address) (*big.Int, error) { - return _Registry.Contract.GetSyntheticDeviceIdByAddress(&_Registry.CallOpts, addr) -} - -// GetVehicleStream is a free data retrieval call binding the contract method 0x180e469a. -// -// Solidity: function getVehicleStream(uint256 vehicleId) view returns(string streamId) -func (_Registry *RegistryCaller) GetVehicleStream(opts *bind.CallOpts, vehicleId *big.Int) (string, error) { - var out []interface{} - err := _Registry.contract.Call(opts, &out, "getVehicleStream", vehicleId) - - if err != nil { - return *new(string), err - } - - out0 := *abi.ConvertType(out[0], new(string)).(*string) - - return out0, err - -} - -// GetVehicleStream is a free data retrieval call binding the contract method 0x180e469a. -// -// Solidity: function getVehicleStream(uint256 vehicleId) view returns(string streamId) -func (_Registry *RegistrySession) GetVehicleStream(vehicleId *big.Int) (string, error) { - return _Registry.Contract.GetVehicleStream(&_Registry.CallOpts, vehicleId) -} - -// GetVehicleStream is a free data retrieval call binding the contract method 0x180e469a. -// -// Solidity: function getVehicleStream(uint256 vehicleId) view returns(string streamId) -func (_Registry *RegistryCallerSession) GetVehicleStream(vehicleId *big.Int) (string, error) { - return _Registry.Contract.GetVehicleStream(&_Registry.CallOpts, vehicleId) -} - -// HasRole is a free data retrieval call binding the contract method 0x91d14854. -// -// Solidity: function hasRole(bytes32 role, address account) view returns(bool) -func (_Registry *RegistryCaller) HasRole(opts *bind.CallOpts, role [32]byte, account common.Address) (bool, error) { - var out []interface{} - err := _Registry.contract.Call(opts, &out, "hasRole", role, account) - - if err != nil { - return *new(bool), err - } - - out0 := *abi.ConvertType(out[0], new(bool)).(*bool) - - return out0, err - -} - -// HasRole is a free data retrieval call binding the contract method 0x91d14854. -// -// Solidity: function hasRole(bytes32 role, address account) view returns(bool) -func (_Registry *RegistrySession) HasRole(role [32]byte, account common.Address) (bool, error) { - return _Registry.Contract.HasRole(&_Registry.CallOpts, role, account) -} - -// HasRole is a free data retrieval call binding the contract method 0x91d14854. -// -// Solidity: function hasRole(bytes32 role, address account) view returns(bool) -func (_Registry *RegistryCallerSession) HasRole(role [32]byte, account common.Address) (bool, error) { - return _Registry.Contract.HasRole(&_Registry.CallOpts, role, account) -} - -// IsAftermarketDeviceClaimed is a free data retrieval call binding the contract method 0xc6b36f2a. -// -// Solidity: function isAftermarketDeviceClaimed(uint256 nodeId) view returns(bool isClaimed) -func (_Registry *RegistryCaller) IsAftermarketDeviceClaimed(opts *bind.CallOpts, nodeId *big.Int) (bool, error) { - var out []interface{} - err := _Registry.contract.Call(opts, &out, "isAftermarketDeviceClaimed", nodeId) - - if err != nil { - return *new(bool), err - } - - out0 := *abi.ConvertType(out[0], new(bool)).(*bool) - - return out0, err - -} - -// IsAftermarketDeviceClaimed is a free data retrieval call binding the contract method 0xc6b36f2a. -// -// Solidity: function isAftermarketDeviceClaimed(uint256 nodeId) view returns(bool isClaimed) -func (_Registry *RegistrySession) IsAftermarketDeviceClaimed(nodeId *big.Int) (bool, error) { - return _Registry.Contract.IsAftermarketDeviceClaimed(&_Registry.CallOpts, nodeId) -} - -// IsAftermarketDeviceClaimed is a free data retrieval call binding the contract method 0xc6b36f2a. -// -// Solidity: function isAftermarketDeviceClaimed(uint256 nodeId) view returns(bool isClaimed) -func (_Registry *RegistryCallerSession) IsAftermarketDeviceClaimed(nodeId *big.Int) (bool, error) { - return _Registry.Contract.IsAftermarketDeviceClaimed(&_Registry.CallOpts, nodeId) -} - -// IsAllowedToOwnManufacturerNode is a free data retrieval call binding the contract method 0xd9c27c40. -// -// Solidity: function isAllowedToOwnManufacturerNode(address addr) view returns(bool _isAllowed) -func (_Registry *RegistryCaller) IsAllowedToOwnManufacturerNode(opts *bind.CallOpts, addr common.Address) (bool, error) { - var out []interface{} - err := _Registry.contract.Call(opts, &out, "isAllowedToOwnManufacturerNode", addr) - - if err != nil { - return *new(bool), err - } - - out0 := *abi.ConvertType(out[0], new(bool)).(*bool) - - return out0, err - -} - -// IsAllowedToOwnManufacturerNode is a free data retrieval call binding the contract method 0xd9c27c40. -// -// Solidity: function isAllowedToOwnManufacturerNode(address addr) view returns(bool _isAllowed) -func (_Registry *RegistrySession) IsAllowedToOwnManufacturerNode(addr common.Address) (bool, error) { - return _Registry.Contract.IsAllowedToOwnManufacturerNode(&_Registry.CallOpts, addr) -} - -// IsAllowedToOwnManufacturerNode is a free data retrieval call binding the contract method 0xd9c27c40. -// -// Solidity: function isAllowedToOwnManufacturerNode(address addr) view returns(bool _isAllowed) -func (_Registry *RegistryCallerSession) IsAllowedToOwnManufacturerNode(addr common.Address) (bool, error) { - return _Registry.Contract.IsAllowedToOwnManufacturerNode(&_Registry.CallOpts, addr) -} - -// IsController is a free data retrieval call binding the contract method 0xb429afeb. -// -// Solidity: function isController(address addr) view returns(bool _isController) -func (_Registry *RegistryCaller) IsController(opts *bind.CallOpts, addr common.Address) (bool, error) { - var out []interface{} - err := _Registry.contract.Call(opts, &out, "isController", addr) - - if err != nil { - return *new(bool), err - } - - out0 := *abi.ConvertType(out[0], new(bool)).(*bool) - - return out0, err - -} - -// IsController is a free data retrieval call binding the contract method 0xb429afeb. -// -// Solidity: function isController(address addr) view returns(bool _isController) -func (_Registry *RegistrySession) IsController(addr common.Address) (bool, error) { - return _Registry.Contract.IsController(&_Registry.CallOpts, addr) -} - -// IsController is a free data retrieval call binding the contract method 0xb429afeb. -// -// Solidity: function isController(address addr) view returns(bool _isController) -func (_Registry *RegistryCallerSession) IsController(addr common.Address) (bool, error) { - return _Registry.Contract.IsController(&_Registry.CallOpts, addr) -} - -// IsManufacturerMinted is a free data retrieval call binding the contract method 0x456bf169. -// -// Solidity: function isManufacturerMinted(address addr) view returns(bool _isManufacturerMinted) -func (_Registry *RegistryCaller) IsManufacturerMinted(opts *bind.CallOpts, addr common.Address) (bool, error) { - var out []interface{} - err := _Registry.contract.Call(opts, &out, "isManufacturerMinted", addr) - - if err != nil { - return *new(bool), err - } - - out0 := *abi.ConvertType(out[0], new(bool)).(*bool) - - return out0, err - -} - -// IsManufacturerMinted is a free data retrieval call binding the contract method 0x456bf169. -// -// Solidity: function isManufacturerMinted(address addr) view returns(bool _isManufacturerMinted) -func (_Registry *RegistrySession) IsManufacturerMinted(addr common.Address) (bool, error) { - return _Registry.Contract.IsManufacturerMinted(&_Registry.CallOpts, addr) -} - -// IsManufacturerMinted is a free data retrieval call binding the contract method 0x456bf169. -// -// Solidity: function isManufacturerMinted(address addr) view returns(bool _isManufacturerMinted) -func (_Registry *RegistryCallerSession) IsManufacturerMinted(addr common.Address) (bool, error) { - return _Registry.Contract.IsManufacturerMinted(&_Registry.CallOpts, addr) -} - -// MultiStaticCall is a free data retrieval call binding the contract method 0x1c0c6e51. -// -// Solidity: function multiStaticCall(bytes[] data) view returns(bytes[] results) -func (_Registry *RegistryCaller) MultiStaticCall(opts *bind.CallOpts, data [][]byte) ([][]byte, error) { - var out []interface{} - err := _Registry.contract.Call(opts, &out, "multiStaticCall", data) - - if err != nil { - return *new([][]byte), err - } - - out0 := *abi.ConvertType(out[0], new([][]byte)).(*[][]byte) - - return out0, err - -} - -// MultiStaticCall is a free data retrieval call binding the contract method 0x1c0c6e51. -// -// Solidity: function multiStaticCall(bytes[] data) view returns(bytes[] results) -func (_Registry *RegistrySession) MultiStaticCall(data [][]byte) ([][]byte, error) { - return _Registry.Contract.MultiStaticCall(&_Registry.CallOpts, data) -} - -// MultiStaticCall is a free data retrieval call binding the contract method 0x1c0c6e51. -// -// Solidity: function multiStaticCall(bytes[] data) view returns(bytes[] results) -func (_Registry *RegistryCallerSession) MultiStaticCall(data [][]byte) ([][]byte, error) { - return _Registry.Contract.MultiStaticCall(&_Registry.CallOpts, data) -} - -// OnERC721Received is a free data retrieval call binding the contract method 0x150b7a02. -// -// Solidity: function onERC721Received(address , address , uint256 , bytes ) pure returns(bytes4) -func (_Registry *RegistryCaller) OnERC721Received(opts *bind.CallOpts, arg0 common.Address, arg1 common.Address, arg2 *big.Int, arg3 []byte) ([4]byte, error) { - var out []interface{} - err := _Registry.contract.Call(opts, &out, "onERC721Received", arg0, arg1, arg2, arg3) - - if err != nil { - return *new([4]byte), err - } - - out0 := *abi.ConvertType(out[0], new([4]byte)).(*[4]byte) - - return out0, err - -} - -// OnERC721Received is a free data retrieval call binding the contract method 0x150b7a02. -// -// Solidity: function onERC721Received(address , address , uint256 , bytes ) pure returns(bytes4) -func (_Registry *RegistrySession) OnERC721Received(arg0 common.Address, arg1 common.Address, arg2 *big.Int, arg3 []byte) ([4]byte, error) { - return _Registry.Contract.OnERC721Received(&_Registry.CallOpts, arg0, arg1, arg2, arg3) -} - -// OnERC721Received is a free data retrieval call binding the contract method 0x150b7a02. -// -// Solidity: function onERC721Received(address , address , uint256 , bytes ) pure returns(bytes4) -func (_Registry *RegistryCallerSession) OnERC721Received(arg0 common.Address, arg1 common.Address, arg2 *big.Int, arg3 []byte) ([4]byte, error) { - return _Registry.Contract.OnERC721Received(&_Registry.CallOpts, arg0, arg1, arg2, arg3) -} - -// VehicleIdToStorageNodeId is a free data retrieval call binding the contract method 0x7a26a1ed. -// -// Solidity: function vehicleIdToStorageNodeId(uint256 vehicleId) view returns(uint256) -func (_Registry *RegistryCaller) VehicleIdToStorageNodeId(opts *bind.CallOpts, vehicleId *big.Int) (*big.Int, error) { - var out []interface{} - err := _Registry.contract.Call(opts, &out, "vehicleIdToStorageNodeId", vehicleId) - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -// VehicleIdToStorageNodeId is a free data retrieval call binding the contract method 0x7a26a1ed. -// -// Solidity: function vehicleIdToStorageNodeId(uint256 vehicleId) view returns(uint256) -func (_Registry *RegistrySession) VehicleIdToStorageNodeId(vehicleId *big.Int) (*big.Int, error) { - return _Registry.Contract.VehicleIdToStorageNodeId(&_Registry.CallOpts, vehicleId) -} - -// VehicleIdToStorageNodeId is a free data retrieval call binding the contract method 0x7a26a1ed. -// -// Solidity: function vehicleIdToStorageNodeId(uint256 vehicleId) view returns(uint256) -func (_Registry *RegistryCallerSession) VehicleIdToStorageNodeId(vehicleId *big.Int) (*big.Int, error) { - return _Registry.Contract.VehicleIdToStorageNodeId(&_Registry.CallOpts, vehicleId) -} - -// AddAftermarketDeviceAttribute is a paid mutator transaction binding the contract method 0x6111afa3. -// -// Solidity: function addAftermarketDeviceAttribute(string attribute) returns() -func (_Registry *RegistryTransactor) AddAftermarketDeviceAttribute(opts *bind.TransactOpts, attribute string) (*types.Transaction, error) { - return _Registry.contract.Transact(opts, "addAftermarketDeviceAttribute", attribute) -} - -// AddAftermarketDeviceAttribute is a paid mutator transaction binding the contract method 0x6111afa3. -// -// Solidity: function addAftermarketDeviceAttribute(string attribute) returns() -func (_Registry *RegistrySession) AddAftermarketDeviceAttribute(attribute string) (*types.Transaction, error) { - return _Registry.Contract.AddAftermarketDeviceAttribute(&_Registry.TransactOpts, attribute) -} - -// AddAftermarketDeviceAttribute is a paid mutator transaction binding the contract method 0x6111afa3. -// -// Solidity: function addAftermarketDeviceAttribute(string attribute) returns() -func (_Registry *RegistryTransactorSession) AddAftermarketDeviceAttribute(attribute string) (*types.Transaction, error) { - return _Registry.Contract.AddAftermarketDeviceAttribute(&_Registry.TransactOpts, attribute) -} - -// AddManufacturerAttribute is a paid mutator transaction binding the contract method 0x50300a3f. -// -// Solidity: function addManufacturerAttribute(string attribute) returns() -func (_Registry *RegistryTransactor) AddManufacturerAttribute(opts *bind.TransactOpts, attribute string) (*types.Transaction, error) { - return _Registry.contract.Transact(opts, "addManufacturerAttribute", attribute) -} - -// AddManufacturerAttribute is a paid mutator transaction binding the contract method 0x50300a3f. -// -// Solidity: function addManufacturerAttribute(string attribute) returns() -func (_Registry *RegistrySession) AddManufacturerAttribute(attribute string) (*types.Transaction, error) { - return _Registry.Contract.AddManufacturerAttribute(&_Registry.TransactOpts, attribute) -} - -// AddManufacturerAttribute is a paid mutator transaction binding the contract method 0x50300a3f. -// -// Solidity: function addManufacturerAttribute(string attribute) returns() -func (_Registry *RegistryTransactorSession) AddManufacturerAttribute(attribute string) (*types.Transaction, error) { - return _Registry.Contract.AddManufacturerAttribute(&_Registry.TransactOpts, attribute) -} - -// AddModule is a paid mutator transaction binding the contract method 0x0df5b997. -// -// Solidity: function addModule(address implementation, bytes4[] selectors) returns() -func (_Registry *RegistryTransactor) AddModule(opts *bind.TransactOpts, implementation common.Address, selectors [][4]byte) (*types.Transaction, error) { - return _Registry.contract.Transact(opts, "addModule", implementation, selectors) -} - -// AddModule is a paid mutator transaction binding the contract method 0x0df5b997. -// -// Solidity: function addModule(address implementation, bytes4[] selectors) returns() -func (_Registry *RegistrySession) AddModule(implementation common.Address, selectors [][4]byte) (*types.Transaction, error) { - return _Registry.Contract.AddModule(&_Registry.TransactOpts, implementation, selectors) -} - -// AddModule is a paid mutator transaction binding the contract method 0x0df5b997. -// -// Solidity: function addModule(address implementation, bytes4[] selectors) returns() -func (_Registry *RegistryTransactorSession) AddModule(implementation common.Address, selectors [][4]byte) (*types.Transaction, error) { - return _Registry.Contract.AddModule(&_Registry.TransactOpts, implementation, selectors) -} - -// AddSyntheticDeviceAttribute is a paid mutator transaction binding the contract method 0xe1f371df. -// -// Solidity: function addSyntheticDeviceAttribute(string attribute) returns() -func (_Registry *RegistryTransactor) AddSyntheticDeviceAttribute(opts *bind.TransactOpts, attribute string) (*types.Transaction, error) { - return _Registry.contract.Transact(opts, "addSyntheticDeviceAttribute", attribute) -} - -// AddSyntheticDeviceAttribute is a paid mutator transaction binding the contract method 0xe1f371df. -// -// Solidity: function addSyntheticDeviceAttribute(string attribute) returns() -func (_Registry *RegistrySession) AddSyntheticDeviceAttribute(attribute string) (*types.Transaction, error) { - return _Registry.Contract.AddSyntheticDeviceAttribute(&_Registry.TransactOpts, attribute) -} - -// AddSyntheticDeviceAttribute is a paid mutator transaction binding the contract method 0xe1f371df. -// -// Solidity: function addSyntheticDeviceAttribute(string attribute) returns() -func (_Registry *RegistryTransactorSession) AddSyntheticDeviceAttribute(attribute string) (*types.Transaction, error) { - return _Registry.Contract.AddSyntheticDeviceAttribute(&_Registry.TransactOpts, attribute) -} - -// AddVehicleAttribute is a paid mutator transaction binding the contract method 0xf0d1a557. -// -// Solidity: function addVehicleAttribute(string attribute) returns() -func (_Registry *RegistryTransactor) AddVehicleAttribute(opts *bind.TransactOpts, attribute string) (*types.Transaction, error) { - return _Registry.contract.Transact(opts, "addVehicleAttribute", attribute) -} - -// AddVehicleAttribute is a paid mutator transaction binding the contract method 0xf0d1a557. -// -// Solidity: function addVehicleAttribute(string attribute) returns() -func (_Registry *RegistrySession) AddVehicleAttribute(attribute string) (*types.Transaction, error) { - return _Registry.Contract.AddVehicleAttribute(&_Registry.TransactOpts, attribute) -} - -// AddVehicleAttribute is a paid mutator transaction binding the contract method 0xf0d1a557. -// -// Solidity: function addVehicleAttribute(string attribute) returns() -func (_Registry *RegistryTransactorSession) AddVehicleAttribute(attribute string) (*types.Transaction, error) { - return _Registry.Contract.AddVehicleAttribute(&_Registry.TransactOpts, attribute) -} - -// AdminBurnAftermarketDevices is a paid mutator transaction binding the contract method 0xd7376bae. -// -// Solidity: function adminBurnAftermarketDevices(uint256[] tokenIds) returns() -func (_Registry *RegistryTransactor) AdminBurnAftermarketDevices(opts *bind.TransactOpts, tokenIds []*big.Int) (*types.Transaction, error) { - return _Registry.contract.Transact(opts, "adminBurnAftermarketDevices", tokenIds) -} - -// AdminBurnAftermarketDevices is a paid mutator transaction binding the contract method 0xd7376bae. -// -// Solidity: function adminBurnAftermarketDevices(uint256[] tokenIds) returns() -func (_Registry *RegistrySession) AdminBurnAftermarketDevices(tokenIds []*big.Int) (*types.Transaction, error) { - return _Registry.Contract.AdminBurnAftermarketDevices(&_Registry.TransactOpts, tokenIds) -} - -// AdminBurnAftermarketDevices is a paid mutator transaction binding the contract method 0xd7376bae. -// -// Solidity: function adminBurnAftermarketDevices(uint256[] tokenIds) returns() -func (_Registry *RegistryTransactorSession) AdminBurnAftermarketDevices(tokenIds []*big.Int) (*types.Transaction, error) { - return _Registry.Contract.AdminBurnAftermarketDevices(&_Registry.TransactOpts, tokenIds) -} - -// AdminBurnAftermarketDevicesAndDeletePairings is a paid mutator transaction binding the contract method 0x63dec203. -// -// Solidity: function adminBurnAftermarketDevicesAndDeletePairings(uint256[] tokenIds) returns() -func (_Registry *RegistryTransactor) AdminBurnAftermarketDevicesAndDeletePairings(opts *bind.TransactOpts, tokenIds []*big.Int) (*types.Transaction, error) { - return _Registry.contract.Transact(opts, "adminBurnAftermarketDevicesAndDeletePairings", tokenIds) -} - -// AdminBurnAftermarketDevicesAndDeletePairings is a paid mutator transaction binding the contract method 0x63dec203. -// -// Solidity: function adminBurnAftermarketDevicesAndDeletePairings(uint256[] tokenIds) returns() -func (_Registry *RegistrySession) AdminBurnAftermarketDevicesAndDeletePairings(tokenIds []*big.Int) (*types.Transaction, error) { - return _Registry.Contract.AdminBurnAftermarketDevicesAndDeletePairings(&_Registry.TransactOpts, tokenIds) -} - -// AdminBurnAftermarketDevicesAndDeletePairings is a paid mutator transaction binding the contract method 0x63dec203. -// -// Solidity: function adminBurnAftermarketDevicesAndDeletePairings(uint256[] tokenIds) returns() -func (_Registry *RegistryTransactorSession) AdminBurnAftermarketDevicesAndDeletePairings(tokenIds []*big.Int) (*types.Transaction, error) { - return _Registry.Contract.AdminBurnAftermarketDevicesAndDeletePairings(&_Registry.TransactOpts, tokenIds) -} - -// AdminBurnSyntheticDevicesAndDeletePairings is a paid mutator transaction binding the contract method 0x52878b61. -// -// Solidity: function adminBurnSyntheticDevicesAndDeletePairings(uint256[] tokenIds) returns() -func (_Registry *RegistryTransactor) AdminBurnSyntheticDevicesAndDeletePairings(opts *bind.TransactOpts, tokenIds []*big.Int) (*types.Transaction, error) { - return _Registry.contract.Transact(opts, "adminBurnSyntheticDevicesAndDeletePairings", tokenIds) -} - -// AdminBurnSyntheticDevicesAndDeletePairings is a paid mutator transaction binding the contract method 0x52878b61. -// -// Solidity: function adminBurnSyntheticDevicesAndDeletePairings(uint256[] tokenIds) returns() -func (_Registry *RegistrySession) AdminBurnSyntheticDevicesAndDeletePairings(tokenIds []*big.Int) (*types.Transaction, error) { - return _Registry.Contract.AdminBurnSyntheticDevicesAndDeletePairings(&_Registry.TransactOpts, tokenIds) -} - -// AdminBurnSyntheticDevicesAndDeletePairings is a paid mutator transaction binding the contract method 0x52878b61. -// -// Solidity: function adminBurnSyntheticDevicesAndDeletePairings(uint256[] tokenIds) returns() -func (_Registry *RegistryTransactorSession) AdminBurnSyntheticDevicesAndDeletePairings(tokenIds []*big.Int) (*types.Transaction, error) { - return _Registry.Contract.AdminBurnSyntheticDevicesAndDeletePairings(&_Registry.TransactOpts, tokenIds) -} - -// AdminBurnVehicles is a paid mutator transaction binding the contract method 0x282eb387. -// -// Solidity: function adminBurnVehicles(uint256[] tokenIds) returns() -func (_Registry *RegistryTransactor) AdminBurnVehicles(opts *bind.TransactOpts, tokenIds []*big.Int) (*types.Transaction, error) { - return _Registry.contract.Transact(opts, "adminBurnVehicles", tokenIds) -} - -// AdminBurnVehicles is a paid mutator transaction binding the contract method 0x282eb387. -// -// Solidity: function adminBurnVehicles(uint256[] tokenIds) returns() -func (_Registry *RegistrySession) AdminBurnVehicles(tokenIds []*big.Int) (*types.Transaction, error) { - return _Registry.Contract.AdminBurnVehicles(&_Registry.TransactOpts, tokenIds) -} - -// AdminBurnVehicles is a paid mutator transaction binding the contract method 0x282eb387. -// -// Solidity: function adminBurnVehicles(uint256[] tokenIds) returns() -func (_Registry *RegistryTransactorSession) AdminBurnVehicles(tokenIds []*big.Int) (*types.Transaction, error) { - return _Registry.Contract.AdminBurnVehicles(&_Registry.TransactOpts, tokenIds) -} - -// AdminBurnVehiclesAndDeletePairings is a paid mutator transaction binding the contract method 0x11d679c9. -// -// Solidity: function adminBurnVehiclesAndDeletePairings(uint256[] tokenIds) returns() -func (_Registry *RegistryTransactor) AdminBurnVehiclesAndDeletePairings(opts *bind.TransactOpts, tokenIds []*big.Int) (*types.Transaction, error) { - return _Registry.contract.Transact(opts, "adminBurnVehiclesAndDeletePairings", tokenIds) -} - -// AdminBurnVehiclesAndDeletePairings is a paid mutator transaction binding the contract method 0x11d679c9. -// -// Solidity: function adminBurnVehiclesAndDeletePairings(uint256[] tokenIds) returns() -func (_Registry *RegistrySession) AdminBurnVehiclesAndDeletePairings(tokenIds []*big.Int) (*types.Transaction, error) { - return _Registry.Contract.AdminBurnVehiclesAndDeletePairings(&_Registry.TransactOpts, tokenIds) -} - -// AdminBurnVehiclesAndDeletePairings is a paid mutator transaction binding the contract method 0x11d679c9. -// -// Solidity: function adminBurnVehiclesAndDeletePairings(uint256[] tokenIds) returns() -func (_Registry *RegistryTransactorSession) AdminBurnVehiclesAndDeletePairings(tokenIds []*big.Int) (*types.Transaction, error) { - return _Registry.Contract.AdminBurnVehiclesAndDeletePairings(&_Registry.TransactOpts, tokenIds) -} - -// AdminCacheDimoStreamrEns is a paid mutator transaction binding the contract method 0xb17b974b. -// -// Solidity: function adminCacheDimoStreamrEns() returns() -func (_Registry *RegistryTransactor) AdminCacheDimoStreamrEns(opts *bind.TransactOpts) (*types.Transaction, error) { - return _Registry.contract.Transact(opts, "adminCacheDimoStreamrEns") -} - -// AdminCacheDimoStreamrEns is a paid mutator transaction binding the contract method 0xb17b974b. -// -// Solidity: function adminCacheDimoStreamrEns() returns() -func (_Registry *RegistrySession) AdminCacheDimoStreamrEns() (*types.Transaction, error) { - return _Registry.Contract.AdminCacheDimoStreamrEns(&_Registry.TransactOpts) -} - -// AdminCacheDimoStreamrEns is a paid mutator transaction binding the contract method 0xb17b974b. -// -// Solidity: function adminCacheDimoStreamrEns() returns() -func (_Registry *RegistryTransactorSession) AdminCacheDimoStreamrEns() (*types.Transaction, error) { - return _Registry.Contract.AdminCacheDimoStreamrEns(&_Registry.TransactOpts) -} - -// AdminChangeParentNode is a paid mutator transaction binding the contract method 0x56936962. -// -// Solidity: function adminChangeParentNode(uint256 newParentNode, address idProxyAddress, uint256[] nodeIdList) returns() -func (_Registry *RegistryTransactor) AdminChangeParentNode(opts *bind.TransactOpts, newParentNode *big.Int, idProxyAddress common.Address, nodeIdList []*big.Int) (*types.Transaction, error) { - return _Registry.contract.Transact(opts, "adminChangeParentNode", newParentNode, idProxyAddress, nodeIdList) -} - -// AdminChangeParentNode is a paid mutator transaction binding the contract method 0x56936962. -// -// Solidity: function adminChangeParentNode(uint256 newParentNode, address idProxyAddress, uint256[] nodeIdList) returns() -func (_Registry *RegistrySession) AdminChangeParentNode(newParentNode *big.Int, idProxyAddress common.Address, nodeIdList []*big.Int) (*types.Transaction, error) { - return _Registry.Contract.AdminChangeParentNode(&_Registry.TransactOpts, newParentNode, idProxyAddress, nodeIdList) -} - -// AdminChangeParentNode is a paid mutator transaction binding the contract method 0x56936962. -// -// Solidity: function adminChangeParentNode(uint256 newParentNode, address idProxyAddress, uint256[] nodeIdList) returns() -func (_Registry *RegistryTransactorSession) AdminChangeParentNode(newParentNode *big.Int, idProxyAddress common.Address, nodeIdList []*big.Int) (*types.Transaction, error) { - return _Registry.Contract.AdminChangeParentNode(&_Registry.TransactOpts, newParentNode, idProxyAddress, nodeIdList) -} - -// AdminPairAftermarketDevice is a paid mutator transaction binding the contract method 0x3febacab. -// -// Solidity: function adminPairAftermarketDevice(uint256 aftermarketDeviceNode, uint256 vehicleNode) returns() -func (_Registry *RegistryTransactor) AdminPairAftermarketDevice(opts *bind.TransactOpts, aftermarketDeviceNode *big.Int, vehicleNode *big.Int) (*types.Transaction, error) { - return _Registry.contract.Transact(opts, "adminPairAftermarketDevice", aftermarketDeviceNode, vehicleNode) -} - -// AdminPairAftermarketDevice is a paid mutator transaction binding the contract method 0x3febacab. -// -// Solidity: function adminPairAftermarketDevice(uint256 aftermarketDeviceNode, uint256 vehicleNode) returns() -func (_Registry *RegistrySession) AdminPairAftermarketDevice(aftermarketDeviceNode *big.Int, vehicleNode *big.Int) (*types.Transaction, error) { - return _Registry.Contract.AdminPairAftermarketDevice(&_Registry.TransactOpts, aftermarketDeviceNode, vehicleNode) -} - -// AdminPairAftermarketDevice is a paid mutator transaction binding the contract method 0x3febacab. -// -// Solidity: function adminPairAftermarketDevice(uint256 aftermarketDeviceNode, uint256 vehicleNode) returns() -func (_Registry *RegistryTransactorSession) AdminPairAftermarketDevice(aftermarketDeviceNode *big.Int, vehicleNode *big.Int) (*types.Transaction, error) { - return _Registry.Contract.AdminPairAftermarketDevice(&_Registry.TransactOpts, aftermarketDeviceNode, vehicleNode) -} - -// AdminRemoveVehicleAttribute is a paid mutator transaction binding the contract method 0x5f741f4d. -// -// Solidity: function adminRemoveVehicleAttribute(string attribute) returns() -func (_Registry *RegistryTransactor) AdminRemoveVehicleAttribute(opts *bind.TransactOpts, attribute string) (*types.Transaction, error) { - return _Registry.contract.Transact(opts, "adminRemoveVehicleAttribute", attribute) -} - -// AdminRemoveVehicleAttribute is a paid mutator transaction binding the contract method 0x5f741f4d. -// -// Solidity: function adminRemoveVehicleAttribute(string attribute) returns() -func (_Registry *RegistrySession) AdminRemoveVehicleAttribute(attribute string) (*types.Transaction, error) { - return _Registry.Contract.AdminRemoveVehicleAttribute(&_Registry.TransactOpts, attribute) -} - -// AdminRemoveVehicleAttribute is a paid mutator transaction binding the contract method 0x5f741f4d. -// -// Solidity: function adminRemoveVehicleAttribute(string attribute) returns() -func (_Registry *RegistryTransactorSession) AdminRemoveVehicleAttribute(attribute string) (*types.Transaction, error) { - return _Registry.Contract.AdminRemoveVehicleAttribute(&_Registry.TransactOpts, attribute) -} - -// AdminSetStorageNodeIdForVehicleIds is a paid mutator transaction binding the contract method 0x3d9cf004. -// -// Solidity: function adminSetStorageNodeIdForVehicleIds(uint256[] vehicleIds, uint256 storageNodeId) returns() -func (_Registry *RegistryTransactor) AdminSetStorageNodeIdForVehicleIds(opts *bind.TransactOpts, vehicleIds []*big.Int, storageNodeId *big.Int) (*types.Transaction, error) { - return _Registry.contract.Transact(opts, "adminSetStorageNodeIdForVehicleIds", vehicleIds, storageNodeId) -} - -// AdminSetStorageNodeIdForVehicleIds is a paid mutator transaction binding the contract method 0x3d9cf004. -// -// Solidity: function adminSetStorageNodeIdForVehicleIds(uint256[] vehicleIds, uint256 storageNodeId) returns() -func (_Registry *RegistrySession) AdminSetStorageNodeIdForVehicleIds(vehicleIds []*big.Int, storageNodeId *big.Int) (*types.Transaction, error) { - return _Registry.Contract.AdminSetStorageNodeIdForVehicleIds(&_Registry.TransactOpts, vehicleIds, storageNodeId) -} - -// AdminSetStorageNodeIdForVehicleIds is a paid mutator transaction binding the contract method 0x3d9cf004. -// -// Solidity: function adminSetStorageNodeIdForVehicleIds(uint256[] vehicleIds, uint256 storageNodeId) returns() -func (_Registry *RegistryTransactorSession) AdminSetStorageNodeIdForVehicleIds(vehicleIds []*big.Int, storageNodeId *big.Int) (*types.Transaction, error) { - return _Registry.Contract.AdminSetStorageNodeIdForVehicleIds(&_Registry.TransactOpts, vehicleIds, storageNodeId) -} - -// AdminSetVehicleDDs is a paid mutator transaction binding the contract method 0xdd60fd1a. -// -// Solidity: function adminSetVehicleDDs((uint256,string)[] vehicleIdDdId) returns() -func (_Registry *RegistryTransactor) AdminSetVehicleDDs(opts *bind.TransactOpts, vehicleIdDdId []DevAdminVehicleIdDeviceDefinitionId) (*types.Transaction, error) { - return _Registry.contract.Transact(opts, "adminSetVehicleDDs", vehicleIdDdId) -} - -// AdminSetVehicleDDs is a paid mutator transaction binding the contract method 0xdd60fd1a. -// -// Solidity: function adminSetVehicleDDs((uint256,string)[] vehicleIdDdId) returns() -func (_Registry *RegistrySession) AdminSetVehicleDDs(vehicleIdDdId []DevAdminVehicleIdDeviceDefinitionId) (*types.Transaction, error) { - return _Registry.Contract.AdminSetVehicleDDs(&_Registry.TransactOpts, vehicleIdDdId) -} - -// AdminSetVehicleDDs is a paid mutator transaction binding the contract method 0xdd60fd1a. -// -// Solidity: function adminSetVehicleDDs((uint256,string)[] vehicleIdDdId) returns() -func (_Registry *RegistryTransactorSession) AdminSetVehicleDDs(vehicleIdDdId []DevAdminVehicleIdDeviceDefinitionId) (*types.Transaction, error) { - return _Registry.Contract.AdminSetVehicleDDs(&_Registry.TransactOpts, vehicleIdDdId) -} - -// BurnSyntheticDeviceSign is a paid mutator transaction binding the contract method 0x7c7c9978. -// -// Solidity: function burnSyntheticDeviceSign(uint256 vehicleNode, uint256 syntheticDeviceNode, bytes ownerSig) returns() -func (_Registry *RegistryTransactor) BurnSyntheticDeviceSign(opts *bind.TransactOpts, vehicleNode *big.Int, syntheticDeviceNode *big.Int, ownerSig []byte) (*types.Transaction, error) { - return _Registry.contract.Transact(opts, "burnSyntheticDeviceSign", vehicleNode, syntheticDeviceNode, ownerSig) -} - -// BurnSyntheticDeviceSign is a paid mutator transaction binding the contract method 0x7c7c9978. -// -// Solidity: function burnSyntheticDeviceSign(uint256 vehicleNode, uint256 syntheticDeviceNode, bytes ownerSig) returns() -func (_Registry *RegistrySession) BurnSyntheticDeviceSign(vehicleNode *big.Int, syntheticDeviceNode *big.Int, ownerSig []byte) (*types.Transaction, error) { - return _Registry.Contract.BurnSyntheticDeviceSign(&_Registry.TransactOpts, vehicleNode, syntheticDeviceNode, ownerSig) -} - -// BurnSyntheticDeviceSign is a paid mutator transaction binding the contract method 0x7c7c9978. -// -// Solidity: function burnSyntheticDeviceSign(uint256 vehicleNode, uint256 syntheticDeviceNode, bytes ownerSig) returns() -func (_Registry *RegistryTransactorSession) BurnSyntheticDeviceSign(vehicleNode *big.Int, syntheticDeviceNode *big.Int, ownerSig []byte) (*types.Transaction, error) { - return _Registry.Contract.BurnSyntheticDeviceSign(&_Registry.TransactOpts, vehicleNode, syntheticDeviceNode, ownerSig) -} - -// BurnVehicleSign is a paid mutator transaction binding the contract method 0xd0b61156. -// -// Solidity: function burnVehicleSign(uint256 tokenId, bytes ownerSig) returns() -func (_Registry *RegistryTransactor) BurnVehicleSign(opts *bind.TransactOpts, tokenId *big.Int, ownerSig []byte) (*types.Transaction, error) { - return _Registry.contract.Transact(opts, "burnVehicleSign", tokenId, ownerSig) -} - -// BurnVehicleSign is a paid mutator transaction binding the contract method 0xd0b61156. -// -// Solidity: function burnVehicleSign(uint256 tokenId, bytes ownerSig) returns() -func (_Registry *RegistrySession) BurnVehicleSign(tokenId *big.Int, ownerSig []byte) (*types.Transaction, error) { - return _Registry.Contract.BurnVehicleSign(&_Registry.TransactOpts, tokenId, ownerSig) -} - -// BurnVehicleSign is a paid mutator transaction binding the contract method 0xd0b61156. -// -// Solidity: function burnVehicleSign(uint256 tokenId, bytes ownerSig) returns() -func (_Registry *RegistryTransactorSession) BurnVehicleSign(tokenId *big.Int, ownerSig []byte) (*types.Transaction, error) { - return _Registry.Contract.BurnVehicleSign(&_Registry.TransactOpts, tokenId, ownerSig) -} - -// ClaimAftermarketDevice is a paid mutator transaction binding the contract method 0x08d2c2f5. -// -// Solidity: function claimAftermarketDevice(uint256 aftermarketDeviceNode, bytes aftermarketDeviceSig) returns() -func (_Registry *RegistryTransactor) ClaimAftermarketDevice(opts *bind.TransactOpts, aftermarketDeviceNode *big.Int, aftermarketDeviceSig []byte) (*types.Transaction, error) { - return _Registry.contract.Transact(opts, "claimAftermarketDevice", aftermarketDeviceNode, aftermarketDeviceSig) -} - -// ClaimAftermarketDevice is a paid mutator transaction binding the contract method 0x08d2c2f5. -// -// Solidity: function claimAftermarketDevice(uint256 aftermarketDeviceNode, bytes aftermarketDeviceSig) returns() -func (_Registry *RegistrySession) ClaimAftermarketDevice(aftermarketDeviceNode *big.Int, aftermarketDeviceSig []byte) (*types.Transaction, error) { - return _Registry.Contract.ClaimAftermarketDevice(&_Registry.TransactOpts, aftermarketDeviceNode, aftermarketDeviceSig) -} - -// ClaimAftermarketDevice is a paid mutator transaction binding the contract method 0x08d2c2f5. -// -// Solidity: function claimAftermarketDevice(uint256 aftermarketDeviceNode, bytes aftermarketDeviceSig) returns() -func (_Registry *RegistryTransactorSession) ClaimAftermarketDevice(aftermarketDeviceNode *big.Int, aftermarketDeviceSig []byte) (*types.Transaction, error) { - return _Registry.Contract.ClaimAftermarketDevice(&_Registry.TransactOpts, aftermarketDeviceNode, aftermarketDeviceSig) -} - -// ClaimAftermarketDeviceBatch is a paid mutator transaction binding the contract method 0xab2ae229. -// -// Solidity: function claimAftermarketDeviceBatch((uint256,address)[] adOwnerPair) returns() -func (_Registry *RegistryTransactor) ClaimAftermarketDeviceBatch(opts *bind.TransactOpts, adOwnerPair []AftermarketDeviceOwnerPair) (*types.Transaction, error) { - return _Registry.contract.Transact(opts, "claimAftermarketDeviceBatch", adOwnerPair) -} - -// ClaimAftermarketDeviceBatch is a paid mutator transaction binding the contract method 0xab2ae229. -// -// Solidity: function claimAftermarketDeviceBatch((uint256,address)[] adOwnerPair) returns() -func (_Registry *RegistrySession) ClaimAftermarketDeviceBatch(adOwnerPair []AftermarketDeviceOwnerPair) (*types.Transaction, error) { - return _Registry.Contract.ClaimAftermarketDeviceBatch(&_Registry.TransactOpts, adOwnerPair) -} - -// ClaimAftermarketDeviceBatch is a paid mutator transaction binding the contract method 0xab2ae229. -// -// Solidity: function claimAftermarketDeviceBatch((uint256,address)[] adOwnerPair) returns() -func (_Registry *RegistryTransactorSession) ClaimAftermarketDeviceBatch(adOwnerPair []AftermarketDeviceOwnerPair) (*types.Transaction, error) { - return _Registry.Contract.ClaimAftermarketDeviceBatch(&_Registry.TransactOpts, adOwnerPair) -} - -// ClaimAftermarketDeviceSign is a paid mutator transaction binding the contract method 0x89a841bb. -// -// Solidity: function claimAftermarketDeviceSign(uint256 aftermarketDeviceNode, address owner, bytes ownerSig, bytes aftermarketDeviceSig) returns() -func (_Registry *RegistryTransactor) ClaimAftermarketDeviceSign(opts *bind.TransactOpts, aftermarketDeviceNode *big.Int, owner common.Address, ownerSig []byte, aftermarketDeviceSig []byte) (*types.Transaction, error) { - return _Registry.contract.Transact(opts, "claimAftermarketDeviceSign", aftermarketDeviceNode, owner, ownerSig, aftermarketDeviceSig) -} - -// ClaimAftermarketDeviceSign is a paid mutator transaction binding the contract method 0x89a841bb. -// -// Solidity: function claimAftermarketDeviceSign(uint256 aftermarketDeviceNode, address owner, bytes ownerSig, bytes aftermarketDeviceSig) returns() -func (_Registry *RegistrySession) ClaimAftermarketDeviceSign(aftermarketDeviceNode *big.Int, owner common.Address, ownerSig []byte, aftermarketDeviceSig []byte) (*types.Transaction, error) { - return _Registry.Contract.ClaimAftermarketDeviceSign(&_Registry.TransactOpts, aftermarketDeviceNode, owner, ownerSig, aftermarketDeviceSig) -} - -// ClaimAftermarketDeviceSign is a paid mutator transaction binding the contract method 0x89a841bb. -// -// Solidity: function claimAftermarketDeviceSign(uint256 aftermarketDeviceNode, address owner, bytes ownerSig, bytes aftermarketDeviceSig) returns() -func (_Registry *RegistryTransactorSession) ClaimAftermarketDeviceSign(aftermarketDeviceNode *big.Int, owner common.Address, ownerSig []byte, aftermarketDeviceSig []byte) (*types.Transaction, error) { - return _Registry.Contract.ClaimAftermarketDeviceSign(&_Registry.TransactOpts, aftermarketDeviceNode, owner, ownerSig, aftermarketDeviceSig) -} - -// CreateDeviceDefinitionTable is a paid mutator transaction binding the contract method 0x20954d21. -// -// Solidity: function createDeviceDefinitionTable(address tableOwner, uint256 manufacturerId) returns() -func (_Registry *RegistryTransactor) CreateDeviceDefinitionTable(opts *bind.TransactOpts, tableOwner common.Address, manufacturerId *big.Int) (*types.Transaction, error) { - return _Registry.contract.Transact(opts, "createDeviceDefinitionTable", tableOwner, manufacturerId) -} - -// CreateDeviceDefinitionTable is a paid mutator transaction binding the contract method 0x20954d21. -// -// Solidity: function createDeviceDefinitionTable(address tableOwner, uint256 manufacturerId) returns() -func (_Registry *RegistrySession) CreateDeviceDefinitionTable(tableOwner common.Address, manufacturerId *big.Int) (*types.Transaction, error) { - return _Registry.Contract.CreateDeviceDefinitionTable(&_Registry.TransactOpts, tableOwner, manufacturerId) -} - -// CreateDeviceDefinitionTable is a paid mutator transaction binding the contract method 0x20954d21. -// -// Solidity: function createDeviceDefinitionTable(address tableOwner, uint256 manufacturerId) returns() -func (_Registry *RegistryTransactorSession) CreateDeviceDefinitionTable(tableOwner common.Address, manufacturerId *big.Int) (*types.Transaction, error) { - return _Registry.Contract.CreateDeviceDefinitionTable(&_Registry.TransactOpts, tableOwner, manufacturerId) -} - -// CreateDeviceDefinitionTableBatch is a paid mutator transaction binding the contract method 0x794c6790. -// -// Solidity: function createDeviceDefinitionTableBatch(address tableOwner, uint256[] manufacturerIds) returns() -func (_Registry *RegistryTransactor) CreateDeviceDefinitionTableBatch(opts *bind.TransactOpts, tableOwner common.Address, manufacturerIds []*big.Int) (*types.Transaction, error) { - return _Registry.contract.Transact(opts, "createDeviceDefinitionTableBatch", tableOwner, manufacturerIds) -} - -// CreateDeviceDefinitionTableBatch is a paid mutator transaction binding the contract method 0x794c6790. -// -// Solidity: function createDeviceDefinitionTableBatch(address tableOwner, uint256[] manufacturerIds) returns() -func (_Registry *RegistrySession) CreateDeviceDefinitionTableBatch(tableOwner common.Address, manufacturerIds []*big.Int) (*types.Transaction, error) { - return _Registry.Contract.CreateDeviceDefinitionTableBatch(&_Registry.TransactOpts, tableOwner, manufacturerIds) -} - -// CreateDeviceDefinitionTableBatch is a paid mutator transaction binding the contract method 0x794c6790. -// -// Solidity: function createDeviceDefinitionTableBatch(address tableOwner, uint256[] manufacturerIds) returns() -func (_Registry *RegistryTransactorSession) CreateDeviceDefinitionTableBatch(tableOwner common.Address, manufacturerIds []*big.Int) (*types.Transaction, error) { - return _Registry.Contract.CreateDeviceDefinitionTableBatch(&_Registry.TransactOpts, tableOwner, manufacturerIds) -} - -// CreateVehicleStream is a paid mutator transaction binding the contract method 0x497323c8. -// -// Solidity: function createVehicleStream(uint256 vehicleId) returns() -func (_Registry *RegistryTransactor) CreateVehicleStream(opts *bind.TransactOpts, vehicleId *big.Int) (*types.Transaction, error) { - return _Registry.contract.Transact(opts, "createVehicleStream", vehicleId) -} - -// CreateVehicleStream is a paid mutator transaction binding the contract method 0x497323c8. -// -// Solidity: function createVehicleStream(uint256 vehicleId) returns() -func (_Registry *RegistrySession) CreateVehicleStream(vehicleId *big.Int) (*types.Transaction, error) { - return _Registry.Contract.CreateVehicleStream(&_Registry.TransactOpts, vehicleId) -} - -// CreateVehicleStream is a paid mutator transaction binding the contract method 0x497323c8. -// -// Solidity: function createVehicleStream(uint256 vehicleId) returns() -func (_Registry *RegistryTransactorSession) CreateVehicleStream(vehicleId *big.Int) (*types.Transaction, error) { - return _Registry.Contract.CreateVehicleStream(&_Registry.TransactOpts, vehicleId) -} - -// DeleteDeviceDefinition is a paid mutator transaction binding the contract method 0x32b3f2d5. -// -// Solidity: function deleteDeviceDefinition(uint256 manufacturerId, string id) returns() -func (_Registry *RegistryTransactor) DeleteDeviceDefinition(opts *bind.TransactOpts, manufacturerId *big.Int, id string) (*types.Transaction, error) { - return _Registry.contract.Transact(opts, "deleteDeviceDefinition", manufacturerId, id) -} - -// DeleteDeviceDefinition is a paid mutator transaction binding the contract method 0x32b3f2d5. -// -// Solidity: function deleteDeviceDefinition(uint256 manufacturerId, string id) returns() -func (_Registry *RegistrySession) DeleteDeviceDefinition(manufacturerId *big.Int, id string) (*types.Transaction, error) { - return _Registry.Contract.DeleteDeviceDefinition(&_Registry.TransactOpts, manufacturerId, id) -} - -// DeleteDeviceDefinition is a paid mutator transaction binding the contract method 0x32b3f2d5. -// -// Solidity: function deleteDeviceDefinition(uint256 manufacturerId, string id) returns() -func (_Registry *RegistryTransactorSession) DeleteDeviceDefinition(manufacturerId *big.Int, id string) (*types.Transaction, error) { - return _Registry.Contract.DeleteDeviceDefinition(&_Registry.TransactOpts, manufacturerId, id) -} - -// GetPolicy is a paid mutator transaction binding the contract method 0x66df322e. -// -// Solidity: function getPolicy(address caller, uint256 ) payable returns((bool,bool,bool,string,string,string[]) policy) -func (_Registry *RegistryTransactor) GetPolicy(opts *bind.TransactOpts, caller common.Address, arg1 *big.Int) (*types.Transaction, error) { - return _Registry.contract.Transact(opts, "getPolicy", caller, arg1) -} - -// GetPolicy is a paid mutator transaction binding the contract method 0x66df322e. -// -// Solidity: function getPolicy(address caller, uint256 ) payable returns((bool,bool,bool,string,string,string[]) policy) -func (_Registry *RegistrySession) GetPolicy(caller common.Address, arg1 *big.Int) (*types.Transaction, error) { - return _Registry.Contract.GetPolicy(&_Registry.TransactOpts, caller, arg1) -} - -// GetPolicy is a paid mutator transaction binding the contract method 0x66df322e. -// -// Solidity: function getPolicy(address caller, uint256 ) payable returns((bool,bool,bool,string,string,string[]) policy) -func (_Registry *RegistryTransactorSession) GetPolicy(caller common.Address, arg1 *big.Int) (*types.Transaction, error) { - return _Registry.Contract.GetPolicy(&_Registry.TransactOpts, caller, arg1) -} - -// GrantRole is a paid mutator transaction binding the contract method 0x2f2ff15d. -// -// Solidity: function grantRole(bytes32 role, address account) returns() -func (_Registry *RegistryTransactor) GrantRole(opts *bind.TransactOpts, role [32]byte, account common.Address) (*types.Transaction, error) { - return _Registry.contract.Transact(opts, "grantRole", role, account) -} - -// GrantRole is a paid mutator transaction binding the contract method 0x2f2ff15d. -// -// Solidity: function grantRole(bytes32 role, address account) returns() -func (_Registry *RegistrySession) GrantRole(role [32]byte, account common.Address) (*types.Transaction, error) { - return _Registry.Contract.GrantRole(&_Registry.TransactOpts, role, account) -} - -// GrantRole is a paid mutator transaction binding the contract method 0x2f2ff15d. -// -// Solidity: function grantRole(bytes32 role, address account) returns() -func (_Registry *RegistryTransactorSession) GrantRole(role [32]byte, account common.Address) (*types.Transaction, error) { - return _Registry.Contract.GrantRole(&_Registry.TransactOpts, role, account) -} - -// Initialize is a paid mutator transaction binding the contract method 0x4cd88b76. -// -// Solidity: function initialize(string name, string version) returns() -func (_Registry *RegistryTransactor) Initialize(opts *bind.TransactOpts, name string, version string) (*types.Transaction, error) { - return _Registry.contract.Transact(opts, "initialize", name, version) -} - -// Initialize is a paid mutator transaction binding the contract method 0x4cd88b76. -// -// Solidity: function initialize(string name, string version) returns() -func (_Registry *RegistrySession) Initialize(name string, version string) (*types.Transaction, error) { - return _Registry.Contract.Initialize(&_Registry.TransactOpts, name, version) -} - -// Initialize is a paid mutator transaction binding the contract method 0x4cd88b76. -// -// Solidity: function initialize(string name, string version) returns() -func (_Registry *RegistryTransactorSession) Initialize(name string, version string) (*types.Transaction, error) { - return _Registry.Contract.Initialize(&_Registry.TransactOpts, name, version) -} - -// InsertDeviceDefinition is a paid mutator transaction binding the contract method 0x23536c5f. -// -// Solidity: function insertDeviceDefinition(uint256 manufacturerId, (string,string,uint256,string,string,string,string) data) returns() -func (_Registry *RegistryTransactor) InsertDeviceDefinition(opts *bind.TransactOpts, manufacturerId *big.Int, data DeviceDefinitionInput) (*types.Transaction, error) { - return _Registry.contract.Transact(opts, "insertDeviceDefinition", manufacturerId, data) -} - -// InsertDeviceDefinition is a paid mutator transaction binding the contract method 0x23536c5f. -// -// Solidity: function insertDeviceDefinition(uint256 manufacturerId, (string,string,uint256,string,string,string,string) data) returns() -func (_Registry *RegistrySession) InsertDeviceDefinition(manufacturerId *big.Int, data DeviceDefinitionInput) (*types.Transaction, error) { - return _Registry.Contract.InsertDeviceDefinition(&_Registry.TransactOpts, manufacturerId, data) -} - -// InsertDeviceDefinition is a paid mutator transaction binding the contract method 0x23536c5f. -// -// Solidity: function insertDeviceDefinition(uint256 manufacturerId, (string,string,uint256,string,string,string,string) data) returns() -func (_Registry *RegistryTransactorSession) InsertDeviceDefinition(manufacturerId *big.Int, data DeviceDefinitionInput) (*types.Transaction, error) { - return _Registry.Contract.InsertDeviceDefinition(&_Registry.TransactOpts, manufacturerId, data) -} - -// InsertDeviceDefinitionBatch is a paid mutator transaction binding the contract method 0x80d50451. -// -// Solidity: function insertDeviceDefinitionBatch(uint256 manufacturerId, (string,string,uint256,string,string,string,string)[] data) returns() -func (_Registry *RegistryTransactor) InsertDeviceDefinitionBatch(opts *bind.TransactOpts, manufacturerId *big.Int, data []DeviceDefinitionInput) (*types.Transaction, error) { - return _Registry.contract.Transact(opts, "insertDeviceDefinitionBatch", manufacturerId, data) -} - -// InsertDeviceDefinitionBatch is a paid mutator transaction binding the contract method 0x80d50451. -// -// Solidity: function insertDeviceDefinitionBatch(uint256 manufacturerId, (string,string,uint256,string,string,string,string)[] data) returns() -func (_Registry *RegistrySession) InsertDeviceDefinitionBatch(manufacturerId *big.Int, data []DeviceDefinitionInput) (*types.Transaction, error) { - return _Registry.Contract.InsertDeviceDefinitionBatch(&_Registry.TransactOpts, manufacturerId, data) -} - -// InsertDeviceDefinitionBatch is a paid mutator transaction binding the contract method 0x80d50451. -// -// Solidity: function insertDeviceDefinitionBatch(uint256 manufacturerId, (string,string,uint256,string,string,string,string)[] data) returns() -func (_Registry *RegistryTransactorSession) InsertDeviceDefinitionBatch(manufacturerId *big.Int, data []DeviceDefinitionInput) (*types.Transaction, error) { - return _Registry.Contract.InsertDeviceDefinitionBatch(&_Registry.TransactOpts, manufacturerId, data) -} - -// MintAftermarketDeviceByManufacturerBatch is a paid mutator transaction binding the contract method 0x7ba79a39. -// -// Solidity: function mintAftermarketDeviceByManufacturerBatch(uint256 manufacturerNode, (address,(string,string)[])[] adInfos) returns() -func (_Registry *RegistryTransactor) MintAftermarketDeviceByManufacturerBatch(opts *bind.TransactOpts, manufacturerNode *big.Int, adInfos []AftermarketDeviceInfos) (*types.Transaction, error) { - return _Registry.contract.Transact(opts, "mintAftermarketDeviceByManufacturerBatch", manufacturerNode, adInfos) -} - -// MintAftermarketDeviceByManufacturerBatch is a paid mutator transaction binding the contract method 0x7ba79a39. -// -// Solidity: function mintAftermarketDeviceByManufacturerBatch(uint256 manufacturerNode, (address,(string,string)[])[] adInfos) returns() -func (_Registry *RegistrySession) MintAftermarketDeviceByManufacturerBatch(manufacturerNode *big.Int, adInfos []AftermarketDeviceInfos) (*types.Transaction, error) { - return _Registry.Contract.MintAftermarketDeviceByManufacturerBatch(&_Registry.TransactOpts, manufacturerNode, adInfos) -} - -// MintAftermarketDeviceByManufacturerBatch is a paid mutator transaction binding the contract method 0x7ba79a39. -// -// Solidity: function mintAftermarketDeviceByManufacturerBatch(uint256 manufacturerNode, (address,(string,string)[])[] adInfos) returns() -func (_Registry *RegistryTransactorSession) MintAftermarketDeviceByManufacturerBatch(manufacturerNode *big.Int, adInfos []AftermarketDeviceInfos) (*types.Transaction, error) { - return _Registry.Contract.MintAftermarketDeviceByManufacturerBatch(&_Registry.TransactOpts, manufacturerNode, adInfos) -} - -// MintManufacturer is a paid mutator transaction binding the contract method 0x5f36da6b. -// -// Solidity: function mintManufacturer(address owner, string name, (string,string)[] attrInfoPairList) returns() -func (_Registry *RegistryTransactor) MintManufacturer(opts *bind.TransactOpts, owner common.Address, name string, attrInfoPairList []AttributeInfoPair) (*types.Transaction, error) { - return _Registry.contract.Transact(opts, "mintManufacturer", owner, name, attrInfoPairList) -} - -// MintManufacturer is a paid mutator transaction binding the contract method 0x5f36da6b. -// -// Solidity: function mintManufacturer(address owner, string name, (string,string)[] attrInfoPairList) returns() -func (_Registry *RegistrySession) MintManufacturer(owner common.Address, name string, attrInfoPairList []AttributeInfoPair) (*types.Transaction, error) { - return _Registry.Contract.MintManufacturer(&_Registry.TransactOpts, owner, name, attrInfoPairList) -} - -// MintManufacturer is a paid mutator transaction binding the contract method 0x5f36da6b. -// -// Solidity: function mintManufacturer(address owner, string name, (string,string)[] attrInfoPairList) returns() -func (_Registry *RegistryTransactorSession) MintManufacturer(owner common.Address, name string, attrInfoPairList []AttributeInfoPair) (*types.Transaction, error) { - return _Registry.Contract.MintManufacturer(&_Registry.TransactOpts, owner, name, attrInfoPairList) -} - -// MintManufacturerBatch is a paid mutator transaction binding the contract method 0x9abb3000. -// -// Solidity: function mintManufacturerBatch(address owner, string[] names) returns() -func (_Registry *RegistryTransactor) MintManufacturerBatch(opts *bind.TransactOpts, owner common.Address, names []string) (*types.Transaction, error) { - return _Registry.contract.Transact(opts, "mintManufacturerBatch", owner, names) -} - -// MintManufacturerBatch is a paid mutator transaction binding the contract method 0x9abb3000. -// -// Solidity: function mintManufacturerBatch(address owner, string[] names) returns() -func (_Registry *RegistrySession) MintManufacturerBatch(owner common.Address, names []string) (*types.Transaction, error) { - return _Registry.Contract.MintManufacturerBatch(&_Registry.TransactOpts, owner, names) -} - -// MintManufacturerBatch is a paid mutator transaction binding the contract method 0x9abb3000. -// -// Solidity: function mintManufacturerBatch(address owner, string[] names) returns() -func (_Registry *RegistryTransactorSession) MintManufacturerBatch(owner common.Address, names []string) (*types.Transaction, error) { - return _Registry.Contract.MintManufacturerBatch(&_Registry.TransactOpts, owner, names) -} - -// MintSyntheticDeviceBatch is a paid mutator transaction binding the contract method 0x261d982a. -// -// Solidity: function mintSyntheticDeviceBatch(uint256 connectionId, (uint256,address,(string,string)[])[] data) returns() -func (_Registry *RegistryTransactor) MintSyntheticDeviceBatch(opts *bind.TransactOpts, connectionId *big.Int, data []MintSyntheticDeviceBatchInput) (*types.Transaction, error) { - return _Registry.contract.Transact(opts, "mintSyntheticDeviceBatch", connectionId, data) -} - -// MintSyntheticDeviceBatch is a paid mutator transaction binding the contract method 0x261d982a. -// -// Solidity: function mintSyntheticDeviceBatch(uint256 connectionId, (uint256,address,(string,string)[])[] data) returns() -func (_Registry *RegistrySession) MintSyntheticDeviceBatch(connectionId *big.Int, data []MintSyntheticDeviceBatchInput) (*types.Transaction, error) { - return _Registry.Contract.MintSyntheticDeviceBatch(&_Registry.TransactOpts, connectionId, data) -} - -// MintSyntheticDeviceBatch is a paid mutator transaction binding the contract method 0x261d982a. -// -// Solidity: function mintSyntheticDeviceBatch(uint256 connectionId, (uint256,address,(string,string)[])[] data) returns() -func (_Registry *RegistryTransactorSession) MintSyntheticDeviceBatch(connectionId *big.Int, data []MintSyntheticDeviceBatchInput) (*types.Transaction, error) { - return _Registry.Contract.MintSyntheticDeviceBatch(&_Registry.TransactOpts, connectionId, data) -} - -// MintSyntheticDeviceSign is a paid mutator transaction binding the contract method 0xc624e8a1. -// -// Solidity: function mintSyntheticDeviceSign((uint256,uint256,bytes,bytes,address,(string,string)[]) data) returns() -func (_Registry *RegistryTransactor) MintSyntheticDeviceSign(opts *bind.TransactOpts, data MintSyntheticDeviceInput) (*types.Transaction, error) { - return _Registry.contract.Transact(opts, "mintSyntheticDeviceSign", data) -} - -// MintSyntheticDeviceSign is a paid mutator transaction binding the contract method 0xc624e8a1. -// -// Solidity: function mintSyntheticDeviceSign((uint256,uint256,bytes,bytes,address,(string,string)[]) data) returns() -func (_Registry *RegistrySession) MintSyntheticDeviceSign(data MintSyntheticDeviceInput) (*types.Transaction, error) { - return _Registry.Contract.MintSyntheticDeviceSign(&_Registry.TransactOpts, data) -} - -// MintSyntheticDeviceSign is a paid mutator transaction binding the contract method 0xc624e8a1. -// -// Solidity: function mintSyntheticDeviceSign((uint256,uint256,bytes,bytes,address,(string,string)[]) data) returns() -func (_Registry *RegistryTransactorSession) MintSyntheticDeviceSign(data MintSyntheticDeviceInput) (*types.Transaction, error) { - return _Registry.Contract.MintSyntheticDeviceSign(&_Registry.TransactOpts, data) -} - -// MintVehicleAndSdSign is a paid mutator transaction binding the contract method 0x688ecea4. -// -// Solidity: function mintVehicleAndSdSign((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]) data) returns() -func (_Registry *RegistryTransactor) MintVehicleAndSdSign(opts *bind.TransactOpts, data MintVehicleAndSdInputWithSnId) (*types.Transaction, error) { - return _Registry.contract.Transact(opts, "mintVehicleAndSdSign", data) -} - -// MintVehicleAndSdSign is a paid mutator transaction binding the contract method 0x688ecea4. -// -// Solidity: function mintVehicleAndSdSign((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]) data) returns() -func (_Registry *RegistrySession) MintVehicleAndSdSign(data MintVehicleAndSdInputWithSnId) (*types.Transaction, error) { - return _Registry.Contract.MintVehicleAndSdSign(&_Registry.TransactOpts, data) -} - -// MintVehicleAndSdSign is a paid mutator transaction binding the contract method 0x688ecea4. -// -// Solidity: function mintVehicleAndSdSign((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]) data) returns() -func (_Registry *RegistryTransactorSession) MintVehicleAndSdSign(data MintVehicleAndSdInputWithSnId) (*types.Transaction, error) { - return _Registry.Contract.MintVehicleAndSdSign(&_Registry.TransactOpts, data) -} - -// MintVehicleAndSdSign0 is a paid mutator transaction binding the contract method 0xfb1a28e8. -// -// Solidity: function mintVehicleAndSdSign((uint256,address,(string,string)[],uint256,bytes,bytes,address,(string,string)[]) data) returns() -func (_Registry *RegistryTransactor) MintVehicleAndSdSign0(opts *bind.TransactOpts, data MintVehicleAndSdInput) (*types.Transaction, error) { - return _Registry.contract.Transact(opts, "mintVehicleAndSdSign0", data) -} - -// MintVehicleAndSdSign0 is a paid mutator transaction binding the contract method 0xfb1a28e8. -// -// Solidity: function mintVehicleAndSdSign((uint256,address,(string,string)[],uint256,bytes,bytes,address,(string,string)[]) data) returns() -func (_Registry *RegistrySession) MintVehicleAndSdSign0(data MintVehicleAndSdInput) (*types.Transaction, error) { - return _Registry.Contract.MintVehicleAndSdSign0(&_Registry.TransactOpts, data) -} - -// MintVehicleAndSdSign0 is a paid mutator transaction binding the contract method 0xfb1a28e8. -// -// Solidity: function mintVehicleAndSdSign((uint256,address,(string,string)[],uint256,bytes,bytes,address,(string,string)[]) data) returns() -func (_Registry *RegistryTransactorSession) MintVehicleAndSdSign0(data MintVehicleAndSdInput) (*types.Transaction, error) { - return _Registry.Contract.MintVehicleAndSdSign0(&_Registry.TransactOpts, data) -} - -// MintVehicleAndSdWithDeviceDefinitionSign is a paid mutator transaction binding the contract method 0x484db0b3. -// -// Solidity: function mintVehicleAndSdWithDeviceDefinitionSign((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]) data) returns() -func (_Registry *RegistryTransactor) MintVehicleAndSdWithDeviceDefinitionSign(opts *bind.TransactOpts, data MintVehicleAndSdWithDdInputWithSnId) (*types.Transaction, error) { - return _Registry.contract.Transact(opts, "mintVehicleAndSdWithDeviceDefinitionSign", data) -} - -// MintVehicleAndSdWithDeviceDefinitionSign is a paid mutator transaction binding the contract method 0x484db0b3. -// -// Solidity: function mintVehicleAndSdWithDeviceDefinitionSign((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]) data) returns() -func (_Registry *RegistrySession) MintVehicleAndSdWithDeviceDefinitionSign(data MintVehicleAndSdWithDdInputWithSnId) (*types.Transaction, error) { - return _Registry.Contract.MintVehicleAndSdWithDeviceDefinitionSign(&_Registry.TransactOpts, data) -} - -// MintVehicleAndSdWithDeviceDefinitionSign is a paid mutator transaction binding the contract method 0x484db0b3. -// -// Solidity: function mintVehicleAndSdWithDeviceDefinitionSign((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]) data) returns() -func (_Registry *RegistryTransactorSession) MintVehicleAndSdWithDeviceDefinitionSign(data MintVehicleAndSdWithDdInputWithSnId) (*types.Transaction, error) { - return _Registry.Contract.MintVehicleAndSdWithDeviceDefinitionSign(&_Registry.TransactOpts, data) -} - -// MintVehicleAndSdWithDeviceDefinitionSign0 is a paid mutator transaction binding the contract method 0xd23965e3. -// -// Solidity: function mintVehicleAndSdWithDeviceDefinitionSign((uint256,address,string,(string,string)[],uint256,bytes,bytes,address,(string,string)[]) data) returns() -func (_Registry *RegistryTransactor) MintVehicleAndSdWithDeviceDefinitionSign0(opts *bind.TransactOpts, data MintVehicleAndSdWithDdInput) (*types.Transaction, error) { - return _Registry.contract.Transact(opts, "mintVehicleAndSdWithDeviceDefinitionSign0", data) -} - -// MintVehicleAndSdWithDeviceDefinitionSign0 is a paid mutator transaction binding the contract method 0xd23965e3. -// -// Solidity: function mintVehicleAndSdWithDeviceDefinitionSign((uint256,address,string,(string,string)[],uint256,bytes,bytes,address,(string,string)[]) data) returns() -func (_Registry *RegistrySession) MintVehicleAndSdWithDeviceDefinitionSign0(data MintVehicleAndSdWithDdInput) (*types.Transaction, error) { - return _Registry.Contract.MintVehicleAndSdWithDeviceDefinitionSign0(&_Registry.TransactOpts, data) -} - -// MintVehicleAndSdWithDeviceDefinitionSign0 is a paid mutator transaction binding the contract method 0xd23965e3. -// -// Solidity: function mintVehicleAndSdWithDeviceDefinitionSign((uint256,address,string,(string,string)[],uint256,bytes,bytes,address,(string,string)[]) data) returns() -func (_Registry *RegistryTransactorSession) MintVehicleAndSdWithDeviceDefinitionSign0(data MintVehicleAndSdWithDdInput) (*types.Transaction, error) { - return _Registry.Contract.MintVehicleAndSdWithDeviceDefinitionSign0(&_Registry.TransactOpts, data) -} - -// MintVehicleAndSdWithDeviceDefinitionSignAndSacd is a paid mutator transaction binding the contract method 0x58657dcc. -// -// Solidity: function mintVehicleAndSdWithDeviceDefinitionSignAndSacd((uint256,address,string,(string,string)[],uint256,bytes,bytes,address,(string,string)[]) data, (address,uint256,uint256,string) sacdInput) returns() -func (_Registry *RegistryTransactor) MintVehicleAndSdWithDeviceDefinitionSignAndSacd(opts *bind.TransactOpts, data MintVehicleAndSdWithDdInput, sacdInput SacdInput) (*types.Transaction, error) { - return _Registry.contract.Transact(opts, "mintVehicleAndSdWithDeviceDefinitionSignAndSacd", data, sacdInput) -} - -// MintVehicleAndSdWithDeviceDefinitionSignAndSacd is a paid mutator transaction binding the contract method 0x58657dcc. -// -// Solidity: function mintVehicleAndSdWithDeviceDefinitionSignAndSacd((uint256,address,string,(string,string)[],uint256,bytes,bytes,address,(string,string)[]) data, (address,uint256,uint256,string) sacdInput) returns() -func (_Registry *RegistrySession) MintVehicleAndSdWithDeviceDefinitionSignAndSacd(data MintVehicleAndSdWithDdInput, sacdInput SacdInput) (*types.Transaction, error) { - return _Registry.Contract.MintVehicleAndSdWithDeviceDefinitionSignAndSacd(&_Registry.TransactOpts, data, sacdInput) -} - -// MintVehicleAndSdWithDeviceDefinitionSignAndSacd is a paid mutator transaction binding the contract method 0x58657dcc. -// -// Solidity: function mintVehicleAndSdWithDeviceDefinitionSignAndSacd((uint256,address,string,(string,string)[],uint256,bytes,bytes,address,(string,string)[]) data, (address,uint256,uint256,string) sacdInput) returns() -func (_Registry *RegistryTransactorSession) MintVehicleAndSdWithDeviceDefinitionSignAndSacd(data MintVehicleAndSdWithDdInput, sacdInput SacdInput) (*types.Transaction, error) { - return _Registry.Contract.MintVehicleAndSdWithDeviceDefinitionSignAndSacd(&_Registry.TransactOpts, data, sacdInput) -} - -// MintVehicleAndSdWithDeviceDefinitionSignAndSacd0 is a paid mutator transaction binding the contract method 0x788a2f48. -// -// Solidity: function mintVehicleAndSdWithDeviceDefinitionSignAndSacd((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]) data, (address,uint256,uint256,string) sacdInput) returns() -func (_Registry *RegistryTransactor) MintVehicleAndSdWithDeviceDefinitionSignAndSacd0(opts *bind.TransactOpts, data MintVehicleAndSdWithDdInputWithSnId, sacdInput SacdInput) (*types.Transaction, error) { - return _Registry.contract.Transact(opts, "mintVehicleAndSdWithDeviceDefinitionSignAndSacd0", data, sacdInput) -} - -// MintVehicleAndSdWithDeviceDefinitionSignAndSacd0 is a paid mutator transaction binding the contract method 0x788a2f48. -// -// Solidity: function mintVehicleAndSdWithDeviceDefinitionSignAndSacd((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]) data, (address,uint256,uint256,string) sacdInput) returns() -func (_Registry *RegistrySession) MintVehicleAndSdWithDeviceDefinitionSignAndSacd0(data MintVehicleAndSdWithDdInputWithSnId, sacdInput SacdInput) (*types.Transaction, error) { - return _Registry.Contract.MintVehicleAndSdWithDeviceDefinitionSignAndSacd0(&_Registry.TransactOpts, data, sacdInput) -} - -// MintVehicleAndSdWithDeviceDefinitionSignAndSacd0 is a paid mutator transaction binding the contract method 0x788a2f48. -// -// Solidity: function mintVehicleAndSdWithDeviceDefinitionSignAndSacd((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]) data, (address,uint256,uint256,string) sacdInput) returns() -func (_Registry *RegistryTransactorSession) MintVehicleAndSdWithDeviceDefinitionSignAndSacd0(data MintVehicleAndSdWithDdInputWithSnId, sacdInput SacdInput) (*types.Transaction, error) { - return _Registry.Contract.MintVehicleAndSdWithDeviceDefinitionSignAndSacd0(&_Registry.TransactOpts, data, sacdInput) -} - -// MintVehicleAndSdWithDeviceDefinitionSignBatch is a paid mutator transaction binding the contract method 0x1a5d15a1. -// -// Solidity: function mintVehicleAndSdWithDeviceDefinitionSignBatch((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[] data) returns() -func (_Registry *RegistryTransactor) MintVehicleAndSdWithDeviceDefinitionSignBatch(opts *bind.TransactOpts, data []MintVehicleAndSdWithDdInputWithSnIdBatch) (*types.Transaction, error) { - return _Registry.contract.Transact(opts, "mintVehicleAndSdWithDeviceDefinitionSignBatch", data) -} - -// MintVehicleAndSdWithDeviceDefinitionSignBatch is a paid mutator transaction binding the contract method 0x1a5d15a1. -// -// Solidity: function mintVehicleAndSdWithDeviceDefinitionSignBatch((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[] data) returns() -func (_Registry *RegistrySession) MintVehicleAndSdWithDeviceDefinitionSignBatch(data []MintVehicleAndSdWithDdInputWithSnIdBatch) (*types.Transaction, error) { - return _Registry.Contract.MintVehicleAndSdWithDeviceDefinitionSignBatch(&_Registry.TransactOpts, data) -} - -// MintVehicleAndSdWithDeviceDefinitionSignBatch is a paid mutator transaction binding the contract method 0x1a5d15a1. -// -// Solidity: function mintVehicleAndSdWithDeviceDefinitionSignBatch((uint256,address,string,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[] data) returns() -func (_Registry *RegistryTransactorSession) MintVehicleAndSdWithDeviceDefinitionSignBatch(data []MintVehicleAndSdWithDdInputWithSnIdBatch) (*types.Transaction, error) { - return _Registry.Contract.MintVehicleAndSdWithDeviceDefinitionSignBatch(&_Registry.TransactOpts, data) -} - -// MintVehicleAndSdWithDeviceDefinitionSignBatch0 is a paid mutator transaction binding the contract method 0x7ae7fe4e. -// -// Solidity: function mintVehicleAndSdWithDeviceDefinitionSignBatch((uint256,address,string,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[] data) returns() -func (_Registry *RegistryTransactor) MintVehicleAndSdWithDeviceDefinitionSignBatch0(opts *bind.TransactOpts, data []MintVehicleAndSdWithDdInputBatch) (*types.Transaction, error) { - return _Registry.contract.Transact(opts, "mintVehicleAndSdWithDeviceDefinitionSignBatch0", data) -} - -// MintVehicleAndSdWithDeviceDefinitionSignBatch0 is a paid mutator transaction binding the contract method 0x7ae7fe4e. -// -// Solidity: function mintVehicleAndSdWithDeviceDefinitionSignBatch((uint256,address,string,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[] data) returns() -func (_Registry *RegistrySession) MintVehicleAndSdWithDeviceDefinitionSignBatch0(data []MintVehicleAndSdWithDdInputBatch) (*types.Transaction, error) { - return _Registry.Contract.MintVehicleAndSdWithDeviceDefinitionSignBatch0(&_Registry.TransactOpts, data) -} - -// MintVehicleAndSdWithDeviceDefinitionSignBatch0 is a paid mutator transaction binding the contract method 0x7ae7fe4e. -// -// Solidity: function mintVehicleAndSdWithDeviceDefinitionSignBatch((uint256,address,string,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[] data) returns() -func (_Registry *RegistryTransactorSession) MintVehicleAndSdWithDeviceDefinitionSignBatch0(data []MintVehicleAndSdWithDdInputBatch) (*types.Transaction, error) { - return _Registry.Contract.MintVehicleAndSdWithDeviceDefinitionSignBatch0(&_Registry.TransactOpts, data) -} - -// MintVehicleWithDeviceDefinition is a paid mutator transaction binding the contract method 0x8b04a18b. -// -// Solidity: function mintVehicleWithDeviceDefinition(uint256 manufacturerNode, address owner, uint256 storageNodeId, string deviceDefinitionId, (string,string)[] attrInfo) returns() -func (_Registry *RegistryTransactor) MintVehicleWithDeviceDefinition(opts *bind.TransactOpts, manufacturerNode *big.Int, owner common.Address, storageNodeId *big.Int, deviceDefinitionId string, attrInfo []AttributeInfoPair) (*types.Transaction, error) { - return _Registry.contract.Transact(opts, "mintVehicleWithDeviceDefinition", manufacturerNode, owner, storageNodeId, deviceDefinitionId, attrInfo) -} - -// MintVehicleWithDeviceDefinition is a paid mutator transaction binding the contract method 0x8b04a18b. -// -// Solidity: function mintVehicleWithDeviceDefinition(uint256 manufacturerNode, address owner, uint256 storageNodeId, string deviceDefinitionId, (string,string)[] attrInfo) returns() -func (_Registry *RegistrySession) MintVehicleWithDeviceDefinition(manufacturerNode *big.Int, owner common.Address, storageNodeId *big.Int, deviceDefinitionId string, attrInfo []AttributeInfoPair) (*types.Transaction, error) { - return _Registry.Contract.MintVehicleWithDeviceDefinition(&_Registry.TransactOpts, manufacturerNode, owner, storageNodeId, deviceDefinitionId, attrInfo) -} - -// MintVehicleWithDeviceDefinition is a paid mutator transaction binding the contract method 0x8b04a18b. -// -// Solidity: function mintVehicleWithDeviceDefinition(uint256 manufacturerNode, address owner, uint256 storageNodeId, string deviceDefinitionId, (string,string)[] attrInfo) returns() -func (_Registry *RegistryTransactorSession) MintVehicleWithDeviceDefinition(manufacturerNode *big.Int, owner common.Address, storageNodeId *big.Int, deviceDefinitionId string, attrInfo []AttributeInfoPair) (*types.Transaction, error) { - return _Registry.Contract.MintVehicleWithDeviceDefinition(&_Registry.TransactOpts, manufacturerNode, owner, storageNodeId, deviceDefinitionId, attrInfo) -} - -// MintVehicleWithDeviceDefinition0 is a paid mutator transaction binding the contract method 0x8bf71ebc. -// -// Solidity: function mintVehicleWithDeviceDefinition(uint256 manufacturerNode, address owner, uint256 storageNodeId, string deviceDefinitionId, (string,string)[] attrInfo, (address,uint256,uint256,string) sacdInput) returns() -func (_Registry *RegistryTransactor) MintVehicleWithDeviceDefinition0(opts *bind.TransactOpts, manufacturerNode *big.Int, owner common.Address, storageNodeId *big.Int, deviceDefinitionId string, attrInfo []AttributeInfoPair, sacdInput SacdInput) (*types.Transaction, error) { - return _Registry.contract.Transact(opts, "mintVehicleWithDeviceDefinition0", manufacturerNode, owner, storageNodeId, deviceDefinitionId, attrInfo, sacdInput) -} - -// MintVehicleWithDeviceDefinition0 is a paid mutator transaction binding the contract method 0x8bf71ebc. -// -// Solidity: function mintVehicleWithDeviceDefinition(uint256 manufacturerNode, address owner, uint256 storageNodeId, string deviceDefinitionId, (string,string)[] attrInfo, (address,uint256,uint256,string) sacdInput) returns() -func (_Registry *RegistrySession) MintVehicleWithDeviceDefinition0(manufacturerNode *big.Int, owner common.Address, storageNodeId *big.Int, deviceDefinitionId string, attrInfo []AttributeInfoPair, sacdInput SacdInput) (*types.Transaction, error) { - return _Registry.Contract.MintVehicleWithDeviceDefinition0(&_Registry.TransactOpts, manufacturerNode, owner, storageNodeId, deviceDefinitionId, attrInfo, sacdInput) -} - -// MintVehicleWithDeviceDefinition0 is a paid mutator transaction binding the contract method 0x8bf71ebc. -// -// Solidity: function mintVehicleWithDeviceDefinition(uint256 manufacturerNode, address owner, uint256 storageNodeId, string deviceDefinitionId, (string,string)[] attrInfo, (address,uint256,uint256,string) sacdInput) returns() -func (_Registry *RegistryTransactorSession) MintVehicleWithDeviceDefinition0(manufacturerNode *big.Int, owner common.Address, storageNodeId *big.Int, deviceDefinitionId string, attrInfo []AttributeInfoPair, sacdInput SacdInput) (*types.Transaction, error) { - return _Registry.Contract.MintVehicleWithDeviceDefinition0(&_Registry.TransactOpts, manufacturerNode, owner, storageNodeId, deviceDefinitionId, attrInfo, sacdInput) -} - -// MintVehicleWithDeviceDefinition1 is a paid mutator transaction binding the contract method 0x97c95b2a. -// -// Solidity: function mintVehicleWithDeviceDefinition(uint256 manufacturerNode, address owner, string deviceDefinitionId, (string,string)[] attrInfo, (address,uint256,uint256,string) sacdInput) returns() -func (_Registry *RegistryTransactor) MintVehicleWithDeviceDefinition1(opts *bind.TransactOpts, manufacturerNode *big.Int, owner common.Address, deviceDefinitionId string, attrInfo []AttributeInfoPair, sacdInput SacdInput) (*types.Transaction, error) { - return _Registry.contract.Transact(opts, "mintVehicleWithDeviceDefinition1", manufacturerNode, owner, deviceDefinitionId, attrInfo, sacdInput) -} - -// MintVehicleWithDeviceDefinition1 is a paid mutator transaction binding the contract method 0x97c95b2a. -// -// Solidity: function mintVehicleWithDeviceDefinition(uint256 manufacturerNode, address owner, string deviceDefinitionId, (string,string)[] attrInfo, (address,uint256,uint256,string) sacdInput) returns() -func (_Registry *RegistrySession) MintVehicleWithDeviceDefinition1(manufacturerNode *big.Int, owner common.Address, deviceDefinitionId string, attrInfo []AttributeInfoPair, sacdInput SacdInput) (*types.Transaction, error) { - return _Registry.Contract.MintVehicleWithDeviceDefinition1(&_Registry.TransactOpts, manufacturerNode, owner, deviceDefinitionId, attrInfo, sacdInput) -} - -// MintVehicleWithDeviceDefinition1 is a paid mutator transaction binding the contract method 0x97c95b2a. -// -// Solidity: function mintVehicleWithDeviceDefinition(uint256 manufacturerNode, address owner, string deviceDefinitionId, (string,string)[] attrInfo, (address,uint256,uint256,string) sacdInput) returns() -func (_Registry *RegistryTransactorSession) MintVehicleWithDeviceDefinition1(manufacturerNode *big.Int, owner common.Address, deviceDefinitionId string, attrInfo []AttributeInfoPair, sacdInput SacdInput) (*types.Transaction, error) { - return _Registry.Contract.MintVehicleWithDeviceDefinition1(&_Registry.TransactOpts, manufacturerNode, owner, deviceDefinitionId, attrInfo, sacdInput) -} - -// MintVehicleWithDeviceDefinition2 is a paid mutator transaction binding the contract method 0xd84baff1. -// -// Solidity: function mintVehicleWithDeviceDefinition(uint256 manufacturerNode, address owner, string deviceDefinitionId, (string,string)[] attrInfo) returns() -func (_Registry *RegistryTransactor) MintVehicleWithDeviceDefinition2(opts *bind.TransactOpts, manufacturerNode *big.Int, owner common.Address, deviceDefinitionId string, attrInfo []AttributeInfoPair) (*types.Transaction, error) { - return _Registry.contract.Transact(opts, "mintVehicleWithDeviceDefinition2", manufacturerNode, owner, deviceDefinitionId, attrInfo) -} - -// MintVehicleWithDeviceDefinition2 is a paid mutator transaction binding the contract method 0xd84baff1. -// -// Solidity: function mintVehicleWithDeviceDefinition(uint256 manufacturerNode, address owner, string deviceDefinitionId, (string,string)[] attrInfo) returns() -func (_Registry *RegistrySession) MintVehicleWithDeviceDefinition2(manufacturerNode *big.Int, owner common.Address, deviceDefinitionId string, attrInfo []AttributeInfoPair) (*types.Transaction, error) { - return _Registry.Contract.MintVehicleWithDeviceDefinition2(&_Registry.TransactOpts, manufacturerNode, owner, deviceDefinitionId, attrInfo) -} - -// MintVehicleWithDeviceDefinition2 is a paid mutator transaction binding the contract method 0xd84baff1. -// -// Solidity: function mintVehicleWithDeviceDefinition(uint256 manufacturerNode, address owner, string deviceDefinitionId, (string,string)[] attrInfo) returns() -func (_Registry *RegistryTransactorSession) MintVehicleWithDeviceDefinition2(manufacturerNode *big.Int, owner common.Address, deviceDefinitionId string, attrInfo []AttributeInfoPair) (*types.Transaction, error) { - return _Registry.Contract.MintVehicleWithDeviceDefinition2(&_Registry.TransactOpts, manufacturerNode, owner, deviceDefinitionId, attrInfo) -} - -// MintVehicleWithDeviceDefinitionSign is a paid mutator transaction binding the contract method 0x592c0889. -// -// Solidity: function mintVehicleWithDeviceDefinitionSign(uint256 manufacturerNode, address owner, uint256 storageNodeId, string deviceDefinitionId, (string,string)[] attrInfo, bytes signature) returns() -func (_Registry *RegistryTransactor) MintVehicleWithDeviceDefinitionSign(opts *bind.TransactOpts, manufacturerNode *big.Int, owner common.Address, storageNodeId *big.Int, deviceDefinitionId string, attrInfo []AttributeInfoPair, signature []byte) (*types.Transaction, error) { - return _Registry.contract.Transact(opts, "mintVehicleWithDeviceDefinitionSign", manufacturerNode, owner, storageNodeId, deviceDefinitionId, attrInfo, signature) -} - -// MintVehicleWithDeviceDefinitionSign is a paid mutator transaction binding the contract method 0x592c0889. -// -// Solidity: function mintVehicleWithDeviceDefinitionSign(uint256 manufacturerNode, address owner, uint256 storageNodeId, string deviceDefinitionId, (string,string)[] attrInfo, bytes signature) returns() -func (_Registry *RegistrySession) MintVehicleWithDeviceDefinitionSign(manufacturerNode *big.Int, owner common.Address, storageNodeId *big.Int, deviceDefinitionId string, attrInfo []AttributeInfoPair, signature []byte) (*types.Transaction, error) { - return _Registry.Contract.MintVehicleWithDeviceDefinitionSign(&_Registry.TransactOpts, manufacturerNode, owner, storageNodeId, deviceDefinitionId, attrInfo, signature) -} - -// MintVehicleWithDeviceDefinitionSign is a paid mutator transaction binding the contract method 0x592c0889. -// -// Solidity: function mintVehicleWithDeviceDefinitionSign(uint256 manufacturerNode, address owner, uint256 storageNodeId, string deviceDefinitionId, (string,string)[] attrInfo, bytes signature) returns() -func (_Registry *RegistryTransactorSession) MintVehicleWithDeviceDefinitionSign(manufacturerNode *big.Int, owner common.Address, storageNodeId *big.Int, deviceDefinitionId string, attrInfo []AttributeInfoPair, signature []byte) (*types.Transaction, error) { - return _Registry.Contract.MintVehicleWithDeviceDefinitionSign(&_Registry.TransactOpts, manufacturerNode, owner, storageNodeId, deviceDefinitionId, attrInfo, signature) -} - -// MintVehicleWithDeviceDefinitionSign0 is a paid mutator transaction binding the contract method 0x8dca2b8e. -// -// Solidity: function mintVehicleWithDeviceDefinitionSign(uint256 manufacturerNode, address owner, string deviceDefinitionId, (string,string)[] attrInfo, bytes signature) returns() -func (_Registry *RegistryTransactor) MintVehicleWithDeviceDefinitionSign0(opts *bind.TransactOpts, manufacturerNode *big.Int, owner common.Address, deviceDefinitionId string, attrInfo []AttributeInfoPair, signature []byte) (*types.Transaction, error) { - return _Registry.contract.Transact(opts, "mintVehicleWithDeviceDefinitionSign0", manufacturerNode, owner, deviceDefinitionId, attrInfo, signature) -} - -// MintVehicleWithDeviceDefinitionSign0 is a paid mutator transaction binding the contract method 0x8dca2b8e. -// -// Solidity: function mintVehicleWithDeviceDefinitionSign(uint256 manufacturerNode, address owner, string deviceDefinitionId, (string,string)[] attrInfo, bytes signature) returns() -func (_Registry *RegistrySession) MintVehicleWithDeviceDefinitionSign0(manufacturerNode *big.Int, owner common.Address, deviceDefinitionId string, attrInfo []AttributeInfoPair, signature []byte) (*types.Transaction, error) { - return _Registry.Contract.MintVehicleWithDeviceDefinitionSign0(&_Registry.TransactOpts, manufacturerNode, owner, deviceDefinitionId, attrInfo, signature) -} - -// MintVehicleWithDeviceDefinitionSign0 is a paid mutator transaction binding the contract method 0x8dca2b8e. -// -// Solidity: function mintVehicleWithDeviceDefinitionSign(uint256 manufacturerNode, address owner, string deviceDefinitionId, (string,string)[] attrInfo, bytes signature) returns() -func (_Registry *RegistryTransactorSession) MintVehicleWithDeviceDefinitionSign0(manufacturerNode *big.Int, owner common.Address, deviceDefinitionId string, attrInfo []AttributeInfoPair, signature []byte) (*types.Transaction, error) { - return _Registry.Contract.MintVehicleWithDeviceDefinitionSign0(&_Registry.TransactOpts, manufacturerNode, owner, deviceDefinitionId, attrInfo, signature) -} - -// MultiDelegateCall is a paid mutator transaction binding the contract method 0x415c2d96. -// -// Solidity: function multiDelegateCall(bytes[] data) returns(bytes[] results) -func (_Registry *RegistryTransactor) MultiDelegateCall(opts *bind.TransactOpts, data [][]byte) (*types.Transaction, error) { - return _Registry.contract.Transact(opts, "multiDelegateCall", data) -} - -// MultiDelegateCall is a paid mutator transaction binding the contract method 0x415c2d96. -// -// Solidity: function multiDelegateCall(bytes[] data) returns(bytes[] results) -func (_Registry *RegistrySession) MultiDelegateCall(data [][]byte) (*types.Transaction, error) { - return _Registry.Contract.MultiDelegateCall(&_Registry.TransactOpts, data) -} - -// MultiDelegateCall is a paid mutator transaction binding the contract method 0x415c2d96. -// -// Solidity: function multiDelegateCall(bytes[] data) returns(bytes[] results) -func (_Registry *RegistryTransactorSession) MultiDelegateCall(data [][]byte) (*types.Transaction, error) { - return _Registry.Contract.MultiDelegateCall(&_Registry.TransactOpts, data) -} - -// OnBurnVehicleStream is a paid mutator transaction binding the contract method 0xa91ec798. -// -// Solidity: function onBurnVehicleStream(uint256 vehicleId) returns() -func (_Registry *RegistryTransactor) OnBurnVehicleStream(opts *bind.TransactOpts, vehicleId *big.Int) (*types.Transaction, error) { - return _Registry.contract.Transact(opts, "onBurnVehicleStream", vehicleId) -} - -// OnBurnVehicleStream is a paid mutator transaction binding the contract method 0xa91ec798. -// -// Solidity: function onBurnVehicleStream(uint256 vehicleId) returns() -func (_Registry *RegistrySession) OnBurnVehicleStream(vehicleId *big.Int) (*types.Transaction, error) { - return _Registry.Contract.OnBurnVehicleStream(&_Registry.TransactOpts, vehicleId) -} - -// OnBurnVehicleStream is a paid mutator transaction binding the contract method 0xa91ec798. -// -// Solidity: function onBurnVehicleStream(uint256 vehicleId) returns() -func (_Registry *RegistryTransactorSession) OnBurnVehicleStream(vehicleId *big.Int) (*types.Transaction, error) { - return _Registry.Contract.OnBurnVehicleStream(&_Registry.TransactOpts, vehicleId) -} - -// OnSetSubscribePrivilege is a paid mutator transaction binding the contract method 0xc8f11a06. -// -// Solidity: function onSetSubscribePrivilege(uint256 vehicleId, address subscriber, uint256 expirationTime) returns() -func (_Registry *RegistryTransactor) OnSetSubscribePrivilege(opts *bind.TransactOpts, vehicleId *big.Int, subscriber common.Address, expirationTime *big.Int) (*types.Transaction, error) { - return _Registry.contract.Transact(opts, "onSetSubscribePrivilege", vehicleId, subscriber, expirationTime) -} - -// OnSetSubscribePrivilege is a paid mutator transaction binding the contract method 0xc8f11a06. -// -// Solidity: function onSetSubscribePrivilege(uint256 vehicleId, address subscriber, uint256 expirationTime) returns() -func (_Registry *RegistrySession) OnSetSubscribePrivilege(vehicleId *big.Int, subscriber common.Address, expirationTime *big.Int) (*types.Transaction, error) { - return _Registry.Contract.OnSetSubscribePrivilege(&_Registry.TransactOpts, vehicleId, subscriber, expirationTime) -} - -// OnSetSubscribePrivilege is a paid mutator transaction binding the contract method 0xc8f11a06. -// -// Solidity: function onSetSubscribePrivilege(uint256 vehicleId, address subscriber, uint256 expirationTime) returns() -func (_Registry *RegistryTransactorSession) OnSetSubscribePrivilege(vehicleId *big.Int, subscriber common.Address, expirationTime *big.Int) (*types.Transaction, error) { - return _Registry.Contract.OnSetSubscribePrivilege(&_Registry.TransactOpts, vehicleId, subscriber, expirationTime) -} - -// OnTransferVehicleStream is a paid mutator transaction binding the contract method 0x1882b263. -// -// Solidity: function onTransferVehicleStream(address to, uint256 vehicleId) returns() -func (_Registry *RegistryTransactor) OnTransferVehicleStream(opts *bind.TransactOpts, to common.Address, vehicleId *big.Int) (*types.Transaction, error) { - return _Registry.contract.Transact(opts, "onTransferVehicleStream", to, vehicleId) -} - -// OnTransferVehicleStream is a paid mutator transaction binding the contract method 0x1882b263. -// -// Solidity: function onTransferVehicleStream(address to, uint256 vehicleId) returns() -func (_Registry *RegistrySession) OnTransferVehicleStream(to common.Address, vehicleId *big.Int) (*types.Transaction, error) { - return _Registry.Contract.OnTransferVehicleStream(&_Registry.TransactOpts, to, vehicleId) -} - -// OnTransferVehicleStream is a paid mutator transaction binding the contract method 0x1882b263. -// -// Solidity: function onTransferVehicleStream(address to, uint256 vehicleId) returns() -func (_Registry *RegistryTransactorSession) OnTransferVehicleStream(to common.Address, vehicleId *big.Int) (*types.Transaction, error) { - return _Registry.Contract.OnTransferVehicleStream(&_Registry.TransactOpts, to, vehicleId) -} - -// PairAftermarketDevice is a paid mutator transaction binding the contract method 0x492ab283. -// -// Solidity: function pairAftermarketDevice(uint256 aftermarketDeviceNode, uint256 vehicleNode) returns() -func (_Registry *RegistryTransactor) PairAftermarketDevice(opts *bind.TransactOpts, aftermarketDeviceNode *big.Int, vehicleNode *big.Int) (*types.Transaction, error) { - return _Registry.contract.Transact(opts, "pairAftermarketDevice", aftermarketDeviceNode, vehicleNode) -} - -// PairAftermarketDevice is a paid mutator transaction binding the contract method 0x492ab283. -// -// Solidity: function pairAftermarketDevice(uint256 aftermarketDeviceNode, uint256 vehicleNode) returns() -func (_Registry *RegistrySession) PairAftermarketDevice(aftermarketDeviceNode *big.Int, vehicleNode *big.Int) (*types.Transaction, error) { - return _Registry.Contract.PairAftermarketDevice(&_Registry.TransactOpts, aftermarketDeviceNode, vehicleNode) -} - -// PairAftermarketDevice is a paid mutator transaction binding the contract method 0x492ab283. -// -// Solidity: function pairAftermarketDevice(uint256 aftermarketDeviceNode, uint256 vehicleNode) returns() -func (_Registry *RegistryTransactorSession) PairAftermarketDevice(aftermarketDeviceNode *big.Int, vehicleNode *big.Int) (*types.Transaction, error) { - return _Registry.Contract.PairAftermarketDevice(&_Registry.TransactOpts, aftermarketDeviceNode, vehicleNode) -} - -// PairAftermarketDeviceSign is a paid mutator transaction binding the contract method 0xb50df2f7. -// -// Solidity: function pairAftermarketDeviceSign(uint256 aftermarketDeviceNode, uint256 vehicleNode, bytes aftermarketDeviceSig, bytes vehicleOwnerSig) returns() -func (_Registry *RegistryTransactor) PairAftermarketDeviceSign(opts *bind.TransactOpts, aftermarketDeviceNode *big.Int, vehicleNode *big.Int, aftermarketDeviceSig []byte, vehicleOwnerSig []byte) (*types.Transaction, error) { - return _Registry.contract.Transact(opts, "pairAftermarketDeviceSign", aftermarketDeviceNode, vehicleNode, aftermarketDeviceSig, vehicleOwnerSig) -} - -// PairAftermarketDeviceSign is a paid mutator transaction binding the contract method 0xb50df2f7. -// -// Solidity: function pairAftermarketDeviceSign(uint256 aftermarketDeviceNode, uint256 vehicleNode, bytes aftermarketDeviceSig, bytes vehicleOwnerSig) returns() -func (_Registry *RegistrySession) PairAftermarketDeviceSign(aftermarketDeviceNode *big.Int, vehicleNode *big.Int, aftermarketDeviceSig []byte, vehicleOwnerSig []byte) (*types.Transaction, error) { - return _Registry.Contract.PairAftermarketDeviceSign(&_Registry.TransactOpts, aftermarketDeviceNode, vehicleNode, aftermarketDeviceSig, vehicleOwnerSig) -} - -// PairAftermarketDeviceSign is a paid mutator transaction binding the contract method 0xb50df2f7. -// -// Solidity: function pairAftermarketDeviceSign(uint256 aftermarketDeviceNode, uint256 vehicleNode, bytes aftermarketDeviceSig, bytes vehicleOwnerSig) returns() -func (_Registry *RegistryTransactorSession) PairAftermarketDeviceSign(aftermarketDeviceNode *big.Int, vehicleNode *big.Int, aftermarketDeviceSig []byte, vehicleOwnerSig []byte) (*types.Transaction, error) { - return _Registry.Contract.PairAftermarketDeviceSign(&_Registry.TransactOpts, aftermarketDeviceNode, vehicleNode, aftermarketDeviceSig, vehicleOwnerSig) -} - -// PairAftermarketDeviceSign0 is a paid mutator transaction binding the contract method 0xcfe642dd. -// -// Solidity: function pairAftermarketDeviceSign(uint256 aftermarketDeviceNode, uint256 vehicleNode, bytes signature) returns() -func (_Registry *RegistryTransactor) PairAftermarketDeviceSign0(opts *bind.TransactOpts, aftermarketDeviceNode *big.Int, vehicleNode *big.Int, signature []byte) (*types.Transaction, error) { - return _Registry.contract.Transact(opts, "pairAftermarketDeviceSign0", aftermarketDeviceNode, vehicleNode, signature) -} - -// PairAftermarketDeviceSign0 is a paid mutator transaction binding the contract method 0xcfe642dd. -// -// Solidity: function pairAftermarketDeviceSign(uint256 aftermarketDeviceNode, uint256 vehicleNode, bytes signature) returns() -func (_Registry *RegistrySession) PairAftermarketDeviceSign0(aftermarketDeviceNode *big.Int, vehicleNode *big.Int, signature []byte) (*types.Transaction, error) { - return _Registry.Contract.PairAftermarketDeviceSign0(&_Registry.TransactOpts, aftermarketDeviceNode, vehicleNode, signature) -} - -// PairAftermarketDeviceSign0 is a paid mutator transaction binding the contract method 0xcfe642dd. -// -// Solidity: function pairAftermarketDeviceSign(uint256 aftermarketDeviceNode, uint256 vehicleNode, bytes signature) returns() -func (_Registry *RegistryTransactorSession) PairAftermarketDeviceSign0(aftermarketDeviceNode *big.Int, vehicleNode *big.Int, signature []byte) (*types.Transaction, error) { - return _Registry.Contract.PairAftermarketDeviceSign0(&_Registry.TransactOpts, aftermarketDeviceNode, vehicleNode, signature) -} - -// PairAftermarketDeviceWithAdSig is a paid mutator transaction binding the contract method 0x7ca22c7b. -// -// Solidity: function pairAftermarketDeviceWithAdSig(uint256 aftermarketDeviceNode, uint256 vehicleNode, bytes aftermarketDeviceSig) returns() -func (_Registry *RegistryTransactor) PairAftermarketDeviceWithAdSig(opts *bind.TransactOpts, aftermarketDeviceNode *big.Int, vehicleNode *big.Int, aftermarketDeviceSig []byte) (*types.Transaction, error) { - return _Registry.contract.Transact(opts, "pairAftermarketDeviceWithAdSig", aftermarketDeviceNode, vehicleNode, aftermarketDeviceSig) -} - -// PairAftermarketDeviceWithAdSig is a paid mutator transaction binding the contract method 0x7ca22c7b. -// -// Solidity: function pairAftermarketDeviceWithAdSig(uint256 aftermarketDeviceNode, uint256 vehicleNode, bytes aftermarketDeviceSig) returns() -func (_Registry *RegistrySession) PairAftermarketDeviceWithAdSig(aftermarketDeviceNode *big.Int, vehicleNode *big.Int, aftermarketDeviceSig []byte) (*types.Transaction, error) { - return _Registry.Contract.PairAftermarketDeviceWithAdSig(&_Registry.TransactOpts, aftermarketDeviceNode, vehicleNode, aftermarketDeviceSig) -} - -// PairAftermarketDeviceWithAdSig is a paid mutator transaction binding the contract method 0x7ca22c7b. -// -// Solidity: function pairAftermarketDeviceWithAdSig(uint256 aftermarketDeviceNode, uint256 vehicleNode, bytes aftermarketDeviceSig) returns() -func (_Registry *RegistryTransactorSession) PairAftermarketDeviceWithAdSig(aftermarketDeviceNode *big.Int, vehicleNode *big.Int, aftermarketDeviceSig []byte) (*types.Transaction, error) { - return _Registry.Contract.PairAftermarketDeviceWithAdSig(&_Registry.TransactOpts, aftermarketDeviceNode, vehicleNode, aftermarketDeviceSig) -} - -// RemoveModule is a paid mutator transaction binding the contract method 0x9748a762. -// -// Solidity: function removeModule(address implementation, bytes4[] selectors) returns() -func (_Registry *RegistryTransactor) RemoveModule(opts *bind.TransactOpts, implementation common.Address, selectors [][4]byte) (*types.Transaction, error) { - return _Registry.contract.Transact(opts, "removeModule", implementation, selectors) -} - -// RemoveModule is a paid mutator transaction binding the contract method 0x9748a762. -// -// Solidity: function removeModule(address implementation, bytes4[] selectors) returns() -func (_Registry *RegistrySession) RemoveModule(implementation common.Address, selectors [][4]byte) (*types.Transaction, error) { - return _Registry.Contract.RemoveModule(&_Registry.TransactOpts, implementation, selectors) -} - -// RemoveModule is a paid mutator transaction binding the contract method 0x9748a762. -// -// Solidity: function removeModule(address implementation, bytes4[] selectors) returns() -func (_Registry *RegistryTransactorSession) RemoveModule(implementation common.Address, selectors [][4]byte) (*types.Transaction, error) { - return _Registry.Contract.RemoveModule(&_Registry.TransactOpts, implementation, selectors) -} - -// RenameManufacturers is a paid mutator transaction binding the contract method 0xf73a8f04. -// -// Solidity: function renameManufacturers((uint256,string)[] idManufacturerNames) returns() -func (_Registry *RegistryTransactor) RenameManufacturers(opts *bind.TransactOpts, idManufacturerNames []DevAdminIdManufacturerName) (*types.Transaction, error) { - return _Registry.contract.Transact(opts, "renameManufacturers", idManufacturerNames) -} - -// RenameManufacturers is a paid mutator transaction binding the contract method 0xf73a8f04. -// -// Solidity: function renameManufacturers((uint256,string)[] idManufacturerNames) returns() -func (_Registry *RegistrySession) RenameManufacturers(idManufacturerNames []DevAdminIdManufacturerName) (*types.Transaction, error) { - return _Registry.Contract.RenameManufacturers(&_Registry.TransactOpts, idManufacturerNames) -} - -// RenameManufacturers is a paid mutator transaction binding the contract method 0xf73a8f04. -// -// Solidity: function renameManufacturers((uint256,string)[] idManufacturerNames) returns() -func (_Registry *RegistryTransactorSession) RenameManufacturers(idManufacturerNames []DevAdminIdManufacturerName) (*types.Transaction, error) { - return _Registry.Contract.RenameManufacturers(&_Registry.TransactOpts, idManufacturerNames) -} - -// RenounceRole is a paid mutator transaction binding the contract method 0x8bb9c5bf. -// -// Solidity: function renounceRole(bytes32 role) returns() -func (_Registry *RegistryTransactor) RenounceRole(opts *bind.TransactOpts, role [32]byte) (*types.Transaction, error) { - return _Registry.contract.Transact(opts, "renounceRole", role) -} - -// RenounceRole is a paid mutator transaction binding the contract method 0x8bb9c5bf. -// -// Solidity: function renounceRole(bytes32 role) returns() -func (_Registry *RegistrySession) RenounceRole(role [32]byte) (*types.Transaction, error) { - return _Registry.Contract.RenounceRole(&_Registry.TransactOpts, role) -} - -// RenounceRole is a paid mutator transaction binding the contract method 0x8bb9c5bf. -// -// Solidity: function renounceRole(bytes32 role) returns() -func (_Registry *RegistryTransactorSession) RenounceRole(role [32]byte) (*types.Transaction, error) { - return _Registry.Contract.RenounceRole(&_Registry.TransactOpts, role) -} - -// ReprovisionAftermarketDeviceByManufacturerBatch is a paid mutator transaction binding the contract method 0x9b3abd48. -// -// Solidity: function reprovisionAftermarketDeviceByManufacturerBatch(uint256[] aftermarketDeviceNodeList) returns() -func (_Registry *RegistryTransactor) ReprovisionAftermarketDeviceByManufacturerBatch(opts *bind.TransactOpts, aftermarketDeviceNodeList []*big.Int) (*types.Transaction, error) { - return _Registry.contract.Transact(opts, "reprovisionAftermarketDeviceByManufacturerBatch", aftermarketDeviceNodeList) -} - -// ReprovisionAftermarketDeviceByManufacturerBatch is a paid mutator transaction binding the contract method 0x9b3abd48. -// -// Solidity: function reprovisionAftermarketDeviceByManufacturerBatch(uint256[] aftermarketDeviceNodeList) returns() -func (_Registry *RegistrySession) ReprovisionAftermarketDeviceByManufacturerBatch(aftermarketDeviceNodeList []*big.Int) (*types.Transaction, error) { - return _Registry.Contract.ReprovisionAftermarketDeviceByManufacturerBatch(&_Registry.TransactOpts, aftermarketDeviceNodeList) -} - -// ReprovisionAftermarketDeviceByManufacturerBatch is a paid mutator transaction binding the contract method 0x9b3abd48. -// -// Solidity: function reprovisionAftermarketDeviceByManufacturerBatch(uint256[] aftermarketDeviceNodeList) returns() -func (_Registry *RegistryTransactorSession) ReprovisionAftermarketDeviceByManufacturerBatch(aftermarketDeviceNodeList []*big.Int) (*types.Transaction, error) { - return _Registry.Contract.ReprovisionAftermarketDeviceByManufacturerBatch(&_Registry.TransactOpts, aftermarketDeviceNodeList) -} - -// ResetAftermarketDeviceAddressByManufacturerBatch is a paid mutator transaction binding the contract method 0x9d0b139b. -// -// Solidity: function resetAftermarketDeviceAddressByManufacturerBatch((uint256,address)[] adIdAddrs) returns() -func (_Registry *RegistryTransactor) ResetAftermarketDeviceAddressByManufacturerBatch(opts *bind.TransactOpts, adIdAddrs []AftermarketDeviceIdAddressPair) (*types.Transaction, error) { - return _Registry.contract.Transact(opts, "resetAftermarketDeviceAddressByManufacturerBatch", adIdAddrs) -} - -// ResetAftermarketDeviceAddressByManufacturerBatch is a paid mutator transaction binding the contract method 0x9d0b139b. -// -// Solidity: function resetAftermarketDeviceAddressByManufacturerBatch((uint256,address)[] adIdAddrs) returns() -func (_Registry *RegistrySession) ResetAftermarketDeviceAddressByManufacturerBatch(adIdAddrs []AftermarketDeviceIdAddressPair) (*types.Transaction, error) { - return _Registry.Contract.ResetAftermarketDeviceAddressByManufacturerBatch(&_Registry.TransactOpts, adIdAddrs) -} - -// ResetAftermarketDeviceAddressByManufacturerBatch is a paid mutator transaction binding the contract method 0x9d0b139b. -// -// Solidity: function resetAftermarketDeviceAddressByManufacturerBatch((uint256,address)[] adIdAddrs) returns() -func (_Registry *RegistryTransactorSession) ResetAftermarketDeviceAddressByManufacturerBatch(adIdAddrs []AftermarketDeviceIdAddressPair) (*types.Transaction, error) { - return _Registry.Contract.ResetAftermarketDeviceAddressByManufacturerBatch(&_Registry.TransactOpts, adIdAddrs) -} - -// ResetAftermarketDeviceForClaiming is a paid mutator transaction binding the contract method 0x4c92773c. -// -// Solidity: function resetAftermarketDeviceForClaiming(address from, uint256 aftermarketDeviceNode) returns(address) -func (_Registry *RegistryTransactor) ResetAftermarketDeviceForClaiming(opts *bind.TransactOpts, from common.Address, aftermarketDeviceNode *big.Int) (*types.Transaction, error) { - return _Registry.contract.Transact(opts, "resetAftermarketDeviceForClaiming", from, aftermarketDeviceNode) -} - -// ResetAftermarketDeviceForClaiming is a paid mutator transaction binding the contract method 0x4c92773c. -// -// Solidity: function resetAftermarketDeviceForClaiming(address from, uint256 aftermarketDeviceNode) returns(address) -func (_Registry *RegistrySession) ResetAftermarketDeviceForClaiming(from common.Address, aftermarketDeviceNode *big.Int) (*types.Transaction, error) { - return _Registry.Contract.ResetAftermarketDeviceForClaiming(&_Registry.TransactOpts, from, aftermarketDeviceNode) -} - -// ResetAftermarketDeviceForClaiming is a paid mutator transaction binding the contract method 0x4c92773c. -// -// Solidity: function resetAftermarketDeviceForClaiming(address from, uint256 aftermarketDeviceNode) returns(address) -func (_Registry *RegistryTransactorSession) ResetAftermarketDeviceForClaiming(from common.Address, aftermarketDeviceNode *big.Int) (*types.Transaction, error) { - return _Registry.Contract.ResetAftermarketDeviceForClaiming(&_Registry.TransactOpts, from, aftermarketDeviceNode) -} - -// RevokeRole is a paid mutator transaction binding the contract method 0xd547741f. -// -// Solidity: function revokeRole(bytes32 role, address account) returns() -func (_Registry *RegistryTransactor) RevokeRole(opts *bind.TransactOpts, role [32]byte, account common.Address) (*types.Transaction, error) { - return _Registry.contract.Transact(opts, "revokeRole", role, account) -} - -// RevokeRole is a paid mutator transaction binding the contract method 0xd547741f. -// -// Solidity: function revokeRole(bytes32 role, address account) returns() -func (_Registry *RegistrySession) RevokeRole(role [32]byte, account common.Address) (*types.Transaction, error) { - return _Registry.Contract.RevokeRole(&_Registry.TransactOpts, role, account) -} - -// RevokeRole is a paid mutator transaction binding the contract method 0xd547741f. -// -// Solidity: function revokeRole(bytes32 role, address account) returns() -func (_Registry *RegistryTransactorSession) RevokeRole(role [32]byte, account common.Address) (*types.Transaction, error) { - return _Registry.Contract.RevokeRole(&_Registry.TransactOpts, role, account) -} - -// SetAftermarketDeviceBeneficiary is a paid mutator transaction binding the contract method 0xbebc0bfc. -// -// Solidity: function setAftermarketDeviceBeneficiary(uint256 nodeId, address beneficiary) returns() -func (_Registry *RegistryTransactor) SetAftermarketDeviceBeneficiary(opts *bind.TransactOpts, nodeId *big.Int, beneficiary common.Address) (*types.Transaction, error) { - return _Registry.contract.Transact(opts, "setAftermarketDeviceBeneficiary", nodeId, beneficiary) -} - -// SetAftermarketDeviceBeneficiary is a paid mutator transaction binding the contract method 0xbebc0bfc. -// -// Solidity: function setAftermarketDeviceBeneficiary(uint256 nodeId, address beneficiary) returns() -func (_Registry *RegistrySession) SetAftermarketDeviceBeneficiary(nodeId *big.Int, beneficiary common.Address) (*types.Transaction, error) { - return _Registry.Contract.SetAftermarketDeviceBeneficiary(&_Registry.TransactOpts, nodeId, beneficiary) -} - -// SetAftermarketDeviceBeneficiary is a paid mutator transaction binding the contract method 0xbebc0bfc. -// -// Solidity: function setAftermarketDeviceBeneficiary(uint256 nodeId, address beneficiary) returns() -func (_Registry *RegistryTransactorSession) SetAftermarketDeviceBeneficiary(nodeId *big.Int, beneficiary common.Address) (*types.Transaction, error) { - return _Registry.Contract.SetAftermarketDeviceBeneficiary(&_Registry.TransactOpts, nodeId, beneficiary) -} - -// SetAftermarketDeviceIdProxyAddress is a paid mutator transaction binding the contract method 0x4d49d82a. -// -// Solidity: function setAftermarketDeviceIdProxyAddress(address addr) returns() -func (_Registry *RegistryTransactor) SetAftermarketDeviceIdProxyAddress(opts *bind.TransactOpts, addr common.Address) (*types.Transaction, error) { - return _Registry.contract.Transact(opts, "setAftermarketDeviceIdProxyAddress", addr) -} - -// SetAftermarketDeviceIdProxyAddress is a paid mutator transaction binding the contract method 0x4d49d82a. -// -// Solidity: function setAftermarketDeviceIdProxyAddress(address addr) returns() -func (_Registry *RegistrySession) SetAftermarketDeviceIdProxyAddress(addr common.Address) (*types.Transaction, error) { - return _Registry.Contract.SetAftermarketDeviceIdProxyAddress(&_Registry.TransactOpts, addr) -} - -// SetAftermarketDeviceIdProxyAddress is a paid mutator transaction binding the contract method 0x4d49d82a. -// -// Solidity: function setAftermarketDeviceIdProxyAddress(address addr) returns() -func (_Registry *RegistryTransactorSession) SetAftermarketDeviceIdProxyAddress(addr common.Address) (*types.Transaction, error) { - return _Registry.Contract.SetAftermarketDeviceIdProxyAddress(&_Registry.TransactOpts, addr) -} - -// SetAftermarketDeviceInfo is a paid mutator transaction binding the contract method 0x4d13b709. -// -// Solidity: function setAftermarketDeviceInfo(uint256 tokenId, (string,string)[] attrInfo) returns() -func (_Registry *RegistryTransactor) SetAftermarketDeviceInfo(opts *bind.TransactOpts, tokenId *big.Int, attrInfo []AttributeInfoPair) (*types.Transaction, error) { - return _Registry.contract.Transact(opts, "setAftermarketDeviceInfo", tokenId, attrInfo) -} - -// SetAftermarketDeviceInfo is a paid mutator transaction binding the contract method 0x4d13b709. -// -// Solidity: function setAftermarketDeviceInfo(uint256 tokenId, (string,string)[] attrInfo) returns() -func (_Registry *RegistrySession) SetAftermarketDeviceInfo(tokenId *big.Int, attrInfo []AttributeInfoPair) (*types.Transaction, error) { - return _Registry.Contract.SetAftermarketDeviceInfo(&_Registry.TransactOpts, tokenId, attrInfo) -} - -// SetAftermarketDeviceInfo is a paid mutator transaction binding the contract method 0x4d13b709. -// -// Solidity: function setAftermarketDeviceInfo(uint256 tokenId, (string,string)[] attrInfo) returns() -func (_Registry *RegistryTransactorSession) SetAftermarketDeviceInfo(tokenId *big.Int, attrInfo []AttributeInfoPair) (*types.Transaction, error) { - return _Registry.Contract.SetAftermarketDeviceInfo(&_Registry.TransactOpts, tokenId, attrInfo) -} - -// SetConnectionsManager is a paid mutator transaction binding the contract method 0x2fee22f4. -// -// Solidity: function setConnectionsManager(address connectionsManager) returns() -func (_Registry *RegistryTransactor) SetConnectionsManager(opts *bind.TransactOpts, connectionsManager common.Address) (*types.Transaction, error) { - return _Registry.contract.Transact(opts, "setConnectionsManager", connectionsManager) -} - -// SetConnectionsManager is a paid mutator transaction binding the contract method 0x2fee22f4. -// -// Solidity: function setConnectionsManager(address connectionsManager) returns() -func (_Registry *RegistrySession) SetConnectionsManager(connectionsManager common.Address) (*types.Transaction, error) { - return _Registry.Contract.SetConnectionsManager(&_Registry.TransactOpts, connectionsManager) -} - -// SetConnectionsManager is a paid mutator transaction binding the contract method 0x2fee22f4. -// -// Solidity: function setConnectionsManager(address connectionsManager) returns() -func (_Registry *RegistryTransactorSession) SetConnectionsManager(connectionsManager common.Address) (*types.Transaction, error) { - return _Registry.Contract.SetConnectionsManager(&_Registry.TransactOpts, connectionsManager) -} - -// SetController is a paid mutator transaction binding the contract method 0x92eefe9b. -// -// Solidity: function setController(address _controller) returns() -func (_Registry *RegistryTransactor) SetController(opts *bind.TransactOpts, _controller common.Address) (*types.Transaction, error) { - return _Registry.contract.Transact(opts, "setController", _controller) -} - -// SetController is a paid mutator transaction binding the contract method 0x92eefe9b. -// -// Solidity: function setController(address _controller) returns() -func (_Registry *RegistrySession) SetController(_controller common.Address) (*types.Transaction, error) { - return _Registry.Contract.SetController(&_Registry.TransactOpts, _controller) -} - -// SetController is a paid mutator transaction binding the contract method 0x92eefe9b. -// -// Solidity: function setController(address _controller) returns() -func (_Registry *RegistryTransactorSession) SetController(_controller common.Address) (*types.Transaction, error) { - return _Registry.Contract.SetController(&_Registry.TransactOpts, _controller) -} - -// SetDcxOperationCost is a paid mutator transaction binding the contract method 0xa2fe8c85. -// -// Solidity: function setDcxOperationCost(bytes32 operation, uint256 cost) returns() -func (_Registry *RegistryTransactor) SetDcxOperationCost(opts *bind.TransactOpts, operation [32]byte, cost *big.Int) (*types.Transaction, error) { - return _Registry.contract.Transact(opts, "setDcxOperationCost", operation, cost) -} - -// SetDcxOperationCost is a paid mutator transaction binding the contract method 0xa2fe8c85. -// -// Solidity: function setDcxOperationCost(bytes32 operation, uint256 cost) returns() -func (_Registry *RegistrySession) SetDcxOperationCost(operation [32]byte, cost *big.Int) (*types.Transaction, error) { - return _Registry.Contract.SetDcxOperationCost(&_Registry.TransactOpts, operation, cost) -} - -// SetDcxOperationCost is a paid mutator transaction binding the contract method 0xa2fe8c85. -// -// Solidity: function setDcxOperationCost(bytes32 operation, uint256 cost) returns() -func (_Registry *RegistryTransactorSession) SetDcxOperationCost(operation [32]byte, cost *big.Int) (*types.Transaction, error) { - return _Registry.Contract.SetDcxOperationCost(&_Registry.TransactOpts, operation, cost) -} - -// SetDefaultStorageNodeId is a paid mutator transaction binding the contract method 0x856f3849. -// -// Solidity: function setDefaultStorageNodeId(uint256 storageNodeId) returns() -func (_Registry *RegistryTransactor) SetDefaultStorageNodeId(opts *bind.TransactOpts, storageNodeId *big.Int) (*types.Transaction, error) { - return _Registry.contract.Transact(opts, "setDefaultStorageNodeId", storageNodeId) -} - -// SetDefaultStorageNodeId is a paid mutator transaction binding the contract method 0x856f3849. -// -// Solidity: function setDefaultStorageNodeId(uint256 storageNodeId) returns() -func (_Registry *RegistrySession) SetDefaultStorageNodeId(storageNodeId *big.Int) (*types.Transaction, error) { - return _Registry.Contract.SetDefaultStorageNodeId(&_Registry.TransactOpts, storageNodeId) -} - -// SetDefaultStorageNodeId is a paid mutator transaction binding the contract method 0x856f3849. -// -// Solidity: function setDefaultStorageNodeId(uint256 storageNodeId) returns() -func (_Registry *RegistryTransactorSession) SetDefaultStorageNodeId(storageNodeId *big.Int) (*types.Transaction, error) { - return _Registry.Contract.SetDefaultStorageNodeId(&_Registry.TransactOpts, storageNodeId) -} - -// SetDeviceDefinitionTable is a paid mutator transaction binding the contract method 0x088fafdb. -// -// Solidity: function setDeviceDefinitionTable(uint256 manufacturerId, uint256 tableId) returns() -func (_Registry *RegistryTransactor) SetDeviceDefinitionTable(opts *bind.TransactOpts, manufacturerId *big.Int, tableId *big.Int) (*types.Transaction, error) { - return _Registry.contract.Transact(opts, "setDeviceDefinitionTable", manufacturerId, tableId) -} - -// SetDeviceDefinitionTable is a paid mutator transaction binding the contract method 0x088fafdb. -// -// Solidity: function setDeviceDefinitionTable(uint256 manufacturerId, uint256 tableId) returns() -func (_Registry *RegistrySession) SetDeviceDefinitionTable(manufacturerId *big.Int, tableId *big.Int) (*types.Transaction, error) { - return _Registry.Contract.SetDeviceDefinitionTable(&_Registry.TransactOpts, manufacturerId, tableId) -} - -// SetDeviceDefinitionTable is a paid mutator transaction binding the contract method 0x088fafdb. -// -// Solidity: function setDeviceDefinitionTable(uint256 manufacturerId, uint256 tableId) returns() -func (_Registry *RegistryTransactorSession) SetDeviceDefinitionTable(manufacturerId *big.Int, tableId *big.Int) (*types.Transaction, error) { - return _Registry.Contract.SetDeviceDefinitionTable(&_Registry.TransactOpts, manufacturerId, tableId) -} - -// SetDimoBaseStreamId is a paid mutator transaction binding the contract method 0x9e594424. -// -// Solidity: function setDimoBaseStreamId(string dimoStreamrEns) returns() -func (_Registry *RegistryTransactor) SetDimoBaseStreamId(opts *bind.TransactOpts, dimoStreamrEns string) (*types.Transaction, error) { - return _Registry.contract.Transact(opts, "setDimoBaseStreamId", dimoStreamrEns) -} - -// SetDimoBaseStreamId is a paid mutator transaction binding the contract method 0x9e594424. -// -// Solidity: function setDimoBaseStreamId(string dimoStreamrEns) returns() -func (_Registry *RegistrySession) SetDimoBaseStreamId(dimoStreamrEns string) (*types.Transaction, error) { - return _Registry.Contract.SetDimoBaseStreamId(&_Registry.TransactOpts, dimoStreamrEns) -} - -// SetDimoBaseStreamId is a paid mutator transaction binding the contract method 0x9e594424. -// -// Solidity: function setDimoBaseStreamId(string dimoStreamrEns) returns() -func (_Registry *RegistryTransactorSession) SetDimoBaseStreamId(dimoStreamrEns string) (*types.Transaction, error) { - return _Registry.Contract.SetDimoBaseStreamId(&_Registry.TransactOpts, dimoStreamrEns) -} - -// SetDimoCredit is a paid mutator transaction binding the contract method 0x4fa9ff16. -// -// Solidity: function setDimoCredit(address dimoCredit) returns() -func (_Registry *RegistryTransactor) SetDimoCredit(opts *bind.TransactOpts, dimoCredit common.Address) (*types.Transaction, error) { - return _Registry.contract.Transact(opts, "setDimoCredit", dimoCredit) -} - -// SetDimoCredit is a paid mutator transaction binding the contract method 0x4fa9ff16. -// -// Solidity: function setDimoCredit(address dimoCredit) returns() -func (_Registry *RegistrySession) SetDimoCredit(dimoCredit common.Address) (*types.Transaction, error) { - return _Registry.Contract.SetDimoCredit(&_Registry.TransactOpts, dimoCredit) -} - -// SetDimoCredit is a paid mutator transaction binding the contract method 0x4fa9ff16. -// -// Solidity: function setDimoCredit(address dimoCredit) returns() -func (_Registry *RegistryTransactorSession) SetDimoCredit(dimoCredit common.Address) (*types.Transaction, error) { - return _Registry.Contract.SetDimoCredit(&_Registry.TransactOpts, dimoCredit) -} - -// SetDimoStreamrNode is a paid mutator transaction binding the contract method 0x5f450e29. -// -// Solidity: function setDimoStreamrNode(address dimoStreamrNode) returns() -func (_Registry *RegistryTransactor) SetDimoStreamrNode(opts *bind.TransactOpts, dimoStreamrNode common.Address) (*types.Transaction, error) { - return _Registry.contract.Transact(opts, "setDimoStreamrNode", dimoStreamrNode) -} - -// SetDimoStreamrNode is a paid mutator transaction binding the contract method 0x5f450e29. -// -// Solidity: function setDimoStreamrNode(address dimoStreamrNode) returns() -func (_Registry *RegistrySession) SetDimoStreamrNode(dimoStreamrNode common.Address) (*types.Transaction, error) { - return _Registry.Contract.SetDimoStreamrNode(&_Registry.TransactOpts, dimoStreamrNode) -} - -// SetDimoStreamrNode is a paid mutator transaction binding the contract method 0x5f450e29. -// -// Solidity: function setDimoStreamrNode(address dimoStreamrNode) returns() -func (_Registry *RegistryTransactorSession) SetDimoStreamrNode(dimoStreamrNode common.Address) (*types.Transaction, error) { - return _Registry.Contract.SetDimoStreamrNode(&_Registry.TransactOpts, dimoStreamrNode) -} - -// SetDimoToken is a paid mutator transaction binding the contract method 0x5b6c1979. -// -// Solidity: function setDimoToken(address dimoToken) returns() -func (_Registry *RegistryTransactor) SetDimoToken(opts *bind.TransactOpts, dimoToken common.Address) (*types.Transaction, error) { - return _Registry.contract.Transact(opts, "setDimoToken", dimoToken) -} - -// SetDimoToken is a paid mutator transaction binding the contract method 0x5b6c1979. -// -// Solidity: function setDimoToken(address dimoToken) returns() -func (_Registry *RegistrySession) SetDimoToken(dimoToken common.Address) (*types.Transaction, error) { - return _Registry.Contract.SetDimoToken(&_Registry.TransactOpts, dimoToken) -} - -// SetDimoToken is a paid mutator transaction binding the contract method 0x5b6c1979. -// -// Solidity: function setDimoToken(address dimoToken) returns() -func (_Registry *RegistryTransactorSession) SetDimoToken(dimoToken common.Address) (*types.Transaction, error) { - return _Registry.Contract.SetDimoToken(&_Registry.TransactOpts, dimoToken) -} - -// SetFoundation is a paid mutator transaction binding the contract method 0xdb3543f5. -// -// Solidity: function setFoundation(address foundation) returns() -func (_Registry *RegistryTransactor) SetFoundation(opts *bind.TransactOpts, foundation common.Address) (*types.Transaction, error) { - return _Registry.contract.Transact(opts, "setFoundation", foundation) -} - -// SetFoundation is a paid mutator transaction binding the contract method 0xdb3543f5. -// -// Solidity: function setFoundation(address foundation) returns() -func (_Registry *RegistrySession) SetFoundation(foundation common.Address) (*types.Transaction, error) { - return _Registry.Contract.SetFoundation(&_Registry.TransactOpts, foundation) -} - -// SetFoundation is a paid mutator transaction binding the contract method 0xdb3543f5. -// -// Solidity: function setFoundation(address foundation) returns() -func (_Registry *RegistryTransactorSession) SetFoundation(foundation common.Address) (*types.Transaction, error) { - return _Registry.Contract.SetFoundation(&_Registry.TransactOpts, foundation) -} - -// SetManufacturerIdProxyAddress is a paid mutator transaction binding the contract method 0xd159f49a. -// -// Solidity: function setManufacturerIdProxyAddress(address addr) returns() -func (_Registry *RegistryTransactor) SetManufacturerIdProxyAddress(opts *bind.TransactOpts, addr common.Address) (*types.Transaction, error) { - return _Registry.contract.Transact(opts, "setManufacturerIdProxyAddress", addr) -} - -// SetManufacturerIdProxyAddress is a paid mutator transaction binding the contract method 0xd159f49a. -// -// Solidity: function setManufacturerIdProxyAddress(address addr) returns() -func (_Registry *RegistrySession) SetManufacturerIdProxyAddress(addr common.Address) (*types.Transaction, error) { - return _Registry.Contract.SetManufacturerIdProxyAddress(&_Registry.TransactOpts, addr) -} - -// SetManufacturerIdProxyAddress is a paid mutator transaction binding the contract method 0xd159f49a. -// -// Solidity: function setManufacturerIdProxyAddress(address addr) returns() -func (_Registry *RegistryTransactorSession) SetManufacturerIdProxyAddress(addr common.Address) (*types.Transaction, error) { - return _Registry.Contract.SetManufacturerIdProxyAddress(&_Registry.TransactOpts, addr) -} - -// SetManufacturerInfo is a paid mutator transaction binding the contract method 0x63545ffa. -// -// Solidity: function setManufacturerInfo(uint256 tokenId, (string,string)[] attrInfoList) returns() -func (_Registry *RegistryTransactor) SetManufacturerInfo(opts *bind.TransactOpts, tokenId *big.Int, attrInfoList []AttributeInfoPair) (*types.Transaction, error) { - return _Registry.contract.Transact(opts, "setManufacturerInfo", tokenId, attrInfoList) -} - -// SetManufacturerInfo is a paid mutator transaction binding the contract method 0x63545ffa. -// -// Solidity: function setManufacturerInfo(uint256 tokenId, (string,string)[] attrInfoList) returns() -func (_Registry *RegistrySession) SetManufacturerInfo(tokenId *big.Int, attrInfoList []AttributeInfoPair) (*types.Transaction, error) { - return _Registry.Contract.SetManufacturerInfo(&_Registry.TransactOpts, tokenId, attrInfoList) -} - -// SetManufacturerInfo is a paid mutator transaction binding the contract method 0x63545ffa. -// -// Solidity: function setManufacturerInfo(uint256 tokenId, (string,string)[] attrInfoList) returns() -func (_Registry *RegistryTransactorSession) SetManufacturerInfo(tokenId *big.Int, attrInfoList []AttributeInfoPair) (*types.Transaction, error) { - return _Registry.Contract.SetManufacturerInfo(&_Registry.TransactOpts, tokenId, attrInfoList) -} - -// SetManufacturerLicense is a paid mutator transaction binding the contract method 0xea9ae2f5. -// -// Solidity: function setManufacturerLicense(address manufacturerLicense) returns() -func (_Registry *RegistryTransactor) SetManufacturerLicense(opts *bind.TransactOpts, manufacturerLicense common.Address) (*types.Transaction, error) { - return _Registry.contract.Transact(opts, "setManufacturerLicense", manufacturerLicense) -} - -// SetManufacturerLicense is a paid mutator transaction binding the contract method 0xea9ae2f5. -// -// Solidity: function setManufacturerLicense(address manufacturerLicense) returns() -func (_Registry *RegistrySession) SetManufacturerLicense(manufacturerLicense common.Address) (*types.Transaction, error) { - return _Registry.Contract.SetManufacturerLicense(&_Registry.TransactOpts, manufacturerLicense) -} - -// SetManufacturerLicense is a paid mutator transaction binding the contract method 0xea9ae2f5. -// -// Solidity: function setManufacturerLicense(address manufacturerLicense) returns() -func (_Registry *RegistryTransactorSession) SetManufacturerLicense(manufacturerLicense common.Address) (*types.Transaction, error) { - return _Registry.Contract.SetManufacturerLicense(&_Registry.TransactOpts, manufacturerLicense) -} - -// SetSacd is a paid mutator transaction binding the contract method 0xc63f7dd2. -// -// Solidity: function setSacd(address sacd) returns() -func (_Registry *RegistryTransactor) SetSacd(opts *bind.TransactOpts, sacd common.Address) (*types.Transaction, error) { - return _Registry.contract.Transact(opts, "setSacd", sacd) -} - -// SetSacd is a paid mutator transaction binding the contract method 0xc63f7dd2. -// -// Solidity: function setSacd(address sacd) returns() -func (_Registry *RegistrySession) SetSacd(sacd common.Address) (*types.Transaction, error) { - return _Registry.Contract.SetSacd(&_Registry.TransactOpts, sacd) -} - -// SetSacd is a paid mutator transaction binding the contract method 0xc63f7dd2. -// -// Solidity: function setSacd(address sacd) returns() -func (_Registry *RegistryTransactorSession) SetSacd(sacd common.Address) (*types.Transaction, error) { - return _Registry.Contract.SetSacd(&_Registry.TransactOpts, sacd) -} - -// SetStorageNode is a paid mutator transaction binding the contract method 0x6ee4a611. -// -// Solidity: function setStorageNode(address storageNode) returns() -func (_Registry *RegistryTransactor) SetStorageNode(opts *bind.TransactOpts, storageNode common.Address) (*types.Transaction, error) { - return _Registry.contract.Transact(opts, "setStorageNode", storageNode) -} - -// SetStorageNode is a paid mutator transaction binding the contract method 0x6ee4a611. -// -// Solidity: function setStorageNode(address storageNode) returns() -func (_Registry *RegistrySession) SetStorageNode(storageNode common.Address) (*types.Transaction, error) { - return _Registry.Contract.SetStorageNode(&_Registry.TransactOpts, storageNode) -} - -// SetStorageNode is a paid mutator transaction binding the contract method 0x6ee4a611. -// -// Solidity: function setStorageNode(address storageNode) returns() -func (_Registry *RegistryTransactorSession) SetStorageNode(storageNode common.Address) (*types.Transaction, error) { - return _Registry.Contract.SetStorageNode(&_Registry.TransactOpts, storageNode) -} - -// SetStorageNodeIdForVehicle is a paid mutator transaction binding the contract method 0xae3ed8dd. -// -// Solidity: function setStorageNodeIdForVehicle(uint256 vehicleId, uint256 storageNodeId) returns() -func (_Registry *RegistryTransactor) SetStorageNodeIdForVehicle(opts *bind.TransactOpts, vehicleId *big.Int, storageNodeId *big.Int) (*types.Transaction, error) { - return _Registry.contract.Transact(opts, "setStorageNodeIdForVehicle", vehicleId, storageNodeId) -} - -// SetStorageNodeIdForVehicle is a paid mutator transaction binding the contract method 0xae3ed8dd. -// -// Solidity: function setStorageNodeIdForVehicle(uint256 vehicleId, uint256 storageNodeId) returns() -func (_Registry *RegistrySession) SetStorageNodeIdForVehicle(vehicleId *big.Int, storageNodeId *big.Int) (*types.Transaction, error) { - return _Registry.Contract.SetStorageNodeIdForVehicle(&_Registry.TransactOpts, vehicleId, storageNodeId) -} - -// SetStorageNodeIdForVehicle is a paid mutator transaction binding the contract method 0xae3ed8dd. -// -// Solidity: function setStorageNodeIdForVehicle(uint256 vehicleId, uint256 storageNodeId) returns() -func (_Registry *RegistryTransactorSession) SetStorageNodeIdForVehicle(vehicleId *big.Int, storageNodeId *big.Int) (*types.Transaction, error) { - return _Registry.Contract.SetStorageNodeIdForVehicle(&_Registry.TransactOpts, vehicleId, storageNodeId) -} - -// SetStreamRegistry is a paid mutator transaction binding the contract method 0x0c3cac3b. -// -// Solidity: function setStreamRegistry(address streamRegistry) returns() -func (_Registry *RegistryTransactor) SetStreamRegistry(opts *bind.TransactOpts, streamRegistry common.Address) (*types.Transaction, error) { - return _Registry.contract.Transact(opts, "setStreamRegistry", streamRegistry) -} - -// SetStreamRegistry is a paid mutator transaction binding the contract method 0x0c3cac3b. -// -// Solidity: function setStreamRegistry(address streamRegistry) returns() -func (_Registry *RegistrySession) SetStreamRegistry(streamRegistry common.Address) (*types.Transaction, error) { - return _Registry.Contract.SetStreamRegistry(&_Registry.TransactOpts, streamRegistry) -} - -// SetStreamRegistry is a paid mutator transaction binding the contract method 0x0c3cac3b. -// -// Solidity: function setStreamRegistry(address streamRegistry) returns() -func (_Registry *RegistryTransactorSession) SetStreamRegistry(streamRegistry common.Address) (*types.Transaction, error) { - return _Registry.Contract.SetStreamRegistry(&_Registry.TransactOpts, streamRegistry) -} - -// SetSubscriptionToVehicleStream is a paid mutator transaction binding the contract method 0xbb44bb75. -// -// Solidity: function setSubscriptionToVehicleStream(uint256 vehicleId, address subscriber, uint256 expirationTime) returns() -func (_Registry *RegistryTransactor) SetSubscriptionToVehicleStream(opts *bind.TransactOpts, vehicleId *big.Int, subscriber common.Address, expirationTime *big.Int) (*types.Transaction, error) { - return _Registry.contract.Transact(opts, "setSubscriptionToVehicleStream", vehicleId, subscriber, expirationTime) -} - -// SetSubscriptionToVehicleStream is a paid mutator transaction binding the contract method 0xbb44bb75. -// -// Solidity: function setSubscriptionToVehicleStream(uint256 vehicleId, address subscriber, uint256 expirationTime) returns() -func (_Registry *RegistrySession) SetSubscriptionToVehicleStream(vehicleId *big.Int, subscriber common.Address, expirationTime *big.Int) (*types.Transaction, error) { - return _Registry.Contract.SetSubscriptionToVehicleStream(&_Registry.TransactOpts, vehicleId, subscriber, expirationTime) -} - -// SetSubscriptionToVehicleStream is a paid mutator transaction binding the contract method 0xbb44bb75. -// -// Solidity: function setSubscriptionToVehicleStream(uint256 vehicleId, address subscriber, uint256 expirationTime) returns() -func (_Registry *RegistryTransactorSession) SetSubscriptionToVehicleStream(vehicleId *big.Int, subscriber common.Address, expirationTime *big.Int) (*types.Transaction, error) { - return _Registry.Contract.SetSubscriptionToVehicleStream(&_Registry.TransactOpts, vehicleId, subscriber, expirationTime) -} - -// SetSyntheticDeviceIdProxyAddress is a paid mutator transaction binding the contract method 0xecf452d7. -// -// Solidity: function setSyntheticDeviceIdProxyAddress(address addr) returns() -func (_Registry *RegistryTransactor) SetSyntheticDeviceIdProxyAddress(opts *bind.TransactOpts, addr common.Address) (*types.Transaction, error) { - return _Registry.contract.Transact(opts, "setSyntheticDeviceIdProxyAddress", addr) -} - -// SetSyntheticDeviceIdProxyAddress is a paid mutator transaction binding the contract method 0xecf452d7. -// -// Solidity: function setSyntheticDeviceIdProxyAddress(address addr) returns() -func (_Registry *RegistrySession) SetSyntheticDeviceIdProxyAddress(addr common.Address) (*types.Transaction, error) { - return _Registry.Contract.SetSyntheticDeviceIdProxyAddress(&_Registry.TransactOpts, addr) -} - -// SetSyntheticDeviceIdProxyAddress is a paid mutator transaction binding the contract method 0xecf452d7. -// -// Solidity: function setSyntheticDeviceIdProxyAddress(address addr) returns() -func (_Registry *RegistryTransactorSession) SetSyntheticDeviceIdProxyAddress(addr common.Address) (*types.Transaction, error) { - return _Registry.Contract.SetSyntheticDeviceIdProxyAddress(&_Registry.TransactOpts, addr) -} - -// SetSyntheticDeviceInfo is a paid mutator transaction binding the contract method 0x80430e0d. -// -// Solidity: function setSyntheticDeviceInfo(uint256 tokenId, (string,string)[] attrInfo) returns() -func (_Registry *RegistryTransactor) SetSyntheticDeviceInfo(opts *bind.TransactOpts, tokenId *big.Int, attrInfo []AttributeInfoPair) (*types.Transaction, error) { - return _Registry.contract.Transact(opts, "setSyntheticDeviceInfo", tokenId, attrInfo) -} - -// SetSyntheticDeviceInfo is a paid mutator transaction binding the contract method 0x80430e0d. -// -// Solidity: function setSyntheticDeviceInfo(uint256 tokenId, (string,string)[] attrInfo) returns() -func (_Registry *RegistrySession) SetSyntheticDeviceInfo(tokenId *big.Int, attrInfo []AttributeInfoPair) (*types.Transaction, error) { - return _Registry.Contract.SetSyntheticDeviceInfo(&_Registry.TransactOpts, tokenId, attrInfo) -} - -// SetSyntheticDeviceInfo is a paid mutator transaction binding the contract method 0x80430e0d. -// -// Solidity: function setSyntheticDeviceInfo(uint256 tokenId, (string,string)[] attrInfo) returns() -func (_Registry *RegistryTransactorSession) SetSyntheticDeviceInfo(tokenId *big.Int, attrInfo []AttributeInfoPair) (*types.Transaction, error) { - return _Registry.Contract.SetSyntheticDeviceInfo(&_Registry.TransactOpts, tokenId, attrInfo) -} - -// SetVehicleIdProxyAddress is a paid mutator transaction binding the contract method 0x9bfae6da. -// -// Solidity: function setVehicleIdProxyAddress(address addr) returns() -func (_Registry *RegistryTransactor) SetVehicleIdProxyAddress(opts *bind.TransactOpts, addr common.Address) (*types.Transaction, error) { - return _Registry.contract.Transact(opts, "setVehicleIdProxyAddress", addr) -} - -// SetVehicleIdProxyAddress is a paid mutator transaction binding the contract method 0x9bfae6da. -// -// Solidity: function setVehicleIdProxyAddress(address addr) returns() -func (_Registry *RegistrySession) SetVehicleIdProxyAddress(addr common.Address) (*types.Transaction, error) { - return _Registry.Contract.SetVehicleIdProxyAddress(&_Registry.TransactOpts, addr) -} - -// SetVehicleIdProxyAddress is a paid mutator transaction binding the contract method 0x9bfae6da. -// -// Solidity: function setVehicleIdProxyAddress(address addr) returns() -func (_Registry *RegistryTransactorSession) SetVehicleIdProxyAddress(addr common.Address) (*types.Transaction, error) { - return _Registry.Contract.SetVehicleIdProxyAddress(&_Registry.TransactOpts, addr) -} - -// SetVehicleInfo is a paid mutator transaction binding the contract method 0xd9c3ae61. -// -// Solidity: function setVehicleInfo(uint256 tokenId, (string,string)[] attrInfo) returns() -func (_Registry *RegistryTransactor) SetVehicleInfo(opts *bind.TransactOpts, tokenId *big.Int, attrInfo []AttributeInfoPair) (*types.Transaction, error) { - return _Registry.contract.Transact(opts, "setVehicleInfo", tokenId, attrInfo) -} - -// SetVehicleInfo is a paid mutator transaction binding the contract method 0xd9c3ae61. -// -// Solidity: function setVehicleInfo(uint256 tokenId, (string,string)[] attrInfo) returns() -func (_Registry *RegistrySession) SetVehicleInfo(tokenId *big.Int, attrInfo []AttributeInfoPair) (*types.Transaction, error) { - return _Registry.Contract.SetVehicleInfo(&_Registry.TransactOpts, tokenId, attrInfo) -} - -// SetVehicleInfo is a paid mutator transaction binding the contract method 0xd9c3ae61. -// -// Solidity: function setVehicleInfo(uint256 tokenId, (string,string)[] attrInfo) returns() -func (_Registry *RegistryTransactorSession) SetVehicleInfo(tokenId *big.Int, attrInfo []AttributeInfoPair) (*types.Transaction, error) { - return _Registry.Contract.SetVehicleInfo(&_Registry.TransactOpts, tokenId, attrInfo) -} - -// SetVehicleStream is a paid mutator transaction binding the contract method 0x6f58f093. -// -// Solidity: function setVehicleStream(uint256 vehicleId, string streamId) returns() -func (_Registry *RegistryTransactor) SetVehicleStream(opts *bind.TransactOpts, vehicleId *big.Int, streamId string) (*types.Transaction, error) { - return _Registry.contract.Transact(opts, "setVehicleStream", vehicleId, streamId) -} - -// SetVehicleStream is a paid mutator transaction binding the contract method 0x6f58f093. -// -// Solidity: function setVehicleStream(uint256 vehicleId, string streamId) returns() -func (_Registry *RegistrySession) SetVehicleStream(vehicleId *big.Int, streamId string) (*types.Transaction, error) { - return _Registry.Contract.SetVehicleStream(&_Registry.TransactOpts, vehicleId, streamId) -} - -// SetVehicleStream is a paid mutator transaction binding the contract method 0x6f58f093. -// -// Solidity: function setVehicleStream(uint256 vehicleId, string streamId) returns() -func (_Registry *RegistryTransactorSession) SetVehicleStream(vehicleId *big.Int, streamId string) (*types.Transaction, error) { - return _Registry.Contract.SetVehicleStream(&_Registry.TransactOpts, vehicleId, streamId) -} - -// SubscribeToVehicleStream is a paid mutator transaction binding the contract method 0x37479f7e. -// -// Solidity: function subscribeToVehicleStream(uint256 vehicleId, uint256 expirationTime) returns() -func (_Registry *RegistryTransactor) SubscribeToVehicleStream(opts *bind.TransactOpts, vehicleId *big.Int, expirationTime *big.Int) (*types.Transaction, error) { - return _Registry.contract.Transact(opts, "subscribeToVehicleStream", vehicleId, expirationTime) -} - -// SubscribeToVehicleStream is a paid mutator transaction binding the contract method 0x37479f7e. -// -// Solidity: function subscribeToVehicleStream(uint256 vehicleId, uint256 expirationTime) returns() -func (_Registry *RegistrySession) SubscribeToVehicleStream(vehicleId *big.Int, expirationTime *big.Int) (*types.Transaction, error) { - return _Registry.Contract.SubscribeToVehicleStream(&_Registry.TransactOpts, vehicleId, expirationTime) -} - -// SubscribeToVehicleStream is a paid mutator transaction binding the contract method 0x37479f7e. -// -// Solidity: function subscribeToVehicleStream(uint256 vehicleId, uint256 expirationTime) returns() -func (_Registry *RegistryTransactorSession) SubscribeToVehicleStream(vehicleId *big.Int, expirationTime *big.Int) (*types.Transaction, error) { - return _Registry.Contract.SubscribeToVehicleStream(&_Registry.TransactOpts, vehicleId, expirationTime) -} - -// TransferAftermarketDeviceOwnership is a paid mutator transaction binding the contract method 0xff96b761. -// -// Solidity: function transferAftermarketDeviceOwnership(uint256 aftermarketDeviceNode, address newOwner) returns() -func (_Registry *RegistryTransactor) TransferAftermarketDeviceOwnership(opts *bind.TransactOpts, aftermarketDeviceNode *big.Int, newOwner common.Address) (*types.Transaction, error) { - return _Registry.contract.Transact(opts, "transferAftermarketDeviceOwnership", aftermarketDeviceNode, newOwner) -} - -// TransferAftermarketDeviceOwnership is a paid mutator transaction binding the contract method 0xff96b761. -// -// Solidity: function transferAftermarketDeviceOwnership(uint256 aftermarketDeviceNode, address newOwner) returns() -func (_Registry *RegistrySession) TransferAftermarketDeviceOwnership(aftermarketDeviceNode *big.Int, newOwner common.Address) (*types.Transaction, error) { - return _Registry.Contract.TransferAftermarketDeviceOwnership(&_Registry.TransactOpts, aftermarketDeviceNode, newOwner) -} - -// TransferAftermarketDeviceOwnership is a paid mutator transaction binding the contract method 0xff96b761. -// -// Solidity: function transferAftermarketDeviceOwnership(uint256 aftermarketDeviceNode, address newOwner) returns() -func (_Registry *RegistryTransactorSession) TransferAftermarketDeviceOwnership(aftermarketDeviceNode *big.Int, newOwner common.Address) (*types.Transaction, error) { - return _Registry.Contract.TransferAftermarketDeviceOwnership(&_Registry.TransactOpts, aftermarketDeviceNode, newOwner) -} - -// UnclaimAftermarketDeviceNode is a paid mutator transaction binding the contract method 0x5c129493. -// -// Solidity: function unclaimAftermarketDeviceNode(uint256[] aftermarketDeviceNodes) returns() -func (_Registry *RegistryTransactor) UnclaimAftermarketDeviceNode(opts *bind.TransactOpts, aftermarketDeviceNodes []*big.Int) (*types.Transaction, error) { - return _Registry.contract.Transact(opts, "unclaimAftermarketDeviceNode", aftermarketDeviceNodes) -} - -// UnclaimAftermarketDeviceNode is a paid mutator transaction binding the contract method 0x5c129493. -// -// Solidity: function unclaimAftermarketDeviceNode(uint256[] aftermarketDeviceNodes) returns() -func (_Registry *RegistrySession) UnclaimAftermarketDeviceNode(aftermarketDeviceNodes []*big.Int) (*types.Transaction, error) { - return _Registry.Contract.UnclaimAftermarketDeviceNode(&_Registry.TransactOpts, aftermarketDeviceNodes) -} - -// UnclaimAftermarketDeviceNode is a paid mutator transaction binding the contract method 0x5c129493. -// -// Solidity: function unclaimAftermarketDeviceNode(uint256[] aftermarketDeviceNodes) returns() -func (_Registry *RegistryTransactorSession) UnclaimAftermarketDeviceNode(aftermarketDeviceNodes []*big.Int) (*types.Transaction, error) { - return _Registry.Contract.UnclaimAftermarketDeviceNode(&_Registry.TransactOpts, aftermarketDeviceNodes) -} - -// UnpairAftermarketDevice is a paid mutator transaction binding the contract method 0xee4d9596. -// -// Solidity: function unpairAftermarketDevice(uint256 aftermarketDeviceNode, uint256 vehicleNode) returns() -func (_Registry *RegistryTransactor) UnpairAftermarketDevice(opts *bind.TransactOpts, aftermarketDeviceNode *big.Int, vehicleNode *big.Int) (*types.Transaction, error) { - return _Registry.contract.Transact(opts, "unpairAftermarketDevice", aftermarketDeviceNode, vehicleNode) -} - -// UnpairAftermarketDevice is a paid mutator transaction binding the contract method 0xee4d9596. -// -// Solidity: function unpairAftermarketDevice(uint256 aftermarketDeviceNode, uint256 vehicleNode) returns() -func (_Registry *RegistrySession) UnpairAftermarketDevice(aftermarketDeviceNode *big.Int, vehicleNode *big.Int) (*types.Transaction, error) { - return _Registry.Contract.UnpairAftermarketDevice(&_Registry.TransactOpts, aftermarketDeviceNode, vehicleNode) -} - -// UnpairAftermarketDevice is a paid mutator transaction binding the contract method 0xee4d9596. -// -// Solidity: function unpairAftermarketDevice(uint256 aftermarketDeviceNode, uint256 vehicleNode) returns() -func (_Registry *RegistryTransactorSession) UnpairAftermarketDevice(aftermarketDeviceNode *big.Int, vehicleNode *big.Int) (*types.Transaction, error) { - return _Registry.Contract.UnpairAftermarketDevice(&_Registry.TransactOpts, aftermarketDeviceNode, vehicleNode) -} - -// UnpairAftermarketDeviceByDeviceNode is a paid mutator transaction binding the contract method 0x71193956. -// -// Solidity: function unpairAftermarketDeviceByDeviceNode(uint256[] aftermarketDeviceNodes) returns() -func (_Registry *RegistryTransactor) UnpairAftermarketDeviceByDeviceNode(opts *bind.TransactOpts, aftermarketDeviceNodes []*big.Int) (*types.Transaction, error) { - return _Registry.contract.Transact(opts, "unpairAftermarketDeviceByDeviceNode", aftermarketDeviceNodes) -} - -// UnpairAftermarketDeviceByDeviceNode is a paid mutator transaction binding the contract method 0x71193956. -// -// Solidity: function unpairAftermarketDeviceByDeviceNode(uint256[] aftermarketDeviceNodes) returns() -func (_Registry *RegistrySession) UnpairAftermarketDeviceByDeviceNode(aftermarketDeviceNodes []*big.Int) (*types.Transaction, error) { - return _Registry.Contract.UnpairAftermarketDeviceByDeviceNode(&_Registry.TransactOpts, aftermarketDeviceNodes) -} - -// UnpairAftermarketDeviceByDeviceNode is a paid mutator transaction binding the contract method 0x71193956. -// -// Solidity: function unpairAftermarketDeviceByDeviceNode(uint256[] aftermarketDeviceNodes) returns() -func (_Registry *RegistryTransactorSession) UnpairAftermarketDeviceByDeviceNode(aftermarketDeviceNodes []*big.Int) (*types.Transaction, error) { - return _Registry.Contract.UnpairAftermarketDeviceByDeviceNode(&_Registry.TransactOpts, aftermarketDeviceNodes) -} - -// UnpairAftermarketDeviceByVehicleNode is a paid mutator transaction binding the contract method 0x8c2ee9bb. -// -// Solidity: function unpairAftermarketDeviceByVehicleNode(uint256[] vehicleNodes) returns() -func (_Registry *RegistryTransactor) UnpairAftermarketDeviceByVehicleNode(opts *bind.TransactOpts, vehicleNodes []*big.Int) (*types.Transaction, error) { - return _Registry.contract.Transact(opts, "unpairAftermarketDeviceByVehicleNode", vehicleNodes) -} - -// UnpairAftermarketDeviceByVehicleNode is a paid mutator transaction binding the contract method 0x8c2ee9bb. -// -// Solidity: function unpairAftermarketDeviceByVehicleNode(uint256[] vehicleNodes) returns() -func (_Registry *RegistrySession) UnpairAftermarketDeviceByVehicleNode(vehicleNodes []*big.Int) (*types.Transaction, error) { - return _Registry.Contract.UnpairAftermarketDeviceByVehicleNode(&_Registry.TransactOpts, vehicleNodes) -} - -// UnpairAftermarketDeviceByVehicleNode is a paid mutator transaction binding the contract method 0x8c2ee9bb. -// -// Solidity: function unpairAftermarketDeviceByVehicleNode(uint256[] vehicleNodes) returns() -func (_Registry *RegistryTransactorSession) UnpairAftermarketDeviceByVehicleNode(vehicleNodes []*big.Int) (*types.Transaction, error) { - return _Registry.Contract.UnpairAftermarketDeviceByVehicleNode(&_Registry.TransactOpts, vehicleNodes) -} - -// UnpairAftermarketDeviceSign is a paid mutator transaction binding the contract method 0x3f65997a. -// -// Solidity: function unpairAftermarketDeviceSign(uint256 aftermarketDeviceNode, uint256 vehicleNode, bytes signature) returns() -func (_Registry *RegistryTransactor) UnpairAftermarketDeviceSign(opts *bind.TransactOpts, aftermarketDeviceNode *big.Int, vehicleNode *big.Int, signature []byte) (*types.Transaction, error) { - return _Registry.contract.Transact(opts, "unpairAftermarketDeviceSign", aftermarketDeviceNode, vehicleNode, signature) -} - -// UnpairAftermarketDeviceSign is a paid mutator transaction binding the contract method 0x3f65997a. -// -// Solidity: function unpairAftermarketDeviceSign(uint256 aftermarketDeviceNode, uint256 vehicleNode, bytes signature) returns() -func (_Registry *RegistrySession) UnpairAftermarketDeviceSign(aftermarketDeviceNode *big.Int, vehicleNode *big.Int, signature []byte) (*types.Transaction, error) { - return _Registry.Contract.UnpairAftermarketDeviceSign(&_Registry.TransactOpts, aftermarketDeviceNode, vehicleNode, signature) -} - -// UnpairAftermarketDeviceSign is a paid mutator transaction binding the contract method 0x3f65997a. -// -// Solidity: function unpairAftermarketDeviceSign(uint256 aftermarketDeviceNode, uint256 vehicleNode, bytes signature) returns() -func (_Registry *RegistryTransactorSession) UnpairAftermarketDeviceSign(aftermarketDeviceNode *big.Int, vehicleNode *big.Int, signature []byte) (*types.Transaction, error) { - return _Registry.Contract.UnpairAftermarketDeviceSign(&_Registry.TransactOpts, aftermarketDeviceNode, vehicleNode, signature) -} - -// UnsetVehicleStream is a paid mutator transaction binding the contract method 0xcd90df7e. -// -// Solidity: function unsetVehicleStream(uint256 vehicleId) returns() -func (_Registry *RegistryTransactor) UnsetVehicleStream(opts *bind.TransactOpts, vehicleId *big.Int) (*types.Transaction, error) { - return _Registry.contract.Transact(opts, "unsetVehicleStream", vehicleId) -} - -// UnsetVehicleStream is a paid mutator transaction binding the contract method 0xcd90df7e. -// -// Solidity: function unsetVehicleStream(uint256 vehicleId) returns() -func (_Registry *RegistrySession) UnsetVehicleStream(vehicleId *big.Int) (*types.Transaction, error) { - return _Registry.Contract.UnsetVehicleStream(&_Registry.TransactOpts, vehicleId) -} - -// UnsetVehicleStream is a paid mutator transaction binding the contract method 0xcd90df7e. -// -// Solidity: function unsetVehicleStream(uint256 vehicleId) returns() -func (_Registry *RegistryTransactorSession) UnsetVehicleStream(vehicleId *big.Int) (*types.Transaction, error) { - return _Registry.Contract.UnsetVehicleStream(&_Registry.TransactOpts, vehicleId) -} - -// UpdateDeviceDefinition is a paid mutator transaction binding the contract method 0x182fef60. -// -// Solidity: function updateDeviceDefinition(uint256 manufacturerId, (string,string,string,string,string) data) returns() -func (_Registry *RegistryTransactor) UpdateDeviceDefinition(opts *bind.TransactOpts, manufacturerId *big.Int, data DeviceDefinitionUpdateInput) (*types.Transaction, error) { - return _Registry.contract.Transact(opts, "updateDeviceDefinition", manufacturerId, data) -} - -// UpdateDeviceDefinition is a paid mutator transaction binding the contract method 0x182fef60. -// -// Solidity: function updateDeviceDefinition(uint256 manufacturerId, (string,string,string,string,string) data) returns() -func (_Registry *RegistrySession) UpdateDeviceDefinition(manufacturerId *big.Int, data DeviceDefinitionUpdateInput) (*types.Transaction, error) { - return _Registry.Contract.UpdateDeviceDefinition(&_Registry.TransactOpts, manufacturerId, data) -} - -// UpdateDeviceDefinition is a paid mutator transaction binding the contract method 0x182fef60. -// -// Solidity: function updateDeviceDefinition(uint256 manufacturerId, (string,string,string,string,string) data) returns() -func (_Registry *RegistryTransactorSession) UpdateDeviceDefinition(manufacturerId *big.Int, data DeviceDefinitionUpdateInput) (*types.Transaction, error) { - return _Registry.Contract.UpdateDeviceDefinition(&_Registry.TransactOpts, manufacturerId, data) -} - -// UpdateManufacturerMinted is a paid mutator transaction binding the contract method 0x20d60248. -// -// Solidity: function updateManufacturerMinted(address from, address to) returns() -func (_Registry *RegistryTransactor) UpdateManufacturerMinted(opts *bind.TransactOpts, from common.Address, to common.Address) (*types.Transaction, error) { - return _Registry.contract.Transact(opts, "updateManufacturerMinted", from, to) -} - -// UpdateManufacturerMinted is a paid mutator transaction binding the contract method 0x20d60248. -// -// Solidity: function updateManufacturerMinted(address from, address to) returns() -func (_Registry *RegistrySession) UpdateManufacturerMinted(from common.Address, to common.Address) (*types.Transaction, error) { - return _Registry.Contract.UpdateManufacturerMinted(&_Registry.TransactOpts, from, to) -} - -// UpdateManufacturerMinted is a paid mutator transaction binding the contract method 0x20d60248. -// -// Solidity: function updateManufacturerMinted(address from, address to) returns() -func (_Registry *RegistryTransactorSession) UpdateManufacturerMinted(from common.Address, to common.Address) (*types.Transaction, error) { - return _Registry.Contract.UpdateManufacturerMinted(&_Registry.TransactOpts, from, to) -} - -// UpdateModule is a paid mutator transaction binding the contract method 0x06d1d2a1. -// -// Solidity: function updateModule(address oldImplementation, address newImplementation, bytes4[] oldSelectors, bytes4[] newSelectors) returns() -func (_Registry *RegistryTransactor) UpdateModule(opts *bind.TransactOpts, oldImplementation common.Address, newImplementation common.Address, oldSelectors [][4]byte, newSelectors [][4]byte) (*types.Transaction, error) { - return _Registry.contract.Transact(opts, "updateModule", oldImplementation, newImplementation, oldSelectors, newSelectors) -} - -// UpdateModule is a paid mutator transaction binding the contract method 0x06d1d2a1. -// -// Solidity: function updateModule(address oldImplementation, address newImplementation, bytes4[] oldSelectors, bytes4[] newSelectors) returns() -func (_Registry *RegistrySession) UpdateModule(oldImplementation common.Address, newImplementation common.Address, oldSelectors [][4]byte, newSelectors [][4]byte) (*types.Transaction, error) { - return _Registry.Contract.UpdateModule(&_Registry.TransactOpts, oldImplementation, newImplementation, oldSelectors, newSelectors) -} - -// UpdateModule is a paid mutator transaction binding the contract method 0x06d1d2a1. -// -// Solidity: function updateModule(address oldImplementation, address newImplementation, bytes4[] oldSelectors, bytes4[] newSelectors) returns() -func (_Registry *RegistryTransactorSession) UpdateModule(oldImplementation common.Address, newImplementation common.Address, oldSelectors [][4]byte, newSelectors [][4]byte) (*types.Transaction, error) { - return _Registry.Contract.UpdateModule(&_Registry.TransactOpts, oldImplementation, newImplementation, oldSelectors, newSelectors) -} - -// ValidateBurnAndResetNode is a paid mutator transaction binding the contract method 0xea0e7d3a. -// -// Solidity: function validateBurnAndResetNode(uint256 tokenId) returns() -func (_Registry *RegistryTransactor) ValidateBurnAndResetNode(opts *bind.TransactOpts, tokenId *big.Int) (*types.Transaction, error) { - return _Registry.contract.Transact(opts, "validateBurnAndResetNode", tokenId) -} - -// ValidateBurnAndResetNode is a paid mutator transaction binding the contract method 0xea0e7d3a. -// -// Solidity: function validateBurnAndResetNode(uint256 tokenId) returns() -func (_Registry *RegistrySession) ValidateBurnAndResetNode(tokenId *big.Int) (*types.Transaction, error) { - return _Registry.Contract.ValidateBurnAndResetNode(&_Registry.TransactOpts, tokenId) -} - -// ValidateBurnAndResetNode is a paid mutator transaction binding the contract method 0xea0e7d3a. -// -// Solidity: function validateBurnAndResetNode(uint256 tokenId) returns() -func (_Registry *RegistryTransactorSession) ValidateBurnAndResetNode(tokenId *big.Int) (*types.Transaction, error) { - return _Registry.Contract.ValidateBurnAndResetNode(&_Registry.TransactOpts, tokenId) -} - -// ValidateSdBurnAndResetNode is a paid mutator transaction binding the contract method 0x53c2aa33. -// -// Solidity: function validateSdBurnAndResetNode(uint256 tokenId) returns() -func (_Registry *RegistryTransactor) ValidateSdBurnAndResetNode(opts *bind.TransactOpts, tokenId *big.Int) (*types.Transaction, error) { - return _Registry.contract.Transact(opts, "validateSdBurnAndResetNode", tokenId) -} - -// ValidateSdBurnAndResetNode is a paid mutator transaction binding the contract method 0x53c2aa33. -// -// Solidity: function validateSdBurnAndResetNode(uint256 tokenId) returns() -func (_Registry *RegistrySession) ValidateSdBurnAndResetNode(tokenId *big.Int) (*types.Transaction, error) { - return _Registry.Contract.ValidateSdBurnAndResetNode(&_Registry.TransactOpts, tokenId) -} - -// ValidateSdBurnAndResetNode is a paid mutator transaction binding the contract method 0x53c2aa33. -// -// Solidity: function validateSdBurnAndResetNode(uint256 tokenId) returns() -func (_Registry *RegistryTransactorSession) ValidateSdBurnAndResetNode(tokenId *big.Int) (*types.Transaction, error) { - return _Registry.Contract.ValidateSdBurnAndResetNode(&_Registry.TransactOpts, tokenId) -} - -// Fallback is a paid mutator transaction binding the contract fallback function. -// -// Solidity: fallback() returns() -func (_Registry *RegistryTransactor) Fallback(opts *bind.TransactOpts, calldata []byte) (*types.Transaction, error) { - return _Registry.contract.RawTransact(opts, calldata) -} - -// Fallback is a paid mutator transaction binding the contract fallback function. -// -// Solidity: fallback() returns() -func (_Registry *RegistrySession) Fallback(calldata []byte) (*types.Transaction, error) { - return _Registry.Contract.Fallback(&_Registry.TransactOpts, calldata) -} - -// Fallback is a paid mutator transaction binding the contract fallback function. -// -// Solidity: fallback() returns() -func (_Registry *RegistryTransactorSession) Fallback(calldata []byte) (*types.Transaction, error) { - return _Registry.Contract.Fallback(&_Registry.TransactOpts, calldata) -} - -// RegistryAftermarketDeviceAddressResetIterator is returned from FilterAftermarketDeviceAddressReset and is used to iterate over the raw logs and unpacked data for AftermarketDeviceAddressReset events raised by the Registry contract. -type RegistryAftermarketDeviceAddressResetIterator struct { - Event *RegistryAftermarketDeviceAddressReset // 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 *RegistryAftermarketDeviceAddressResetIterator) 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(RegistryAftermarketDeviceAddressReset) - 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(RegistryAftermarketDeviceAddressReset) - 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 *RegistryAftermarketDeviceAddressResetIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *RegistryAftermarketDeviceAddressResetIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// RegistryAftermarketDeviceAddressReset represents a AftermarketDeviceAddressReset event raised by the Registry contract. -type RegistryAftermarketDeviceAddressReset struct { - ManufacturerId *big.Int - TokenId *big.Int - AftermarketDeviceAddress common.Address - Raw types.Log // Blockchain specific contextual infos -} - -// FilterAftermarketDeviceAddressReset is a free log retrieval operation binding the contract event 0x4993b53bba9fe570bd465464126bb5be93bd1504db0060ed2b7cd89f5a32b6be. -// -// Solidity: event AftermarketDeviceAddressReset(uint256 indexed manufacturerId, uint256 indexed tokenId, address indexed aftermarketDeviceAddress) -func (_Registry *RegistryFilterer) FilterAftermarketDeviceAddressReset(opts *bind.FilterOpts, manufacturerId []*big.Int, tokenId []*big.Int, aftermarketDeviceAddress []common.Address) (*RegistryAftermarketDeviceAddressResetIterator, error) { - - var manufacturerIdRule []interface{} - for _, manufacturerIdItem := range manufacturerId { - manufacturerIdRule = append(manufacturerIdRule, manufacturerIdItem) - } - var tokenIdRule []interface{} - for _, tokenIdItem := range tokenId { - tokenIdRule = append(tokenIdRule, tokenIdItem) - } - var aftermarketDeviceAddressRule []interface{} - for _, aftermarketDeviceAddressItem := range aftermarketDeviceAddress { - aftermarketDeviceAddressRule = append(aftermarketDeviceAddressRule, aftermarketDeviceAddressItem) - } - - logs, sub, err := _Registry.contract.FilterLogs(opts, "AftermarketDeviceAddressReset", manufacturerIdRule, tokenIdRule, aftermarketDeviceAddressRule) - if err != nil { - return nil, err - } - return &RegistryAftermarketDeviceAddressResetIterator{contract: _Registry.contract, event: "AftermarketDeviceAddressReset", logs: logs, sub: sub}, nil -} - -// WatchAftermarketDeviceAddressReset is a free log subscription operation binding the contract event 0x4993b53bba9fe570bd465464126bb5be93bd1504db0060ed2b7cd89f5a32b6be. -// -// Solidity: event AftermarketDeviceAddressReset(uint256 indexed manufacturerId, uint256 indexed tokenId, address indexed aftermarketDeviceAddress) -func (_Registry *RegistryFilterer) WatchAftermarketDeviceAddressReset(opts *bind.WatchOpts, sink chan<- *RegistryAftermarketDeviceAddressReset, manufacturerId []*big.Int, tokenId []*big.Int, aftermarketDeviceAddress []common.Address) (event.Subscription, error) { - - var manufacturerIdRule []interface{} - for _, manufacturerIdItem := range manufacturerId { - manufacturerIdRule = append(manufacturerIdRule, manufacturerIdItem) - } - var tokenIdRule []interface{} - for _, tokenIdItem := range tokenId { - tokenIdRule = append(tokenIdRule, tokenIdItem) - } - var aftermarketDeviceAddressRule []interface{} - for _, aftermarketDeviceAddressItem := range aftermarketDeviceAddress { - aftermarketDeviceAddressRule = append(aftermarketDeviceAddressRule, aftermarketDeviceAddressItem) - } - - logs, sub, err := _Registry.contract.WatchLogs(opts, "AftermarketDeviceAddressReset", manufacturerIdRule, tokenIdRule, aftermarketDeviceAddressRule) - 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(RegistryAftermarketDeviceAddressReset) - if err := _Registry.contract.UnpackLog(event, "AftermarketDeviceAddressReset", 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 -} - -// ParseAftermarketDeviceAddressReset is a log parse operation binding the contract event 0x4993b53bba9fe570bd465464126bb5be93bd1504db0060ed2b7cd89f5a32b6be. -// -// Solidity: event AftermarketDeviceAddressReset(uint256 indexed manufacturerId, uint256 indexed tokenId, address indexed aftermarketDeviceAddress) -func (_Registry *RegistryFilterer) ParseAftermarketDeviceAddressReset(log types.Log) (*RegistryAftermarketDeviceAddressReset, error) { - event := new(RegistryAftermarketDeviceAddressReset) - if err := _Registry.contract.UnpackLog(event, "AftermarketDeviceAddressReset", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// RegistryAftermarketDeviceAttributeAddedIterator is returned from FilterAftermarketDeviceAttributeAdded and is used to iterate over the raw logs and unpacked data for AftermarketDeviceAttributeAdded events raised by the Registry contract. -type RegistryAftermarketDeviceAttributeAddedIterator struct { - Event *RegistryAftermarketDeviceAttributeAdded // 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 *RegistryAftermarketDeviceAttributeAddedIterator) 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(RegistryAftermarketDeviceAttributeAdded) - 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(RegistryAftermarketDeviceAttributeAdded) - 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 *RegistryAftermarketDeviceAttributeAddedIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *RegistryAftermarketDeviceAttributeAddedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// RegistryAftermarketDeviceAttributeAdded represents a AftermarketDeviceAttributeAdded event raised by the Registry contract. -type RegistryAftermarketDeviceAttributeAdded struct { - Attribute string - Raw types.Log // Blockchain specific contextual infos -} - -// FilterAftermarketDeviceAttributeAdded is a free log retrieval operation binding the contract event 0x3ef2473cbfb66e153539befafe6ba95e95c6cc0659ebc0d7e8a56f014de7eb5f. -// -// Solidity: event AftermarketDeviceAttributeAdded(string attribute) -func (_Registry *RegistryFilterer) FilterAftermarketDeviceAttributeAdded(opts *bind.FilterOpts) (*RegistryAftermarketDeviceAttributeAddedIterator, error) { - - logs, sub, err := _Registry.contract.FilterLogs(opts, "AftermarketDeviceAttributeAdded") - if err != nil { - return nil, err - } - return &RegistryAftermarketDeviceAttributeAddedIterator{contract: _Registry.contract, event: "AftermarketDeviceAttributeAdded", logs: logs, sub: sub}, nil -} - -// WatchAftermarketDeviceAttributeAdded is a free log subscription operation binding the contract event 0x3ef2473cbfb66e153539befafe6ba95e95c6cc0659ebc0d7e8a56f014de7eb5f. -// -// Solidity: event AftermarketDeviceAttributeAdded(string attribute) -func (_Registry *RegistryFilterer) WatchAftermarketDeviceAttributeAdded(opts *bind.WatchOpts, sink chan<- *RegistryAftermarketDeviceAttributeAdded) (event.Subscription, error) { - - logs, sub, err := _Registry.contract.WatchLogs(opts, "AftermarketDeviceAttributeAdded") - 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(RegistryAftermarketDeviceAttributeAdded) - if err := _Registry.contract.UnpackLog(event, "AftermarketDeviceAttributeAdded", 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 -} - -// ParseAftermarketDeviceAttributeAdded is a log parse operation binding the contract event 0x3ef2473cbfb66e153539befafe6ba95e95c6cc0659ebc0d7e8a56f014de7eb5f. -// -// Solidity: event AftermarketDeviceAttributeAdded(string attribute) -func (_Registry *RegistryFilterer) ParseAftermarketDeviceAttributeAdded(log types.Log) (*RegistryAftermarketDeviceAttributeAdded, error) { - event := new(RegistryAftermarketDeviceAttributeAdded) - if err := _Registry.contract.UnpackLog(event, "AftermarketDeviceAttributeAdded", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// RegistryAftermarketDeviceAttributeSetIterator is returned from FilterAftermarketDeviceAttributeSet and is used to iterate over the raw logs and unpacked data for AftermarketDeviceAttributeSet events raised by the Registry contract. -type RegistryAftermarketDeviceAttributeSetIterator struct { - Event *RegistryAftermarketDeviceAttributeSet // 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 *RegistryAftermarketDeviceAttributeSetIterator) 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(RegistryAftermarketDeviceAttributeSet) - 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(RegistryAftermarketDeviceAttributeSet) - 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 *RegistryAftermarketDeviceAttributeSetIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *RegistryAftermarketDeviceAttributeSetIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// RegistryAftermarketDeviceAttributeSet represents a AftermarketDeviceAttributeSet event raised by the Registry contract. -type RegistryAftermarketDeviceAttributeSet struct { - TokenId *big.Int - Attribute string - Info string - Raw types.Log // Blockchain specific contextual infos -} - -// FilterAftermarketDeviceAttributeSet is a free log retrieval operation binding the contract event 0x977fe0ddf8485988af0b93d70bf5977b48236e9969cdb9b1f55977fbab7cd417. -// -// Solidity: event AftermarketDeviceAttributeSet(uint256 tokenId, string attribute, string info) -func (_Registry *RegistryFilterer) FilterAftermarketDeviceAttributeSet(opts *bind.FilterOpts) (*RegistryAftermarketDeviceAttributeSetIterator, error) { - - logs, sub, err := _Registry.contract.FilterLogs(opts, "AftermarketDeviceAttributeSet") - if err != nil { - return nil, err - } - return &RegistryAftermarketDeviceAttributeSetIterator{contract: _Registry.contract, event: "AftermarketDeviceAttributeSet", logs: logs, sub: sub}, nil -} - -// WatchAftermarketDeviceAttributeSet is a free log subscription operation binding the contract event 0x977fe0ddf8485988af0b93d70bf5977b48236e9969cdb9b1f55977fbab7cd417. -// -// Solidity: event AftermarketDeviceAttributeSet(uint256 tokenId, string attribute, string info) -func (_Registry *RegistryFilterer) WatchAftermarketDeviceAttributeSet(opts *bind.WatchOpts, sink chan<- *RegistryAftermarketDeviceAttributeSet) (event.Subscription, error) { - - logs, sub, err := _Registry.contract.WatchLogs(opts, "AftermarketDeviceAttributeSet") - 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(RegistryAftermarketDeviceAttributeSet) - if err := _Registry.contract.UnpackLog(event, "AftermarketDeviceAttributeSet", 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 -} - -// ParseAftermarketDeviceAttributeSet is a log parse operation binding the contract event 0x977fe0ddf8485988af0b93d70bf5977b48236e9969cdb9b1f55977fbab7cd417. -// -// Solidity: event AftermarketDeviceAttributeSet(uint256 tokenId, string attribute, string info) -func (_Registry *RegistryFilterer) ParseAftermarketDeviceAttributeSet(log types.Log) (*RegistryAftermarketDeviceAttributeSet, error) { - event := new(RegistryAftermarketDeviceAttributeSet) - if err := _Registry.contract.UnpackLog(event, "AftermarketDeviceAttributeSet", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// RegistryAftermarketDeviceClaimedIterator is returned from FilterAftermarketDeviceClaimed and is used to iterate over the raw logs and unpacked data for AftermarketDeviceClaimed events raised by the Registry contract. -type RegistryAftermarketDeviceClaimedIterator struct { - Event *RegistryAftermarketDeviceClaimed // 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 *RegistryAftermarketDeviceClaimedIterator) 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(RegistryAftermarketDeviceClaimed) - 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(RegistryAftermarketDeviceClaimed) - 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 *RegistryAftermarketDeviceClaimedIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *RegistryAftermarketDeviceClaimedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// RegistryAftermarketDeviceClaimed represents a AftermarketDeviceClaimed event raised by the Registry contract. -type RegistryAftermarketDeviceClaimed struct { - AftermarketDeviceNode *big.Int - Owner common.Address - Raw types.Log // Blockchain specific contextual infos -} - -// FilterAftermarketDeviceClaimed is a free log retrieval operation binding the contract event 0x8468d811e5090d3b1a07e28af524e66c128f624e16b07638f419012c779f76ec. -// -// Solidity: event AftermarketDeviceClaimed(uint256 aftermarketDeviceNode, address indexed owner) -func (_Registry *RegistryFilterer) FilterAftermarketDeviceClaimed(opts *bind.FilterOpts, owner []common.Address) (*RegistryAftermarketDeviceClaimedIterator, error) { - - var ownerRule []interface{} - for _, ownerItem := range owner { - ownerRule = append(ownerRule, ownerItem) - } - - logs, sub, err := _Registry.contract.FilterLogs(opts, "AftermarketDeviceClaimed", ownerRule) - if err != nil { - return nil, err - } - return &RegistryAftermarketDeviceClaimedIterator{contract: _Registry.contract, event: "AftermarketDeviceClaimed", logs: logs, sub: sub}, nil -} - -// WatchAftermarketDeviceClaimed is a free log subscription operation binding the contract event 0x8468d811e5090d3b1a07e28af524e66c128f624e16b07638f419012c779f76ec. -// -// Solidity: event AftermarketDeviceClaimed(uint256 aftermarketDeviceNode, address indexed owner) -func (_Registry *RegistryFilterer) WatchAftermarketDeviceClaimed(opts *bind.WatchOpts, sink chan<- *RegistryAftermarketDeviceClaimed, owner []common.Address) (event.Subscription, error) { - - var ownerRule []interface{} - for _, ownerItem := range owner { - ownerRule = append(ownerRule, ownerItem) - } - - logs, sub, err := _Registry.contract.WatchLogs(opts, "AftermarketDeviceClaimed", ownerRule) - 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(RegistryAftermarketDeviceClaimed) - if err := _Registry.contract.UnpackLog(event, "AftermarketDeviceClaimed", 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 -} - -// ParseAftermarketDeviceClaimed is a log parse operation binding the contract event 0x8468d811e5090d3b1a07e28af524e66c128f624e16b07638f419012c779f76ec. -// -// Solidity: event AftermarketDeviceClaimed(uint256 aftermarketDeviceNode, address indexed owner) -func (_Registry *RegistryFilterer) ParseAftermarketDeviceClaimed(log types.Log) (*RegistryAftermarketDeviceClaimed, error) { - event := new(RegistryAftermarketDeviceClaimed) - if err := _Registry.contract.UnpackLog(event, "AftermarketDeviceClaimed", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// RegistryAftermarketDeviceIdProxySetIterator is returned from FilterAftermarketDeviceIdProxySet and is used to iterate over the raw logs and unpacked data for AftermarketDeviceIdProxySet events raised by the Registry contract. -type RegistryAftermarketDeviceIdProxySetIterator struct { - Event *RegistryAftermarketDeviceIdProxySet // 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 *RegistryAftermarketDeviceIdProxySetIterator) 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(RegistryAftermarketDeviceIdProxySet) - 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(RegistryAftermarketDeviceIdProxySet) - 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 *RegistryAftermarketDeviceIdProxySetIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *RegistryAftermarketDeviceIdProxySetIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// RegistryAftermarketDeviceIdProxySet represents a AftermarketDeviceIdProxySet event raised by the Registry contract. -type RegistryAftermarketDeviceIdProxySet struct { - Proxy common.Address - Raw types.Log // Blockchain specific contextual infos -} - -// FilterAftermarketDeviceIdProxySet is a free log retrieval operation binding the contract event 0xe2daa727eb82f2761802221c26f72d54501ca8abd6da081e50fedaaab21f4036. -// -// Solidity: event AftermarketDeviceIdProxySet(address indexed proxy) -func (_Registry *RegistryFilterer) FilterAftermarketDeviceIdProxySet(opts *bind.FilterOpts, proxy []common.Address) (*RegistryAftermarketDeviceIdProxySetIterator, error) { - - var proxyRule []interface{} - for _, proxyItem := range proxy { - proxyRule = append(proxyRule, proxyItem) - } - - logs, sub, err := _Registry.contract.FilterLogs(opts, "AftermarketDeviceIdProxySet", proxyRule) - if err != nil { - return nil, err - } - return &RegistryAftermarketDeviceIdProxySetIterator{contract: _Registry.contract, event: "AftermarketDeviceIdProxySet", logs: logs, sub: sub}, nil -} - -// WatchAftermarketDeviceIdProxySet is a free log subscription operation binding the contract event 0xe2daa727eb82f2761802221c26f72d54501ca8abd6da081e50fedaaab21f4036. -// -// Solidity: event AftermarketDeviceIdProxySet(address indexed proxy) -func (_Registry *RegistryFilterer) WatchAftermarketDeviceIdProxySet(opts *bind.WatchOpts, sink chan<- *RegistryAftermarketDeviceIdProxySet, proxy []common.Address) (event.Subscription, error) { - - var proxyRule []interface{} - for _, proxyItem := range proxy { - proxyRule = append(proxyRule, proxyItem) - } - - logs, sub, err := _Registry.contract.WatchLogs(opts, "AftermarketDeviceIdProxySet", proxyRule) - 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(RegistryAftermarketDeviceIdProxySet) - if err := _Registry.contract.UnpackLog(event, "AftermarketDeviceIdProxySet", 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 -} - -// ParseAftermarketDeviceIdProxySet is a log parse operation binding the contract event 0xe2daa727eb82f2761802221c26f72d54501ca8abd6da081e50fedaaab21f4036. -// -// Solidity: event AftermarketDeviceIdProxySet(address indexed proxy) -func (_Registry *RegistryFilterer) ParseAftermarketDeviceIdProxySet(log types.Log) (*RegistryAftermarketDeviceIdProxySet, error) { - event := new(RegistryAftermarketDeviceIdProxySet) - if err := _Registry.contract.UnpackLog(event, "AftermarketDeviceIdProxySet", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// RegistryAftermarketDeviceNodeBurnedIterator is returned from FilterAftermarketDeviceNodeBurned and is used to iterate over the raw logs and unpacked data for AftermarketDeviceNodeBurned events raised by the Registry contract. -type RegistryAftermarketDeviceNodeBurnedIterator struct { - Event *RegistryAftermarketDeviceNodeBurned // 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 *RegistryAftermarketDeviceNodeBurnedIterator) 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(RegistryAftermarketDeviceNodeBurned) - 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(RegistryAftermarketDeviceNodeBurned) - 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 *RegistryAftermarketDeviceNodeBurnedIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *RegistryAftermarketDeviceNodeBurnedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// RegistryAftermarketDeviceNodeBurned represents a AftermarketDeviceNodeBurned event raised by the Registry contract. -type RegistryAftermarketDeviceNodeBurned struct { - TokenId *big.Int - Owner common.Address - Raw types.Log // Blockchain specific contextual infos -} - -// FilterAftermarketDeviceNodeBurned is a free log retrieval operation binding the contract event 0xc4d38c0a034bc1693db3b9a33125831c3d2e1f11e5b69be183ff9ac991384d95. -// -// Solidity: event AftermarketDeviceNodeBurned(uint256 indexed tokenId, address indexed owner) -func (_Registry *RegistryFilterer) FilterAftermarketDeviceNodeBurned(opts *bind.FilterOpts, tokenId []*big.Int, owner []common.Address) (*RegistryAftermarketDeviceNodeBurnedIterator, error) { - - var tokenIdRule []interface{} - for _, tokenIdItem := range tokenId { - tokenIdRule = append(tokenIdRule, tokenIdItem) - } - var ownerRule []interface{} - for _, ownerItem := range owner { - ownerRule = append(ownerRule, ownerItem) - } - - logs, sub, err := _Registry.contract.FilterLogs(opts, "AftermarketDeviceNodeBurned", tokenIdRule, ownerRule) - if err != nil { - return nil, err - } - return &RegistryAftermarketDeviceNodeBurnedIterator{contract: _Registry.contract, event: "AftermarketDeviceNodeBurned", logs: logs, sub: sub}, nil -} - -// WatchAftermarketDeviceNodeBurned is a free log subscription operation binding the contract event 0xc4d38c0a034bc1693db3b9a33125831c3d2e1f11e5b69be183ff9ac991384d95. -// -// Solidity: event AftermarketDeviceNodeBurned(uint256 indexed tokenId, address indexed owner) -func (_Registry *RegistryFilterer) WatchAftermarketDeviceNodeBurned(opts *bind.WatchOpts, sink chan<- *RegistryAftermarketDeviceNodeBurned, tokenId []*big.Int, owner []common.Address) (event.Subscription, error) { - - var tokenIdRule []interface{} - for _, tokenIdItem := range tokenId { - tokenIdRule = append(tokenIdRule, tokenIdItem) - } - var ownerRule []interface{} - for _, ownerItem := range owner { - ownerRule = append(ownerRule, ownerItem) - } - - logs, sub, err := _Registry.contract.WatchLogs(opts, "AftermarketDeviceNodeBurned", tokenIdRule, ownerRule) - 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(RegistryAftermarketDeviceNodeBurned) - if err := _Registry.contract.UnpackLog(event, "AftermarketDeviceNodeBurned", 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 -} - -// ParseAftermarketDeviceNodeBurned is a log parse operation binding the contract event 0xc4d38c0a034bc1693db3b9a33125831c3d2e1f11e5b69be183ff9ac991384d95. -// -// Solidity: event AftermarketDeviceNodeBurned(uint256 indexed tokenId, address indexed owner) -func (_Registry *RegistryFilterer) ParseAftermarketDeviceNodeBurned(log types.Log) (*RegistryAftermarketDeviceNodeBurned, error) { - event := new(RegistryAftermarketDeviceNodeBurned) - if err := _Registry.contract.UnpackLog(event, "AftermarketDeviceNodeBurned", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// RegistryAftermarketDeviceNodeMintedIterator is returned from FilterAftermarketDeviceNodeMinted and is used to iterate over the raw logs and unpacked data for AftermarketDeviceNodeMinted events raised by the Registry contract. -type RegistryAftermarketDeviceNodeMintedIterator struct { - Event *RegistryAftermarketDeviceNodeMinted // 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 *RegistryAftermarketDeviceNodeMintedIterator) 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(RegistryAftermarketDeviceNodeMinted) - 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(RegistryAftermarketDeviceNodeMinted) - 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 *RegistryAftermarketDeviceNodeMintedIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *RegistryAftermarketDeviceNodeMintedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// RegistryAftermarketDeviceNodeMinted represents a AftermarketDeviceNodeMinted event raised by the Registry contract. -type RegistryAftermarketDeviceNodeMinted struct { - ManufacturerId *big.Int - TokenId *big.Int - AftermarketDeviceAddress common.Address - Owner common.Address - Raw types.Log // Blockchain specific contextual infos -} - -// FilterAftermarketDeviceNodeMinted is a free log retrieval operation binding the contract event 0xd624fd4c3311e1803d230d97ce71fd60c4f658c30a31fbe08edcb211fd90f63f. -// -// Solidity: event AftermarketDeviceNodeMinted(uint256 indexed manufacturerId, uint256 tokenId, address indexed aftermarketDeviceAddress, address indexed owner) -func (_Registry *RegistryFilterer) FilterAftermarketDeviceNodeMinted(opts *bind.FilterOpts, manufacturerId []*big.Int, aftermarketDeviceAddress []common.Address, owner []common.Address) (*RegistryAftermarketDeviceNodeMintedIterator, error) { - - var manufacturerIdRule []interface{} - for _, manufacturerIdItem := range manufacturerId { - manufacturerIdRule = append(manufacturerIdRule, manufacturerIdItem) - } - - var aftermarketDeviceAddressRule []interface{} - for _, aftermarketDeviceAddressItem := range aftermarketDeviceAddress { - aftermarketDeviceAddressRule = append(aftermarketDeviceAddressRule, aftermarketDeviceAddressItem) - } - var ownerRule []interface{} - for _, ownerItem := range owner { - ownerRule = append(ownerRule, ownerItem) - } - - logs, sub, err := _Registry.contract.FilterLogs(opts, "AftermarketDeviceNodeMinted", manufacturerIdRule, aftermarketDeviceAddressRule, ownerRule) - if err != nil { - return nil, err - } - return &RegistryAftermarketDeviceNodeMintedIterator{contract: _Registry.contract, event: "AftermarketDeviceNodeMinted", logs: logs, sub: sub}, nil -} - -// WatchAftermarketDeviceNodeMinted is a free log subscription operation binding the contract event 0xd624fd4c3311e1803d230d97ce71fd60c4f658c30a31fbe08edcb211fd90f63f. -// -// Solidity: event AftermarketDeviceNodeMinted(uint256 indexed manufacturerId, uint256 tokenId, address indexed aftermarketDeviceAddress, address indexed owner) -func (_Registry *RegistryFilterer) WatchAftermarketDeviceNodeMinted(opts *bind.WatchOpts, sink chan<- *RegistryAftermarketDeviceNodeMinted, manufacturerId []*big.Int, aftermarketDeviceAddress []common.Address, owner []common.Address) (event.Subscription, error) { - - var manufacturerIdRule []interface{} - for _, manufacturerIdItem := range manufacturerId { - manufacturerIdRule = append(manufacturerIdRule, manufacturerIdItem) - } - - var aftermarketDeviceAddressRule []interface{} - for _, aftermarketDeviceAddressItem := range aftermarketDeviceAddress { - aftermarketDeviceAddressRule = append(aftermarketDeviceAddressRule, aftermarketDeviceAddressItem) - } - var ownerRule []interface{} - for _, ownerItem := range owner { - ownerRule = append(ownerRule, ownerItem) - } - - logs, sub, err := _Registry.contract.WatchLogs(opts, "AftermarketDeviceNodeMinted", manufacturerIdRule, aftermarketDeviceAddressRule, ownerRule) - 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(RegistryAftermarketDeviceNodeMinted) - if err := _Registry.contract.UnpackLog(event, "AftermarketDeviceNodeMinted", 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 -} - -// ParseAftermarketDeviceNodeMinted is a log parse operation binding the contract event 0xd624fd4c3311e1803d230d97ce71fd60c4f658c30a31fbe08edcb211fd90f63f. -// -// Solidity: event AftermarketDeviceNodeMinted(uint256 indexed manufacturerId, uint256 tokenId, address indexed aftermarketDeviceAddress, address indexed owner) -func (_Registry *RegistryFilterer) ParseAftermarketDeviceNodeMinted(log types.Log) (*RegistryAftermarketDeviceNodeMinted, error) { - event := new(RegistryAftermarketDeviceNodeMinted) - if err := _Registry.contract.UnpackLog(event, "AftermarketDeviceNodeMinted", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// RegistryAftermarketDevicePairedIterator is returned from FilterAftermarketDevicePaired and is used to iterate over the raw logs and unpacked data for AftermarketDevicePaired events raised by the Registry contract. -type RegistryAftermarketDevicePairedIterator struct { - Event *RegistryAftermarketDevicePaired // 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 *RegistryAftermarketDevicePairedIterator) 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(RegistryAftermarketDevicePaired) - 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(RegistryAftermarketDevicePaired) - 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 *RegistryAftermarketDevicePairedIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *RegistryAftermarketDevicePairedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// RegistryAftermarketDevicePaired represents a AftermarketDevicePaired event raised by the Registry contract. -type RegistryAftermarketDevicePaired struct { - AftermarketDeviceNode *big.Int - VehicleNode *big.Int - Owner common.Address - Raw types.Log // Blockchain specific contextual infos -} - -// FilterAftermarketDevicePaired is a free log retrieval operation binding the contract event 0x89ec132808bbf01af00b90fd34e04fd6cfb8dba2813ca5446a415500b83c7938. -// -// Solidity: event AftermarketDevicePaired(uint256 aftermarketDeviceNode, uint256 vehicleNode, address indexed owner) -func (_Registry *RegistryFilterer) FilterAftermarketDevicePaired(opts *bind.FilterOpts, owner []common.Address) (*RegistryAftermarketDevicePairedIterator, error) { - - var ownerRule []interface{} - for _, ownerItem := range owner { - ownerRule = append(ownerRule, ownerItem) - } - - logs, sub, err := _Registry.contract.FilterLogs(opts, "AftermarketDevicePaired", ownerRule) - if err != nil { - return nil, err - } - return &RegistryAftermarketDevicePairedIterator{contract: _Registry.contract, event: "AftermarketDevicePaired", logs: logs, sub: sub}, nil -} - -// WatchAftermarketDevicePaired is a free log subscription operation binding the contract event 0x89ec132808bbf01af00b90fd34e04fd6cfb8dba2813ca5446a415500b83c7938. -// -// Solidity: event AftermarketDevicePaired(uint256 aftermarketDeviceNode, uint256 vehicleNode, address indexed owner) -func (_Registry *RegistryFilterer) WatchAftermarketDevicePaired(opts *bind.WatchOpts, sink chan<- *RegistryAftermarketDevicePaired, owner []common.Address) (event.Subscription, error) { - - var ownerRule []interface{} - for _, ownerItem := range owner { - ownerRule = append(ownerRule, ownerItem) - } - - logs, sub, err := _Registry.contract.WatchLogs(opts, "AftermarketDevicePaired", ownerRule) - 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(RegistryAftermarketDevicePaired) - if err := _Registry.contract.UnpackLog(event, "AftermarketDevicePaired", 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 -} - -// ParseAftermarketDevicePaired is a log parse operation binding the contract event 0x89ec132808bbf01af00b90fd34e04fd6cfb8dba2813ca5446a415500b83c7938. -// -// Solidity: event AftermarketDevicePaired(uint256 aftermarketDeviceNode, uint256 vehicleNode, address indexed owner) -func (_Registry *RegistryFilterer) ParseAftermarketDevicePaired(log types.Log) (*RegistryAftermarketDevicePaired, error) { - event := new(RegistryAftermarketDevicePaired) - if err := _Registry.contract.UnpackLog(event, "AftermarketDevicePaired", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// RegistryAftermarketDeviceTransferredIterator is returned from FilterAftermarketDeviceTransferred and is used to iterate over the raw logs and unpacked data for AftermarketDeviceTransferred events raised by the Registry contract. -type RegistryAftermarketDeviceTransferredIterator struct { - Event *RegistryAftermarketDeviceTransferred // 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 *RegistryAftermarketDeviceTransferredIterator) 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(RegistryAftermarketDeviceTransferred) - 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(RegistryAftermarketDeviceTransferred) - 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 *RegistryAftermarketDeviceTransferredIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *RegistryAftermarketDeviceTransferredIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// RegistryAftermarketDeviceTransferred represents a AftermarketDeviceTransferred event raised by the Registry contract. -type RegistryAftermarketDeviceTransferred struct { - AftermarketDeviceNode *big.Int - OldOwner common.Address - NewOwner common.Address - Raw types.Log // Blockchain specific contextual infos -} - -// FilterAftermarketDeviceTransferred is a free log retrieval operation binding the contract event 0x1d2e88640b58e7fc67878851d97e2cfae3bc7eb7db3226dec94b1c499d631637. -// -// Solidity: event AftermarketDeviceTransferred(uint256 indexed aftermarketDeviceNode, address indexed oldOwner, address indexed newOwner) -func (_Registry *RegistryFilterer) FilterAftermarketDeviceTransferred(opts *bind.FilterOpts, aftermarketDeviceNode []*big.Int, oldOwner []common.Address, newOwner []common.Address) (*RegistryAftermarketDeviceTransferredIterator, error) { - - var aftermarketDeviceNodeRule []interface{} - for _, aftermarketDeviceNodeItem := range aftermarketDeviceNode { - aftermarketDeviceNodeRule = append(aftermarketDeviceNodeRule, aftermarketDeviceNodeItem) - } - var oldOwnerRule []interface{} - for _, oldOwnerItem := range oldOwner { - oldOwnerRule = append(oldOwnerRule, oldOwnerItem) - } - var newOwnerRule []interface{} - for _, newOwnerItem := range newOwner { - newOwnerRule = append(newOwnerRule, newOwnerItem) - } - - logs, sub, err := _Registry.contract.FilterLogs(opts, "AftermarketDeviceTransferred", aftermarketDeviceNodeRule, oldOwnerRule, newOwnerRule) - if err != nil { - return nil, err - } - return &RegistryAftermarketDeviceTransferredIterator{contract: _Registry.contract, event: "AftermarketDeviceTransferred", logs: logs, sub: sub}, nil -} - -// WatchAftermarketDeviceTransferred is a free log subscription operation binding the contract event 0x1d2e88640b58e7fc67878851d97e2cfae3bc7eb7db3226dec94b1c499d631637. -// -// Solidity: event AftermarketDeviceTransferred(uint256 indexed aftermarketDeviceNode, address indexed oldOwner, address indexed newOwner) -func (_Registry *RegistryFilterer) WatchAftermarketDeviceTransferred(opts *bind.WatchOpts, sink chan<- *RegistryAftermarketDeviceTransferred, aftermarketDeviceNode []*big.Int, oldOwner []common.Address, newOwner []common.Address) (event.Subscription, error) { - - var aftermarketDeviceNodeRule []interface{} - for _, aftermarketDeviceNodeItem := range aftermarketDeviceNode { - aftermarketDeviceNodeRule = append(aftermarketDeviceNodeRule, aftermarketDeviceNodeItem) - } - var oldOwnerRule []interface{} - for _, oldOwnerItem := range oldOwner { - oldOwnerRule = append(oldOwnerRule, oldOwnerItem) - } - var newOwnerRule []interface{} - for _, newOwnerItem := range newOwner { - newOwnerRule = append(newOwnerRule, newOwnerItem) - } - - logs, sub, err := _Registry.contract.WatchLogs(opts, "AftermarketDeviceTransferred", aftermarketDeviceNodeRule, oldOwnerRule, 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(RegistryAftermarketDeviceTransferred) - if err := _Registry.contract.UnpackLog(event, "AftermarketDeviceTransferred", 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 -} - -// ParseAftermarketDeviceTransferred is a log parse operation binding the contract event 0x1d2e88640b58e7fc67878851d97e2cfae3bc7eb7db3226dec94b1c499d631637. -// -// Solidity: event AftermarketDeviceTransferred(uint256 indexed aftermarketDeviceNode, address indexed oldOwner, address indexed newOwner) -func (_Registry *RegistryFilterer) ParseAftermarketDeviceTransferred(log types.Log) (*RegistryAftermarketDeviceTransferred, error) { - event := new(RegistryAftermarketDeviceTransferred) - if err := _Registry.contract.UnpackLog(event, "AftermarketDeviceTransferred", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// RegistryAftermarketDeviceUnclaimedIterator is returned from FilterAftermarketDeviceUnclaimed and is used to iterate over the raw logs and unpacked data for AftermarketDeviceUnclaimed events raised by the Registry contract. -type RegistryAftermarketDeviceUnclaimedIterator struct { - Event *RegistryAftermarketDeviceUnclaimed // 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 *RegistryAftermarketDeviceUnclaimedIterator) 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(RegistryAftermarketDeviceUnclaimed) - 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(RegistryAftermarketDeviceUnclaimed) - 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 *RegistryAftermarketDeviceUnclaimedIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *RegistryAftermarketDeviceUnclaimedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// RegistryAftermarketDeviceUnclaimed represents a AftermarketDeviceUnclaimed event raised by the Registry contract. -type RegistryAftermarketDeviceUnclaimed struct { - AftermarketDeviceNode *big.Int - Raw types.Log // Blockchain specific contextual infos -} - -// FilterAftermarketDeviceUnclaimed is a free log retrieval operation binding the contract event 0x9811dbcee5e7af2d698bf7ed98b64e8e28ab2e5e5e5fa4a03aace3c4f9b48e84. -// -// Solidity: event AftermarketDeviceUnclaimed(uint256 indexed aftermarketDeviceNode) -func (_Registry *RegistryFilterer) FilterAftermarketDeviceUnclaimed(opts *bind.FilterOpts, aftermarketDeviceNode []*big.Int) (*RegistryAftermarketDeviceUnclaimedIterator, error) { - - var aftermarketDeviceNodeRule []interface{} - for _, aftermarketDeviceNodeItem := range aftermarketDeviceNode { - aftermarketDeviceNodeRule = append(aftermarketDeviceNodeRule, aftermarketDeviceNodeItem) - } - - logs, sub, err := _Registry.contract.FilterLogs(opts, "AftermarketDeviceUnclaimed", aftermarketDeviceNodeRule) - if err != nil { - return nil, err - } - return &RegistryAftermarketDeviceUnclaimedIterator{contract: _Registry.contract, event: "AftermarketDeviceUnclaimed", logs: logs, sub: sub}, nil -} - -// WatchAftermarketDeviceUnclaimed is a free log subscription operation binding the contract event 0x9811dbcee5e7af2d698bf7ed98b64e8e28ab2e5e5e5fa4a03aace3c4f9b48e84. -// -// Solidity: event AftermarketDeviceUnclaimed(uint256 indexed aftermarketDeviceNode) -func (_Registry *RegistryFilterer) WatchAftermarketDeviceUnclaimed(opts *bind.WatchOpts, sink chan<- *RegistryAftermarketDeviceUnclaimed, aftermarketDeviceNode []*big.Int) (event.Subscription, error) { - - var aftermarketDeviceNodeRule []interface{} - for _, aftermarketDeviceNodeItem := range aftermarketDeviceNode { - aftermarketDeviceNodeRule = append(aftermarketDeviceNodeRule, aftermarketDeviceNodeItem) - } - - logs, sub, err := _Registry.contract.WatchLogs(opts, "AftermarketDeviceUnclaimed", aftermarketDeviceNodeRule) - 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(RegistryAftermarketDeviceUnclaimed) - if err := _Registry.contract.UnpackLog(event, "AftermarketDeviceUnclaimed", 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 -} - -// ParseAftermarketDeviceUnclaimed is a log parse operation binding the contract event 0x9811dbcee5e7af2d698bf7ed98b64e8e28ab2e5e5e5fa4a03aace3c4f9b48e84. -// -// Solidity: event AftermarketDeviceUnclaimed(uint256 indexed aftermarketDeviceNode) -func (_Registry *RegistryFilterer) ParseAftermarketDeviceUnclaimed(log types.Log) (*RegistryAftermarketDeviceUnclaimed, error) { - event := new(RegistryAftermarketDeviceUnclaimed) - if err := _Registry.contract.UnpackLog(event, "AftermarketDeviceUnclaimed", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// RegistryAftermarketDeviceUnclaimed0Iterator is returned from FilterAftermarketDeviceUnclaimed0 and is used to iterate over the raw logs and unpacked data for AftermarketDeviceUnclaimed0 events raised by the Registry contract. -type RegistryAftermarketDeviceUnclaimed0Iterator struct { - Event *RegistryAftermarketDeviceUnclaimed0 // 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 *RegistryAftermarketDeviceUnclaimed0Iterator) 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(RegistryAftermarketDeviceUnclaimed0) - 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(RegistryAftermarketDeviceUnclaimed0) - 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 *RegistryAftermarketDeviceUnclaimed0Iterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *RegistryAftermarketDeviceUnclaimed0Iterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// RegistryAftermarketDeviceUnclaimed0 represents a AftermarketDeviceUnclaimed0 event raised by the Registry contract. -type RegistryAftermarketDeviceUnclaimed0 struct { - AftermarketDeviceNode *big.Int - Owner common.Address - Raw types.Log // Blockchain specific contextual infos -} - -// FilterAftermarketDeviceUnclaimed0 is a free log retrieval operation binding the contract event 0x3c800215fb945811565456946ce9f62446cfbbd5529e45180bd31a17ae054b00. -// -// Solidity: event AftermarketDeviceUnclaimed(uint256 indexed aftermarketDeviceNode, address indexed owner) -func (_Registry *RegistryFilterer) FilterAftermarketDeviceUnclaimed0(opts *bind.FilterOpts, aftermarketDeviceNode []*big.Int, owner []common.Address) (*RegistryAftermarketDeviceUnclaimed0Iterator, error) { - - var aftermarketDeviceNodeRule []interface{} - for _, aftermarketDeviceNodeItem := range aftermarketDeviceNode { - aftermarketDeviceNodeRule = append(aftermarketDeviceNodeRule, aftermarketDeviceNodeItem) - } - var ownerRule []interface{} - for _, ownerItem := range owner { - ownerRule = append(ownerRule, ownerItem) - } - - logs, sub, err := _Registry.contract.FilterLogs(opts, "AftermarketDeviceUnclaimed0", aftermarketDeviceNodeRule, ownerRule) - if err != nil { - return nil, err - } - return &RegistryAftermarketDeviceUnclaimed0Iterator{contract: _Registry.contract, event: "AftermarketDeviceUnclaimed0", logs: logs, sub: sub}, nil -} - -// WatchAftermarketDeviceUnclaimed0 is a free log subscription operation binding the contract event 0x3c800215fb945811565456946ce9f62446cfbbd5529e45180bd31a17ae054b00. -// -// Solidity: event AftermarketDeviceUnclaimed(uint256 indexed aftermarketDeviceNode, address indexed owner) -func (_Registry *RegistryFilterer) WatchAftermarketDeviceUnclaimed0(opts *bind.WatchOpts, sink chan<- *RegistryAftermarketDeviceUnclaimed0, aftermarketDeviceNode []*big.Int, owner []common.Address) (event.Subscription, error) { - - var aftermarketDeviceNodeRule []interface{} - for _, aftermarketDeviceNodeItem := range aftermarketDeviceNode { - aftermarketDeviceNodeRule = append(aftermarketDeviceNodeRule, aftermarketDeviceNodeItem) - } - var ownerRule []interface{} - for _, ownerItem := range owner { - ownerRule = append(ownerRule, ownerItem) - } - - logs, sub, err := _Registry.contract.WatchLogs(opts, "AftermarketDeviceUnclaimed0", aftermarketDeviceNodeRule, ownerRule) - 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(RegistryAftermarketDeviceUnclaimed0) - if err := _Registry.contract.UnpackLog(event, "AftermarketDeviceUnclaimed0", 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 -} - -// ParseAftermarketDeviceUnclaimed0 is a log parse operation binding the contract event 0x3c800215fb945811565456946ce9f62446cfbbd5529e45180bd31a17ae054b00. -// -// Solidity: event AftermarketDeviceUnclaimed(uint256 indexed aftermarketDeviceNode, address indexed owner) -func (_Registry *RegistryFilterer) ParseAftermarketDeviceUnclaimed0(log types.Log) (*RegistryAftermarketDeviceUnclaimed0, error) { - event := new(RegistryAftermarketDeviceUnclaimed0) - if err := _Registry.contract.UnpackLog(event, "AftermarketDeviceUnclaimed0", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// RegistryAftermarketDeviceUnpairedIterator is returned from FilterAftermarketDeviceUnpaired and is used to iterate over the raw logs and unpacked data for AftermarketDeviceUnpaired events raised by the Registry contract. -type RegistryAftermarketDeviceUnpairedIterator struct { - Event *RegistryAftermarketDeviceUnpaired // 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 *RegistryAftermarketDeviceUnpairedIterator) 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(RegistryAftermarketDeviceUnpaired) - 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(RegistryAftermarketDeviceUnpaired) - 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 *RegistryAftermarketDeviceUnpairedIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *RegistryAftermarketDeviceUnpairedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// RegistryAftermarketDeviceUnpaired represents a AftermarketDeviceUnpaired event raised by the Registry contract. -type RegistryAftermarketDeviceUnpaired struct { - AftermarketDeviceNode *big.Int - VehicleNode *big.Int - Owner common.Address - Raw types.Log // Blockchain specific contextual infos -} - -// FilterAftermarketDeviceUnpaired is a free log retrieval operation binding the contract event 0xd9135724aa6cdaa5b3ea73e3e0d74cb1a3a6d3cddcb9d58583f05f17bac82a8e. -// -// Solidity: event AftermarketDeviceUnpaired(uint256 aftermarketDeviceNode, uint256 vehicleNode, address indexed owner) -func (_Registry *RegistryFilterer) FilterAftermarketDeviceUnpaired(opts *bind.FilterOpts, owner []common.Address) (*RegistryAftermarketDeviceUnpairedIterator, error) { - - var ownerRule []interface{} - for _, ownerItem := range owner { - ownerRule = append(ownerRule, ownerItem) - } - - logs, sub, err := _Registry.contract.FilterLogs(opts, "AftermarketDeviceUnpaired", ownerRule) - if err != nil { - return nil, err - } - return &RegistryAftermarketDeviceUnpairedIterator{contract: _Registry.contract, event: "AftermarketDeviceUnpaired", logs: logs, sub: sub}, nil -} - -// WatchAftermarketDeviceUnpaired is a free log subscription operation binding the contract event 0xd9135724aa6cdaa5b3ea73e3e0d74cb1a3a6d3cddcb9d58583f05f17bac82a8e. -// -// Solidity: event AftermarketDeviceUnpaired(uint256 aftermarketDeviceNode, uint256 vehicleNode, address indexed owner) -func (_Registry *RegistryFilterer) WatchAftermarketDeviceUnpaired(opts *bind.WatchOpts, sink chan<- *RegistryAftermarketDeviceUnpaired, owner []common.Address) (event.Subscription, error) { - - var ownerRule []interface{} - for _, ownerItem := range owner { - ownerRule = append(ownerRule, ownerItem) - } - - logs, sub, err := _Registry.contract.WatchLogs(opts, "AftermarketDeviceUnpaired", ownerRule) - 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(RegistryAftermarketDeviceUnpaired) - if err := _Registry.contract.UnpackLog(event, "AftermarketDeviceUnpaired", 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 -} - -// ParseAftermarketDeviceUnpaired is a log parse operation binding the contract event 0xd9135724aa6cdaa5b3ea73e3e0d74cb1a3a6d3cddcb9d58583f05f17bac82a8e. -// -// Solidity: event AftermarketDeviceUnpaired(uint256 aftermarketDeviceNode, uint256 vehicleNode, address indexed owner) -func (_Registry *RegistryFilterer) ParseAftermarketDeviceUnpaired(log types.Log) (*RegistryAftermarketDeviceUnpaired, error) { - event := new(RegistryAftermarketDeviceUnpaired) - if err := _Registry.contract.UnpackLog(event, "AftermarketDeviceUnpaired", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// RegistryBeneficiarySetIterator is returned from FilterBeneficiarySet and is used to iterate over the raw logs and unpacked data for BeneficiarySet events raised by the Registry contract. -type RegistryBeneficiarySetIterator struct { - Event *RegistryBeneficiarySet // 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 *RegistryBeneficiarySetIterator) 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(RegistryBeneficiarySet) - 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(RegistryBeneficiarySet) - 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 *RegistryBeneficiarySetIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *RegistryBeneficiarySetIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// RegistryBeneficiarySet represents a BeneficiarySet event raised by the Registry contract. -type RegistryBeneficiarySet struct { - IdProxyAddress common.Address - NodeId *big.Int - Beneficiary common.Address - Raw types.Log // Blockchain specific contextual infos -} - -// FilterBeneficiarySet is a free log retrieval operation binding the contract event 0xf6f6de47a057b68d993d1ca4c1b8a95e51b10d7efbf516bc3c591eb6c4f209ee. -// -// Solidity: event BeneficiarySet(address indexed idProxyAddress, uint256 indexed nodeId, address indexed beneficiary) -func (_Registry *RegistryFilterer) FilterBeneficiarySet(opts *bind.FilterOpts, idProxyAddress []common.Address, nodeId []*big.Int, beneficiary []common.Address) (*RegistryBeneficiarySetIterator, error) { - - var idProxyAddressRule []interface{} - for _, idProxyAddressItem := range idProxyAddress { - idProxyAddressRule = append(idProxyAddressRule, idProxyAddressItem) - } - var nodeIdRule []interface{} - for _, nodeIdItem := range nodeId { - nodeIdRule = append(nodeIdRule, nodeIdItem) - } - var beneficiaryRule []interface{} - for _, beneficiaryItem := range beneficiary { - beneficiaryRule = append(beneficiaryRule, beneficiaryItem) - } - - logs, sub, err := _Registry.contract.FilterLogs(opts, "BeneficiarySet", idProxyAddressRule, nodeIdRule, beneficiaryRule) - if err != nil { - return nil, err - } - return &RegistryBeneficiarySetIterator{contract: _Registry.contract, event: "BeneficiarySet", logs: logs, sub: sub}, nil -} - -// WatchBeneficiarySet is a free log subscription operation binding the contract event 0xf6f6de47a057b68d993d1ca4c1b8a95e51b10d7efbf516bc3c591eb6c4f209ee. -// -// Solidity: event BeneficiarySet(address indexed idProxyAddress, uint256 indexed nodeId, address indexed beneficiary) -func (_Registry *RegistryFilterer) WatchBeneficiarySet(opts *bind.WatchOpts, sink chan<- *RegistryBeneficiarySet, idProxyAddress []common.Address, nodeId []*big.Int, beneficiary []common.Address) (event.Subscription, error) { - - var idProxyAddressRule []interface{} - for _, idProxyAddressItem := range idProxyAddress { - idProxyAddressRule = append(idProxyAddressRule, idProxyAddressItem) - } - var nodeIdRule []interface{} - for _, nodeIdItem := range nodeId { - nodeIdRule = append(nodeIdRule, nodeIdItem) - } - var beneficiaryRule []interface{} - for _, beneficiaryItem := range beneficiary { - beneficiaryRule = append(beneficiaryRule, beneficiaryItem) - } - - logs, sub, err := _Registry.contract.WatchLogs(opts, "BeneficiarySet", idProxyAddressRule, nodeIdRule, beneficiaryRule) - 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(RegistryBeneficiarySet) - if err := _Registry.contract.UnpackLog(event, "BeneficiarySet", 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 -} - -// ParseBeneficiarySet is a log parse operation binding the contract event 0xf6f6de47a057b68d993d1ca4c1b8a95e51b10d7efbf516bc3c591eb6c4f209ee. -// -// Solidity: event BeneficiarySet(address indexed idProxyAddress, uint256 indexed nodeId, address indexed beneficiary) -func (_Registry *RegistryFilterer) ParseBeneficiarySet(log types.Log) (*RegistryBeneficiarySet, error) { - event := new(RegistryBeneficiarySet) - if err := _Registry.contract.UnpackLog(event, "BeneficiarySet", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// RegistryConnectionsManagerSetIterator is returned from FilterConnectionsManagerSet and is used to iterate over the raw logs and unpacked data for ConnectionsManagerSet events raised by the Registry contract. -type RegistryConnectionsManagerSetIterator struct { - Event *RegistryConnectionsManagerSet // 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 *RegistryConnectionsManagerSetIterator) 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(RegistryConnectionsManagerSet) - 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(RegistryConnectionsManagerSet) - 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 *RegistryConnectionsManagerSetIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *RegistryConnectionsManagerSetIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// RegistryConnectionsManagerSet represents a ConnectionsManagerSet event raised by the Registry contract. -type RegistryConnectionsManagerSet struct { - ConnectionsManager common.Address - Raw types.Log // Blockchain specific contextual infos -} - -// FilterConnectionsManagerSet is a free log retrieval operation binding the contract event 0x460e3b50be19d87b32890a997e8e8783e00b4b49ca0ca80d9773a79c88ca5f7f. -// -// Solidity: event ConnectionsManagerSet(address indexed connectionsManager) -func (_Registry *RegistryFilterer) FilterConnectionsManagerSet(opts *bind.FilterOpts, connectionsManager []common.Address) (*RegistryConnectionsManagerSetIterator, error) { - - var connectionsManagerRule []interface{} - for _, connectionsManagerItem := range connectionsManager { - connectionsManagerRule = append(connectionsManagerRule, connectionsManagerItem) - } - - logs, sub, err := _Registry.contract.FilterLogs(opts, "ConnectionsManagerSet", connectionsManagerRule) - if err != nil { - return nil, err - } - return &RegistryConnectionsManagerSetIterator{contract: _Registry.contract, event: "ConnectionsManagerSet", logs: logs, sub: sub}, nil -} - -// WatchConnectionsManagerSet is a free log subscription operation binding the contract event 0x460e3b50be19d87b32890a997e8e8783e00b4b49ca0ca80d9773a79c88ca5f7f. -// -// Solidity: event ConnectionsManagerSet(address indexed connectionsManager) -func (_Registry *RegistryFilterer) WatchConnectionsManagerSet(opts *bind.WatchOpts, sink chan<- *RegistryConnectionsManagerSet, connectionsManager []common.Address) (event.Subscription, error) { - - var connectionsManagerRule []interface{} - for _, connectionsManagerItem := range connectionsManager { - connectionsManagerRule = append(connectionsManagerRule, connectionsManagerItem) - } - - logs, sub, err := _Registry.contract.WatchLogs(opts, "ConnectionsManagerSet", connectionsManagerRule) - 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(RegistryConnectionsManagerSet) - if err := _Registry.contract.UnpackLog(event, "ConnectionsManagerSet", 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 -} - -// ParseConnectionsManagerSet is a log parse operation binding the contract event 0x460e3b50be19d87b32890a997e8e8783e00b4b49ca0ca80d9773a79c88ca5f7f. -// -// Solidity: event ConnectionsManagerSet(address indexed connectionsManager) -func (_Registry *RegistryFilterer) ParseConnectionsManagerSet(log types.Log) (*RegistryConnectionsManagerSet, error) { - event := new(RegistryConnectionsManagerSet) - if err := _Registry.contract.UnpackLog(event, "ConnectionsManagerSet", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// RegistryControllerSetIterator is returned from FilterControllerSet and is used to iterate over the raw logs and unpacked data for ControllerSet events raised by the Registry contract. -type RegistryControllerSetIterator struct { - Event *RegistryControllerSet // 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 *RegistryControllerSetIterator) 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(RegistryControllerSet) - 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(RegistryControllerSet) - 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 *RegistryControllerSetIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *RegistryControllerSetIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// RegistryControllerSet represents a ControllerSet event raised by the Registry contract. -type RegistryControllerSet struct { - Controller common.Address - Raw types.Log // Blockchain specific contextual infos -} - -// FilterControllerSet is a free log retrieval operation binding the contract event 0x79f74fd5964b6943d8a1865abfb7f668c92fa3f32c0a2e3195da7d0946703ad7. -// -// Solidity: event ControllerSet(address indexed controller) -func (_Registry *RegistryFilterer) FilterControllerSet(opts *bind.FilterOpts, controller []common.Address) (*RegistryControllerSetIterator, error) { - - var controllerRule []interface{} - for _, controllerItem := range controller { - controllerRule = append(controllerRule, controllerItem) - } - - logs, sub, err := _Registry.contract.FilterLogs(opts, "ControllerSet", controllerRule) - if err != nil { - return nil, err - } - return &RegistryControllerSetIterator{contract: _Registry.contract, event: "ControllerSet", logs: logs, sub: sub}, nil -} - -// WatchControllerSet is a free log subscription operation binding the contract event 0x79f74fd5964b6943d8a1865abfb7f668c92fa3f32c0a2e3195da7d0946703ad7. -// -// Solidity: event ControllerSet(address indexed controller) -func (_Registry *RegistryFilterer) WatchControllerSet(opts *bind.WatchOpts, sink chan<- *RegistryControllerSet, controller []common.Address) (event.Subscription, error) { - - var controllerRule []interface{} - for _, controllerItem := range controller { - controllerRule = append(controllerRule, controllerItem) - } - - logs, sub, err := _Registry.contract.WatchLogs(opts, "ControllerSet", controllerRule) - 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(RegistryControllerSet) - if err := _Registry.contract.UnpackLog(event, "ControllerSet", 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 -} - -// ParseControllerSet is a log parse operation binding the contract event 0x79f74fd5964b6943d8a1865abfb7f668c92fa3f32c0a2e3195da7d0946703ad7. -// -// Solidity: event ControllerSet(address indexed controller) -func (_Registry *RegistryFilterer) ParseControllerSet(log types.Log) (*RegistryControllerSet, error) { - event := new(RegistryControllerSet) - if err := _Registry.contract.UnpackLog(event, "ControllerSet", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// RegistryDeviceDefinitionDeletedIterator is returned from FilterDeviceDefinitionDeleted and is used to iterate over the raw logs and unpacked data for DeviceDefinitionDeleted events raised by the Registry contract. -type RegistryDeviceDefinitionDeletedIterator struct { - Event *RegistryDeviceDefinitionDeleted // 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 *RegistryDeviceDefinitionDeletedIterator) 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(RegistryDeviceDefinitionDeleted) - 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(RegistryDeviceDefinitionDeleted) - 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 *RegistryDeviceDefinitionDeletedIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *RegistryDeviceDefinitionDeletedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// RegistryDeviceDefinitionDeleted represents a DeviceDefinitionDeleted event raised by the Registry contract. -type RegistryDeviceDefinitionDeleted struct { - TableId *big.Int - Id string - Raw types.Log // Blockchain specific contextual infos -} - -// FilterDeviceDefinitionDeleted is a free log retrieval operation binding the contract event 0x29504454a41793fb917c032e7baa04f0e74dd570dafc91d64cecff606f3411ca. -// -// Solidity: event DeviceDefinitionDeleted(uint256 indexed tableId, string id) -func (_Registry *RegistryFilterer) FilterDeviceDefinitionDeleted(opts *bind.FilterOpts, tableId []*big.Int) (*RegistryDeviceDefinitionDeletedIterator, error) { - - var tableIdRule []interface{} - for _, tableIdItem := range tableId { - tableIdRule = append(tableIdRule, tableIdItem) - } - - logs, sub, err := _Registry.contract.FilterLogs(opts, "DeviceDefinitionDeleted", tableIdRule) - if err != nil { - return nil, err - } - return &RegistryDeviceDefinitionDeletedIterator{contract: _Registry.contract, event: "DeviceDefinitionDeleted", logs: logs, sub: sub}, nil -} - -// WatchDeviceDefinitionDeleted is a free log subscription operation binding the contract event 0x29504454a41793fb917c032e7baa04f0e74dd570dafc91d64cecff606f3411ca. -// -// Solidity: event DeviceDefinitionDeleted(uint256 indexed tableId, string id) -func (_Registry *RegistryFilterer) WatchDeviceDefinitionDeleted(opts *bind.WatchOpts, sink chan<- *RegistryDeviceDefinitionDeleted, tableId []*big.Int) (event.Subscription, error) { - - var tableIdRule []interface{} - for _, tableIdItem := range tableId { - tableIdRule = append(tableIdRule, tableIdItem) - } - - logs, sub, err := _Registry.contract.WatchLogs(opts, "DeviceDefinitionDeleted", tableIdRule) - 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(RegistryDeviceDefinitionDeleted) - if err := _Registry.contract.UnpackLog(event, "DeviceDefinitionDeleted", 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 -} - -// ParseDeviceDefinitionDeleted is a log parse operation binding the contract event 0x29504454a41793fb917c032e7baa04f0e74dd570dafc91d64cecff606f3411ca. -// -// Solidity: event DeviceDefinitionDeleted(uint256 indexed tableId, string id) -func (_Registry *RegistryFilterer) ParseDeviceDefinitionDeleted(log types.Log) (*RegistryDeviceDefinitionDeleted, error) { - event := new(RegistryDeviceDefinitionDeleted) - if err := _Registry.contract.UnpackLog(event, "DeviceDefinitionDeleted", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// RegistryDeviceDefinitionIdSetIterator is returned from FilterDeviceDefinitionIdSet and is used to iterate over the raw logs and unpacked data for DeviceDefinitionIdSet events raised by the Registry contract. -type RegistryDeviceDefinitionIdSetIterator struct { - Event *RegistryDeviceDefinitionIdSet // 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 *RegistryDeviceDefinitionIdSetIterator) 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(RegistryDeviceDefinitionIdSet) - 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(RegistryDeviceDefinitionIdSet) - 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 *RegistryDeviceDefinitionIdSetIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *RegistryDeviceDefinitionIdSetIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// RegistryDeviceDefinitionIdSet represents a DeviceDefinitionIdSet event raised by the Registry contract. -type RegistryDeviceDefinitionIdSet struct { - VehicleId *big.Int - DdId string - Raw types.Log // Blockchain specific contextual infos -} - -// FilterDeviceDefinitionIdSet is a free log retrieval operation binding the contract event 0x11880ae675ee346586e2fe83800263cdf21bada6dba1a0623cad2163338a6fad. -// -// Solidity: event DeviceDefinitionIdSet(uint256 indexed vehicleId, string ddId) -func (_Registry *RegistryFilterer) FilterDeviceDefinitionIdSet(opts *bind.FilterOpts, vehicleId []*big.Int) (*RegistryDeviceDefinitionIdSetIterator, error) { - - var vehicleIdRule []interface{} - for _, vehicleIdItem := range vehicleId { - vehicleIdRule = append(vehicleIdRule, vehicleIdItem) - } - - logs, sub, err := _Registry.contract.FilterLogs(opts, "DeviceDefinitionIdSet", vehicleIdRule) - if err != nil { - return nil, err - } - return &RegistryDeviceDefinitionIdSetIterator{contract: _Registry.contract, event: "DeviceDefinitionIdSet", logs: logs, sub: sub}, nil -} - -// WatchDeviceDefinitionIdSet is a free log subscription operation binding the contract event 0x11880ae675ee346586e2fe83800263cdf21bada6dba1a0623cad2163338a6fad. -// -// Solidity: event DeviceDefinitionIdSet(uint256 indexed vehicleId, string ddId) -func (_Registry *RegistryFilterer) WatchDeviceDefinitionIdSet(opts *bind.WatchOpts, sink chan<- *RegistryDeviceDefinitionIdSet, vehicleId []*big.Int) (event.Subscription, error) { - - var vehicleIdRule []interface{} - for _, vehicleIdItem := range vehicleId { - vehicleIdRule = append(vehicleIdRule, vehicleIdItem) - } - - logs, sub, err := _Registry.contract.WatchLogs(opts, "DeviceDefinitionIdSet", vehicleIdRule) - 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(RegistryDeviceDefinitionIdSet) - if err := _Registry.contract.UnpackLog(event, "DeviceDefinitionIdSet", 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 -} - -// ParseDeviceDefinitionIdSet is a log parse operation binding the contract event 0x11880ae675ee346586e2fe83800263cdf21bada6dba1a0623cad2163338a6fad. -// -// Solidity: event DeviceDefinitionIdSet(uint256 indexed vehicleId, string ddId) -func (_Registry *RegistryFilterer) ParseDeviceDefinitionIdSet(log types.Log) (*RegistryDeviceDefinitionIdSet, error) { - event := new(RegistryDeviceDefinitionIdSet) - if err := _Registry.contract.UnpackLog(event, "DeviceDefinitionIdSet", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// RegistryDeviceDefinitionInsertedIterator is returned from FilterDeviceDefinitionInserted and is used to iterate over the raw logs and unpacked data for DeviceDefinitionInserted events raised by the Registry contract. -type RegistryDeviceDefinitionInsertedIterator struct { - Event *RegistryDeviceDefinitionInserted // 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 *RegistryDeviceDefinitionInsertedIterator) 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(RegistryDeviceDefinitionInserted) - 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(RegistryDeviceDefinitionInserted) - 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 *RegistryDeviceDefinitionInsertedIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *RegistryDeviceDefinitionInsertedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// RegistryDeviceDefinitionInserted represents a DeviceDefinitionInserted event raised by the Registry contract. -type RegistryDeviceDefinitionInserted struct { - TableId *big.Int - Id string - Model string - Year *big.Int - Raw types.Log // Blockchain specific contextual infos -} - -// FilterDeviceDefinitionInserted is a free log retrieval operation binding the contract event 0x462ef08cd7ac75ba02b3d84fe43ba15ae23f90a51484c6536057e951c2b629bb. -// -// Solidity: event DeviceDefinitionInserted(uint256 indexed tableId, string id, string model, uint256 year) -func (_Registry *RegistryFilterer) FilterDeviceDefinitionInserted(opts *bind.FilterOpts, tableId []*big.Int) (*RegistryDeviceDefinitionInsertedIterator, error) { - - var tableIdRule []interface{} - for _, tableIdItem := range tableId { - tableIdRule = append(tableIdRule, tableIdItem) - } - - logs, sub, err := _Registry.contract.FilterLogs(opts, "DeviceDefinitionInserted", tableIdRule) - if err != nil { - return nil, err - } - return &RegistryDeviceDefinitionInsertedIterator{contract: _Registry.contract, event: "DeviceDefinitionInserted", logs: logs, sub: sub}, nil -} - -// WatchDeviceDefinitionInserted is a free log subscription operation binding the contract event 0x462ef08cd7ac75ba02b3d84fe43ba15ae23f90a51484c6536057e951c2b629bb. -// -// Solidity: event DeviceDefinitionInserted(uint256 indexed tableId, string id, string model, uint256 year) -func (_Registry *RegistryFilterer) WatchDeviceDefinitionInserted(opts *bind.WatchOpts, sink chan<- *RegistryDeviceDefinitionInserted, tableId []*big.Int) (event.Subscription, error) { - - var tableIdRule []interface{} - for _, tableIdItem := range tableId { - tableIdRule = append(tableIdRule, tableIdItem) - } - - logs, sub, err := _Registry.contract.WatchLogs(opts, "DeviceDefinitionInserted", tableIdRule) - 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(RegistryDeviceDefinitionInserted) - if err := _Registry.contract.UnpackLog(event, "DeviceDefinitionInserted", 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 -} - -// ParseDeviceDefinitionInserted is a log parse operation binding the contract event 0x462ef08cd7ac75ba02b3d84fe43ba15ae23f90a51484c6536057e951c2b629bb. -// -// Solidity: event DeviceDefinitionInserted(uint256 indexed tableId, string id, string model, uint256 year) -func (_Registry *RegistryFilterer) ParseDeviceDefinitionInserted(log types.Log) (*RegistryDeviceDefinitionInserted, error) { - event := new(RegistryDeviceDefinitionInserted) - if err := _Registry.contract.UnpackLog(event, "DeviceDefinitionInserted", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// RegistryDeviceDefinitionTableCreatedIterator is returned from FilterDeviceDefinitionTableCreated and is used to iterate over the raw logs and unpacked data for DeviceDefinitionTableCreated events raised by the Registry contract. -type RegistryDeviceDefinitionTableCreatedIterator struct { - Event *RegistryDeviceDefinitionTableCreated // 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 *RegistryDeviceDefinitionTableCreatedIterator) 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(RegistryDeviceDefinitionTableCreated) - 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(RegistryDeviceDefinitionTableCreated) - 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 *RegistryDeviceDefinitionTableCreatedIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *RegistryDeviceDefinitionTableCreatedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// RegistryDeviceDefinitionTableCreated represents a DeviceDefinitionTableCreated event raised by the Registry contract. -type RegistryDeviceDefinitionTableCreated struct { - TableOwner common.Address - ManufacturerId *big.Int - TableId *big.Int - Raw types.Log // Blockchain specific contextual infos -} - -// FilterDeviceDefinitionTableCreated is a free log retrieval operation binding the contract event 0x34045c03bca909729abb696ffeefc454874a5b7967ee473daeafa7b45c91999e. -// -// Solidity: event DeviceDefinitionTableCreated(address indexed tableOwner, uint256 indexed manufacturerId, uint256 indexed tableId) -func (_Registry *RegistryFilterer) FilterDeviceDefinitionTableCreated(opts *bind.FilterOpts, tableOwner []common.Address, manufacturerId []*big.Int, tableId []*big.Int) (*RegistryDeviceDefinitionTableCreatedIterator, error) { - - var tableOwnerRule []interface{} - for _, tableOwnerItem := range tableOwner { - tableOwnerRule = append(tableOwnerRule, tableOwnerItem) - } - var manufacturerIdRule []interface{} - for _, manufacturerIdItem := range manufacturerId { - manufacturerIdRule = append(manufacturerIdRule, manufacturerIdItem) - } - var tableIdRule []interface{} - for _, tableIdItem := range tableId { - tableIdRule = append(tableIdRule, tableIdItem) - } - - logs, sub, err := _Registry.contract.FilterLogs(opts, "DeviceDefinitionTableCreated", tableOwnerRule, manufacturerIdRule, tableIdRule) - if err != nil { - return nil, err - } - return &RegistryDeviceDefinitionTableCreatedIterator{contract: _Registry.contract, event: "DeviceDefinitionTableCreated", logs: logs, sub: sub}, nil -} - -// WatchDeviceDefinitionTableCreated is a free log subscription operation binding the contract event 0x34045c03bca909729abb696ffeefc454874a5b7967ee473daeafa7b45c91999e. -// -// Solidity: event DeviceDefinitionTableCreated(address indexed tableOwner, uint256 indexed manufacturerId, uint256 indexed tableId) -func (_Registry *RegistryFilterer) WatchDeviceDefinitionTableCreated(opts *bind.WatchOpts, sink chan<- *RegistryDeviceDefinitionTableCreated, tableOwner []common.Address, manufacturerId []*big.Int, tableId []*big.Int) (event.Subscription, error) { - - var tableOwnerRule []interface{} - for _, tableOwnerItem := range tableOwner { - tableOwnerRule = append(tableOwnerRule, tableOwnerItem) - } - var manufacturerIdRule []interface{} - for _, manufacturerIdItem := range manufacturerId { - manufacturerIdRule = append(manufacturerIdRule, manufacturerIdItem) - } - var tableIdRule []interface{} - for _, tableIdItem := range tableId { - tableIdRule = append(tableIdRule, tableIdItem) - } - - logs, sub, err := _Registry.contract.WatchLogs(opts, "DeviceDefinitionTableCreated", tableOwnerRule, manufacturerIdRule, tableIdRule) - 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(RegistryDeviceDefinitionTableCreated) - if err := _Registry.contract.UnpackLog(event, "DeviceDefinitionTableCreated", 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 -} - -// ParseDeviceDefinitionTableCreated is a log parse operation binding the contract event 0x34045c03bca909729abb696ffeefc454874a5b7967ee473daeafa7b45c91999e. -// -// Solidity: event DeviceDefinitionTableCreated(address indexed tableOwner, uint256 indexed manufacturerId, uint256 indexed tableId) -func (_Registry *RegistryFilterer) ParseDeviceDefinitionTableCreated(log types.Log) (*RegistryDeviceDefinitionTableCreated, error) { - event := new(RegistryDeviceDefinitionTableCreated) - if err := _Registry.contract.UnpackLog(event, "DeviceDefinitionTableCreated", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// RegistryDeviceDefinitionUpdatedIterator is returned from FilterDeviceDefinitionUpdated and is used to iterate over the raw logs and unpacked data for DeviceDefinitionUpdated events raised by the Registry contract. -type RegistryDeviceDefinitionUpdatedIterator struct { - Event *RegistryDeviceDefinitionUpdated // 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 *RegistryDeviceDefinitionUpdatedIterator) 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(RegistryDeviceDefinitionUpdated) - 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(RegistryDeviceDefinitionUpdated) - 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 *RegistryDeviceDefinitionUpdatedIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *RegistryDeviceDefinitionUpdatedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// RegistryDeviceDefinitionUpdated represents a DeviceDefinitionUpdated event raised by the Registry contract. -type RegistryDeviceDefinitionUpdated struct { - TableId *big.Int - Id string - Raw types.Log // Blockchain specific contextual infos -} - -// FilterDeviceDefinitionUpdated is a free log retrieval operation binding the contract event 0x67c3ba003a03bea0bbf3e3b8b976139e07cca2c5b0cc89131d95f2a998796bf6. -// -// Solidity: event DeviceDefinitionUpdated(uint256 indexed tableId, string id) -func (_Registry *RegistryFilterer) FilterDeviceDefinitionUpdated(opts *bind.FilterOpts, tableId []*big.Int) (*RegistryDeviceDefinitionUpdatedIterator, error) { - - var tableIdRule []interface{} - for _, tableIdItem := range tableId { - tableIdRule = append(tableIdRule, tableIdItem) - } - - logs, sub, err := _Registry.contract.FilterLogs(opts, "DeviceDefinitionUpdated", tableIdRule) - if err != nil { - return nil, err - } - return &RegistryDeviceDefinitionUpdatedIterator{contract: _Registry.contract, event: "DeviceDefinitionUpdated", logs: logs, sub: sub}, nil -} - -// WatchDeviceDefinitionUpdated is a free log subscription operation binding the contract event 0x67c3ba003a03bea0bbf3e3b8b976139e07cca2c5b0cc89131d95f2a998796bf6. -// -// Solidity: event DeviceDefinitionUpdated(uint256 indexed tableId, string id) -func (_Registry *RegistryFilterer) WatchDeviceDefinitionUpdated(opts *bind.WatchOpts, sink chan<- *RegistryDeviceDefinitionUpdated, tableId []*big.Int) (event.Subscription, error) { - - var tableIdRule []interface{} - for _, tableIdItem := range tableId { - tableIdRule = append(tableIdRule, tableIdItem) - } - - logs, sub, err := _Registry.contract.WatchLogs(opts, "DeviceDefinitionUpdated", tableIdRule) - 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(RegistryDeviceDefinitionUpdated) - if err := _Registry.contract.UnpackLog(event, "DeviceDefinitionUpdated", 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 -} - -// ParseDeviceDefinitionUpdated is a log parse operation binding the contract event 0x67c3ba003a03bea0bbf3e3b8b976139e07cca2c5b0cc89131d95f2a998796bf6. -// -// Solidity: event DeviceDefinitionUpdated(uint256 indexed tableId, string id) -func (_Registry *RegistryFilterer) ParseDeviceDefinitionUpdated(log types.Log) (*RegistryDeviceDefinitionUpdated, error) { - event := new(RegistryDeviceDefinitionUpdated) - if err := _Registry.contract.UnpackLog(event, "DeviceDefinitionUpdated", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// RegistryDimoCreditSetIterator is returned from FilterDimoCreditSet and is used to iterate over the raw logs and unpacked data for DimoCreditSet events raised by the Registry contract. -type RegistryDimoCreditSetIterator struct { - Event *RegistryDimoCreditSet // 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 *RegistryDimoCreditSetIterator) 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(RegistryDimoCreditSet) - 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(RegistryDimoCreditSet) - 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 *RegistryDimoCreditSetIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *RegistryDimoCreditSetIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// RegistryDimoCreditSet represents a DimoCreditSet event raised by the Registry contract. -type RegistryDimoCreditSet struct { - DimoCredit common.Address - Raw types.Log // Blockchain specific contextual infos -} - -// FilterDimoCreditSet is a free log retrieval operation binding the contract event 0x6f17bce437ce6897c71e9d81fa557073d0f924fbafbace72ebd44e39cbba6506. -// -// Solidity: event DimoCreditSet(address indexed dimoCredit) -func (_Registry *RegistryFilterer) FilterDimoCreditSet(opts *bind.FilterOpts, dimoCredit []common.Address) (*RegistryDimoCreditSetIterator, error) { - - var dimoCreditRule []interface{} - for _, dimoCreditItem := range dimoCredit { - dimoCreditRule = append(dimoCreditRule, dimoCreditItem) - } - - logs, sub, err := _Registry.contract.FilterLogs(opts, "DimoCreditSet", dimoCreditRule) - if err != nil { - return nil, err - } - return &RegistryDimoCreditSetIterator{contract: _Registry.contract, event: "DimoCreditSet", logs: logs, sub: sub}, nil -} - -// WatchDimoCreditSet is a free log subscription operation binding the contract event 0x6f17bce437ce6897c71e9d81fa557073d0f924fbafbace72ebd44e39cbba6506. -// -// Solidity: event DimoCreditSet(address indexed dimoCredit) -func (_Registry *RegistryFilterer) WatchDimoCreditSet(opts *bind.WatchOpts, sink chan<- *RegistryDimoCreditSet, dimoCredit []common.Address) (event.Subscription, error) { - - var dimoCreditRule []interface{} - for _, dimoCreditItem := range dimoCredit { - dimoCreditRule = append(dimoCreditRule, dimoCreditItem) - } - - logs, sub, err := _Registry.contract.WatchLogs(opts, "DimoCreditSet", dimoCreditRule) - 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(RegistryDimoCreditSet) - if err := _Registry.contract.UnpackLog(event, "DimoCreditSet", 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 -} - -// ParseDimoCreditSet is a log parse operation binding the contract event 0x6f17bce437ce6897c71e9d81fa557073d0f924fbafbace72ebd44e39cbba6506. -// -// Solidity: event DimoCreditSet(address indexed dimoCredit) -func (_Registry *RegistryFilterer) ParseDimoCreditSet(log types.Log) (*RegistryDimoCreditSet, error) { - event := new(RegistryDimoCreditSet) - if err := _Registry.contract.UnpackLog(event, "DimoCreditSet", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// RegistryDimoStreamrEnsSetIterator is returned from FilterDimoStreamrEnsSet and is used to iterate over the raw logs and unpacked data for DimoStreamrEnsSet events raised by the Registry contract. -type RegistryDimoStreamrEnsSetIterator struct { - Event *RegistryDimoStreamrEnsSet // 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 *RegistryDimoStreamrEnsSetIterator) 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(RegistryDimoStreamrEnsSet) - 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(RegistryDimoStreamrEnsSet) - 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 *RegistryDimoStreamrEnsSetIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *RegistryDimoStreamrEnsSetIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// RegistryDimoStreamrEnsSet represents a DimoStreamrEnsSet event raised by the Registry contract. -type RegistryDimoStreamrEnsSet struct { - DimoStreamrEns string - Raw types.Log // Blockchain specific contextual infos -} - -// FilterDimoStreamrEnsSet is a free log retrieval operation binding the contract event 0x5c6e4ce43bdb4e1b32c15a4e01073b36c28f6f16a024609785a545634d83ba69. -// -// Solidity: event DimoStreamrEnsSet(string dimoStreamrEns) -func (_Registry *RegistryFilterer) FilterDimoStreamrEnsSet(opts *bind.FilterOpts) (*RegistryDimoStreamrEnsSetIterator, error) { - - logs, sub, err := _Registry.contract.FilterLogs(opts, "DimoStreamrEnsSet") - if err != nil { - return nil, err - } - return &RegistryDimoStreamrEnsSetIterator{contract: _Registry.contract, event: "DimoStreamrEnsSet", logs: logs, sub: sub}, nil -} - -// WatchDimoStreamrEnsSet is a free log subscription operation binding the contract event 0x5c6e4ce43bdb4e1b32c15a4e01073b36c28f6f16a024609785a545634d83ba69. -// -// Solidity: event DimoStreamrEnsSet(string dimoStreamrEns) -func (_Registry *RegistryFilterer) WatchDimoStreamrEnsSet(opts *bind.WatchOpts, sink chan<- *RegistryDimoStreamrEnsSet) (event.Subscription, error) { - - logs, sub, err := _Registry.contract.WatchLogs(opts, "DimoStreamrEnsSet") - 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(RegistryDimoStreamrEnsSet) - if err := _Registry.contract.UnpackLog(event, "DimoStreamrEnsSet", 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 -} - -// ParseDimoStreamrEnsSet is a log parse operation binding the contract event 0x5c6e4ce43bdb4e1b32c15a4e01073b36c28f6f16a024609785a545634d83ba69. -// -// Solidity: event DimoStreamrEnsSet(string dimoStreamrEns) -func (_Registry *RegistryFilterer) ParseDimoStreamrEnsSet(log types.Log) (*RegistryDimoStreamrEnsSet, error) { - event := new(RegistryDimoStreamrEnsSet) - if err := _Registry.contract.UnpackLog(event, "DimoStreamrEnsSet", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// RegistryDimoStreamrNodeSetIterator is returned from FilterDimoStreamrNodeSet and is used to iterate over the raw logs and unpacked data for DimoStreamrNodeSet events raised by the Registry contract. -type RegistryDimoStreamrNodeSetIterator struct { - Event *RegistryDimoStreamrNodeSet // 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 *RegistryDimoStreamrNodeSetIterator) 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(RegistryDimoStreamrNodeSet) - 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(RegistryDimoStreamrNodeSet) - 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 *RegistryDimoStreamrNodeSetIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *RegistryDimoStreamrNodeSetIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// RegistryDimoStreamrNodeSet represents a DimoStreamrNodeSet event raised by the Registry contract. -type RegistryDimoStreamrNodeSet struct { - DimoStreamrNode common.Address - Raw types.Log // Blockchain specific contextual infos -} - -// FilterDimoStreamrNodeSet is a free log retrieval operation binding the contract event 0x49a3b2d583fcf868092d6cb62f348da2ae9e03698d56a5104a9dd5ea5cafbae7. -// -// Solidity: event DimoStreamrNodeSet(address dimoStreamrNode) -func (_Registry *RegistryFilterer) FilterDimoStreamrNodeSet(opts *bind.FilterOpts) (*RegistryDimoStreamrNodeSetIterator, error) { - - logs, sub, err := _Registry.contract.FilterLogs(opts, "DimoStreamrNodeSet") - if err != nil { - return nil, err - } - return &RegistryDimoStreamrNodeSetIterator{contract: _Registry.contract, event: "DimoStreamrNodeSet", logs: logs, sub: sub}, nil -} - -// WatchDimoStreamrNodeSet is a free log subscription operation binding the contract event 0x49a3b2d583fcf868092d6cb62f348da2ae9e03698d56a5104a9dd5ea5cafbae7. -// -// Solidity: event DimoStreamrNodeSet(address dimoStreamrNode) -func (_Registry *RegistryFilterer) WatchDimoStreamrNodeSet(opts *bind.WatchOpts, sink chan<- *RegistryDimoStreamrNodeSet) (event.Subscription, error) { - - logs, sub, err := _Registry.contract.WatchLogs(opts, "DimoStreamrNodeSet") - 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(RegistryDimoStreamrNodeSet) - if err := _Registry.contract.UnpackLog(event, "DimoStreamrNodeSet", 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 -} - -// ParseDimoStreamrNodeSet is a log parse operation binding the contract event 0x49a3b2d583fcf868092d6cb62f348da2ae9e03698d56a5104a9dd5ea5cafbae7. -// -// Solidity: event DimoStreamrNodeSet(address dimoStreamrNode) -func (_Registry *RegistryFilterer) ParseDimoStreamrNodeSet(log types.Log) (*RegistryDimoStreamrNodeSet, error) { - event := new(RegistryDimoStreamrNodeSet) - if err := _Registry.contract.UnpackLog(event, "DimoStreamrNodeSet", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// RegistryDimoTokenSetIterator is returned from FilterDimoTokenSet and is used to iterate over the raw logs and unpacked data for DimoTokenSet events raised by the Registry contract. -type RegistryDimoTokenSetIterator struct { - Event *RegistryDimoTokenSet // 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 *RegistryDimoTokenSetIterator) 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(RegistryDimoTokenSet) - 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(RegistryDimoTokenSet) - 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 *RegistryDimoTokenSetIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *RegistryDimoTokenSetIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// RegistryDimoTokenSet represents a DimoTokenSet event raised by the Registry contract. -type RegistryDimoTokenSet struct { - DimoToken common.Address - Raw types.Log // Blockchain specific contextual infos -} - -// FilterDimoTokenSet is a free log retrieval operation binding the contract event 0x3c3a6813362275982da07666bb5b9d4306b5d37c557e51bf60512c8da7a08bc8. -// -// Solidity: event DimoTokenSet(address indexed dimoToken) -func (_Registry *RegistryFilterer) FilterDimoTokenSet(opts *bind.FilterOpts, dimoToken []common.Address) (*RegistryDimoTokenSetIterator, error) { - - var dimoTokenRule []interface{} - for _, dimoTokenItem := range dimoToken { - dimoTokenRule = append(dimoTokenRule, dimoTokenItem) - } - - logs, sub, err := _Registry.contract.FilterLogs(opts, "DimoTokenSet", dimoTokenRule) - if err != nil { - return nil, err - } - return &RegistryDimoTokenSetIterator{contract: _Registry.contract, event: "DimoTokenSet", logs: logs, sub: sub}, nil -} - -// WatchDimoTokenSet is a free log subscription operation binding the contract event 0x3c3a6813362275982da07666bb5b9d4306b5d37c557e51bf60512c8da7a08bc8. -// -// Solidity: event DimoTokenSet(address indexed dimoToken) -func (_Registry *RegistryFilterer) WatchDimoTokenSet(opts *bind.WatchOpts, sink chan<- *RegistryDimoTokenSet, dimoToken []common.Address) (event.Subscription, error) { - - var dimoTokenRule []interface{} - for _, dimoTokenItem := range dimoToken { - dimoTokenRule = append(dimoTokenRule, dimoTokenItem) - } - - logs, sub, err := _Registry.contract.WatchLogs(opts, "DimoTokenSet", dimoTokenRule) - 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(RegistryDimoTokenSet) - if err := _Registry.contract.UnpackLog(event, "DimoTokenSet", 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 -} - -// ParseDimoTokenSet is a log parse operation binding the contract event 0x3c3a6813362275982da07666bb5b9d4306b5d37c557e51bf60512c8da7a08bc8. -// -// Solidity: event DimoTokenSet(address indexed dimoToken) -func (_Registry *RegistryFilterer) ParseDimoTokenSet(log types.Log) (*RegistryDimoTokenSet, error) { - event := new(RegistryDimoTokenSet) - if err := _Registry.contract.UnpackLog(event, "DimoTokenSet", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// RegistryFoundationSetIterator is returned from FilterFoundationSet and is used to iterate over the raw logs and unpacked data for FoundationSet events raised by the Registry contract. -type RegistryFoundationSetIterator struct { - Event *RegistryFoundationSet // 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 *RegistryFoundationSetIterator) 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(RegistryFoundationSet) - 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(RegistryFoundationSet) - 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 *RegistryFoundationSetIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *RegistryFoundationSetIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// RegistryFoundationSet represents a FoundationSet event raised by the Registry contract. -type RegistryFoundationSet struct { - Foundation common.Address - Raw types.Log // Blockchain specific contextual infos -} - -// FilterFoundationSet is a free log retrieval operation binding the contract event 0xfb3a44111c652758dbcb45122c36ba9fa8d5f2c5b3df984a0196dee5a0bdcc97. -// -// Solidity: event FoundationSet(address indexed foundation) -func (_Registry *RegistryFilterer) FilterFoundationSet(opts *bind.FilterOpts, foundation []common.Address) (*RegistryFoundationSetIterator, error) { - - var foundationRule []interface{} - for _, foundationItem := range foundation { - foundationRule = append(foundationRule, foundationItem) - } - - logs, sub, err := _Registry.contract.FilterLogs(opts, "FoundationSet", foundationRule) - if err != nil { - return nil, err - } - return &RegistryFoundationSetIterator{contract: _Registry.contract, event: "FoundationSet", logs: logs, sub: sub}, nil -} - -// WatchFoundationSet is a free log subscription operation binding the contract event 0xfb3a44111c652758dbcb45122c36ba9fa8d5f2c5b3df984a0196dee5a0bdcc97. -// -// Solidity: event FoundationSet(address indexed foundation) -func (_Registry *RegistryFilterer) WatchFoundationSet(opts *bind.WatchOpts, sink chan<- *RegistryFoundationSet, foundation []common.Address) (event.Subscription, error) { - - var foundationRule []interface{} - for _, foundationItem := range foundation { - foundationRule = append(foundationRule, foundationItem) - } - - logs, sub, err := _Registry.contract.WatchLogs(opts, "FoundationSet", foundationRule) - 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(RegistryFoundationSet) - if err := _Registry.contract.UnpackLog(event, "FoundationSet", 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 -} - -// ParseFoundationSet is a log parse operation binding the contract event 0xfb3a44111c652758dbcb45122c36ba9fa8d5f2c5b3df984a0196dee5a0bdcc97. -// -// Solidity: event FoundationSet(address indexed foundation) -func (_Registry *RegistryFilterer) ParseFoundationSet(log types.Log) (*RegistryFoundationSet, error) { - event := new(RegistryFoundationSet) - if err := _Registry.contract.UnpackLog(event, "FoundationSet", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// RegistryManufacturerAttributeAddedIterator is returned from FilterManufacturerAttributeAdded and is used to iterate over the raw logs and unpacked data for ManufacturerAttributeAdded events raised by the Registry contract. -type RegistryManufacturerAttributeAddedIterator struct { - Event *RegistryManufacturerAttributeAdded // 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 *RegistryManufacturerAttributeAddedIterator) 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(RegistryManufacturerAttributeAdded) - 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(RegistryManufacturerAttributeAdded) - 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 *RegistryManufacturerAttributeAddedIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *RegistryManufacturerAttributeAddedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// RegistryManufacturerAttributeAdded represents a ManufacturerAttributeAdded event raised by the Registry contract. -type RegistryManufacturerAttributeAdded struct { - Attribute string - Raw types.Log // Blockchain specific contextual infos -} - -// FilterManufacturerAttributeAdded is a free log retrieval operation binding the contract event 0x47ff34ba477617ab4dc2aefe5ea26ba19a207b052ec44d59b86c2ff3e7fd53b3. -// -// Solidity: event ManufacturerAttributeAdded(string attribute) -func (_Registry *RegistryFilterer) FilterManufacturerAttributeAdded(opts *bind.FilterOpts) (*RegistryManufacturerAttributeAddedIterator, error) { - - logs, sub, err := _Registry.contract.FilterLogs(opts, "ManufacturerAttributeAdded") - if err != nil { - return nil, err - } - return &RegistryManufacturerAttributeAddedIterator{contract: _Registry.contract, event: "ManufacturerAttributeAdded", logs: logs, sub: sub}, nil -} - -// WatchManufacturerAttributeAdded is a free log subscription operation binding the contract event 0x47ff34ba477617ab4dc2aefe5ea26ba19a207b052ec44d59b86c2ff3e7fd53b3. -// -// Solidity: event ManufacturerAttributeAdded(string attribute) -func (_Registry *RegistryFilterer) WatchManufacturerAttributeAdded(opts *bind.WatchOpts, sink chan<- *RegistryManufacturerAttributeAdded) (event.Subscription, error) { - - logs, sub, err := _Registry.contract.WatchLogs(opts, "ManufacturerAttributeAdded") - 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(RegistryManufacturerAttributeAdded) - if err := _Registry.contract.UnpackLog(event, "ManufacturerAttributeAdded", 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 -} - -// ParseManufacturerAttributeAdded is a log parse operation binding the contract event 0x47ff34ba477617ab4dc2aefe5ea26ba19a207b052ec44d59b86c2ff3e7fd53b3. -// -// Solidity: event ManufacturerAttributeAdded(string attribute) -func (_Registry *RegistryFilterer) ParseManufacturerAttributeAdded(log types.Log) (*RegistryManufacturerAttributeAdded, error) { - event := new(RegistryManufacturerAttributeAdded) - if err := _Registry.contract.UnpackLog(event, "ManufacturerAttributeAdded", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// RegistryManufacturerAttributeSetIterator is returned from FilterManufacturerAttributeSet and is used to iterate over the raw logs and unpacked data for ManufacturerAttributeSet events raised by the Registry contract. -type RegistryManufacturerAttributeSetIterator struct { - Event *RegistryManufacturerAttributeSet // 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 *RegistryManufacturerAttributeSetIterator) 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(RegistryManufacturerAttributeSet) - 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(RegistryManufacturerAttributeSet) - 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 *RegistryManufacturerAttributeSetIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *RegistryManufacturerAttributeSetIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// RegistryManufacturerAttributeSet represents a ManufacturerAttributeSet event raised by the Registry contract. -type RegistryManufacturerAttributeSet struct { - TokenId *big.Int - Attribute string - Info string - Raw types.Log // Blockchain specific contextual infos -} - -// FilterManufacturerAttributeSet is a free log retrieval operation binding the contract event 0xb81a4ce1a42b79dd48c79a2c5a0b170cebf3c78b5ecb25df31066eb9b656a929. -// -// Solidity: event ManufacturerAttributeSet(uint256 tokenId, string attribute, string info) -func (_Registry *RegistryFilterer) FilterManufacturerAttributeSet(opts *bind.FilterOpts) (*RegistryManufacturerAttributeSetIterator, error) { - - logs, sub, err := _Registry.contract.FilterLogs(opts, "ManufacturerAttributeSet") - if err != nil { - return nil, err - } - return &RegistryManufacturerAttributeSetIterator{contract: _Registry.contract, event: "ManufacturerAttributeSet", logs: logs, sub: sub}, nil -} - -// WatchManufacturerAttributeSet is a free log subscription operation binding the contract event 0xb81a4ce1a42b79dd48c79a2c5a0b170cebf3c78b5ecb25df31066eb9b656a929. -// -// Solidity: event ManufacturerAttributeSet(uint256 tokenId, string attribute, string info) -func (_Registry *RegistryFilterer) WatchManufacturerAttributeSet(opts *bind.WatchOpts, sink chan<- *RegistryManufacturerAttributeSet) (event.Subscription, error) { - - logs, sub, err := _Registry.contract.WatchLogs(opts, "ManufacturerAttributeSet") - 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(RegistryManufacturerAttributeSet) - if err := _Registry.contract.UnpackLog(event, "ManufacturerAttributeSet", 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 -} - -// ParseManufacturerAttributeSet is a log parse operation binding the contract event 0xb81a4ce1a42b79dd48c79a2c5a0b170cebf3c78b5ecb25df31066eb9b656a929. -// -// Solidity: event ManufacturerAttributeSet(uint256 tokenId, string attribute, string info) -func (_Registry *RegistryFilterer) ParseManufacturerAttributeSet(log types.Log) (*RegistryManufacturerAttributeSet, error) { - event := new(RegistryManufacturerAttributeSet) - if err := _Registry.contract.UnpackLog(event, "ManufacturerAttributeSet", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// RegistryManufacturerIdProxySetIterator is returned from FilterManufacturerIdProxySet and is used to iterate over the raw logs and unpacked data for ManufacturerIdProxySet events raised by the Registry contract. -type RegistryManufacturerIdProxySetIterator struct { - Event *RegistryManufacturerIdProxySet // 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 *RegistryManufacturerIdProxySetIterator) 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(RegistryManufacturerIdProxySet) - 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(RegistryManufacturerIdProxySet) - 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 *RegistryManufacturerIdProxySetIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *RegistryManufacturerIdProxySetIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// RegistryManufacturerIdProxySet represents a ManufacturerIdProxySet event raised by the Registry contract. -type RegistryManufacturerIdProxySet struct { - Proxy common.Address - Raw types.Log // Blockchain specific contextual infos -} - -// FilterManufacturerIdProxySet is a free log retrieval operation binding the contract event 0xf9bca5f2d5444f9fbb6e6d0fb2b4c2cda766bd110a1326420b883ffc6978f5e2. -// -// Solidity: event ManufacturerIdProxySet(address indexed proxy) -func (_Registry *RegistryFilterer) FilterManufacturerIdProxySet(opts *bind.FilterOpts, proxy []common.Address) (*RegistryManufacturerIdProxySetIterator, error) { - - var proxyRule []interface{} - for _, proxyItem := range proxy { - proxyRule = append(proxyRule, proxyItem) - } - - logs, sub, err := _Registry.contract.FilterLogs(opts, "ManufacturerIdProxySet", proxyRule) - if err != nil { - return nil, err - } - return &RegistryManufacturerIdProxySetIterator{contract: _Registry.contract, event: "ManufacturerIdProxySet", logs: logs, sub: sub}, nil -} - -// WatchManufacturerIdProxySet is a free log subscription operation binding the contract event 0xf9bca5f2d5444f9fbb6e6d0fb2b4c2cda766bd110a1326420b883ffc6978f5e2. -// -// Solidity: event ManufacturerIdProxySet(address indexed proxy) -func (_Registry *RegistryFilterer) WatchManufacturerIdProxySet(opts *bind.WatchOpts, sink chan<- *RegistryManufacturerIdProxySet, proxy []common.Address) (event.Subscription, error) { - - var proxyRule []interface{} - for _, proxyItem := range proxy { - proxyRule = append(proxyRule, proxyItem) - } - - logs, sub, err := _Registry.contract.WatchLogs(opts, "ManufacturerIdProxySet", proxyRule) - 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(RegistryManufacturerIdProxySet) - if err := _Registry.contract.UnpackLog(event, "ManufacturerIdProxySet", 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 -} - -// ParseManufacturerIdProxySet is a log parse operation binding the contract event 0xf9bca5f2d5444f9fbb6e6d0fb2b4c2cda766bd110a1326420b883ffc6978f5e2. -// -// Solidity: event ManufacturerIdProxySet(address indexed proxy) -func (_Registry *RegistryFilterer) ParseManufacturerIdProxySet(log types.Log) (*RegistryManufacturerIdProxySet, error) { - event := new(RegistryManufacturerIdProxySet) - if err := _Registry.contract.UnpackLog(event, "ManufacturerIdProxySet", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// RegistryManufacturerLicenseSetIterator is returned from FilterManufacturerLicenseSet and is used to iterate over the raw logs and unpacked data for ManufacturerLicenseSet events raised by the Registry contract. -type RegistryManufacturerLicenseSetIterator struct { - Event *RegistryManufacturerLicenseSet // 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 *RegistryManufacturerLicenseSetIterator) 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(RegistryManufacturerLicenseSet) - 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(RegistryManufacturerLicenseSet) - 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 *RegistryManufacturerLicenseSetIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *RegistryManufacturerLicenseSetIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// RegistryManufacturerLicenseSet represents a ManufacturerLicenseSet event raised by the Registry contract. -type RegistryManufacturerLicenseSet struct { - ManufacturerLicense common.Address - Raw types.Log // Blockchain specific contextual infos -} - -// FilterManufacturerLicenseSet is a free log retrieval operation binding the contract event 0x52ce79552a0de48e63f55aa197389ac337a67a7fed9ba71fe580aeaedd7a05e9. -// -// Solidity: event ManufacturerLicenseSet(address indexed manufacturerLicense) -func (_Registry *RegistryFilterer) FilterManufacturerLicenseSet(opts *bind.FilterOpts, manufacturerLicense []common.Address) (*RegistryManufacturerLicenseSetIterator, error) { - - var manufacturerLicenseRule []interface{} - for _, manufacturerLicenseItem := range manufacturerLicense { - manufacturerLicenseRule = append(manufacturerLicenseRule, manufacturerLicenseItem) - } - - logs, sub, err := _Registry.contract.FilterLogs(opts, "ManufacturerLicenseSet", manufacturerLicenseRule) - if err != nil { - return nil, err - } - return &RegistryManufacturerLicenseSetIterator{contract: _Registry.contract, event: "ManufacturerLicenseSet", logs: logs, sub: sub}, nil -} - -// WatchManufacturerLicenseSet is a free log subscription operation binding the contract event 0x52ce79552a0de48e63f55aa197389ac337a67a7fed9ba71fe580aeaedd7a05e9. -// -// Solidity: event ManufacturerLicenseSet(address indexed manufacturerLicense) -func (_Registry *RegistryFilterer) WatchManufacturerLicenseSet(opts *bind.WatchOpts, sink chan<- *RegistryManufacturerLicenseSet, manufacturerLicense []common.Address) (event.Subscription, error) { - - var manufacturerLicenseRule []interface{} - for _, manufacturerLicenseItem := range manufacturerLicense { - manufacturerLicenseRule = append(manufacturerLicenseRule, manufacturerLicenseItem) - } - - logs, sub, err := _Registry.contract.WatchLogs(opts, "ManufacturerLicenseSet", manufacturerLicenseRule) - 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(RegistryManufacturerLicenseSet) - if err := _Registry.contract.UnpackLog(event, "ManufacturerLicenseSet", 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 -} - -// ParseManufacturerLicenseSet is a log parse operation binding the contract event 0x52ce79552a0de48e63f55aa197389ac337a67a7fed9ba71fe580aeaedd7a05e9. -// -// Solidity: event ManufacturerLicenseSet(address indexed manufacturerLicense) -func (_Registry *RegistryFilterer) ParseManufacturerLicenseSet(log types.Log) (*RegistryManufacturerLicenseSet, error) { - event := new(RegistryManufacturerLicenseSet) - if err := _Registry.contract.UnpackLog(event, "ManufacturerLicenseSet", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// RegistryManufacturerNodeMintedIterator is returned from FilterManufacturerNodeMinted and is used to iterate over the raw logs and unpacked data for ManufacturerNodeMinted events raised by the Registry contract. -type RegistryManufacturerNodeMintedIterator struct { - Event *RegistryManufacturerNodeMinted // 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 *RegistryManufacturerNodeMintedIterator) 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(RegistryManufacturerNodeMinted) - 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(RegistryManufacturerNodeMinted) - 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 *RegistryManufacturerNodeMintedIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *RegistryManufacturerNodeMintedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// RegistryManufacturerNodeMinted represents a ManufacturerNodeMinted event raised by the Registry contract. -type RegistryManufacturerNodeMinted struct { - Name string - TokenId *big.Int - Owner common.Address - Raw types.Log // Blockchain specific contextual infos -} - -// FilterManufacturerNodeMinted is a free log retrieval operation binding the contract event 0xc1279f9a9b23f63ed6e8fe22568fdb1962597404fb8ecb1d4b1722ac5e7a4343. -// -// Solidity: event ManufacturerNodeMinted(string name, uint256 tokenId, address indexed owner) -func (_Registry *RegistryFilterer) FilterManufacturerNodeMinted(opts *bind.FilterOpts, owner []common.Address) (*RegistryManufacturerNodeMintedIterator, error) { - - var ownerRule []interface{} - for _, ownerItem := range owner { - ownerRule = append(ownerRule, ownerItem) - } - - logs, sub, err := _Registry.contract.FilterLogs(opts, "ManufacturerNodeMinted", ownerRule) - if err != nil { - return nil, err - } - return &RegistryManufacturerNodeMintedIterator{contract: _Registry.contract, event: "ManufacturerNodeMinted", logs: logs, sub: sub}, nil -} - -// WatchManufacturerNodeMinted is a free log subscription operation binding the contract event 0xc1279f9a9b23f63ed6e8fe22568fdb1962597404fb8ecb1d4b1722ac5e7a4343. -// -// Solidity: event ManufacturerNodeMinted(string name, uint256 tokenId, address indexed owner) -func (_Registry *RegistryFilterer) WatchManufacturerNodeMinted(opts *bind.WatchOpts, sink chan<- *RegistryManufacturerNodeMinted, owner []common.Address) (event.Subscription, error) { - - var ownerRule []interface{} - for _, ownerItem := range owner { - ownerRule = append(ownerRule, ownerItem) - } - - logs, sub, err := _Registry.contract.WatchLogs(opts, "ManufacturerNodeMinted", ownerRule) - 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(RegistryManufacturerNodeMinted) - if err := _Registry.contract.UnpackLog(event, "ManufacturerNodeMinted", 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 -} - -// ParseManufacturerNodeMinted is a log parse operation binding the contract event 0xc1279f9a9b23f63ed6e8fe22568fdb1962597404fb8ecb1d4b1722ac5e7a4343. -// -// Solidity: event ManufacturerNodeMinted(string name, uint256 tokenId, address indexed owner) -func (_Registry *RegistryFilterer) ParseManufacturerNodeMinted(log types.Log) (*RegistryManufacturerNodeMinted, error) { - event := new(RegistryManufacturerNodeMinted) - if err := _Registry.contract.UnpackLog(event, "ManufacturerNodeMinted", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// RegistryManufacturerTableSetIterator is returned from FilterManufacturerTableSet and is used to iterate over the raw logs and unpacked data for ManufacturerTableSet events raised by the Registry contract. -type RegistryManufacturerTableSetIterator struct { - Event *RegistryManufacturerTableSet // 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 *RegistryManufacturerTableSetIterator) 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(RegistryManufacturerTableSet) - 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(RegistryManufacturerTableSet) - 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 *RegistryManufacturerTableSetIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *RegistryManufacturerTableSetIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// RegistryManufacturerTableSet represents a ManufacturerTableSet event raised by the Registry contract. -type RegistryManufacturerTableSet struct { - ManufacturerId *big.Int - TableId *big.Int - Raw types.Log // Blockchain specific contextual infos -} - -// FilterManufacturerTableSet is a free log retrieval operation binding the contract event 0x753affc1c97f48f4eb21cf9ca5906ba280ab310171483c29e73826d74505b3cf. -// -// Solidity: event ManufacturerTableSet(uint256 indexed manufacturerId, uint256 indexed tableId) -func (_Registry *RegistryFilterer) FilterManufacturerTableSet(opts *bind.FilterOpts, manufacturerId []*big.Int, tableId []*big.Int) (*RegistryManufacturerTableSetIterator, error) { - - var manufacturerIdRule []interface{} - for _, manufacturerIdItem := range manufacturerId { - manufacturerIdRule = append(manufacturerIdRule, manufacturerIdItem) - } - var tableIdRule []interface{} - for _, tableIdItem := range tableId { - tableIdRule = append(tableIdRule, tableIdItem) - } - - logs, sub, err := _Registry.contract.FilterLogs(opts, "ManufacturerTableSet", manufacturerIdRule, tableIdRule) - if err != nil { - return nil, err - } - return &RegistryManufacturerTableSetIterator{contract: _Registry.contract, event: "ManufacturerTableSet", logs: logs, sub: sub}, nil -} - -// WatchManufacturerTableSet is a free log subscription operation binding the contract event 0x753affc1c97f48f4eb21cf9ca5906ba280ab310171483c29e73826d74505b3cf. -// -// Solidity: event ManufacturerTableSet(uint256 indexed manufacturerId, uint256 indexed tableId) -func (_Registry *RegistryFilterer) WatchManufacturerTableSet(opts *bind.WatchOpts, sink chan<- *RegistryManufacturerTableSet, manufacturerId []*big.Int, tableId []*big.Int) (event.Subscription, error) { - - var manufacturerIdRule []interface{} - for _, manufacturerIdItem := range manufacturerId { - manufacturerIdRule = append(manufacturerIdRule, manufacturerIdItem) - } - var tableIdRule []interface{} - for _, tableIdItem := range tableId { - tableIdRule = append(tableIdRule, tableIdItem) - } - - logs, sub, err := _Registry.contract.WatchLogs(opts, "ManufacturerTableSet", manufacturerIdRule, tableIdRule) - 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(RegistryManufacturerTableSet) - if err := _Registry.contract.UnpackLog(event, "ManufacturerTableSet", 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 -} - -// ParseManufacturerTableSet is a log parse operation binding the contract event 0x753affc1c97f48f4eb21cf9ca5906ba280ab310171483c29e73826d74505b3cf. -// -// Solidity: event ManufacturerTableSet(uint256 indexed manufacturerId, uint256 indexed tableId) -func (_Registry *RegistryFilterer) ParseManufacturerTableSet(log types.Log) (*RegistryManufacturerTableSet, error) { - event := new(RegistryManufacturerTableSet) - if err := _Registry.contract.UnpackLog(event, "ManufacturerTableSet", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// RegistryModuleAddedIterator is returned from FilterModuleAdded and is used to iterate over the raw logs and unpacked data for ModuleAdded events raised by the Registry contract. -type RegistryModuleAddedIterator struct { - Event *RegistryModuleAdded // 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 *RegistryModuleAddedIterator) 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(RegistryModuleAdded) - 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(RegistryModuleAdded) - 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 *RegistryModuleAddedIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *RegistryModuleAddedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// RegistryModuleAdded represents a ModuleAdded event raised by the Registry contract. -type RegistryModuleAdded struct { - ModuleAddr common.Address - Selectors [][4]byte - Raw types.Log // Blockchain specific contextual infos -} - -// FilterModuleAdded is a free log retrieval operation binding the contract event 0x02d0c334c706cd2f08faf7bc03674fc7f3970dd8921776c655069cde33b7fb29. -// -// Solidity: event ModuleAdded(address indexed moduleAddr, bytes4[] selectors) -func (_Registry *RegistryFilterer) FilterModuleAdded(opts *bind.FilterOpts, moduleAddr []common.Address) (*RegistryModuleAddedIterator, error) { - - var moduleAddrRule []interface{} - for _, moduleAddrItem := range moduleAddr { - moduleAddrRule = append(moduleAddrRule, moduleAddrItem) - } - - logs, sub, err := _Registry.contract.FilterLogs(opts, "ModuleAdded", moduleAddrRule) - if err != nil { - return nil, err - } - return &RegistryModuleAddedIterator{contract: _Registry.contract, event: "ModuleAdded", logs: logs, sub: sub}, nil -} - -// WatchModuleAdded is a free log subscription operation binding the contract event 0x02d0c334c706cd2f08faf7bc03674fc7f3970dd8921776c655069cde33b7fb29. -// -// Solidity: event ModuleAdded(address indexed moduleAddr, bytes4[] selectors) -func (_Registry *RegistryFilterer) WatchModuleAdded(opts *bind.WatchOpts, sink chan<- *RegistryModuleAdded, moduleAddr []common.Address) (event.Subscription, error) { - - var moduleAddrRule []interface{} - for _, moduleAddrItem := range moduleAddr { - moduleAddrRule = append(moduleAddrRule, moduleAddrItem) - } - - logs, sub, err := _Registry.contract.WatchLogs(opts, "ModuleAdded", moduleAddrRule) - 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(RegistryModuleAdded) - if err := _Registry.contract.UnpackLog(event, "ModuleAdded", 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 -} - -// ParseModuleAdded is a log parse operation binding the contract event 0x02d0c334c706cd2f08faf7bc03674fc7f3970dd8921776c655069cde33b7fb29. -// -// Solidity: event ModuleAdded(address indexed moduleAddr, bytes4[] selectors) -func (_Registry *RegistryFilterer) ParseModuleAdded(log types.Log) (*RegistryModuleAdded, error) { - event := new(RegistryModuleAdded) - if err := _Registry.contract.UnpackLog(event, "ModuleAdded", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// RegistryModuleRemovedIterator is returned from FilterModuleRemoved and is used to iterate over the raw logs and unpacked data for ModuleRemoved events raised by the Registry contract. -type RegistryModuleRemovedIterator struct { - Event *RegistryModuleRemoved // 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 *RegistryModuleRemovedIterator) 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(RegistryModuleRemoved) - 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(RegistryModuleRemoved) - 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 *RegistryModuleRemovedIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *RegistryModuleRemovedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// RegistryModuleRemoved represents a ModuleRemoved event raised by the Registry contract. -type RegistryModuleRemoved struct { - ModuleAddr common.Address - Selectors [][4]byte - Raw types.Log // Blockchain specific contextual infos -} - -// FilterModuleRemoved is a free log retrieval operation binding the contract event 0x7c3eb4f9083f75cbed2bd3f703e24b4bbcb77d345d3c50945f3abf3e967755cb. -// -// Solidity: event ModuleRemoved(address indexed moduleAddr, bytes4[] selectors) -func (_Registry *RegistryFilterer) FilterModuleRemoved(opts *bind.FilterOpts, moduleAddr []common.Address) (*RegistryModuleRemovedIterator, error) { - - var moduleAddrRule []interface{} - for _, moduleAddrItem := range moduleAddr { - moduleAddrRule = append(moduleAddrRule, moduleAddrItem) - } - - logs, sub, err := _Registry.contract.FilterLogs(opts, "ModuleRemoved", moduleAddrRule) - if err != nil { - return nil, err - } - return &RegistryModuleRemovedIterator{contract: _Registry.contract, event: "ModuleRemoved", logs: logs, sub: sub}, nil -} - -// WatchModuleRemoved is a free log subscription operation binding the contract event 0x7c3eb4f9083f75cbed2bd3f703e24b4bbcb77d345d3c50945f3abf3e967755cb. -// -// Solidity: event ModuleRemoved(address indexed moduleAddr, bytes4[] selectors) -func (_Registry *RegistryFilterer) WatchModuleRemoved(opts *bind.WatchOpts, sink chan<- *RegistryModuleRemoved, moduleAddr []common.Address) (event.Subscription, error) { - - var moduleAddrRule []interface{} - for _, moduleAddrItem := range moduleAddr { - moduleAddrRule = append(moduleAddrRule, moduleAddrItem) - } - - logs, sub, err := _Registry.contract.WatchLogs(opts, "ModuleRemoved", moduleAddrRule) - 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(RegistryModuleRemoved) - if err := _Registry.contract.UnpackLog(event, "ModuleRemoved", 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 -} - -// ParseModuleRemoved is a log parse operation binding the contract event 0x7c3eb4f9083f75cbed2bd3f703e24b4bbcb77d345d3c50945f3abf3e967755cb. -// -// Solidity: event ModuleRemoved(address indexed moduleAddr, bytes4[] selectors) -func (_Registry *RegistryFilterer) ParseModuleRemoved(log types.Log) (*RegistryModuleRemoved, error) { - event := new(RegistryModuleRemoved) - if err := _Registry.contract.UnpackLog(event, "ModuleRemoved", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// RegistryModuleUpdatedIterator is returned from FilterModuleUpdated and is used to iterate over the raw logs and unpacked data for ModuleUpdated events raised by the Registry contract. -type RegistryModuleUpdatedIterator struct { - Event *RegistryModuleUpdated // 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 *RegistryModuleUpdatedIterator) 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(RegistryModuleUpdated) - 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(RegistryModuleUpdated) - 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 *RegistryModuleUpdatedIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *RegistryModuleUpdatedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// RegistryModuleUpdated represents a ModuleUpdated event raised by the Registry contract. -type RegistryModuleUpdated struct { - OldImplementation common.Address - NewImplementation common.Address - OldSelectors [][4]byte - NewSelectors [][4]byte - Raw types.Log // Blockchain specific contextual infos -} - -// FilterModuleUpdated is a free log retrieval operation binding the contract event 0xa062c2c046aa14dc9284b13bde77061cb034f0aa820f20057af6b164651eaa08. -// -// Solidity: event ModuleUpdated(address indexed oldImplementation, address indexed newImplementation, bytes4[] oldSelectors, bytes4[] newSelectors) -func (_Registry *RegistryFilterer) FilterModuleUpdated(opts *bind.FilterOpts, oldImplementation []common.Address, newImplementation []common.Address) (*RegistryModuleUpdatedIterator, error) { - - var oldImplementationRule []interface{} - for _, oldImplementationItem := range oldImplementation { - oldImplementationRule = append(oldImplementationRule, oldImplementationItem) - } - var newImplementationRule []interface{} - for _, newImplementationItem := range newImplementation { - newImplementationRule = append(newImplementationRule, newImplementationItem) - } - - logs, sub, err := _Registry.contract.FilterLogs(opts, "ModuleUpdated", oldImplementationRule, newImplementationRule) - if err != nil { - return nil, err - } - return &RegistryModuleUpdatedIterator{contract: _Registry.contract, event: "ModuleUpdated", logs: logs, sub: sub}, nil -} - -// WatchModuleUpdated is a free log subscription operation binding the contract event 0xa062c2c046aa14dc9284b13bde77061cb034f0aa820f20057af6b164651eaa08. -// -// Solidity: event ModuleUpdated(address indexed oldImplementation, address indexed newImplementation, bytes4[] oldSelectors, bytes4[] newSelectors) -func (_Registry *RegistryFilterer) WatchModuleUpdated(opts *bind.WatchOpts, sink chan<- *RegistryModuleUpdated, oldImplementation []common.Address, newImplementation []common.Address) (event.Subscription, error) { - - var oldImplementationRule []interface{} - for _, oldImplementationItem := range oldImplementation { - oldImplementationRule = append(oldImplementationRule, oldImplementationItem) - } - var newImplementationRule []interface{} - for _, newImplementationItem := range newImplementation { - newImplementationRule = append(newImplementationRule, newImplementationItem) - } - - logs, sub, err := _Registry.contract.WatchLogs(opts, "ModuleUpdated", oldImplementationRule, newImplementationRule) - 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(RegistryModuleUpdated) - if err := _Registry.contract.UnpackLog(event, "ModuleUpdated", 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 -} - -// ParseModuleUpdated is a log parse operation binding the contract event 0xa062c2c046aa14dc9284b13bde77061cb034f0aa820f20057af6b164651eaa08. -// -// Solidity: event ModuleUpdated(address indexed oldImplementation, address indexed newImplementation, bytes4[] oldSelectors, bytes4[] newSelectors) -func (_Registry *RegistryFilterer) ParseModuleUpdated(log types.Log) (*RegistryModuleUpdated, error) { - event := new(RegistryModuleUpdated) - if err := _Registry.contract.UnpackLog(event, "ModuleUpdated", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// RegistryOperationCostSetIterator is returned from FilterOperationCostSet and is used to iterate over the raw logs and unpacked data for OperationCostSet events raised by the Registry contract. -type RegistryOperationCostSetIterator struct { - Event *RegistryOperationCostSet // 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 *RegistryOperationCostSetIterator) 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(RegistryOperationCostSet) - 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(RegistryOperationCostSet) - 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 *RegistryOperationCostSetIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *RegistryOperationCostSetIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// RegistryOperationCostSet represents a OperationCostSet event raised by the Registry contract. -type RegistryOperationCostSet struct { - Operation [32]byte - Cost *big.Int - Raw types.Log // Blockchain specific contextual infos -} - -// FilterOperationCostSet is a free log retrieval operation binding the contract event 0x2f2e341f7af8c198c5fe4136f45dee9ed56441686b2357204a9d440c12c4f6af. -// -// Solidity: event OperationCostSet(bytes32 operation, uint256 cost) -func (_Registry *RegistryFilterer) FilterOperationCostSet(opts *bind.FilterOpts) (*RegistryOperationCostSetIterator, error) { - - logs, sub, err := _Registry.contract.FilterLogs(opts, "OperationCostSet") - if err != nil { - return nil, err - } - return &RegistryOperationCostSetIterator{contract: _Registry.contract, event: "OperationCostSet", logs: logs, sub: sub}, nil -} - -// WatchOperationCostSet is a free log subscription operation binding the contract event 0x2f2e341f7af8c198c5fe4136f45dee9ed56441686b2357204a9d440c12c4f6af. -// -// Solidity: event OperationCostSet(bytes32 operation, uint256 cost) -func (_Registry *RegistryFilterer) WatchOperationCostSet(opts *bind.WatchOpts, sink chan<- *RegistryOperationCostSet) (event.Subscription, error) { - - logs, sub, err := _Registry.contract.WatchLogs(opts, "OperationCostSet") - 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(RegistryOperationCostSet) - if err := _Registry.contract.UnpackLog(event, "OperationCostSet", 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 -} - -// ParseOperationCostSet is a log parse operation binding the contract event 0x2f2e341f7af8c198c5fe4136f45dee9ed56441686b2357204a9d440c12c4f6af. -// -// Solidity: event OperationCostSet(bytes32 operation, uint256 cost) -func (_Registry *RegistryFilterer) ParseOperationCostSet(log types.Log) (*RegistryOperationCostSet, error) { - event := new(RegistryOperationCostSet) - if err := _Registry.contract.UnpackLog(event, "OperationCostSet", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// RegistryRoleAdminChangedIterator is returned from FilterRoleAdminChanged and is used to iterate over the raw logs and unpacked data for RoleAdminChanged events raised by the Registry contract. -type RegistryRoleAdminChangedIterator struct { - Event *RegistryRoleAdminChanged // 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 *RegistryRoleAdminChangedIterator) 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(RegistryRoleAdminChanged) - 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(RegistryRoleAdminChanged) - 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 *RegistryRoleAdminChangedIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *RegistryRoleAdminChangedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// RegistryRoleAdminChanged represents a RoleAdminChanged event raised by the Registry contract. -type RegistryRoleAdminChanged struct { - Role [32]byte - PreviousAdminRole [32]byte - NewAdminRole [32]byte - Raw types.Log // Blockchain specific contextual infos -} - -// FilterRoleAdminChanged is a free log retrieval operation binding the contract event 0xbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff. -// -// Solidity: event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole) -func (_Registry *RegistryFilterer) FilterRoleAdminChanged(opts *bind.FilterOpts, role [][32]byte, previousAdminRole [][32]byte, newAdminRole [][32]byte) (*RegistryRoleAdminChangedIterator, error) { - - var roleRule []interface{} - for _, roleItem := range role { - roleRule = append(roleRule, roleItem) - } - var previousAdminRoleRule []interface{} - for _, previousAdminRoleItem := range previousAdminRole { - previousAdminRoleRule = append(previousAdminRoleRule, previousAdminRoleItem) - } - var newAdminRoleRule []interface{} - for _, newAdminRoleItem := range newAdminRole { - newAdminRoleRule = append(newAdminRoleRule, newAdminRoleItem) - } - - logs, sub, err := _Registry.contract.FilterLogs(opts, "RoleAdminChanged", roleRule, previousAdminRoleRule, newAdminRoleRule) - if err != nil { - return nil, err - } - return &RegistryRoleAdminChangedIterator{contract: _Registry.contract, event: "RoleAdminChanged", logs: logs, sub: sub}, nil -} - -// WatchRoleAdminChanged is a free log subscription operation binding the contract event 0xbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff. -// -// Solidity: event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole) -func (_Registry *RegistryFilterer) WatchRoleAdminChanged(opts *bind.WatchOpts, sink chan<- *RegistryRoleAdminChanged, role [][32]byte, previousAdminRole [][32]byte, newAdminRole [][32]byte) (event.Subscription, error) { - - var roleRule []interface{} - for _, roleItem := range role { - roleRule = append(roleRule, roleItem) - } - var previousAdminRoleRule []interface{} - for _, previousAdminRoleItem := range previousAdminRole { - previousAdminRoleRule = append(previousAdminRoleRule, previousAdminRoleItem) - } - var newAdminRoleRule []interface{} - for _, newAdminRoleItem := range newAdminRole { - newAdminRoleRule = append(newAdminRoleRule, newAdminRoleItem) - } - - logs, sub, err := _Registry.contract.WatchLogs(opts, "RoleAdminChanged", roleRule, previousAdminRoleRule, newAdminRoleRule) - 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(RegistryRoleAdminChanged) - if err := _Registry.contract.UnpackLog(event, "RoleAdminChanged", 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 -} - -// ParseRoleAdminChanged is a log parse operation binding the contract event 0xbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff. -// -// Solidity: event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole) -func (_Registry *RegistryFilterer) ParseRoleAdminChanged(log types.Log) (*RegistryRoleAdminChanged, error) { - event := new(RegistryRoleAdminChanged) - if err := _Registry.contract.UnpackLog(event, "RoleAdminChanged", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// RegistryRoleGrantedIterator is returned from FilterRoleGranted and is used to iterate over the raw logs and unpacked data for RoleGranted events raised by the Registry contract. -type RegistryRoleGrantedIterator struct { - Event *RegistryRoleGranted // 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 *RegistryRoleGrantedIterator) 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(RegistryRoleGranted) - 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(RegistryRoleGranted) - 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 *RegistryRoleGrantedIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *RegistryRoleGrantedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// RegistryRoleGranted represents a RoleGranted event raised by the Registry contract. -type RegistryRoleGranted struct { - Role [32]byte - Account common.Address - Sender common.Address - Raw types.Log // Blockchain specific contextual infos -} - -// FilterRoleGranted is a free log retrieval operation binding the contract event 0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d. -// -// Solidity: event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender) -func (_Registry *RegistryFilterer) FilterRoleGranted(opts *bind.FilterOpts, role [][32]byte, account []common.Address, sender []common.Address) (*RegistryRoleGrantedIterator, error) { - - var roleRule []interface{} - for _, roleItem := range role { - roleRule = append(roleRule, roleItem) - } - var accountRule []interface{} - for _, accountItem := range account { - accountRule = append(accountRule, accountItem) - } - var senderRule []interface{} - for _, senderItem := range sender { - senderRule = append(senderRule, senderItem) - } - - logs, sub, err := _Registry.contract.FilterLogs(opts, "RoleGranted", roleRule, accountRule, senderRule) - if err != nil { - return nil, err - } - return &RegistryRoleGrantedIterator{contract: _Registry.contract, event: "RoleGranted", logs: logs, sub: sub}, nil -} - -// WatchRoleGranted is a free log subscription operation binding the contract event 0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d. -// -// Solidity: event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender) -func (_Registry *RegistryFilterer) WatchRoleGranted(opts *bind.WatchOpts, sink chan<- *RegistryRoleGranted, role [][32]byte, account []common.Address, sender []common.Address) (event.Subscription, error) { - - var roleRule []interface{} - for _, roleItem := range role { - roleRule = append(roleRule, roleItem) - } - var accountRule []interface{} - for _, accountItem := range account { - accountRule = append(accountRule, accountItem) - } - var senderRule []interface{} - for _, senderItem := range sender { - senderRule = append(senderRule, senderItem) - } - - logs, sub, err := _Registry.contract.WatchLogs(opts, "RoleGranted", roleRule, accountRule, 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(RegistryRoleGranted) - if err := _Registry.contract.UnpackLog(event, "RoleGranted", 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 -} - -// ParseRoleGranted is a log parse operation binding the contract event 0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d. -// -// Solidity: event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender) -func (_Registry *RegistryFilterer) ParseRoleGranted(log types.Log) (*RegistryRoleGranted, error) { - event := new(RegistryRoleGranted) - if err := _Registry.contract.UnpackLog(event, "RoleGranted", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// RegistryRoleRevokedIterator is returned from FilterRoleRevoked and is used to iterate over the raw logs and unpacked data for RoleRevoked events raised by the Registry contract. -type RegistryRoleRevokedIterator struct { - Event *RegistryRoleRevoked // 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 *RegistryRoleRevokedIterator) 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(RegistryRoleRevoked) - 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(RegistryRoleRevoked) - 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 *RegistryRoleRevokedIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *RegistryRoleRevokedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// RegistryRoleRevoked represents a RoleRevoked event raised by the Registry contract. -type RegistryRoleRevoked struct { - Role [32]byte - Account common.Address - Sender common.Address - Raw types.Log // Blockchain specific contextual infos -} - -// FilterRoleRevoked is a free log retrieval operation binding the contract event 0xf6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b. -// -// Solidity: event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender) -func (_Registry *RegistryFilterer) FilterRoleRevoked(opts *bind.FilterOpts, role [][32]byte, account []common.Address, sender []common.Address) (*RegistryRoleRevokedIterator, error) { - - var roleRule []interface{} - for _, roleItem := range role { - roleRule = append(roleRule, roleItem) - } - var accountRule []interface{} - for _, accountItem := range account { - accountRule = append(accountRule, accountItem) - } - var senderRule []interface{} - for _, senderItem := range sender { - senderRule = append(senderRule, senderItem) - } - - logs, sub, err := _Registry.contract.FilterLogs(opts, "RoleRevoked", roleRule, accountRule, senderRule) - if err != nil { - return nil, err - } - return &RegistryRoleRevokedIterator{contract: _Registry.contract, event: "RoleRevoked", logs: logs, sub: sub}, nil -} - -// WatchRoleRevoked is a free log subscription operation binding the contract event 0xf6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b. -// -// Solidity: event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender) -func (_Registry *RegistryFilterer) WatchRoleRevoked(opts *bind.WatchOpts, sink chan<- *RegistryRoleRevoked, role [][32]byte, account []common.Address, sender []common.Address) (event.Subscription, error) { - - var roleRule []interface{} - for _, roleItem := range role { - roleRule = append(roleRule, roleItem) - } - var accountRule []interface{} - for _, accountItem := range account { - accountRule = append(accountRule, accountItem) - } - var senderRule []interface{} - for _, senderItem := range sender { - senderRule = append(senderRule, senderItem) - } - - logs, sub, err := _Registry.contract.WatchLogs(opts, "RoleRevoked", roleRule, accountRule, 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(RegistryRoleRevoked) - if err := _Registry.contract.UnpackLog(event, "RoleRevoked", 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 -} - -// ParseRoleRevoked is a log parse operation binding the contract event 0xf6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b. -// -// Solidity: event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender) -func (_Registry *RegistryFilterer) ParseRoleRevoked(log types.Log) (*RegistryRoleRevoked, error) { - event := new(RegistryRoleRevoked) - if err := _Registry.contract.UnpackLog(event, "RoleRevoked", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// RegistrySacdSetIterator is returned from FilterSacdSet and is used to iterate over the raw logs and unpacked data for SacdSet events raised by the Registry contract. -type RegistrySacdSetIterator struct { - Event *RegistrySacdSet // 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 *RegistrySacdSetIterator) 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(RegistrySacdSet) - 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(RegistrySacdSet) - 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 *RegistrySacdSetIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *RegistrySacdSetIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// RegistrySacdSet represents a SacdSet event raised by the Registry contract. -type RegistrySacdSet struct { - Sacd common.Address - Raw types.Log // Blockchain specific contextual infos -} - -// FilterSacdSet is a free log retrieval operation binding the contract event 0xc50082fb4147e98d660e75c08932fdd418c83242b1759954e6e8f1678aec7d90. -// -// Solidity: event SacdSet(address indexed sacd) -func (_Registry *RegistryFilterer) FilterSacdSet(opts *bind.FilterOpts, sacd []common.Address) (*RegistrySacdSetIterator, error) { - - var sacdRule []interface{} - for _, sacdItem := range sacd { - sacdRule = append(sacdRule, sacdItem) - } - - logs, sub, err := _Registry.contract.FilterLogs(opts, "SacdSet", sacdRule) - if err != nil { - return nil, err - } - return &RegistrySacdSetIterator{contract: _Registry.contract, event: "SacdSet", logs: logs, sub: sub}, nil -} - -// WatchSacdSet is a free log subscription operation binding the contract event 0xc50082fb4147e98d660e75c08932fdd418c83242b1759954e6e8f1678aec7d90. -// -// Solidity: event SacdSet(address indexed sacd) -func (_Registry *RegistryFilterer) WatchSacdSet(opts *bind.WatchOpts, sink chan<- *RegistrySacdSet, sacd []common.Address) (event.Subscription, error) { - - var sacdRule []interface{} - for _, sacdItem := range sacd { - sacdRule = append(sacdRule, sacdItem) - } - - logs, sub, err := _Registry.contract.WatchLogs(opts, "SacdSet", sacdRule) - 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(RegistrySacdSet) - if err := _Registry.contract.UnpackLog(event, "SacdSet", 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 -} - -// ParseSacdSet is a log parse operation binding the contract event 0xc50082fb4147e98d660e75c08932fdd418c83242b1759954e6e8f1678aec7d90. -// -// Solidity: event SacdSet(address indexed sacd) -func (_Registry *RegistryFilterer) ParseSacdSet(log types.Log) (*RegistrySacdSet, error) { - event := new(RegistrySacdSet) - if err := _Registry.contract.UnpackLog(event, "SacdSet", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// RegistryStorageNodeSetIterator is returned from FilterStorageNodeSet and is used to iterate over the raw logs and unpacked data for StorageNodeSet events raised by the Registry contract. -type RegistryStorageNodeSetIterator struct { - Event *RegistryStorageNodeSet // 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 *RegistryStorageNodeSetIterator) 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(RegistryStorageNodeSet) - 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(RegistryStorageNodeSet) - 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 *RegistryStorageNodeSetIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *RegistryStorageNodeSetIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// RegistryStorageNodeSet represents a StorageNodeSet event raised by the Registry contract. -type RegistryStorageNodeSet struct { - StorageNode common.Address - Raw types.Log // Blockchain specific contextual infos -} - -// FilterStorageNodeSet is a free log retrieval operation binding the contract event 0x541fe9686b7c3d62d92be47c7692a2851332f13ace2e23436c062a8bcf624608. -// -// Solidity: event StorageNodeSet(address indexed storageNode) -func (_Registry *RegistryFilterer) FilterStorageNodeSet(opts *bind.FilterOpts, storageNode []common.Address) (*RegistryStorageNodeSetIterator, error) { - - var storageNodeRule []interface{} - for _, storageNodeItem := range storageNode { - storageNodeRule = append(storageNodeRule, storageNodeItem) - } - - logs, sub, err := _Registry.contract.FilterLogs(opts, "StorageNodeSet", storageNodeRule) - if err != nil { - return nil, err - } - return &RegistryStorageNodeSetIterator{contract: _Registry.contract, event: "StorageNodeSet", logs: logs, sub: sub}, nil -} - -// WatchStorageNodeSet is a free log subscription operation binding the contract event 0x541fe9686b7c3d62d92be47c7692a2851332f13ace2e23436c062a8bcf624608. -// -// Solidity: event StorageNodeSet(address indexed storageNode) -func (_Registry *RegistryFilterer) WatchStorageNodeSet(opts *bind.WatchOpts, sink chan<- *RegistryStorageNodeSet, storageNode []common.Address) (event.Subscription, error) { - - var storageNodeRule []interface{} - for _, storageNodeItem := range storageNode { - storageNodeRule = append(storageNodeRule, storageNodeItem) - } - - logs, sub, err := _Registry.contract.WatchLogs(opts, "StorageNodeSet", storageNodeRule) - 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(RegistryStorageNodeSet) - if err := _Registry.contract.UnpackLog(event, "StorageNodeSet", 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 -} - -// ParseStorageNodeSet is a log parse operation binding the contract event 0x541fe9686b7c3d62d92be47c7692a2851332f13ace2e23436c062a8bcf624608. -// -// Solidity: event StorageNodeSet(address indexed storageNode) -func (_Registry *RegistryFilterer) ParseStorageNodeSet(log types.Log) (*RegistryStorageNodeSet, error) { - event := new(RegistryStorageNodeSet) - if err := _Registry.contract.UnpackLog(event, "StorageNodeSet", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// RegistryStreamRegistrySetIterator is returned from FilterStreamRegistrySet and is used to iterate over the raw logs and unpacked data for StreamRegistrySet events raised by the Registry contract. -type RegistryStreamRegistrySetIterator struct { - Event *RegistryStreamRegistrySet // 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 *RegistryStreamRegistrySetIterator) 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(RegistryStreamRegistrySet) - 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(RegistryStreamRegistrySet) - 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 *RegistryStreamRegistrySetIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *RegistryStreamRegistrySetIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// RegistryStreamRegistrySet represents a StreamRegistrySet event raised by the Registry contract. -type RegistryStreamRegistrySet struct { - StreamRegistry common.Address - Raw types.Log // Blockchain specific contextual infos -} - -// FilterStreamRegistrySet is a free log retrieval operation binding the contract event 0x42d068f44efba28cc4aa260e8fd67e7d93abf8215c8a61b4dbbc3eaf0ab39f56. -// -// Solidity: event StreamRegistrySet(address streamRegistry) -func (_Registry *RegistryFilterer) FilterStreamRegistrySet(opts *bind.FilterOpts) (*RegistryStreamRegistrySetIterator, error) { - - logs, sub, err := _Registry.contract.FilterLogs(opts, "StreamRegistrySet") - if err != nil { - return nil, err - } - return &RegistryStreamRegistrySetIterator{contract: _Registry.contract, event: "StreamRegistrySet", logs: logs, sub: sub}, nil -} - -// WatchStreamRegistrySet is a free log subscription operation binding the contract event 0x42d068f44efba28cc4aa260e8fd67e7d93abf8215c8a61b4dbbc3eaf0ab39f56. -// -// Solidity: event StreamRegistrySet(address streamRegistry) -func (_Registry *RegistryFilterer) WatchStreamRegistrySet(opts *bind.WatchOpts, sink chan<- *RegistryStreamRegistrySet) (event.Subscription, error) { - - logs, sub, err := _Registry.contract.WatchLogs(opts, "StreamRegistrySet") - 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(RegistryStreamRegistrySet) - if err := _Registry.contract.UnpackLog(event, "StreamRegistrySet", 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 -} - -// ParseStreamRegistrySet is a log parse operation binding the contract event 0x42d068f44efba28cc4aa260e8fd67e7d93abf8215c8a61b4dbbc3eaf0ab39f56. -// -// Solidity: event StreamRegistrySet(address streamRegistry) -func (_Registry *RegistryFilterer) ParseStreamRegistrySet(log types.Log) (*RegistryStreamRegistrySet, error) { - event := new(RegistryStreamRegistrySet) - if err := _Registry.contract.UnpackLog(event, "StreamRegistrySet", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// RegistrySubscribedToVehicleStreamIterator is returned from FilterSubscribedToVehicleStream and is used to iterate over the raw logs and unpacked data for SubscribedToVehicleStream events raised by the Registry contract. -type RegistrySubscribedToVehicleStreamIterator struct { - Event *RegistrySubscribedToVehicleStream // 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 *RegistrySubscribedToVehicleStreamIterator) 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(RegistrySubscribedToVehicleStream) - 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(RegistrySubscribedToVehicleStream) - 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 *RegistrySubscribedToVehicleStreamIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *RegistrySubscribedToVehicleStreamIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// RegistrySubscribedToVehicleStream represents a SubscribedToVehicleStream event raised by the Registry contract. -type RegistrySubscribedToVehicleStream struct { - StreamId string - Subscriber common.Address - ExpirationTime *big.Int - Raw types.Log // Blockchain specific contextual infos -} - -// FilterSubscribedToVehicleStream is a free log retrieval operation binding the contract event 0x316c96770fe2528453ad15ac8843953cbc659399f006200f7d61fe124720d607. -// -// Solidity: event SubscribedToVehicleStream(string streamId, address indexed subscriber, uint256 expirationTime) -func (_Registry *RegistryFilterer) FilterSubscribedToVehicleStream(opts *bind.FilterOpts, subscriber []common.Address) (*RegistrySubscribedToVehicleStreamIterator, error) { - - var subscriberRule []interface{} - for _, subscriberItem := range subscriber { - subscriberRule = append(subscriberRule, subscriberItem) - } - - logs, sub, err := _Registry.contract.FilterLogs(opts, "SubscribedToVehicleStream", subscriberRule) - if err != nil { - return nil, err - } - return &RegistrySubscribedToVehicleStreamIterator{contract: _Registry.contract, event: "SubscribedToVehicleStream", logs: logs, sub: sub}, nil -} - -// WatchSubscribedToVehicleStream is a free log subscription operation binding the contract event 0x316c96770fe2528453ad15ac8843953cbc659399f006200f7d61fe124720d607. -// -// Solidity: event SubscribedToVehicleStream(string streamId, address indexed subscriber, uint256 expirationTime) -func (_Registry *RegistryFilterer) WatchSubscribedToVehicleStream(opts *bind.WatchOpts, sink chan<- *RegistrySubscribedToVehicleStream, subscriber []common.Address) (event.Subscription, error) { - - var subscriberRule []interface{} - for _, subscriberItem := range subscriber { - subscriberRule = append(subscriberRule, subscriberItem) - } - - logs, sub, err := _Registry.contract.WatchLogs(opts, "SubscribedToVehicleStream", subscriberRule) - 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(RegistrySubscribedToVehicleStream) - if err := _Registry.contract.UnpackLog(event, "SubscribedToVehicleStream", 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 -} - -// ParseSubscribedToVehicleStream is a log parse operation binding the contract event 0x316c96770fe2528453ad15ac8843953cbc659399f006200f7d61fe124720d607. -// -// Solidity: event SubscribedToVehicleStream(string streamId, address indexed subscriber, uint256 expirationTime) -func (_Registry *RegistryFilterer) ParseSubscribedToVehicleStream(log types.Log) (*RegistrySubscribedToVehicleStream, error) { - event := new(RegistrySubscribedToVehicleStream) - if err := _Registry.contract.UnpackLog(event, "SubscribedToVehicleStream", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// RegistrySyntheticDeviceAttributeAddedIterator is returned from FilterSyntheticDeviceAttributeAdded and is used to iterate over the raw logs and unpacked data for SyntheticDeviceAttributeAdded events raised by the Registry contract. -type RegistrySyntheticDeviceAttributeAddedIterator struct { - Event *RegistrySyntheticDeviceAttributeAdded // 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 *RegistrySyntheticDeviceAttributeAddedIterator) 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(RegistrySyntheticDeviceAttributeAdded) - 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(RegistrySyntheticDeviceAttributeAdded) - 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 *RegistrySyntheticDeviceAttributeAddedIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *RegistrySyntheticDeviceAttributeAddedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// RegistrySyntheticDeviceAttributeAdded represents a SyntheticDeviceAttributeAdded event raised by the Registry contract. -type RegistrySyntheticDeviceAttributeAdded struct { - Attribute string - Raw types.Log // Blockchain specific contextual infos -} - -// FilterSyntheticDeviceAttributeAdded is a free log retrieval operation binding the contract event 0x6e358be27e6aade9d45fb0b4de4cf68e2dc5630108c30a699ad5cc954d6d05c5. -// -// Solidity: event SyntheticDeviceAttributeAdded(string attribute) -func (_Registry *RegistryFilterer) FilterSyntheticDeviceAttributeAdded(opts *bind.FilterOpts) (*RegistrySyntheticDeviceAttributeAddedIterator, error) { - - logs, sub, err := _Registry.contract.FilterLogs(opts, "SyntheticDeviceAttributeAdded") - if err != nil { - return nil, err - } - return &RegistrySyntheticDeviceAttributeAddedIterator{contract: _Registry.contract, event: "SyntheticDeviceAttributeAdded", logs: logs, sub: sub}, nil -} - -// WatchSyntheticDeviceAttributeAdded is a free log subscription operation binding the contract event 0x6e358be27e6aade9d45fb0b4de4cf68e2dc5630108c30a699ad5cc954d6d05c5. -// -// Solidity: event SyntheticDeviceAttributeAdded(string attribute) -func (_Registry *RegistryFilterer) WatchSyntheticDeviceAttributeAdded(opts *bind.WatchOpts, sink chan<- *RegistrySyntheticDeviceAttributeAdded) (event.Subscription, error) { - - logs, sub, err := _Registry.contract.WatchLogs(opts, "SyntheticDeviceAttributeAdded") - 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(RegistrySyntheticDeviceAttributeAdded) - if err := _Registry.contract.UnpackLog(event, "SyntheticDeviceAttributeAdded", 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 -} - -// ParseSyntheticDeviceAttributeAdded is a log parse operation binding the contract event 0x6e358be27e6aade9d45fb0b4de4cf68e2dc5630108c30a699ad5cc954d6d05c5. -// -// Solidity: event SyntheticDeviceAttributeAdded(string attribute) -func (_Registry *RegistryFilterer) ParseSyntheticDeviceAttributeAdded(log types.Log) (*RegistrySyntheticDeviceAttributeAdded, error) { - event := new(RegistrySyntheticDeviceAttributeAdded) - if err := _Registry.contract.UnpackLog(event, "SyntheticDeviceAttributeAdded", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// RegistrySyntheticDeviceAttributeSetIterator is returned from FilterSyntheticDeviceAttributeSet and is used to iterate over the raw logs and unpacked data for SyntheticDeviceAttributeSet events raised by the Registry contract. -type RegistrySyntheticDeviceAttributeSetIterator struct { - Event *RegistrySyntheticDeviceAttributeSet // 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 *RegistrySyntheticDeviceAttributeSetIterator) 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(RegistrySyntheticDeviceAttributeSet) - 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(RegistrySyntheticDeviceAttributeSet) - 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 *RegistrySyntheticDeviceAttributeSetIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *RegistrySyntheticDeviceAttributeSetIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// RegistrySyntheticDeviceAttributeSet represents a SyntheticDeviceAttributeSet event raised by the Registry contract. -type RegistrySyntheticDeviceAttributeSet struct { - TokenId *big.Int - Attribute string - Info string - Raw types.Log // Blockchain specific contextual infos -} - -// FilterSyntheticDeviceAttributeSet is a free log retrieval operation binding the contract event 0xe89d3dc758bde24a2e62ff9b8b2e7e099d7d181ca58160bce0f3fd4939da0dd1. -// -// Solidity: event SyntheticDeviceAttributeSet(uint256 indexed tokenId, string attribute, string info) -func (_Registry *RegistryFilterer) FilterSyntheticDeviceAttributeSet(opts *bind.FilterOpts, tokenId []*big.Int) (*RegistrySyntheticDeviceAttributeSetIterator, error) { - - var tokenIdRule []interface{} - for _, tokenIdItem := range tokenId { - tokenIdRule = append(tokenIdRule, tokenIdItem) - } - - logs, sub, err := _Registry.contract.FilterLogs(opts, "SyntheticDeviceAttributeSet", tokenIdRule) - if err != nil { - return nil, err - } - return &RegistrySyntheticDeviceAttributeSetIterator{contract: _Registry.contract, event: "SyntheticDeviceAttributeSet", logs: logs, sub: sub}, nil -} - -// WatchSyntheticDeviceAttributeSet is a free log subscription operation binding the contract event 0xe89d3dc758bde24a2e62ff9b8b2e7e099d7d181ca58160bce0f3fd4939da0dd1. -// -// Solidity: event SyntheticDeviceAttributeSet(uint256 indexed tokenId, string attribute, string info) -func (_Registry *RegistryFilterer) WatchSyntheticDeviceAttributeSet(opts *bind.WatchOpts, sink chan<- *RegistrySyntheticDeviceAttributeSet, tokenId []*big.Int) (event.Subscription, error) { - - var tokenIdRule []interface{} - for _, tokenIdItem := range tokenId { - tokenIdRule = append(tokenIdRule, tokenIdItem) - } - - logs, sub, err := _Registry.contract.WatchLogs(opts, "SyntheticDeviceAttributeSet", 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(RegistrySyntheticDeviceAttributeSet) - if err := _Registry.contract.UnpackLog(event, "SyntheticDeviceAttributeSet", 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 -} - -// ParseSyntheticDeviceAttributeSet is a log parse operation binding the contract event 0xe89d3dc758bde24a2e62ff9b8b2e7e099d7d181ca58160bce0f3fd4939da0dd1. -// -// Solidity: event SyntheticDeviceAttributeSet(uint256 indexed tokenId, string attribute, string info) -func (_Registry *RegistryFilterer) ParseSyntheticDeviceAttributeSet(log types.Log) (*RegistrySyntheticDeviceAttributeSet, error) { - event := new(RegistrySyntheticDeviceAttributeSet) - if err := _Registry.contract.UnpackLog(event, "SyntheticDeviceAttributeSet", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// RegistrySyntheticDeviceIdProxySetIterator is returned from FilterSyntheticDeviceIdProxySet and is used to iterate over the raw logs and unpacked data for SyntheticDeviceIdProxySet events raised by the Registry contract. -type RegistrySyntheticDeviceIdProxySetIterator struct { - Event *RegistrySyntheticDeviceIdProxySet // 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 *RegistrySyntheticDeviceIdProxySetIterator) 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(RegistrySyntheticDeviceIdProxySet) - 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(RegistrySyntheticDeviceIdProxySet) - 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 *RegistrySyntheticDeviceIdProxySetIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *RegistrySyntheticDeviceIdProxySetIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// RegistrySyntheticDeviceIdProxySet represents a SyntheticDeviceIdProxySet event raised by the Registry contract. -type RegistrySyntheticDeviceIdProxySet struct { - Proxy common.Address - Raw types.Log // Blockchain specific contextual infos -} - -// FilterSyntheticDeviceIdProxySet is a free log retrieval operation binding the contract event 0x03f4b74ae931497684aeebcd1d5bdf812118bbabca14f32f5d58a226534485da. -// -// Solidity: event SyntheticDeviceIdProxySet(address proxy) -func (_Registry *RegistryFilterer) FilterSyntheticDeviceIdProxySet(opts *bind.FilterOpts) (*RegistrySyntheticDeviceIdProxySetIterator, error) { - - logs, sub, err := _Registry.contract.FilterLogs(opts, "SyntheticDeviceIdProxySet") - if err != nil { - return nil, err - } - return &RegistrySyntheticDeviceIdProxySetIterator{contract: _Registry.contract, event: "SyntheticDeviceIdProxySet", logs: logs, sub: sub}, nil -} - -// WatchSyntheticDeviceIdProxySet is a free log subscription operation binding the contract event 0x03f4b74ae931497684aeebcd1d5bdf812118bbabca14f32f5d58a226534485da. -// -// Solidity: event SyntheticDeviceIdProxySet(address proxy) -func (_Registry *RegistryFilterer) WatchSyntheticDeviceIdProxySet(opts *bind.WatchOpts, sink chan<- *RegistrySyntheticDeviceIdProxySet) (event.Subscription, error) { - - logs, sub, err := _Registry.contract.WatchLogs(opts, "SyntheticDeviceIdProxySet") - 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(RegistrySyntheticDeviceIdProxySet) - if err := _Registry.contract.UnpackLog(event, "SyntheticDeviceIdProxySet", 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 -} - -// ParseSyntheticDeviceIdProxySet is a log parse operation binding the contract event 0x03f4b74ae931497684aeebcd1d5bdf812118bbabca14f32f5d58a226534485da. -// -// Solidity: event SyntheticDeviceIdProxySet(address proxy) -func (_Registry *RegistryFilterer) ParseSyntheticDeviceIdProxySet(log types.Log) (*RegistrySyntheticDeviceIdProxySet, error) { - event := new(RegistrySyntheticDeviceIdProxySet) - if err := _Registry.contract.UnpackLog(event, "SyntheticDeviceIdProxySet", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// RegistrySyntheticDeviceNodeBurnedIterator is returned from FilterSyntheticDeviceNodeBurned and is used to iterate over the raw logs and unpacked data for SyntheticDeviceNodeBurned events raised by the Registry contract. -type RegistrySyntheticDeviceNodeBurnedIterator struct { - Event *RegistrySyntheticDeviceNodeBurned // 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 *RegistrySyntheticDeviceNodeBurnedIterator) 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(RegistrySyntheticDeviceNodeBurned) - 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(RegistrySyntheticDeviceNodeBurned) - 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 *RegistrySyntheticDeviceNodeBurnedIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *RegistrySyntheticDeviceNodeBurnedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// RegistrySyntheticDeviceNodeBurned represents a SyntheticDeviceNodeBurned event raised by the Registry contract. -type RegistrySyntheticDeviceNodeBurned struct { - SyntheticDeviceNode *big.Int - VehicleNode *big.Int - Owner common.Address - Raw types.Log // Blockchain specific contextual infos -} - -// FilterSyntheticDeviceNodeBurned is a free log retrieval operation binding the contract event 0xe4edc3c1f917608d486e02df63af34158f185b78cef44615aebee26c09064122. -// -// Solidity: event SyntheticDeviceNodeBurned(uint256 indexed syntheticDeviceNode, uint256 indexed vehicleNode, address indexed owner) -func (_Registry *RegistryFilterer) FilterSyntheticDeviceNodeBurned(opts *bind.FilterOpts, syntheticDeviceNode []*big.Int, vehicleNode []*big.Int, owner []common.Address) (*RegistrySyntheticDeviceNodeBurnedIterator, error) { - - var syntheticDeviceNodeRule []interface{} - for _, syntheticDeviceNodeItem := range syntheticDeviceNode { - syntheticDeviceNodeRule = append(syntheticDeviceNodeRule, syntheticDeviceNodeItem) - } - var vehicleNodeRule []interface{} - for _, vehicleNodeItem := range vehicleNode { - vehicleNodeRule = append(vehicleNodeRule, vehicleNodeItem) - } - var ownerRule []interface{} - for _, ownerItem := range owner { - ownerRule = append(ownerRule, ownerItem) - } - - logs, sub, err := _Registry.contract.FilterLogs(opts, "SyntheticDeviceNodeBurned", syntheticDeviceNodeRule, vehicleNodeRule, ownerRule) - if err != nil { - return nil, err - } - return &RegistrySyntheticDeviceNodeBurnedIterator{contract: _Registry.contract, event: "SyntheticDeviceNodeBurned", logs: logs, sub: sub}, nil -} - -// WatchSyntheticDeviceNodeBurned is a free log subscription operation binding the contract event 0xe4edc3c1f917608d486e02df63af34158f185b78cef44615aebee26c09064122. -// -// Solidity: event SyntheticDeviceNodeBurned(uint256 indexed syntheticDeviceNode, uint256 indexed vehicleNode, address indexed owner) -func (_Registry *RegistryFilterer) WatchSyntheticDeviceNodeBurned(opts *bind.WatchOpts, sink chan<- *RegistrySyntheticDeviceNodeBurned, syntheticDeviceNode []*big.Int, vehicleNode []*big.Int, owner []common.Address) (event.Subscription, error) { - - var syntheticDeviceNodeRule []interface{} - for _, syntheticDeviceNodeItem := range syntheticDeviceNode { - syntheticDeviceNodeRule = append(syntheticDeviceNodeRule, syntheticDeviceNodeItem) - } - var vehicleNodeRule []interface{} - for _, vehicleNodeItem := range vehicleNode { - vehicleNodeRule = append(vehicleNodeRule, vehicleNodeItem) - } - var ownerRule []interface{} - for _, ownerItem := range owner { - ownerRule = append(ownerRule, ownerItem) - } - - logs, sub, err := _Registry.contract.WatchLogs(opts, "SyntheticDeviceNodeBurned", syntheticDeviceNodeRule, vehicleNodeRule, ownerRule) - 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(RegistrySyntheticDeviceNodeBurned) - if err := _Registry.contract.UnpackLog(event, "SyntheticDeviceNodeBurned", 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 -} - -// ParseSyntheticDeviceNodeBurned is a log parse operation binding the contract event 0xe4edc3c1f917608d486e02df63af34158f185b78cef44615aebee26c09064122. -// -// Solidity: event SyntheticDeviceNodeBurned(uint256 indexed syntheticDeviceNode, uint256 indexed vehicleNode, address indexed owner) -func (_Registry *RegistryFilterer) ParseSyntheticDeviceNodeBurned(log types.Log) (*RegistrySyntheticDeviceNodeBurned, error) { - event := new(RegistrySyntheticDeviceNodeBurned) - if err := _Registry.contract.UnpackLog(event, "SyntheticDeviceNodeBurned", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// RegistrySyntheticDeviceNodeMintedIterator is returned from FilterSyntheticDeviceNodeMinted and is used to iterate over the raw logs and unpacked data for SyntheticDeviceNodeMinted events raised by the Registry contract. -type RegistrySyntheticDeviceNodeMintedIterator struct { - Event *RegistrySyntheticDeviceNodeMinted // 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 *RegistrySyntheticDeviceNodeMintedIterator) 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(RegistrySyntheticDeviceNodeMinted) - 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(RegistrySyntheticDeviceNodeMinted) - 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 *RegistrySyntheticDeviceNodeMintedIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *RegistrySyntheticDeviceNodeMintedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// RegistrySyntheticDeviceNodeMinted represents a SyntheticDeviceNodeMinted event raised by the Registry contract. -type RegistrySyntheticDeviceNodeMinted struct { - ConnectionId *big.Int - SyntheticDeviceNode *big.Int - VehicleNode *big.Int - SyntheticDeviceAddress common.Address - Owner common.Address - Raw types.Log // Blockchain specific contextual infos -} - -// FilterSyntheticDeviceNodeMinted is a free log retrieval operation binding the contract event 0x5a560c1adda92bd6cbf9c891dc38e9e2973b7963493f2364caa40a4218346280. -// -// Solidity: event SyntheticDeviceNodeMinted(uint256 connectionId, uint256 syntheticDeviceNode, uint256 indexed vehicleNode, address indexed syntheticDeviceAddress, address indexed owner) -func (_Registry *RegistryFilterer) FilterSyntheticDeviceNodeMinted(opts *bind.FilterOpts, vehicleNode []*big.Int, syntheticDeviceAddress []common.Address, owner []common.Address) (*RegistrySyntheticDeviceNodeMintedIterator, error) { - - var vehicleNodeRule []interface{} - for _, vehicleNodeItem := range vehicleNode { - vehicleNodeRule = append(vehicleNodeRule, vehicleNodeItem) - } - var syntheticDeviceAddressRule []interface{} - for _, syntheticDeviceAddressItem := range syntheticDeviceAddress { - syntheticDeviceAddressRule = append(syntheticDeviceAddressRule, syntheticDeviceAddressItem) - } - var ownerRule []interface{} - for _, ownerItem := range owner { - ownerRule = append(ownerRule, ownerItem) - } - - logs, sub, err := _Registry.contract.FilterLogs(opts, "SyntheticDeviceNodeMinted", vehicleNodeRule, syntheticDeviceAddressRule, ownerRule) - if err != nil { - return nil, err - } - return &RegistrySyntheticDeviceNodeMintedIterator{contract: _Registry.contract, event: "SyntheticDeviceNodeMinted", logs: logs, sub: sub}, nil -} - -// WatchSyntheticDeviceNodeMinted is a free log subscription operation binding the contract event 0x5a560c1adda92bd6cbf9c891dc38e9e2973b7963493f2364caa40a4218346280. -// -// Solidity: event SyntheticDeviceNodeMinted(uint256 connectionId, uint256 syntheticDeviceNode, uint256 indexed vehicleNode, address indexed syntheticDeviceAddress, address indexed owner) -func (_Registry *RegistryFilterer) WatchSyntheticDeviceNodeMinted(opts *bind.WatchOpts, sink chan<- *RegistrySyntheticDeviceNodeMinted, vehicleNode []*big.Int, syntheticDeviceAddress []common.Address, owner []common.Address) (event.Subscription, error) { - - var vehicleNodeRule []interface{} - for _, vehicleNodeItem := range vehicleNode { - vehicleNodeRule = append(vehicleNodeRule, vehicleNodeItem) - } - var syntheticDeviceAddressRule []interface{} - for _, syntheticDeviceAddressItem := range syntheticDeviceAddress { - syntheticDeviceAddressRule = append(syntheticDeviceAddressRule, syntheticDeviceAddressItem) - } - var ownerRule []interface{} - for _, ownerItem := range owner { - ownerRule = append(ownerRule, ownerItem) - } - - logs, sub, err := _Registry.contract.WatchLogs(opts, "SyntheticDeviceNodeMinted", vehicleNodeRule, syntheticDeviceAddressRule, ownerRule) - 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(RegistrySyntheticDeviceNodeMinted) - if err := _Registry.contract.UnpackLog(event, "SyntheticDeviceNodeMinted", 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 -} - -// ParseSyntheticDeviceNodeMinted is a log parse operation binding the contract event 0x5a560c1adda92bd6cbf9c891dc38e9e2973b7963493f2364caa40a4218346280. -// -// Solidity: event SyntheticDeviceNodeMinted(uint256 connectionId, uint256 syntheticDeviceNode, uint256 indexed vehicleNode, address indexed syntheticDeviceAddress, address indexed owner) -func (_Registry *RegistryFilterer) ParseSyntheticDeviceNodeMinted(log types.Log) (*RegistrySyntheticDeviceNodeMinted, error) { - event := new(RegistrySyntheticDeviceNodeMinted) - if err := _Registry.contract.UnpackLog(event, "SyntheticDeviceNodeMinted", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// RegistryVehicleAttributeAddedIterator is returned from FilterVehicleAttributeAdded and is used to iterate over the raw logs and unpacked data for VehicleAttributeAdded events raised by the Registry contract. -type RegistryVehicleAttributeAddedIterator struct { - Event *RegistryVehicleAttributeAdded // 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 *RegistryVehicleAttributeAddedIterator) 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(RegistryVehicleAttributeAdded) - 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(RegistryVehicleAttributeAdded) - 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 *RegistryVehicleAttributeAddedIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *RegistryVehicleAttributeAddedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// RegistryVehicleAttributeAdded represents a VehicleAttributeAdded event raised by the Registry contract. -type RegistryVehicleAttributeAdded struct { - Attribute string - Raw types.Log // Blockchain specific contextual infos -} - -// FilterVehicleAttributeAdded is a free log retrieval operation binding the contract event 0x2b7d41dc33ffd58029f53ebfc3232e4f343480b078458bc17c527583e0172c1a. -// -// Solidity: event VehicleAttributeAdded(string attribute) -func (_Registry *RegistryFilterer) FilterVehicleAttributeAdded(opts *bind.FilterOpts) (*RegistryVehicleAttributeAddedIterator, error) { - - logs, sub, err := _Registry.contract.FilterLogs(opts, "VehicleAttributeAdded") - if err != nil { - return nil, err - } - return &RegistryVehicleAttributeAddedIterator{contract: _Registry.contract, event: "VehicleAttributeAdded", logs: logs, sub: sub}, nil -} - -// WatchVehicleAttributeAdded is a free log subscription operation binding the contract event 0x2b7d41dc33ffd58029f53ebfc3232e4f343480b078458bc17c527583e0172c1a. -// -// Solidity: event VehicleAttributeAdded(string attribute) -func (_Registry *RegistryFilterer) WatchVehicleAttributeAdded(opts *bind.WatchOpts, sink chan<- *RegistryVehicleAttributeAdded) (event.Subscription, error) { - - logs, sub, err := _Registry.contract.WatchLogs(opts, "VehicleAttributeAdded") - 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(RegistryVehicleAttributeAdded) - if err := _Registry.contract.UnpackLog(event, "VehicleAttributeAdded", 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 -} - -// ParseVehicleAttributeAdded is a log parse operation binding the contract event 0x2b7d41dc33ffd58029f53ebfc3232e4f343480b078458bc17c527583e0172c1a. -// -// Solidity: event VehicleAttributeAdded(string attribute) -func (_Registry *RegistryFilterer) ParseVehicleAttributeAdded(log types.Log) (*RegistryVehicleAttributeAdded, error) { - event := new(RegistryVehicleAttributeAdded) - if err := _Registry.contract.UnpackLog(event, "VehicleAttributeAdded", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// RegistryVehicleAttributeRemovedIterator is returned from FilterVehicleAttributeRemoved and is used to iterate over the raw logs and unpacked data for VehicleAttributeRemoved events raised by the Registry contract. -type RegistryVehicleAttributeRemovedIterator struct { - Event *RegistryVehicleAttributeRemoved // 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 *RegistryVehicleAttributeRemovedIterator) 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(RegistryVehicleAttributeRemoved) - 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(RegistryVehicleAttributeRemoved) - 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 *RegistryVehicleAttributeRemovedIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *RegistryVehicleAttributeRemovedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// RegistryVehicleAttributeRemoved represents a VehicleAttributeRemoved event raised by the Registry contract. -type RegistryVehicleAttributeRemoved struct { - Attribute string - Raw types.Log // Blockchain specific contextual infos -} - -// FilterVehicleAttributeRemoved is a free log retrieval operation binding the contract event 0x9b4bf3774d4e97d237196fc2a2d3f0764f4a7987c5a5db94f029cc8357f72b45. -// -// Solidity: event VehicleAttributeRemoved(string attribute) -func (_Registry *RegistryFilterer) FilterVehicleAttributeRemoved(opts *bind.FilterOpts) (*RegistryVehicleAttributeRemovedIterator, error) { - - logs, sub, err := _Registry.contract.FilterLogs(opts, "VehicleAttributeRemoved") - if err != nil { - return nil, err - } - return &RegistryVehicleAttributeRemovedIterator{contract: _Registry.contract, event: "VehicleAttributeRemoved", logs: logs, sub: sub}, nil -} - -// WatchVehicleAttributeRemoved is a free log subscription operation binding the contract event 0x9b4bf3774d4e97d237196fc2a2d3f0764f4a7987c5a5db94f029cc8357f72b45. -// -// Solidity: event VehicleAttributeRemoved(string attribute) -func (_Registry *RegistryFilterer) WatchVehicleAttributeRemoved(opts *bind.WatchOpts, sink chan<- *RegistryVehicleAttributeRemoved) (event.Subscription, error) { - - logs, sub, err := _Registry.contract.WatchLogs(opts, "VehicleAttributeRemoved") - 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(RegistryVehicleAttributeRemoved) - if err := _Registry.contract.UnpackLog(event, "VehicleAttributeRemoved", 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 -} - -// ParseVehicleAttributeRemoved is a log parse operation binding the contract event 0x9b4bf3774d4e97d237196fc2a2d3f0764f4a7987c5a5db94f029cc8357f72b45. -// -// Solidity: event VehicleAttributeRemoved(string attribute) -func (_Registry *RegistryFilterer) ParseVehicleAttributeRemoved(log types.Log) (*RegistryVehicleAttributeRemoved, error) { - event := new(RegistryVehicleAttributeRemoved) - if err := _Registry.contract.UnpackLog(event, "VehicleAttributeRemoved", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// RegistryVehicleAttributeSetIterator is returned from FilterVehicleAttributeSet and is used to iterate over the raw logs and unpacked data for VehicleAttributeSet events raised by the Registry contract. -type RegistryVehicleAttributeSetIterator struct { - Event *RegistryVehicleAttributeSet // 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 *RegistryVehicleAttributeSetIterator) 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(RegistryVehicleAttributeSet) - 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(RegistryVehicleAttributeSet) - 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 *RegistryVehicleAttributeSetIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *RegistryVehicleAttributeSetIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// RegistryVehicleAttributeSet represents a VehicleAttributeSet event raised by the Registry contract. -type RegistryVehicleAttributeSet struct { - TokenId *big.Int - Attribute string - Info string - Raw types.Log // Blockchain specific contextual infos -} - -// FilterVehicleAttributeSet is a free log retrieval operation binding the contract event 0x3a259e5d4c53f11c343582a8291a82a8cc0b36ec211d5ab48c2f29ebb068e5fb. -// -// Solidity: event VehicleAttributeSet(uint256 tokenId, string attribute, string info) -func (_Registry *RegistryFilterer) FilterVehicleAttributeSet(opts *bind.FilterOpts) (*RegistryVehicleAttributeSetIterator, error) { - - logs, sub, err := _Registry.contract.FilterLogs(opts, "VehicleAttributeSet") - if err != nil { - return nil, err - } - return &RegistryVehicleAttributeSetIterator{contract: _Registry.contract, event: "VehicleAttributeSet", logs: logs, sub: sub}, nil -} - -// WatchVehicleAttributeSet is a free log subscription operation binding the contract event 0x3a259e5d4c53f11c343582a8291a82a8cc0b36ec211d5ab48c2f29ebb068e5fb. -// -// Solidity: event VehicleAttributeSet(uint256 tokenId, string attribute, string info) -func (_Registry *RegistryFilterer) WatchVehicleAttributeSet(opts *bind.WatchOpts, sink chan<- *RegistryVehicleAttributeSet) (event.Subscription, error) { - - logs, sub, err := _Registry.contract.WatchLogs(opts, "VehicleAttributeSet") - 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(RegistryVehicleAttributeSet) - if err := _Registry.contract.UnpackLog(event, "VehicleAttributeSet", 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 -} - -// ParseVehicleAttributeSet is a log parse operation binding the contract event 0x3a259e5d4c53f11c343582a8291a82a8cc0b36ec211d5ab48c2f29ebb068e5fb. -// -// Solidity: event VehicleAttributeSet(uint256 tokenId, string attribute, string info) -func (_Registry *RegistryFilterer) ParseVehicleAttributeSet(log types.Log) (*RegistryVehicleAttributeSet, error) { - event := new(RegistryVehicleAttributeSet) - if err := _Registry.contract.UnpackLog(event, "VehicleAttributeSet", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// RegistryVehicleIdProxySetIterator is returned from FilterVehicleIdProxySet and is used to iterate over the raw logs and unpacked data for VehicleIdProxySet events raised by the Registry contract. -type RegistryVehicleIdProxySetIterator struct { - Event *RegistryVehicleIdProxySet // 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 *RegistryVehicleIdProxySetIterator) 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(RegistryVehicleIdProxySet) - 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(RegistryVehicleIdProxySet) - 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 *RegistryVehicleIdProxySetIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *RegistryVehicleIdProxySetIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// RegistryVehicleIdProxySet represents a VehicleIdProxySet event raised by the Registry contract. -type RegistryVehicleIdProxySet struct { - Proxy common.Address - Raw types.Log // Blockchain specific contextual infos -} - -// FilterVehicleIdProxySet is a free log retrieval operation binding the contract event 0x3e7484c4e57f7d92e9f02eba6cd805d89112e48db8c21aeb8485fcf0020e479d. -// -// Solidity: event VehicleIdProxySet(address indexed proxy) -func (_Registry *RegistryFilterer) FilterVehicleIdProxySet(opts *bind.FilterOpts, proxy []common.Address) (*RegistryVehicleIdProxySetIterator, error) { - - var proxyRule []interface{} - for _, proxyItem := range proxy { - proxyRule = append(proxyRule, proxyItem) - } - - logs, sub, err := _Registry.contract.FilterLogs(opts, "VehicleIdProxySet", proxyRule) - if err != nil { - return nil, err - } - return &RegistryVehicleIdProxySetIterator{contract: _Registry.contract, event: "VehicleIdProxySet", logs: logs, sub: sub}, nil -} - -// WatchVehicleIdProxySet is a free log subscription operation binding the contract event 0x3e7484c4e57f7d92e9f02eba6cd805d89112e48db8c21aeb8485fcf0020e479d. -// -// Solidity: event VehicleIdProxySet(address indexed proxy) -func (_Registry *RegistryFilterer) WatchVehicleIdProxySet(opts *bind.WatchOpts, sink chan<- *RegistryVehicleIdProxySet, proxy []common.Address) (event.Subscription, error) { - - var proxyRule []interface{} - for _, proxyItem := range proxy { - proxyRule = append(proxyRule, proxyItem) - } - - logs, sub, err := _Registry.contract.WatchLogs(opts, "VehicleIdProxySet", proxyRule) - 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(RegistryVehicleIdProxySet) - if err := _Registry.contract.UnpackLog(event, "VehicleIdProxySet", 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 -} - -// ParseVehicleIdProxySet is a log parse operation binding the contract event 0x3e7484c4e57f7d92e9f02eba6cd805d89112e48db8c21aeb8485fcf0020e479d. -// -// Solidity: event VehicleIdProxySet(address indexed proxy) -func (_Registry *RegistryFilterer) ParseVehicleIdProxySet(log types.Log) (*RegistryVehicleIdProxySet, error) { - event := new(RegistryVehicleIdProxySet) - if err := _Registry.contract.UnpackLog(event, "VehicleIdProxySet", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// RegistryVehicleNodeBurnedIterator is returned from FilterVehicleNodeBurned and is used to iterate over the raw logs and unpacked data for VehicleNodeBurned events raised by the Registry contract. -type RegistryVehicleNodeBurnedIterator struct { - Event *RegistryVehicleNodeBurned // 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 *RegistryVehicleNodeBurnedIterator) 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(RegistryVehicleNodeBurned) - 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(RegistryVehicleNodeBurned) - 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 *RegistryVehicleNodeBurnedIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *RegistryVehicleNodeBurnedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// RegistryVehicleNodeBurned represents a VehicleNodeBurned event raised by the Registry contract. -type RegistryVehicleNodeBurned struct { - VehicleNode *big.Int - Owner common.Address - Raw types.Log // Blockchain specific contextual infos -} - -// FilterVehicleNodeBurned is a free log retrieval operation binding the contract event 0x7b36384f0fcf18da09247269a4716eecbcbc475a5b2bc7aa371fc1164789508d. -// -// Solidity: event VehicleNodeBurned(uint256 indexed vehicleNode, address indexed owner) -func (_Registry *RegistryFilterer) FilterVehicleNodeBurned(opts *bind.FilterOpts, vehicleNode []*big.Int, owner []common.Address) (*RegistryVehicleNodeBurnedIterator, error) { - - var vehicleNodeRule []interface{} - for _, vehicleNodeItem := range vehicleNode { - vehicleNodeRule = append(vehicleNodeRule, vehicleNodeItem) - } - var ownerRule []interface{} - for _, ownerItem := range owner { - ownerRule = append(ownerRule, ownerItem) - } - - logs, sub, err := _Registry.contract.FilterLogs(opts, "VehicleNodeBurned", vehicleNodeRule, ownerRule) - if err != nil { - return nil, err - } - return &RegistryVehicleNodeBurnedIterator{contract: _Registry.contract, event: "VehicleNodeBurned", logs: logs, sub: sub}, nil -} - -// WatchVehicleNodeBurned is a free log subscription operation binding the contract event 0x7b36384f0fcf18da09247269a4716eecbcbc475a5b2bc7aa371fc1164789508d. -// -// Solidity: event VehicleNodeBurned(uint256 indexed vehicleNode, address indexed owner) -func (_Registry *RegistryFilterer) WatchVehicleNodeBurned(opts *bind.WatchOpts, sink chan<- *RegistryVehicleNodeBurned, vehicleNode []*big.Int, owner []common.Address) (event.Subscription, error) { - - var vehicleNodeRule []interface{} - for _, vehicleNodeItem := range vehicleNode { - vehicleNodeRule = append(vehicleNodeRule, vehicleNodeItem) - } - var ownerRule []interface{} - for _, ownerItem := range owner { - ownerRule = append(ownerRule, ownerItem) - } - - logs, sub, err := _Registry.contract.WatchLogs(opts, "VehicleNodeBurned", vehicleNodeRule, ownerRule) - 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(RegistryVehicleNodeBurned) - if err := _Registry.contract.UnpackLog(event, "VehicleNodeBurned", 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 -} - -// ParseVehicleNodeBurned is a log parse operation binding the contract event 0x7b36384f0fcf18da09247269a4716eecbcbc475a5b2bc7aa371fc1164789508d. -// -// Solidity: event VehicleNodeBurned(uint256 indexed vehicleNode, address indexed owner) -func (_Registry *RegistryFilterer) ParseVehicleNodeBurned(log types.Log) (*RegistryVehicleNodeBurned, error) { - event := new(RegistryVehicleNodeBurned) - if err := _Registry.contract.UnpackLog(event, "VehicleNodeBurned", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// RegistryVehicleNodeMintedIterator is returned from FilterVehicleNodeMinted and is used to iterate over the raw logs and unpacked data for VehicleNodeMinted events raised by the Registry contract. -type RegistryVehicleNodeMintedIterator struct { - Event *RegistryVehicleNodeMinted // 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 *RegistryVehicleNodeMintedIterator) 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(RegistryVehicleNodeMinted) - 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(RegistryVehicleNodeMinted) - 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 *RegistryVehicleNodeMintedIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *RegistryVehicleNodeMintedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// RegistryVehicleNodeMinted represents a VehicleNodeMinted event raised by the Registry contract. -type RegistryVehicleNodeMinted struct { - ManufacturerNode *big.Int - TokenId *big.Int - Owner common.Address - Raw types.Log // Blockchain specific contextual infos -} - -// FilterVehicleNodeMinted is a free log retrieval operation binding the contract event 0xd471ae8ab3c01edc986909c344bb50f982b21772fcac173103ef8b9924375ec6. -// -// Solidity: event VehicleNodeMinted(uint256 manufacturerNode, uint256 tokenId, address owner) -func (_Registry *RegistryFilterer) FilterVehicleNodeMinted(opts *bind.FilterOpts) (*RegistryVehicleNodeMintedIterator, error) { - - logs, sub, err := _Registry.contract.FilterLogs(opts, "VehicleNodeMinted") - if err != nil { - return nil, err - } - return &RegistryVehicleNodeMintedIterator{contract: _Registry.contract, event: "VehicleNodeMinted", logs: logs, sub: sub}, nil -} - -// WatchVehicleNodeMinted is a free log subscription operation binding the contract event 0xd471ae8ab3c01edc986909c344bb50f982b21772fcac173103ef8b9924375ec6. -// -// Solidity: event VehicleNodeMinted(uint256 manufacturerNode, uint256 tokenId, address owner) -func (_Registry *RegistryFilterer) WatchVehicleNodeMinted(opts *bind.WatchOpts, sink chan<- *RegistryVehicleNodeMinted) (event.Subscription, error) { - - logs, sub, err := _Registry.contract.WatchLogs(opts, "VehicleNodeMinted") - 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(RegistryVehicleNodeMinted) - if err := _Registry.contract.UnpackLog(event, "VehicleNodeMinted", 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 -} - -// ParseVehicleNodeMinted is a log parse operation binding the contract event 0xd471ae8ab3c01edc986909c344bb50f982b21772fcac173103ef8b9924375ec6. -// -// Solidity: event VehicleNodeMinted(uint256 manufacturerNode, uint256 tokenId, address owner) -func (_Registry *RegistryFilterer) ParseVehicleNodeMinted(log types.Log) (*RegistryVehicleNodeMinted, error) { - event := new(RegistryVehicleNodeMinted) - if err := _Registry.contract.UnpackLog(event, "VehicleNodeMinted", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// RegistryVehicleNodeMintedWithDeviceDefinitionIterator is returned from FilterVehicleNodeMintedWithDeviceDefinition and is used to iterate over the raw logs and unpacked data for VehicleNodeMintedWithDeviceDefinition events raised by the Registry contract. -type RegistryVehicleNodeMintedWithDeviceDefinitionIterator struct { - Event *RegistryVehicleNodeMintedWithDeviceDefinition // 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 *RegistryVehicleNodeMintedWithDeviceDefinitionIterator) 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(RegistryVehicleNodeMintedWithDeviceDefinition) - 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(RegistryVehicleNodeMintedWithDeviceDefinition) - 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 *RegistryVehicleNodeMintedWithDeviceDefinitionIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *RegistryVehicleNodeMintedWithDeviceDefinitionIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// RegistryVehicleNodeMintedWithDeviceDefinition represents a VehicleNodeMintedWithDeviceDefinition event raised by the Registry contract. -type RegistryVehicleNodeMintedWithDeviceDefinition struct { - ManufacturerId *big.Int - VehicleId *big.Int - Owner common.Address - DeviceDefinitionId string - Raw types.Log // Blockchain specific contextual infos -} - -// FilterVehicleNodeMintedWithDeviceDefinition is a free log retrieval operation binding the contract event 0xc7c7d9ac150ee7eff1ae17be6e6c250d9f574d019d47cd741f693feb1929496c. -// -// Solidity: event VehicleNodeMintedWithDeviceDefinition(uint256 indexed manufacturerId, uint256 indexed vehicleId, address indexed owner, string deviceDefinitionId) -func (_Registry *RegistryFilterer) FilterVehicleNodeMintedWithDeviceDefinition(opts *bind.FilterOpts, manufacturerId []*big.Int, vehicleId []*big.Int, owner []common.Address) (*RegistryVehicleNodeMintedWithDeviceDefinitionIterator, error) { - - var manufacturerIdRule []interface{} - for _, manufacturerIdItem := range manufacturerId { - manufacturerIdRule = append(manufacturerIdRule, manufacturerIdItem) - } - var vehicleIdRule []interface{} - for _, vehicleIdItem := range vehicleId { - vehicleIdRule = append(vehicleIdRule, vehicleIdItem) - } - var ownerRule []interface{} - for _, ownerItem := range owner { - ownerRule = append(ownerRule, ownerItem) - } - - logs, sub, err := _Registry.contract.FilterLogs(opts, "VehicleNodeMintedWithDeviceDefinition", manufacturerIdRule, vehicleIdRule, ownerRule) - if err != nil { - return nil, err - } - return &RegistryVehicleNodeMintedWithDeviceDefinitionIterator{contract: _Registry.contract, event: "VehicleNodeMintedWithDeviceDefinition", logs: logs, sub: sub}, nil -} - -// WatchVehicleNodeMintedWithDeviceDefinition is a free log subscription operation binding the contract event 0xc7c7d9ac150ee7eff1ae17be6e6c250d9f574d019d47cd741f693feb1929496c. -// -// Solidity: event VehicleNodeMintedWithDeviceDefinition(uint256 indexed manufacturerId, uint256 indexed vehicleId, address indexed owner, string deviceDefinitionId) -func (_Registry *RegistryFilterer) WatchVehicleNodeMintedWithDeviceDefinition(opts *bind.WatchOpts, sink chan<- *RegistryVehicleNodeMintedWithDeviceDefinition, manufacturerId []*big.Int, vehicleId []*big.Int, owner []common.Address) (event.Subscription, error) { - - var manufacturerIdRule []interface{} - for _, manufacturerIdItem := range manufacturerId { - manufacturerIdRule = append(manufacturerIdRule, manufacturerIdItem) - } - var vehicleIdRule []interface{} - for _, vehicleIdItem := range vehicleId { - vehicleIdRule = append(vehicleIdRule, vehicleIdItem) - } - var ownerRule []interface{} - for _, ownerItem := range owner { - ownerRule = append(ownerRule, ownerItem) - } - - logs, sub, err := _Registry.contract.WatchLogs(opts, "VehicleNodeMintedWithDeviceDefinition", manufacturerIdRule, vehicleIdRule, ownerRule) - 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(RegistryVehicleNodeMintedWithDeviceDefinition) - if err := _Registry.contract.UnpackLog(event, "VehicleNodeMintedWithDeviceDefinition", 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 -} - -// ParseVehicleNodeMintedWithDeviceDefinition is a log parse operation binding the contract event 0xc7c7d9ac150ee7eff1ae17be6e6c250d9f574d019d47cd741f693feb1929496c. -// -// Solidity: event VehicleNodeMintedWithDeviceDefinition(uint256 indexed manufacturerId, uint256 indexed vehicleId, address indexed owner, string deviceDefinitionId) -func (_Registry *RegistryFilterer) ParseVehicleNodeMintedWithDeviceDefinition(log types.Log) (*RegistryVehicleNodeMintedWithDeviceDefinition, error) { - event := new(RegistryVehicleNodeMintedWithDeviceDefinition) - if err := _Registry.contract.UnpackLog(event, "VehicleNodeMintedWithDeviceDefinition", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// RegistryVehicleStorageNodeIdSetIterator is returned from FilterVehicleStorageNodeIdSet and is used to iterate over the raw logs and unpacked data for VehicleStorageNodeIdSet events raised by the Registry contract. -type RegistryVehicleStorageNodeIdSetIterator struct { - Event *RegistryVehicleStorageNodeIdSet // 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 *RegistryVehicleStorageNodeIdSetIterator) 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(RegistryVehicleStorageNodeIdSet) - 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(RegistryVehicleStorageNodeIdSet) - 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 *RegistryVehicleStorageNodeIdSetIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *RegistryVehicleStorageNodeIdSetIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// RegistryVehicleStorageNodeIdSet represents a VehicleStorageNodeIdSet event raised by the Registry contract. -type RegistryVehicleStorageNodeIdSet struct { - VehicleId *big.Int - StorageNodeId *big.Int - Raw types.Log // Blockchain specific contextual infos -} - -// FilterVehicleStorageNodeIdSet is a free log retrieval operation binding the contract event 0x9197060b37d411c171b9a3c09175a1f6e3f98e71adaf8f44c750a7cdd2c87fee. -// -// Solidity: event VehicleStorageNodeIdSet(uint256 indexed vehicleId, uint256 indexed storageNodeId) -func (_Registry *RegistryFilterer) FilterVehicleStorageNodeIdSet(opts *bind.FilterOpts, vehicleId []*big.Int, storageNodeId []*big.Int) (*RegistryVehicleStorageNodeIdSetIterator, error) { - - var vehicleIdRule []interface{} - for _, vehicleIdItem := range vehicleId { - vehicleIdRule = append(vehicleIdRule, vehicleIdItem) - } - var storageNodeIdRule []interface{} - for _, storageNodeIdItem := range storageNodeId { - storageNodeIdRule = append(storageNodeIdRule, storageNodeIdItem) - } - - logs, sub, err := _Registry.contract.FilterLogs(opts, "VehicleStorageNodeIdSet", vehicleIdRule, storageNodeIdRule) - if err != nil { - return nil, err - } - return &RegistryVehicleStorageNodeIdSetIterator{contract: _Registry.contract, event: "VehicleStorageNodeIdSet", logs: logs, sub: sub}, nil -} - -// WatchVehicleStorageNodeIdSet is a free log subscription operation binding the contract event 0x9197060b37d411c171b9a3c09175a1f6e3f98e71adaf8f44c750a7cdd2c87fee. -// -// Solidity: event VehicleStorageNodeIdSet(uint256 indexed vehicleId, uint256 indexed storageNodeId) -func (_Registry *RegistryFilterer) WatchVehicleStorageNodeIdSet(opts *bind.WatchOpts, sink chan<- *RegistryVehicleStorageNodeIdSet, vehicleId []*big.Int, storageNodeId []*big.Int) (event.Subscription, error) { - - var vehicleIdRule []interface{} - for _, vehicleIdItem := range vehicleId { - vehicleIdRule = append(vehicleIdRule, vehicleIdItem) - } - var storageNodeIdRule []interface{} - for _, storageNodeIdItem := range storageNodeId { - storageNodeIdRule = append(storageNodeIdRule, storageNodeIdItem) - } - - logs, sub, err := _Registry.contract.WatchLogs(opts, "VehicleStorageNodeIdSet", vehicleIdRule, storageNodeIdRule) - 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(RegistryVehicleStorageNodeIdSet) - if err := _Registry.contract.UnpackLog(event, "VehicleStorageNodeIdSet", 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 -} - -// ParseVehicleStorageNodeIdSet is a log parse operation binding the contract event 0x9197060b37d411c171b9a3c09175a1f6e3f98e71adaf8f44c750a7cdd2c87fee. -// -// Solidity: event VehicleStorageNodeIdSet(uint256 indexed vehicleId, uint256 indexed storageNodeId) -func (_Registry *RegistryFilterer) ParseVehicleStorageNodeIdSet(log types.Log) (*RegistryVehicleStorageNodeIdSet, error) { - event := new(RegistryVehicleStorageNodeIdSet) - if err := _Registry.contract.UnpackLog(event, "VehicleStorageNodeIdSet", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// RegistryVehicleStreamSetIterator is returned from FilterVehicleStreamSet and is used to iterate over the raw logs and unpacked data for VehicleStreamSet events raised by the Registry contract. -type RegistryVehicleStreamSetIterator struct { - Event *RegistryVehicleStreamSet // 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 *RegistryVehicleStreamSetIterator) 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(RegistryVehicleStreamSet) - 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(RegistryVehicleStreamSet) - 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 *RegistryVehicleStreamSetIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *RegistryVehicleStreamSetIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// RegistryVehicleStreamSet represents a VehicleStreamSet event raised by the Registry contract. -type RegistryVehicleStreamSet struct { - VehicleId *big.Int - StreamId string - Raw types.Log // Blockchain specific contextual infos -} - -// FilterVehicleStreamSet is a free log retrieval operation binding the contract event 0x09d0a7809cb7d90906448d57618581b65ca306d116e2b991721b9ef877d890de. -// -// Solidity: event VehicleStreamSet(uint256 indexed vehicleId, string streamId) -func (_Registry *RegistryFilterer) FilterVehicleStreamSet(opts *bind.FilterOpts, vehicleId []*big.Int) (*RegistryVehicleStreamSetIterator, error) { - - var vehicleIdRule []interface{} - for _, vehicleIdItem := range vehicleId { - vehicleIdRule = append(vehicleIdRule, vehicleIdItem) - } - - logs, sub, err := _Registry.contract.FilterLogs(opts, "VehicleStreamSet", vehicleIdRule) - if err != nil { - return nil, err - } - return &RegistryVehicleStreamSetIterator{contract: _Registry.contract, event: "VehicleStreamSet", logs: logs, sub: sub}, nil -} - -// WatchVehicleStreamSet is a free log subscription operation binding the contract event 0x09d0a7809cb7d90906448d57618581b65ca306d116e2b991721b9ef877d890de. -// -// Solidity: event VehicleStreamSet(uint256 indexed vehicleId, string streamId) -func (_Registry *RegistryFilterer) WatchVehicleStreamSet(opts *bind.WatchOpts, sink chan<- *RegistryVehicleStreamSet, vehicleId []*big.Int) (event.Subscription, error) { - - var vehicleIdRule []interface{} - for _, vehicleIdItem := range vehicleId { - vehicleIdRule = append(vehicleIdRule, vehicleIdItem) - } - - logs, sub, err := _Registry.contract.WatchLogs(opts, "VehicleStreamSet", vehicleIdRule) - 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(RegistryVehicleStreamSet) - if err := _Registry.contract.UnpackLog(event, "VehicleStreamSet", 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 -} - -// ParseVehicleStreamSet is a log parse operation binding the contract event 0x09d0a7809cb7d90906448d57618581b65ca306d116e2b991721b9ef877d890de. -// -// Solidity: event VehicleStreamSet(uint256 indexed vehicleId, string streamId) -func (_Registry *RegistryFilterer) ParseVehicleStreamSet(log types.Log) (*RegistryVehicleStreamSet, error) { - event := new(RegistryVehicleStreamSet) - if err := _Registry.contract.UnpackLog(event, "VehicleStreamSet", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// RegistryVehicleStreamUnsetIterator is returned from FilterVehicleStreamUnset and is used to iterate over the raw logs and unpacked data for VehicleStreamUnset events raised by the Registry contract. -type RegistryVehicleStreamUnsetIterator struct { - Event *RegistryVehicleStreamUnset // 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 *RegistryVehicleStreamUnsetIterator) 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(RegistryVehicleStreamUnset) - 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(RegistryVehicleStreamUnset) - 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 *RegistryVehicleStreamUnsetIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *RegistryVehicleStreamUnsetIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// RegistryVehicleStreamUnset represents a VehicleStreamUnset event raised by the Registry contract. -type RegistryVehicleStreamUnset struct { - VehicleId *big.Int - StreamId string - Raw types.Log // Blockchain specific contextual infos -} - -// FilterVehicleStreamUnset is a free log retrieval operation binding the contract event 0x14692607635062a59787a92503915f7eca22e88b9bb3474438d0b393ad0ecf0d. -// -// Solidity: event VehicleStreamUnset(uint256 indexed vehicleId, string streamId) -func (_Registry *RegistryFilterer) FilterVehicleStreamUnset(opts *bind.FilterOpts, vehicleId []*big.Int) (*RegistryVehicleStreamUnsetIterator, error) { - - var vehicleIdRule []interface{} - for _, vehicleIdItem := range vehicleId { - vehicleIdRule = append(vehicleIdRule, vehicleIdItem) - } - - logs, sub, err := _Registry.contract.FilterLogs(opts, "VehicleStreamUnset", vehicleIdRule) - if err != nil { - return nil, err - } - return &RegistryVehicleStreamUnsetIterator{contract: _Registry.contract, event: "VehicleStreamUnset", logs: logs, sub: sub}, nil -} - -// WatchVehicleStreamUnset is a free log subscription operation binding the contract event 0x14692607635062a59787a92503915f7eca22e88b9bb3474438d0b393ad0ecf0d. -// -// Solidity: event VehicleStreamUnset(uint256 indexed vehicleId, string streamId) -func (_Registry *RegistryFilterer) WatchVehicleStreamUnset(opts *bind.WatchOpts, sink chan<- *RegistryVehicleStreamUnset, vehicleId []*big.Int) (event.Subscription, error) { - - var vehicleIdRule []interface{} - for _, vehicleIdItem := range vehicleId { - vehicleIdRule = append(vehicleIdRule, vehicleIdItem) - } - - logs, sub, err := _Registry.contract.WatchLogs(opts, "VehicleStreamUnset", vehicleIdRule) - 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(RegistryVehicleStreamUnset) - if err := _Registry.contract.UnpackLog(event, "VehicleStreamUnset", 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 -} - -// ParseVehicleStreamUnset is a log parse operation binding the contract event 0x14692607635062a59787a92503915f7eca22e88b9bb3474438d0b393ad0ecf0d. -// -// Solidity: event VehicleStreamUnset(uint256 indexed vehicleId, string streamId) -func (_Registry *RegistryFilterer) ParseVehicleStreamUnset(log types.Log) (*RegistryVehicleStreamUnset, error) { - event := new(RegistryVehicleStreamUnset) - if err := _Registry.contract.UnpackLog(event, "VehicleStreamUnset", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} diff --git a/test/MultipleMinter.test.ts b/test/MultipleMinter.test.ts index 26f625ac..2504d5da 100644 --- a/test/MultipleMinter.test.ts +++ b/test/MultipleMinter.test.ts @@ -31,7 +31,7 @@ import { createSnapshot, revertToSnapshot, signMessage, - MintVehicleAndSdInputWithSdId, + MintVehicleAndSdInputWithSnId, MintVehicleAndSdInputWithSnIdBatch, SacdInput, C @@ -353,8 +353,8 @@ describe('MultipleMinter', function () { describe('mintVehicleAndSdSign((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]))', () => { let mintSyntheticDeviceSig1: string; let mintVehicleOwnerSig1: string; - let correctMintInput: MintVehicleAndSdInputWithSdId; - let incorrectMintInput: MintVehicleAndSdInputWithSdId; + let correctMintInput: MintVehicleAndSdInputWithSnId; + let incorrectMintInput: MintVehicleAndSdInputWithSnId; before(async () => { mintSyntheticDeviceSig1 = await signMessage({ @@ -1665,8 +1665,8 @@ describe('MultipleMinter', function () { describe('mintVehicleAndSdSignAndSacd((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))', () => { let mintSyntheticDeviceSig1: string; let mintVehicleOwnerSig1: string; - let correctMintInput: MintVehicleAndSdInputWithSdId; - let incorrectMintInput: MintVehicleAndSdInputWithSdId; + let correctMintInput: MintVehicleAndSdInputWithSnId; + let incorrectMintInput: MintVehicleAndSdInputWithSnId; let sacdInput: SacdInput; before(async () => { diff --git a/utils/types.ts b/utils/types.ts index f8b943ed..64cb86c2 100644 --- a/utils/types.ts +++ b/utils/types.ts @@ -57,7 +57,7 @@ export type MintVehicleAndSdInput = { attrInfoPairsDevice: AttributeInfoPair[] }; -export type MintVehicleAndSdInputWithSdId = { +export type MintVehicleAndSdInputWithSnId = { manufacturerNode: string, owner: string, storageNodeId: string, @@ -91,7 +91,7 @@ export type MintVehicleAndSdInputBatch = MintVehicleAndSdInput & { sacdInput: SacdInput } -export type MintVehicleAndSdInputWithSnIdBatch = MintVehicleAndSdInputWithSdId & { +export type MintVehicleAndSdInputWithSnIdBatch = MintVehicleAndSdInputWithSnId & { sacdInput: SacdInput } From 1f272c23a1b90368e801903788d2dbc3772092df Mon Sep 17 00:00:00 2001 From: Dylan Moreland Date: Sat, 2 May 2026 13:47:05 -0400 Subject: [PATCH 9/9] Add tests for the functions without storage nodes This was a problem on main as well. I considered having these call, e.g., mintVehicle(manuf, owner, 0, attr), which would assign the default node. But I'm worried that storage concept will change soon and that these values will become liabilities. --- test/MultipleMinter.test.ts | 924 +++++++++++++++++++++++++++++++++++- test/nodes/Vehicle.test.ts | 813 ++++++++++++++++++++++++++++--- 2 files changed, 1652 insertions(+), 85 deletions(-) diff --git a/test/MultipleMinter.test.ts b/test/MultipleMinter.test.ts index 2504d5da..ca3fc2f6 100644 --- a/test/MultipleMinter.test.ts +++ b/test/MultipleMinter.test.ts @@ -31,6 +31,8 @@ import { createSnapshot, revertToSnapshot, signMessage, + MintVehicleAndSdInput, + MintVehicleAndSdInputBatch, MintVehicleAndSdInputWithSnId, MintVehicleAndSdInputWithSnIdBatch, SacdInput, @@ -350,6 +352,320 @@ describe('MultipleMinter', function () { await revertToSnapshot(snapshot); }); + describe('mintVehicleAndSdSign((uint256,address,(string,string)[],uint256,bytes,bytes,address,(string,string)[]))', () => { + let mintSyntheticDeviceSig1: string; + let mintVehicleOwnerSig1: string; + let correctMintInput: MintVehicleAndSdInput; + let incorrectMintInput: MintVehicleAndSdInput; + + before(async () => { + mintSyntheticDeviceSig1 = await signMessage({ + _signer: sdAddress1, + _primaryType: 'MintVehicleAndSdSign', + _verifyingContract: await syntheticDeviceInstance.getAddress(), + message: { + connectionId: C.CONNECTION_ID_1 + } + }); + mintVehicleOwnerSig1 = await signMessage({ + _signer: user1, + _primaryType: 'MintVehicleSign', + _verifyingContract: await vehicleInstance.getAddress(), + message: { + manufacturerNode: '1', + owner: user1.address, + attributes: C.mockVehicleAttributes, + infos: C.mockVehicleInfos + } + }); + correctMintInput = { + manufacturerNode: '1', + owner: user1.address, + attrInfoPairsVehicle: C.mockVehicleAttributeInfoPairs, + connectionId: C.CONNECTION_ID_1, + vehicleOwnerSig: mintVehicleOwnerSig1, + syntheticDeviceSig: mintSyntheticDeviceSig1, + syntheticDeviceAddr: sdAddress1.address, + attrInfoPairsDevice: C.mockSyntheticDeviceAttributeInfoPairs + }; + }); + + context('Error handling', () => { + beforeEach(() => { + incorrectMintInput = { ...correctMintInput }; + }); + + it('Should revert if vehicle parent node is not a manufacturer node', async () => { + incorrectMintInput.manufacturerNode = '99'; + + await expect( + multipleMinterInstance + .connect(connectionOwner1) + ['mintVehicleAndSdSign((uint256,address,(string,string)[],uint256,bytes,bytes,address,(string,string)[]))']( + incorrectMintInput + ) + ).to.be.revertedWithCustomError(multipleMinterInstance, 'InvalidParentNode') + .withArgs(99); + }); + it('Should revert if synthetic device parent node is not a connection ID', async () => { + incorrectMintInput.connectionId = '99'; + + await expect( + multipleMinterInstance + .connect(connectionOwner1) + ['mintVehicleAndSdSign((uint256,address,(string,string)[],uint256,bytes,bytes,address,(string,string)[]))']( + incorrectMintInput + ) + ).to.be.revertedWithCustomError(multipleMinterInstance, 'InvalidParentNode') + .withArgs(99); + }); + it('Should revert if caller is not the connection ID owner nor has permissions', async () => { + await expect( + multipleMinterInstance + .connect(nonAdmin) + ['mintVehicleAndSdSign((uint256,address,(string,string)[],uint256,bytes,bytes,address,(string,string)[]))']( + correctMintInput + ) + ) + .to.be.revertedWithCustomError( + multipleMinterInstance, + 'Unauthorized', + ) + .withArgs(nonAdmin.address); + }); + it('Should revert if vehicle attribute is not whitelisted', async () => { + incorrectMintInput.attrInfoPairsVehicle = + C.mockVehicleAttributeInfoPairsNotWhitelisted; + + await expect( + multipleMinterInstance + .connect(connectionOwner1) + ['mintVehicleAndSdSign((uint256,address,(string,string)[],uint256,bytes,bytes,address,(string,string)[]))']( + incorrectMintInput + ) + ).to.be.revertedWithCustomError( + multipleMinterInstance, + 'AttributeNotWhitelisted' + ).withArgs(C.mockVehicleAttributeInfoPairsNotWhitelisted[1].attribute); + }); + it('Should revert if synthetic device attribute is not whitelisted', async () => { + incorrectMintInput.attrInfoPairsDevice = + C.mockSyntheticDeviceAttributeInfoPairsNotWhitelisted; + + await expect( + multipleMinterInstance + .connect(connectionOwner1) + ['mintVehicleAndSdSign((uint256,address,(string,string)[],uint256,bytes,bytes,address,(string,string)[]))']( + incorrectMintInput + ) + ).to.be.revertedWithCustomError( + multipleMinterInstance, + 'AttributeNotWhitelisted' + ).withArgs(C.mockSyntheticDeviceAttributeInfoPairsNotWhitelisted[1].attribute); + }); + it('Should revert if vehicle owner signer does not match owner', async () => { + const invalidSignature = await signMessage({ + _signer: user2, + _primaryType: 'MintVehicleSign', + _verifyingContract: await vehicleInstance.getAddress(), + message: { + manufacturerNode: '1', + owner: user1.address, + attributes: C.mockVehicleAttributes, + infos: C.mockVehicleInfos + } + }); + incorrectMintInput.vehicleOwnerSig = invalidSignature; + + await expect( + multipleMinterInstance + .connect(connectionOwner1) + ['mintVehicleAndSdSign((uint256,address,(string,string)[],uint256,bytes,bytes,address,(string,string)[]))']( + incorrectMintInput + ) + ).to.be.revertedWithCustomError(multipleMinterInstance, 'InvalidOwnerSignature'); + }); + it('Should revert if synthetic device signer does not match device address', async () => { + const invalidSignature = await signMessage({ + _signer: sdAddress2, + _primaryType: 'MintVehicleAndSdSign', + _verifyingContract: await multipleMinterInstance.getAddress(), + message: { + connectionId: C.CONNECTION_ID_1 + } + }); + incorrectMintInput.syntheticDeviceSig = invalidSignature; + + await expect( + multipleMinterInstance + .connect(connectionOwner1) + ['mintVehicleAndSdSign((uint256,address,(string,string)[],uint256,bytes,bytes,address,(string,string)[]))']( + incorrectMintInput + ) + ).to.be.revertedWithCustomError(multipleMinterInstance, 'InvalidSdSignature'); + }); + it('Should revert if device address is already registered', async () => { + await multipleMinterInstance + .connect(connectionOwner1) + ['mintVehicleAndSdSign((uint256,address,(string,string)[],uint256,bytes,bytes,address,(string,string)[]))']( + correctMintInput + ); + + await expect( + multipleMinterInstance + .connect(connectionOwner1) + ['mintVehicleAndSdSign((uint256,address,(string,string)[],uint256,bytes,bytes,address,(string,string)[]))']( + correctMintInput + ) + ).to.be.revertedWithCustomError( + multipleMinterInstance, + 'DeviceAlreadyRegistered' + ).withArgs(sdAddress1.address); + }); + }); + + context('State', () => { + it('Should correctly set vehicle parent node', async () => { + await multipleMinterInstance + .connect(connectionOwner1) + ['mintVehicleAndSdSign((uint256,address,(string,string)[],uint256,bytes,bytes,address,(string,string)[]))']( + correctMintInput + ); + + const parentNode = await nodesInstance.getParentNode( + await vehicleIdInstance.getAddress(), + 3 + ); + + expect(parentNode).to.be.equal(1); + }); + it('Should correctly set vehicle node owner', async () => { + await multipleMinterInstance + .connect(connectionOwner1) + ['mintVehicleAndSdSign((uint256,address,(string,string)[],uint256,bytes,bytes,address,(string,string)[]))']( + correctMintInput + ); + + expect(await vehicleIdInstance.ownerOf(3)).to.be.equal(user1.address); + }); + it('Should correctly set synthetic device parent node', async () => { + await multipleMinterInstance + .connect(connectionOwner1) + ['mintVehicleAndSdSign((uint256,address,(string,string)[],uint256,bytes,bytes,address,(string,string)[]))']( + correctMintInput + ); + + const parentNode = await nodesInstance.getParentNode( + await sdIdInstance.getAddress(), + 1 + ); + + expect(parentNode).to.be.equal(C.CONNECTION_ID_1); + }); + it('Should correctly set synthetic device node owner', async () => { + await multipleMinterInstance + .connect(connectionOwner1) + ['mintVehicleAndSdSign((uint256,address,(string,string)[],uint256,bytes,bytes,address,(string,string)[]))']( + correctMintInput + ); + + expect(await sdIdInstance.ownerOf(1)).to.be.equal(user1.address); + }); + it('Should correctly set synthetic device address', async () => { + await multipleMinterInstance + .connect(connectionOwner1) + ['mintVehicleAndSdSign((uint256,address,(string,string)[],uint256,bytes,bytes,address,(string,string)[]))']( + correctMintInput + ); + + const id = await syntheticDeviceInstance.getSyntheticDeviceIdByAddress( + sdAddress1.address + ); + + expect(id).to.equal(1); + }); + it('Should correctly map the synthetic device to the vehicle', async () => { + await multipleMinterInstance + .connect(connectionOwner1) + ['mintVehicleAndSdSign((uint256,address,(string,string)[],uint256,bytes,bytes,address,(string,string)[]))']( + correctMintInput + ); + + expect( + await mapperInstance.getNodeLink( + await vehicleIdInstance.getAddress(), + await sdIdInstance.getAddress(), + 3 + ) + ).to.be.equal(1); + }); + it('Should correctly map the vehicle to the synthetic device', async () => { + await multipleMinterInstance + .connect(connectionOwner1) + ['mintVehicleAndSdSign((uint256,address,(string,string)[],uint256,bytes,bytes,address,(string,string)[]))']( + correctMintInput + ); + + expect( + await mapperInstance.getNodeLink( + await sdIdInstance.getAddress(), + await vehicleIdInstance.getAddress(), + 1 + ) + ).to.be.equal(3); + }); + it('Should not assign any Storage Node ID to the vehicle', async () => { + expect( + await storageNodeRegistryInstance.vehicleIdToStorageNodeId(3) + ).to.equal(0); + + await multipleMinterInstance + .connect(connectionOwner1) + ['mintVehicleAndSdSign((uint256,address,(string,string)[],uint256,bytes,bytes,address,(string,string)[]))']( + correctMintInput + ); + + expect( + await storageNodeRegistryInstance.vehicleIdToStorageNodeId(3) + ).to.equal(0); + }); + }); + + context('Events', () => { + it('Should emit VehicleNodeMinted event with correct params', async () => { + await expect( + multipleMinterInstance + .connect(connectionOwner1) + ['mintVehicleAndSdSign((uint256,address,(string,string)[],uint256,bytes,bytes,address,(string,string)[]))']( + correctMintInput + ) + ) + .to.emit(multipleMinterInstance, 'VehicleNodeMinted') + .withArgs(1, 3, user1.address); + }); + it('Should emit SyntheticDeviceNodeMinted event with correct params', async () => { + await expect( + multipleMinterInstance + .connect(connectionOwner1) + ['mintVehicleAndSdSign((uint256,address,(string,string)[],uint256,bytes,bytes,address,(string,string)[]))']( + correctMintInput + ) + ) + .to.emit(multipleMinterInstance, 'SyntheticDeviceNodeMinted') + .withArgs(C.CONNECTION_ID_1, 1, 3, sdAddress1.address, user1.address); + }); + it('Should not emit VehicleStorageNodeIdSet event', async () => { + await expect( + multipleMinterInstance + .connect(connectionOwner1) + ['mintVehicleAndSdSign((uint256,address,(string,string)[],uint256,bytes,bytes,address,(string,string)[]))']( + correctMintInput + ) + ).to.not.emit(storageNodeRegistryInstance, 'VehicleStorageNodeIdSet'); + }); + }); + }); + describe('mintVehicleAndSdSign((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]))', () => { let mintSyntheticDeviceSig1: string; let mintVehicleOwnerSig1: string; @@ -1646,21 +1962,353 @@ describe('MultipleMinter', function () { ) ).to.not.emit(multipleMinterInstance, 'SyntheticDeviceAttributeSet'); }); - it('Should emit VehicleStorageNodeIdSet events with correct params', async () => { - await expect( - multipleMinterInstance - .connect(minterWithPermission1) - ['mintVehicleAndSdSign((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]))']( - correctMintInput - ) + it('Should emit VehicleStorageNodeIdSet events with correct params', async () => { + await expect( + multipleMinterInstance + .connect(minterWithPermission1) + ['mintVehicleAndSdSign((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]))']( + correctMintInput + ) + ) + .to.emit(storageNodeRegistryInstance, 'VehicleStorageNodeIdSet') + .withArgs(3, C.STORAGE_NODE_ID_1); + }); + }); + }); + }); + + + describe('mintVehicleAndSdSignAndSacd((uint256,address,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))', () => { + let mintSyntheticDeviceSig1: string; + let mintVehicleOwnerSig1: string; + let correctMintInput: MintVehicleAndSdInput; + let incorrectMintInput: MintVehicleAndSdInput; + let sacdInput: SacdInput; + + before(async () => { + mintSyntheticDeviceSig1 = await signMessage({ + _signer: sdAddress1, + _primaryType: 'MintVehicleAndSdSign', + _verifyingContract: await syntheticDeviceInstance.getAddress(), + message: { + connectionId: C.CONNECTION_ID_1 + } + }); + mintVehicleOwnerSig1 = await signMessage({ + _signer: user1, + _primaryType: 'MintVehicleSign', + _verifyingContract: await vehicleInstance.getAddress(), + message: { + manufacturerNode: '1', + owner: user1.address, + attributes: C.mockVehicleAttributes, + infos: C.mockVehicleInfos + } + }); + correctMintInput = { + manufacturerNode: '1', + owner: user1.address, + attrInfoPairsVehicle: C.mockVehicleAttributeInfoPairs, + connectionId: C.CONNECTION_ID_1, + vehicleOwnerSig: mintVehicleOwnerSig1, + syntheticDeviceSig: mintSyntheticDeviceSig1, + syntheticDeviceAddr: sdAddress1.address, + attrInfoPairsDevice: C.mockSyntheticDeviceAttributeInfoPairs + }; + sacdInput = { + ...C.mockSacdInput, + grantee: user2.address, + expiration: DEFAULT_EXPIRATION + }; + }); + + context('Error handling', () => { + beforeEach(() => { + incorrectMintInput = { ...correctMintInput }; + }); + + it('Should revert if vehicle parent node is not a manufacturer node', async () => { + incorrectMintInput.manufacturerNode = '99'; + + await expect( + multipleMinterInstance + .connect(connectionOwner1) + ['mintVehicleAndSdSignAndSacd((uint256,address,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( + incorrectMintInput, + sacdInput + ) + ).to.be.revertedWithCustomError(multipleMinterInstance, 'InvalidParentNode') + .withArgs(99); + }); + it('Should revert if synthetic device parent node is not a connection ID', async () => { + incorrectMintInput.connectionId = '99'; + + await expect( + multipleMinterInstance + .connect(connectionOwner1) + ['mintVehicleAndSdSignAndSacd((uint256,address,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( + incorrectMintInput, + sacdInput + ) + ).to.be.revertedWithCustomError(multipleMinterInstance, 'InvalidParentNode') + .withArgs(99); + }); + it('Should revert if caller is not the connection ID owner nor has permissions', async () => { + await expect( + multipleMinterInstance + .connect(nonAdmin) + ['mintVehicleAndSdSignAndSacd((uint256,address,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( + correctMintInput, + sacdInput + ) + ) + .to.be.revertedWithCustomError( + multipleMinterInstance, + 'Unauthorized', + ) + .withArgs(nonAdmin.address); + }); + it('Should revert if vehicle attribute is not whitelisted', async () => { + incorrectMintInput.attrInfoPairsVehicle = + C.mockVehicleAttributeInfoPairsNotWhitelisted; + + await expect( + multipleMinterInstance + .connect(connectionOwner1) + ['mintVehicleAndSdSignAndSacd((uint256,address,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( + incorrectMintInput, + sacdInput + ) + ).to.be.revertedWithCustomError( + multipleMinterInstance, + 'AttributeNotWhitelisted' + ).withArgs(C.mockVehicleAttributeInfoPairsNotWhitelisted[1].attribute); + }); + it('Should revert if synthetic device attribute is not whitelisted', async () => { + incorrectMintInput.attrInfoPairsDevice = + C.mockSyntheticDeviceAttributeInfoPairsNotWhitelisted; + + await expect( + multipleMinterInstance + .connect(connectionOwner1) + ['mintVehicleAndSdSignAndSacd((uint256,address,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( + incorrectMintInput, + sacdInput + ) + ).to.be.revertedWithCustomError( + multipleMinterInstance, + 'AttributeNotWhitelisted' + ).withArgs(C.mockSyntheticDeviceAttributeInfoPairsNotWhitelisted[1].attribute); + }); + it('Should revert if vehicle owner signer does not match owner', async () => { + const invalidSignature = await signMessage({ + _signer: user2, + _primaryType: 'MintVehicleSign', + _verifyingContract: await vehicleInstance.getAddress(), + message: { + manufacturerNode: '1', + owner: user1.address, + attributes: C.mockVehicleAttributes, + infos: C.mockVehicleInfos + } + }); + incorrectMintInput.vehicleOwnerSig = invalidSignature; + + await expect( + multipleMinterInstance + .connect(connectionOwner1) + ['mintVehicleAndSdSignAndSacd((uint256,address,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( + incorrectMintInput, + sacdInput ) - .to.emit(storageNodeRegistryInstance, 'VehicleStorageNodeIdSet') - .withArgs(3, C.STORAGE_NODE_ID_1); + ).to.be.revertedWithCustomError(multipleMinterInstance, 'InvalidOwnerSignature'); + }); + it('Should revert if synthetic device signer does not match device address', async () => { + const invalidSignature = await signMessage({ + _signer: sdAddress2, + _primaryType: 'MintVehicleAndSdSign', + _verifyingContract: await multipleMinterInstance.getAddress(), + message: { + connectionId: C.CONNECTION_ID_1 + } }); + incorrectMintInput.syntheticDeviceSig = invalidSignature; + + await expect( + multipleMinterInstance + .connect(connectionOwner1) + ['mintVehicleAndSdSignAndSacd((uint256,address,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( + incorrectMintInput, + sacdInput + ) + ).to.be.revertedWithCustomError(multipleMinterInstance, 'InvalidSdSignature'); + }); + it('Should revert if device address is already registered', async () => { + await multipleMinterInstance + .connect(connectionOwner1) + ['mintVehicleAndSdSignAndSacd((uint256,address,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( + correctMintInput, + sacdInput + ); + + await expect( + multipleMinterInstance + .connect(connectionOwner1) + ['mintVehicleAndSdSignAndSacd((uint256,address,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( + correctMintInput, + sacdInput + ) + ).to.be.revertedWithCustomError( + multipleMinterInstance, + 'DeviceAlreadyRegistered' + ).withArgs(sdAddress1.address); + }); + }); + + context('State', () => { + it('Should correctly set vehicle parent node and owner', async () => { + await multipleMinterInstance + .connect(connectionOwner1) + ['mintVehicleAndSdSignAndSacd((uint256,address,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( + correctMintInput, + sacdInput + ); + + const parentNode = await nodesInstance.getParentNode( + await vehicleIdInstance.getAddress(), + 3 + ); + + expect(parentNode).to.be.equal(1); + expect(await vehicleIdInstance.ownerOf(3)).to.be.equal(user1.address); + }); + it('Should correctly set synthetic device parent node, owner, and address', async () => { + await multipleMinterInstance + .connect(connectionOwner1) + ['mintVehicleAndSdSignAndSacd((uint256,address,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( + correctMintInput, + sacdInput + ); + + const parentNode = await nodesInstance.getParentNode( + await sdIdInstance.getAddress(), + 1 + ); + + expect(parentNode).to.be.equal(C.CONNECTION_ID_1); + expect(await sdIdInstance.ownerOf(1)).to.be.equal(user1.address); + expect( + await syntheticDeviceInstance.getSyntheticDeviceIdByAddress(sdAddress1.address) + ).to.equal(1); + }); + it('Should correctly map vehicle and synthetic device', async () => { + await multipleMinterInstance + .connect(connectionOwner1) + ['mintVehicleAndSdSignAndSacd((uint256,address,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( + correctMintInput, + sacdInput + ); + + expect( + await mapperInstance.getNodeLink( + await vehicleIdInstance.getAddress(), + await sdIdInstance.getAddress(), + 3 + ) + ).to.be.equal(1); + expect( + await mapperInstance.getNodeLink( + await sdIdInstance.getAddress(), + await vehicleIdInstance.getAddress(), + 1 + ) + ).to.be.equal(3); + }); + it('Should correctly burn DIMO Credit tokens from the sender', async () => { + await expect(() => + multipleMinterInstance + .connect(connectionOwner1) + ['mintVehicleAndSdSignAndSacd((uint256,address,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( + correctMintInput, + sacdInput + ) + ).changeTokenBalance( + mockDimoCreditInstance, + connectionOwner1.address, + -C.MINT_VEHICLE_OPERATION_COST + ); + }); + it('Should correctly set SACD permissions', async () => { + expect( + await mockSacdInstance.permissionRecords(await vehicleIdInstance.getAddress(), 3, 0, user2.address) + ).to.eql([0n, 0n, '']); + + await multipleMinterInstance + .connect(connectionOwner1) + ['mintVehicleAndSdSignAndSacd((uint256,address,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( + correctMintInput, + sacdInput + ); + + expect( + await mockSacdInstance.permissionRecords(await vehicleIdInstance.getAddress(), 3, 0, user2.address) + ).to.eql([BigInt(C.mockSacdInput.permissions), BigInt(DEFAULT_EXPIRATION), C.mockSacdInput.source]); + }); + it('Should not assign any Storage Node ID to the vehicle', async () => { + expect( + await storageNodeRegistryInstance.vehicleIdToStorageNodeId(3) + ).to.equal(0); + + await multipleMinterInstance + .connect(connectionOwner1) + ['mintVehicleAndSdSignAndSacd((uint256,address,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( + correctMintInput, + sacdInput + ); + + expect( + await storageNodeRegistryInstance.vehicleIdToStorageNodeId(3) + ).to.equal(0); }); }); - }); + context('Events', () => { + it('Should emit VehicleNodeMinted event with correct params', async () => { + await expect( + multipleMinterInstance + .connect(connectionOwner1) + ['mintVehicleAndSdSignAndSacd((uint256,address,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( + correctMintInput, + sacdInput + ) + ) + .to.emit(multipleMinterInstance, 'VehicleNodeMinted') + .withArgs(1, 3, user1.address); + }); + it('Should emit SyntheticDeviceNodeMinted event with correct params', async () => { + await expect( + multipleMinterInstance + .connect(connectionOwner1) + ['mintVehicleAndSdSignAndSacd((uint256,address,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( + correctMintInput, + sacdInput + ) + ) + .to.emit(multipleMinterInstance, 'SyntheticDeviceNodeMinted') + .withArgs(C.CONNECTION_ID_1, 1, 3, sdAddress1.address, user1.address); + }); + it('Should not emit VehicleStorageNodeIdSet event', async () => { + await expect( + multipleMinterInstance + .connect(connectionOwner1) + ['mintVehicleAndSdSignAndSacd((uint256,address,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))']( + correctMintInput, + sacdInput + ) + ).to.not.emit(storageNodeRegistryInstance, 'VehicleStorageNodeIdSet'); + }); + }); + }); describe('mintVehicleAndSdSignAndSacd((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[]),(address,uint256,uint256,string))', () => { let mintSyntheticDeviceSig1: string; @@ -3111,6 +3759,262 @@ describe('MultipleMinter', function () { }); }); + describe('mintVehicleAndSdSignBatch((uint256,address,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])', () => { + let mintSyntheticDeviceSig1: string; + let mintSyntheticDeviceSig2WithConnection1: string; + let mintVehicleOwnerSig1: string; + let mintVehicleOwnerSig2: string; + let correctMintInput: MintVehicleAndSdInputBatch[]; + let incorrectMintInput: MintVehicleAndSdInputBatch[]; + let sacdInput1: SacdInput; + let sacdInput2: SacdInput; + + before(async () => { + mintSyntheticDeviceSig1 = await signMessage({ + _signer: sdAddress1, + _primaryType: 'MintVehicleAndSdSign', + _verifyingContract: await syntheticDeviceInstance.getAddress(), + message: { + connectionId: C.CONNECTION_ID_1 + } + }); + mintSyntheticDeviceSig2WithConnection1 = await signMessage({ + _signer: sdAddress2, + _primaryType: 'MintVehicleAndSdSign', + _verifyingContract: await syntheticDeviceInstance.getAddress(), + message: { + connectionId: C.CONNECTION_ID_1 + } + }); + mintVehicleOwnerSig1 = await signMessage({ + _signer: user1, + _primaryType: 'MintVehicleSign', + _verifyingContract: await vehicleInstance.getAddress(), + message: { + manufacturerNode: '1', + owner: user1.address, + attributes: C.mockVehicleAttributes, + infos: C.mockVehicleInfos + } + }); + mintVehicleOwnerSig2 = await signMessage({ + _signer: user2, + _primaryType: 'MintVehicleSign', + _verifyingContract: await vehicleInstance.getAddress(), + message: { + manufacturerNode: '2', + owner: user2.address, + attributes: C.mockVehicleAttributes, + infos: C.mockVehicleInfos + } + }); + sacdInput1 = { + ...C.mockSacdInput, + grantee: user3.address, + expiration: DEFAULT_EXPIRATION + }; + sacdInput2 = { + ...C.mockSacdInput, + grantee: user3.address, + expiration: DEFAULT_EXPIRATION + }; + correctMintInput = [ + { + manufacturerNode: '1', + owner: user1.address, + attrInfoPairsVehicle: C.mockVehicleAttributeInfoPairs, + connectionId: C.CONNECTION_ID_1, + vehicleOwnerSig: mintVehicleOwnerSig1, + syntheticDeviceSig: mintSyntheticDeviceSig1, + syntheticDeviceAddr: sdAddress1.address, + attrInfoPairsDevice: C.mockSyntheticDeviceAttributeInfoPairs, + sacdInput: sacdInput1 + }, + { + manufacturerNode: '2', + owner: user2.address, + attrInfoPairsVehicle: C.mockVehicleAttributeInfoPairs, + connectionId: C.CONNECTION_ID_1, + vehicleOwnerSig: mintVehicleOwnerSig2, + syntheticDeviceSig: mintSyntheticDeviceSig2WithConnection1, + syntheticDeviceAddr: sdAddress2.address, + attrInfoPairsDevice: C.mockSyntheticDeviceAttributeInfoPairs, + sacdInput: sacdInput2 + }, + ]; + }); + + context('Error handling', () => { + beforeEach(() => { + incorrectMintInput = JSON.parse(JSON.stringify(correctMintInput)); + }); + + it('Should revert if vehicle parent node is not a manufacturer node', async () => { + incorrectMintInput[0].manufacturerNode = '99'; + + await expect( + multipleMinterInstance + .connect(connectionOwner1) + ['mintVehicleAndSdSignBatch((uint256,address,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( + incorrectMintInput + ) + ).to.be.revertedWithCustomError(multipleMinterInstance, 'InvalidParentNode') + .withArgs(99); + }); + it('Should revert if synthetic device parent node is not a connection ID', async () => { + incorrectMintInput[0].connectionId = '99'; + + await expect( + multipleMinterInstance + .connect(connectionOwner1) + ['mintVehicleAndSdSignBatch((uint256,address,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( + incorrectMintInput + ) + ).to.be.revertedWithCustomError(multipleMinterInstance, 'InvalidParentNode') + .withArgs(99); + }); + it('Should revert if caller is not the connection ID owner nor has permissions', async () => { + await expect( + multipleMinterInstance + .connect(nonAdmin) + ['mintVehicleAndSdSignBatch((uint256,address,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( + correctMintInput + ) + ) + .to.be.revertedWithCustomError( + multipleMinterInstance, + 'Unauthorized', + ) + .withArgs(nonAdmin.address); + }); + it('Should revert if a vehicle attribute is not whitelisted', async () => { + incorrectMintInput[1].attrInfoPairsVehicle = + C.mockVehicleAttributeInfoPairsNotWhitelisted; + + await expect( + multipleMinterInstance + .connect(connectionOwner1) + ['mintVehicleAndSdSignBatch((uint256,address,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( + incorrectMintInput + ) + ).to.be.revertedWithCustomError( + multipleMinterInstance, + 'AttributeNotWhitelisted' + ).withArgs(C.mockVehicleAttributeInfoPairsNotWhitelisted[1].attribute); + }); + it('Should revert if device address is already registered', async () => { + await multipleMinterInstance + .connect(connectionOwner1) + ['mintVehicleAndSdSignBatch((uint256,address,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( + correctMintInput + ); + + await expect( + multipleMinterInstance + .connect(connectionOwner1) + ['mintVehicleAndSdSignBatch((uint256,address,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( + correctMintInput + ) + ).to.be.revertedWithCustomError( + multipleMinterInstance, + 'DeviceAlreadyRegistered' + ).withArgs(sdAddress1.address); + }); + }); + + context('State', () => { + it('Should correctly mint and pair both vehicles in the batch', async () => { + await multipleMinterInstance + .connect(connectionOwner1) + ['mintVehicleAndSdSignBatch((uint256,address,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( + correctMintInput + ); + + expect(await vehicleIdInstance.ownerOf(3)).to.equal(user1.address); + expect(await vehicleIdInstance.ownerOf(4)).to.equal(user2.address); + expect(await sdIdInstance.ownerOf(1)).to.equal(user1.address); + expect(await sdIdInstance.ownerOf(2)).to.equal(user2.address); + + expect( + await mapperInstance.getNodeLink( + await vehicleIdInstance.getAddress(), + await sdIdInstance.getAddress(), + 3 + ) + ).to.equal(1); + expect( + await mapperInstance.getNodeLink( + await vehicleIdInstance.getAddress(), + await sdIdInstance.getAddress(), + 4 + ) + ).to.equal(2); + }); + it('Should correctly set SACD permissions for both vehicles', async () => { + await multipleMinterInstance + .connect(connectionOwner1) + ['mintVehicleAndSdSignBatch((uint256,address,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( + correctMintInput + ); + + expect( + await mockSacdInstance.permissionRecords(await vehicleIdInstance.getAddress(), 3, 0, user3.address) + ).to.eql([BigInt(C.mockSacdInput.permissions), BigInt(DEFAULT_EXPIRATION), C.mockSacdInput.source]); + expect( + await mockSacdInstance.permissionRecords(await vehicleIdInstance.getAddress(), 4, 0, user3.address) + ).to.eql([BigInt(C.mockSacdInput.permissions), BigInt(DEFAULT_EXPIRATION), C.mockSacdInput.source]); + }); + it('Should not assign any Storage Node ID to either vehicle in the batch', async () => { + await multipleMinterInstance + .connect(connectionOwner1) + ['mintVehicleAndSdSignBatch((uint256,address,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( + correctMintInput + ); + + expect(await storageNodeRegistryInstance.vehicleIdToStorageNodeId(3)).to.equal(0); + expect(await storageNodeRegistryInstance.vehicleIdToStorageNodeId(4)).to.equal(0); + }); + }); + + context('Events', () => { + it('Should emit VehicleNodeMinted events for both vehicles', async () => { + await expect( + multipleMinterInstance + .connect(connectionOwner1) + ['mintVehicleAndSdSignBatch((uint256,address,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( + correctMintInput + ) + ) + .to.emit(multipleMinterInstance, 'VehicleNodeMinted') + .withArgs(1, 3, user1.address) + .to.emit(multipleMinterInstance, 'VehicleNodeMinted') + .withArgs(2, 4, user2.address); + }); + it('Should emit SyntheticDeviceNodeMinted events for both devices', async () => { + await expect( + multipleMinterInstance + .connect(connectionOwner1) + ['mintVehicleAndSdSignBatch((uint256,address,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( + correctMintInput + ) + ) + .to.emit(multipleMinterInstance, 'SyntheticDeviceNodeMinted') + .withArgs(C.CONNECTION_ID_1, 1, 3, sdAddress1.address, user1.address) + .to.emit(multipleMinterInstance, 'SyntheticDeviceNodeMinted') + .withArgs(C.CONNECTION_ID_1, 2, 4, sdAddress2.address, user2.address); + }); + it('Should not emit VehicleStorageNodeIdSet event for any vehicle in the batch', async () => { + await expect( + multipleMinterInstance + .connect(connectionOwner1) + ['mintVehicleAndSdSignBatch((uint256,address,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])']( + correctMintInput + ) + ).to.not.emit(storageNodeRegistryInstance, 'VehicleStorageNodeIdSet'); + }); + }); + }); + describe('mintVehicleAndSdSignBatch((uint256,address,uint256,(string,string)[],uint256,bytes,bytes,address,(string,string)[],(address,uint256,uint256,string))[])', () => { let mintSyntheticDeviceSig1: string; let mintSyntheticDeviceSig2WithConnection1: string; diff --git a/test/nodes/Vehicle.test.ts b/test/nodes/Vehicle.test.ts index bba03ace..0462d71e 100644 --- a/test/nodes/Vehicle.test.ts +++ b/test/nodes/Vehicle.test.ts @@ -441,6 +441,196 @@ describe('Vehicle', function () { }); }); + describe('mintVehicle(uint256,address,(string,string)[])', () => { + context('Error handling', () => { + it('Should revert if parent node is not a manufacturer node', async () => { + await expect( + vehicleInstance + .connect(admin) + ['mintVehicle(uint256,address,(string,string)[])']( + 99, + user1.address, + C.mockVehicleAttributeInfoPairs + ) + ).to.be.revertedWithCustomError(vehicleInstance, 'InvalidParentNode') + .withArgs(99); + }); + it('Should revert if attribute is not whitelisted', async () => { + await expect( + vehicleInstance + .connect(admin) + ['mintVehicle(uint256,address,(string,string)[])']( + 1, + user1.address, + C.mockVehicleAttributeInfoPairsNotWhitelisted + ) + ).to.be.revertedWithCustomError( + vehicleInstance, + 'AttributeNotWhitelisted' + ).withArgs(C.mockVehicleAttributeInfoPairsNotWhitelisted[1].attribute); + }); + }); + + context('State', () => { + it('Should correctly set parent node', async () => { + await vehicleInstance + .connect(admin) + ['mintVehicle(uint256,address,(string,string)[])']( + 1, + user1.address, + C.mockVehicleAttributeInfoPairs + ); + + const parentNode = await nodesInstance.getParentNode( + await vehicleIdInstance.getAddress(), + 1 + ); + expect(parentNode).to.be.equal(1); + }); + it('Should correctly set node owner', async () => { + await vehicleInstance + .connect(admin) + ['mintVehicle(uint256,address,(string,string)[])']( + 1, + user1.address, + C.mockVehicleAttributeInfoPairs + ); + + expect(await vehicleIdInstance.ownerOf(1)).to.be.equal(user1.address); + }); + it('Should not write to the deprecated Device Definition Id slot on mint', async () => { + await vehicleInstance + .connect(admin) + ['mintVehicle(uint256,address,(string,string)[])']( + 1, + user1.address, + C.mockVehicleAttributeInfoPairs + ); + + expect( + await vehicleInstance.getDeviceDefinitionIdByVehicleId(1) + ).to.be.empty; + }); + it('Should correctly set infos', async () => { + await vehicleInstance + .connect(admin) + ['mintVehicle(uint256,address,(string,string)[])']( + 1, + user1.address, + C.mockVehicleAttributeInfoPairs + ); + + expect( + await nodesInstance.getInfo( + await vehicleIdInstance.getAddress(), + 1, + C.mockVehicleAttribute1 + ) + ).to.be.equal(C.mockVehicleInfo1); + expect( + await nodesInstance.getInfo( + await vehicleIdInstance.getAddress(), + 1, + C.mockVehicleAttribute2 + ) + ).to.be.equal(C.mockVehicleInfo2); + }); + it('Should correctly burn DIMO Credit tokens from the sender', async () => { + await expect(() => + vehicleInstance + .connect(admin) + ['mintVehicle(uint256,address,(string,string)[])']( + 1, + user1.address, + C.mockVehicleAttributeInfoPairs + ) + ).changeTokenBalance( + mockDimoCreditInstance, + admin.address, + -C.MINT_VEHICLE_OPERATION_COST + ); + }); + it('Should not assign any Storage Node ID to the vehicle', async () => { + expect( + await storageNodeRegistryInstance.vehicleIdToStorageNodeId(1) + ).to.equal(0); + + await vehicleInstance + .connect(admin) + ['mintVehicle(uint256,address,(string,string)[])']( + 1, + user1.address, + C.mockVehicleAttributeInfoPairs + ); + + expect( + await storageNodeRegistryInstance.vehicleIdToStorageNodeId(1) + ).to.equal(0); + }); + }); + + context('Events', () => { + it('Should emit VehicleNodeMinted event with correct params', async () => { + await expect( + vehicleInstance + .connect(admin) + ['mintVehicle(uint256,address,(string,string)[])']( + 1, + user1.address, + C.mockVehicleAttributeInfoPairs + ) + ) + .to.emit(vehicleInstance, 'VehicleNodeMinted') + .withArgs(1, 1, user1.address); + }); + it('Should emit VehicleAttributeSet events with correct params', async () => { + await expect( + vehicleInstance + .connect(admin) + ['mintVehicle(uint256,address,(string,string)[])']( + 1, + user1.address, + C.mockVehicleAttributeInfoPairs + ) + ) + .to.emit(vehicleInstance, 'VehicleAttributeSet') + .withArgs( + 1, + C.mockVehicleAttributeInfoPairs[0].attribute, + C.mockVehicleAttributeInfoPairs[0].info + ) + .to.emit(vehicleInstance, 'VehicleAttributeSet') + .withArgs( + 1, + C.mockVehicleAttributeInfoPairs[1].attribute, + C.mockVehicleAttributeInfoPairs[1].info + ); + }); + it('Should not emit VehicleAttributeSet event if attrInfo is empty', async () => { + await expect( + vehicleInstance + .connect(admin) + ['mintVehicle(uint256,address,(string,string)[])']( + 1, + user1.address, + [] + ) + ).to.not.emit(vehicleInstance, 'VehicleAttributeSet'); + }); + it('Should not emit VehicleStorageNodeIdSet event', async () => { + await expect( + vehicleInstance + .connect(admin) + ['mintVehicle(uint256,address,(string,string)[])']( + 1, + user1.address, + C.mockVehicleAttributeInfoPairs + ) + ).to.not.emit(storageNodeRegistryInstance, 'VehicleStorageNodeIdSet'); + }); + }); + }); + describe('mintVehicle(uint256,address,uint256,(string,string)[])', () => { context('Error handling', () => { it('Should revert if parent node is not a manufacturer node', async () => { @@ -675,7 +865,7 @@ describe('Vehicle', function () { }); }); - describe('mintVehicle(uint256,address,uint256,(string,string)[],(address,uint256,uint256,string))', () => { + describe('mintVehicle(uint256,address,(string,string)[],(address,uint256,uint256,string))', () => { let sacdInput: SacdInput; before(() => { sacdInput = { @@ -690,10 +880,9 @@ describe('Vehicle', function () { await expect( vehicleInstance .connect(admin) - ['mintVehicle(uint256,address,uint256,(string,string)[],(address,uint256,uint256,string))']( + ['mintVehicle(uint256,address,(string,string)[],(address,uint256,uint256,string))']( 99, user1.address, - C.STORAGE_NODE_ID_1, C.mockVehicleAttributeInfoPairs, sacdInput ) @@ -704,10 +893,9 @@ describe('Vehicle', function () { await expect( vehicleInstance .connect(admin) - ['mintVehicle(uint256,address,uint256,(string,string)[],(address,uint256,uint256,string))']( + ['mintVehicle(uint256,address,(string,string)[],(address,uint256,uint256,string))']( 1, user1.address, - C.STORAGE_NODE_ID_1, C.mockVehicleAttributeInfoPairsNotWhitelisted, sacdInput ) @@ -716,32 +904,15 @@ describe('Vehicle', function () { 'AttributeNotWhitelisted' ).withArgs(C.mockVehicleAttributeInfoPairsNotWhitelisted[1].attribute); }); - it('Should revert if Storage Node ID does not exist', async () => { - await expect( - vehicleInstance - .connect(admin) - ['mintVehicle(uint256,address,uint256,(string,string)[],(address,uint256,uint256,string))']( - 1, - user1.address, - 99, - C.mockVehicleAttributeInfoPairs, - sacdInput - ) - ).to.be.revertedWithCustomError( - vehicleInstance, - 'InvalidStorageNode' - ).withArgs(99); - }); }); context('State', () => { it('Should correctly set parent node', async () => { await vehicleInstance .connect(admin) - ['mintVehicle(uint256,address,uint256,(string,string)[],(address,uint256,uint256,string))']( + ['mintVehicle(uint256,address,(string,string)[],(address,uint256,uint256,string))']( 1, user1.address, - C.STORAGE_NODE_ID_1, C.mockVehicleAttributeInfoPairs, sacdInput ); @@ -755,10 +926,9 @@ describe('Vehicle', function () { it('Should correctly set node owner', async () => { await vehicleInstance .connect(admin) - ['mintVehicle(uint256,address,uint256,(string,string)[],(address,uint256,uint256,string))']( + ['mintVehicle(uint256,address,(string,string)[],(address,uint256,uint256,string))']( 1, user1.address, - C.STORAGE_NODE_ID_1, C.mockVehicleAttributeInfoPairs, sacdInput ); @@ -768,26 +938,23 @@ describe('Vehicle', function () { it('Should not write to the deprecated Device Definition Id slot on mint', async () => { await vehicleInstance .connect(admin) - ['mintVehicle(uint256,address,uint256,(string,string)[],(address,uint256,uint256,string))']( + ['mintVehicle(uint256,address,(string,string)[],(address,uint256,uint256,string))']( 1, user1.address, - C.STORAGE_NODE_ID_1, C.mockVehicleAttributeInfoPairs, sacdInput ); expect( - await vehicleInstance - .getDeviceDefinitionIdByVehicleId(1) + await vehicleInstance.getDeviceDefinitionIdByVehicleId(1) ).to.be.empty; }); it('Should correctly set infos', async () => { await vehicleInstance .connect(admin) - ['mintVehicle(uint256,address,uint256,(string,string)[],(address,uint256,uint256,string))']( + ['mintVehicle(uint256,address,(string,string)[],(address,uint256,uint256,string))']( 1, user1.address, - C.STORAGE_NODE_ID_1, C.mockVehicleAttributeInfoPairs, sacdInput ); @@ -811,10 +978,9 @@ describe('Vehicle', function () { await expect(() => vehicleInstance .connect(admin) - ['mintVehicle(uint256,address,uint256,(string,string)[],(address,uint256,uint256,string))']( + ['mintVehicle(uint256,address,(string,string)[],(address,uint256,uint256,string))']( 1, user1.address, - C.STORAGE_NODE_ID_1, C.mockVehicleAttributeInfoPairs, sacdInput ) @@ -827,56 +993,39 @@ describe('Vehicle', function () { it('Should correctly set SACD permissions', async () => { expect( await mockSacdInstance.permissionRecords(await vehicleIdInstance.getAddress(), 1, 0, user2.address) - ).to.eql([0n, 0n, '']) + ).to.eql([0n, 0n, '']); await vehicleInstance .connect(admin) - ['mintVehicle(uint256,address,uint256,(string,string)[],(address,uint256,uint256,string))']( + ['mintVehicle(uint256,address,(string,string)[],(address,uint256,uint256,string))']( 1, user1.address, - C.STORAGE_NODE_ID_1, C.mockVehicleAttributeInfoPairs, sacdInput - ) + ); expect( await mockSacdInstance.permissionRecords(await vehicleIdInstance.getAddress(), 1, 0, user2.address) - ).to.eql([BigInt(C.mockSacdInput.permissions), BigInt(DEFAULT_EXPIRATION), C.mockSacdInput.source]) + ).to.eql([BigInt(C.mockSacdInput.permissions), BigInt(DEFAULT_EXPIRATION), C.mockSacdInput.source]); }); - it('Should correctly set Storage Node ID for vehicle ID', async () => { - const storageNodeIdForVehicleBefore = await storageNodeRegistryInstance.vehicleIdToStorageNodeId(1); - expect(storageNodeIdForVehicleBefore).to.equal(0) + it('Should not assign any Storage Node ID to the vehicle', async () => { + expect( + await storageNodeRegistryInstance.vehicleIdToStorageNodeId(1) + ).to.equal(0); await vehicleInstance .connect(admin) - ['mintVehicle(uint256,address,uint256,(string,string)[],(address,uint256,uint256,string))']( + ['mintVehicle(uint256,address,(string,string)[],(address,uint256,uint256,string))']( 1, user1.address, - C.STORAGE_NODE_ID_1, C.mockVehicleAttributeInfoPairs, sacdInput - ) + ); - const storageNodeIdForVehicleAfter = await storageNodeRegistryInstance.vehicleIdToStorageNodeId(1); - expect(storageNodeIdForVehicleAfter).to.equal(C.STORAGE_NODE_ID_1) + expect( + await storageNodeRegistryInstance.vehicleIdToStorageNodeId(1) + ).to.equal(0); }); - it('Should correctly set Storage Node ID Default for vehicle ID if no Storage Node ID is specified', async () => { - const storageNodeIdForVehicleBefore = await storageNodeRegistryInstance.vehicleIdToStorageNodeId(1); - expect(storageNodeIdForVehicleBefore).to.equal(0) - - await vehicleInstance - .connect(admin) - ['mintVehicle(uint256,address,uint256,(string,string)[],(address,uint256,uint256,string))']( - 1, - user1.address, - 0, - C.mockVehicleAttributeInfoPairs, - sacdInput - ) - - const storageNodeIdForVehicleAfter = await storageNodeRegistryInstance.vehicleIdToStorageNodeId(1); - expect(storageNodeIdForVehicleAfter).to.equal(C.STORAGE_NODE_ID_DEFAULT); - }) }); context('Events', () => { @@ -884,10 +1033,9 @@ describe('Vehicle', function () { await expect( vehicleInstance .connect(admin) - ['mintVehicle(uint256,address,uint256,(string,string)[],(address,uint256,uint256,string))']( + ['mintVehicle(uint256,address,(string,string)[],(address,uint256,uint256,string))']( 1, user1.address, - C.STORAGE_NODE_ID_1, C.mockVehicleAttributeInfoPairs, sacdInput ) @@ -899,10 +1047,9 @@ describe('Vehicle', function () { await expect( vehicleInstance .connect(admin) - ['mintVehicle(uint256,address,uint256,(string,string)[],(address,uint256,uint256,string))']( + ['mintVehicle(uint256,address,(string,string)[],(address,uint256,uint256,string))']( 1, user1.address, - C.STORAGE_NODE_ID_1, C.mockVehicleAttributeInfoPairs, sacdInput ) @@ -924,29 +1071,545 @@ describe('Vehicle', function () { await expect( vehicleInstance .connect(admin) - ['mintVehicle(uint256,address,uint256,(string,string)[],(address,uint256,uint256,string))']( + ['mintVehicle(uint256,address,(string,string)[],(address,uint256,uint256,string))']( 1, user1.address, - C.STORAGE_NODE_ID_1, [], sacdInput ) ).to.not.emit(vehicleInstance, 'VehicleAttributeSet'); }); - it('Should emit VehicleStorageNodeIdSet event with correct params', async () => { + it('Should not emit VehicleStorageNodeIdSet event', async () => { await expect( vehicleInstance .connect(admin) - ['mintVehicle(uint256,address,uint256,(string,string)[],(address,uint256,uint256,string))']( + ['mintVehicle(uint256,address,(string,string)[],(address,uint256,uint256,string))']( 1, user1.address, - C.STORAGE_NODE_ID_1, C.mockVehicleAttributeInfoPairs, sacdInput ) - ) - .to.emit(storageNodeRegistryInstance, 'VehicleStorageNodeIdSet') - .withArgs(1, C.STORAGE_NODE_ID_1); + ).to.not.emit(storageNodeRegistryInstance, 'VehicleStorageNodeIdSet'); + }); + }); + }); + + describe('mintVehicle(uint256,address,uint256,(string,string)[],(address,uint256,uint256,string))', () => { + let sacdInput: SacdInput; + before(() => { + sacdInput = { + ...C.mockSacdInput, + grantee: user2.address, + expiration: DEFAULT_EXPIRATION + }; + }) + + context('Error handling', () => { + it('Should revert if parent node is not a manufacturer node', async () => { + await expect( + vehicleInstance + .connect(admin) + ['mintVehicle(uint256,address,uint256,(string,string)[],(address,uint256,uint256,string))']( + 99, + user1.address, + C.STORAGE_NODE_ID_1, + C.mockVehicleAttributeInfoPairs, + sacdInput + ) + ).to.be.revertedWithCustomError(vehicleInstance, 'InvalidParentNode') + .withArgs(99); + }); + it('Should revert if attribute is not whitelisted', async () => { + await expect( + vehicleInstance + .connect(admin) + ['mintVehicle(uint256,address,uint256,(string,string)[],(address,uint256,uint256,string))']( + 1, + user1.address, + C.STORAGE_NODE_ID_1, + C.mockVehicleAttributeInfoPairsNotWhitelisted, + sacdInput + ) + ).to.be.revertedWithCustomError( + vehicleInstance, + 'AttributeNotWhitelisted' + ).withArgs(C.mockVehicleAttributeInfoPairsNotWhitelisted[1].attribute); + }); + it('Should revert if Storage Node ID does not exist', async () => { + await expect( + vehicleInstance + .connect(admin) + ['mintVehicle(uint256,address,uint256,(string,string)[],(address,uint256,uint256,string))']( + 1, + user1.address, + 99, + C.mockVehicleAttributeInfoPairs, + sacdInput + ) + ).to.be.revertedWithCustomError( + vehicleInstance, + 'InvalidStorageNode' + ).withArgs(99); + }); + }); + + context('State', () => { + it('Should correctly set parent node', async () => { + await vehicleInstance + .connect(admin) + ['mintVehicle(uint256,address,uint256,(string,string)[],(address,uint256,uint256,string))']( + 1, + user1.address, + C.STORAGE_NODE_ID_1, + C.mockVehicleAttributeInfoPairs, + sacdInput + ); + + const parentNode = await nodesInstance.getParentNode( + await vehicleIdInstance.getAddress(), + 1 + ); + expect(parentNode).to.be.equal(1); + }); + it('Should correctly set node owner', async () => { + await vehicleInstance + .connect(admin) + ['mintVehicle(uint256,address,uint256,(string,string)[],(address,uint256,uint256,string))']( + 1, + user1.address, + C.STORAGE_NODE_ID_1, + C.mockVehicleAttributeInfoPairs, + sacdInput + ); + + expect(await vehicleIdInstance.ownerOf(1)).to.be.equal(user1.address); + }); + it('Should not write to the deprecated Device Definition Id slot on mint', async () => { + await vehicleInstance + .connect(admin) + ['mintVehicle(uint256,address,uint256,(string,string)[],(address,uint256,uint256,string))']( + 1, + user1.address, + C.STORAGE_NODE_ID_1, + C.mockVehicleAttributeInfoPairs, + sacdInput + ); + + expect( + await vehicleInstance + .getDeviceDefinitionIdByVehicleId(1) + ).to.be.empty; + }); + it('Should correctly set infos', async () => { + await vehicleInstance + .connect(admin) + ['mintVehicle(uint256,address,uint256,(string,string)[],(address,uint256,uint256,string))']( + 1, + user1.address, + C.STORAGE_NODE_ID_1, + C.mockVehicleAttributeInfoPairs, + sacdInput + ); + + expect( + await nodesInstance.getInfo( + await vehicleIdInstance.getAddress(), + 1, + C.mockVehicleAttribute1 + ) + ).to.be.equal(C.mockVehicleInfo1); + expect( + await nodesInstance.getInfo( + await vehicleIdInstance.getAddress(), + 1, + C.mockVehicleAttribute2 + ) + ).to.be.equal(C.mockVehicleInfo2); + }); + it('Should correctly burn DIMO Credit tokens from the sender', async () => { + await expect(() => + vehicleInstance + .connect(admin) + ['mintVehicle(uint256,address,uint256,(string,string)[],(address,uint256,uint256,string))']( + 1, + user1.address, + C.STORAGE_NODE_ID_1, + C.mockVehicleAttributeInfoPairs, + sacdInput + ) + ).changeTokenBalance( + mockDimoCreditInstance, + admin.address, + -C.MINT_VEHICLE_OPERATION_COST + ); + }); + it('Should correctly set SACD permissions', async () => { + expect( + await mockSacdInstance.permissionRecords(await vehicleIdInstance.getAddress(), 1, 0, user2.address) + ).to.eql([0n, 0n, '']) + + await vehicleInstance + .connect(admin) + ['mintVehicle(uint256,address,uint256,(string,string)[],(address,uint256,uint256,string))']( + 1, + user1.address, + C.STORAGE_NODE_ID_1, + C.mockVehicleAttributeInfoPairs, + sacdInput + ) + + expect( + await mockSacdInstance.permissionRecords(await vehicleIdInstance.getAddress(), 1, 0, user2.address) + ).to.eql([BigInt(C.mockSacdInput.permissions), BigInt(DEFAULT_EXPIRATION), C.mockSacdInput.source]) + }); + it('Should correctly set Storage Node ID for vehicle ID', async () => { + const storageNodeIdForVehicleBefore = await storageNodeRegistryInstance.vehicleIdToStorageNodeId(1); + expect(storageNodeIdForVehicleBefore).to.equal(0) + + await vehicleInstance + .connect(admin) + ['mintVehicle(uint256,address,uint256,(string,string)[],(address,uint256,uint256,string))']( + 1, + user1.address, + C.STORAGE_NODE_ID_1, + C.mockVehicleAttributeInfoPairs, + sacdInput + ) + + const storageNodeIdForVehicleAfter = await storageNodeRegistryInstance.vehicleIdToStorageNodeId(1); + expect(storageNodeIdForVehicleAfter).to.equal(C.STORAGE_NODE_ID_1) + }); + it('Should correctly set Storage Node ID Default for vehicle ID if no Storage Node ID is specified', async () => { + const storageNodeIdForVehicleBefore = await storageNodeRegistryInstance.vehicleIdToStorageNodeId(1); + expect(storageNodeIdForVehicleBefore).to.equal(0) + + await vehicleInstance + .connect(admin) + ['mintVehicle(uint256,address,uint256,(string,string)[],(address,uint256,uint256,string))']( + 1, + user1.address, + 0, + C.mockVehicleAttributeInfoPairs, + sacdInput + ) + + const storageNodeIdForVehicleAfter = await storageNodeRegistryInstance.vehicleIdToStorageNodeId(1); + expect(storageNodeIdForVehicleAfter).to.equal(C.STORAGE_NODE_ID_DEFAULT); + }) + }); + + context('Events', () => { + it('Should emit VehicleNodeMinted event with correct params', async () => { + await expect( + vehicleInstance + .connect(admin) + ['mintVehicle(uint256,address,uint256,(string,string)[],(address,uint256,uint256,string))']( + 1, + user1.address, + C.STORAGE_NODE_ID_1, + C.mockVehicleAttributeInfoPairs, + sacdInput + ) + ) + .to.emit(vehicleInstance, 'VehicleNodeMinted') + .withArgs(1, 1, user1.address); + }); + it('Should emit VehicleAttributeSet events with correct params', async () => { + await expect( + vehicleInstance + .connect(admin) + ['mintVehicle(uint256,address,uint256,(string,string)[],(address,uint256,uint256,string))']( + 1, + user1.address, + C.STORAGE_NODE_ID_1, + C.mockVehicleAttributeInfoPairs, + sacdInput + ) + ) + .to.emit(vehicleInstance, 'VehicleAttributeSet') + .withArgs( + 1, + C.mockVehicleAttributeInfoPairs[0].attribute, + C.mockVehicleAttributeInfoPairs[0].info + ) + .to.emit(vehicleInstance, 'VehicleAttributeSet') + .withArgs( + 1, + C.mockVehicleAttributeInfoPairs[1].attribute, + C.mockVehicleAttributeInfoPairs[1].info + ); + }); + it('Should not emit VehicleAttributeSet event if attrInfo is empty', async () => { + await expect( + vehicleInstance + .connect(admin) + ['mintVehicle(uint256,address,uint256,(string,string)[],(address,uint256,uint256,string))']( + 1, + user1.address, + C.STORAGE_NODE_ID_1, + [], + sacdInput + ) + ).to.not.emit(vehicleInstance, 'VehicleAttributeSet'); + }); + it('Should emit VehicleStorageNodeIdSet event with correct params', async () => { + await expect( + vehicleInstance + .connect(admin) + ['mintVehicle(uint256,address,uint256,(string,string)[],(address,uint256,uint256,string))']( + 1, + user1.address, + C.STORAGE_NODE_ID_1, + C.mockVehicleAttributeInfoPairs, + sacdInput + ) + ) + .to.emit(storageNodeRegistryInstance, 'VehicleStorageNodeIdSet') + .withArgs(1, C.STORAGE_NODE_ID_1); + }); + }); + }); + + describe('mintVehicleSign(uint256,address,(string,string)[],bytes)', () => { + let signature: string; + before(async () => { + signature = await signMessage({ + _signer: user1, + _primaryType: 'MintVehicleSign', + _verifyingContract: await vehicleInstance.getAddress(), + message: { + manufacturerNode: '1', + owner: user1.address, + attributes: C.mockVehicleAttributes, + infos: C.mockVehicleInfos + } + }); + }); + + context('Error handling', () => { + it('Should revert if caller does not have MINT_VEHICLE_ROLE', async () => { + await expect( + vehicleInstance + .connect(nonAdmin) + ['mintVehicleSign(uint256,address,(string,string)[],bytes)']( + 1, + user1.address, + C.mockVehicleAttributeInfoPairs, + signature + ) + ).to.be.revertedWith( + `AccessControl: account ${nonAdmin.address.toLowerCase()} is missing role ${C.MINT_VEHICLE_ROLE + }` + ); + }); + it('Should revert if parent node is not a manufacturer node', async () => { + await expect( + vehicleInstance + .connect(admin) + ['mintVehicleSign(uint256,address,(string,string)[],bytes)']( + 99, + user1.address, + C.mockVehicleAttributeInfoPairs, + signature + ) + ).to.be.revertedWithCustomError(vehicleInstance, 'InvalidParentNode') + .withArgs(99); + }); + it('Should revert if attribute is not whitelisted', async () => { + await expect( + vehicleInstance + .connect(admin) + ['mintVehicleSign(uint256,address,(string,string)[],bytes)']( + 1, + user1.address, + C.mockVehicleAttributeInfoPairsNotWhitelisted, + signature + ) + ).to.be.revertedWithCustomError( + vehicleInstance, + 'AttributeNotWhitelisted' + ).withArgs(C.mockVehicleAttributeInfoPairsNotWhitelisted[1].attribute); + }); + it('Should revert if owner does not match signer', async () => { + const invalidSignature = await signMessage({ + _signer: user1, + _primaryType: 'MintVehicleSign', + _verifyingContract: await vehicleInstance.getAddress(), + message: { + manufacturerNode: '1', + owner: user2.address, + attributes: C.mockVehicleAttributes, + infos: C.mockVehicleInfos + } + }); + + await expect( + vehicleInstance + .connect(admin) + ['mintVehicleSign(uint256,address,(string,string)[],bytes)']( + 1, + user1.address, + C.mockVehicleAttributeInfoPairs, + invalidSignature + ) + ).to.be.revertedWithCustomError(vehicleInstance, 'InvalidOwnerSignature'); + }); + }); + + context('State', () => { + it('Should correctly set parent node', async () => { + await vehicleInstance + .connect(admin) + ['mintVehicleSign(uint256,address,(string,string)[],bytes)']( + 1, + user1.address, + C.mockVehicleAttributeInfoPairs, + signature + ); + + const parentNode = await nodesInstance.getParentNode( + await vehicleIdInstance.getAddress(), + 1 + ); + expect(parentNode).to.be.equal(1); + }); + it('Should correctly set node owner', async () => { + await vehicleInstance + .connect(admin) + ['mintVehicleSign(uint256,address,(string,string)[],bytes)']( + 1, + user1.address, + C.mockVehicleAttributeInfoPairs, + signature + ); + + expect(await vehicleIdInstance.ownerOf(1)).to.be.equal(user1.address); + }); + it('Should not write to the deprecated Device Definition Id slot on mint', async () => { + await vehicleInstance + .connect(admin) + ['mintVehicleSign(uint256,address,(string,string)[],bytes)']( + 1, + user1.address, + C.mockVehicleAttributeInfoPairs, + signature + ); + + expect( + await vehicleInstance.getDeviceDefinitionIdByVehicleId(1) + ).to.be.empty; + }); + it('Should correctly set infos', async () => { + await vehicleInstance + .connect(admin) + ['mintVehicleSign(uint256,address,(string,string)[],bytes)']( + 1, + user1.address, + C.mockVehicleAttributeInfoPairs, + signature + ); + + expect( + await nodesInstance.getInfo( + await vehicleIdInstance.getAddress(), + 1, + C.mockVehicleAttribute1 + ) + ).to.be.equal(C.mockVehicleInfo1); + expect( + await nodesInstance.getInfo( + await vehicleIdInstance.getAddress(), + 1, + C.mockVehicleAttribute2 + ) + ).to.be.equal(C.mockVehicleInfo2); + }); + it('Should correctly burn DIMO Credit tokens from the sender', async () => { + await expect(() => + vehicleInstance + .connect(admin) + ['mintVehicleSign(uint256,address,(string,string)[],bytes)']( + 1, + user1.address, + C.mockVehicleAttributeInfoPairs, + signature + ) + ).changeTokenBalance( + mockDimoCreditInstance, + admin.address, + -C.MINT_VEHICLE_OPERATION_COST + ); + }); + it('Should not assign any Storage Node ID to the vehicle', async () => { + expect( + await storageNodeRegistryInstance.vehicleIdToStorageNodeId(1) + ).to.equal(0); + + await vehicleInstance + .connect(admin) + ['mintVehicleSign(uint256,address,(string,string)[],bytes)']( + 1, + user1.address, + C.mockVehicleAttributeInfoPairs, + signature + ); + + expect( + await storageNodeRegistryInstance.vehicleIdToStorageNodeId(1) + ).to.equal(0); + }); + }); + + context('Events', () => { + it('Should emit VehicleNodeMinted event with correct params', async () => { + await expect( + vehicleInstance + .connect(admin) + ['mintVehicleSign(uint256,address,(string,string)[],bytes)']( + 1, + user1.address, + C.mockVehicleAttributeInfoPairs, + signature + ) + ) + .to.emit(vehicleInstance, 'VehicleNodeMinted') + .withArgs(1, 1, user1.address); + }); + it('Should emit VehicleAttributeSet events with correct params', async () => { + await expect( + vehicleInstance + .connect(admin) + ['mintVehicleSign(uint256,address,(string,string)[],bytes)']( + 1, + user1.address, + C.mockVehicleAttributeInfoPairs, + signature + ) + ) + .to.emit(vehicleInstance, 'VehicleAttributeSet') + .withArgs( + 1, + C.mockVehicleAttributeInfoPairs[0].attribute, + C.mockVehicleAttributeInfoPairs[0].info + ) + .to.emit(vehicleInstance, 'VehicleAttributeSet') + .withArgs( + 1, + C.mockVehicleAttributeInfoPairs[1].attribute, + C.mockVehicleAttributeInfoPairs[1].info + ); + }); + it('Should not emit VehicleStorageNodeIdSet event', async () => { + await expect( + vehicleInstance + .connect(admin) + ['mintVehicleSign(uint256,address,(string,string)[],bytes)']( + 1, + user1.address, + C.mockVehicleAttributeInfoPairs, + signature + ) + ).to.not.emit(storageNodeRegistryInstance, 'VehicleStorageNodeIdSet'); }); }); });