diff --git a/ioctl/cmd/ws/contracts/Makefile b/ioctl/cmd/ws/contracts/Makefile new file mode 100644 index 0000000000..889da32bb1 --- /dev/null +++ b/ioctl/cmd/ws/contracts/Makefile @@ -0,0 +1,42 @@ +.DEFAULT_GOAL := update + +.PHONY: update +update: clean fetch generate_abi generate_go + +.PHONY: fetch +fetch: + @echo "#### clone sprout develop branch..." + @mkdir sprout + @cd sprout && git init --quiet + @cd sprout && git remote add origin git@github.com:machinefi/sprout.git + @cd sprout && git config core.sparsecheckout true + @cd sprout && echo "smartcontracts" >> .git/info/sparse-checkout + @cd sprout && git pull origin develop --depth=1 --quiet + @echo DONE + + +CONTRACTS=('FleetManagement' 'ProjectRegistrar' 'W3bstreamProject' 'W3bstreamRouter' 'W3bstreamProver') + +.PHONY: generate_abi +generate_abi: + @echo "#### generate abis from latest contracts..." + @cd sprout/smartcontracts && yarn install > /dev/null 2>&1 + @cd sprout/smartcontracts/contracts && for file in 'FleetManagement' 'ProjectRegistrar' 'W3bstreamProject' 'W3bstreamRouter' 'W3bstreamProver' ; \ + do \ + solc --include-path ../node_modules/ --base-path . --optimize --abi --overwrite --pretty-json -o . $$file.sol > /dev/null 2>&1 ; \ + if [ -e $$file.abi ]; then \ + mv $$file.abi ../../../abis/$$file.json; \ + fi \ + done + @echo DONE + +.PHONY: generate_go +generate_go: + @echo "#### generate go code by abis" + @go generate . + @echo DONE + +.PHONY: clean +clean: + @rm -rf sprout + diff --git a/ioctl/cmd/ws/contracts/abis/FleetManagement.json b/ioctl/cmd/ws/contracts/abis/FleetManagement.json new file mode 100644 index 0000000000..4f6d26737c --- /dev/null +++ b/ioctl/cmd/ws/contracts/abis/FleetManagement.json @@ -0,0 +1,505 @@ +[ + { + "anonymous": false, + "inputs": + [ + { + "indexed": true, + "internalType": "address", + "name": "coordinator", + "type": "address" + } + ], + "name": "CoordinatorSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": + [ + { + "indexed": true, + "internalType": "address", + "name": "creditCenter", + "type": "address" + } + ], + "name": "CreditCenterSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": + [ + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "FeeWithdrawn", + "type": "event" + }, + { + "anonymous": false, + "inputs": + [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": + [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": + [ + { + "indexed": true, + "internalType": "address", + "name": "prover", + "type": "address" + } + ], + "name": "ProverStoreSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": + [ + { + "indexed": false, + "internalType": "uint256", + "name": "fee", + "type": "uint256" + } + ], + "name": "RegistrationFeeSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": + [ + { + "indexed": true, + "internalType": "address", + "name": "slasher", + "type": "address" + } + ], + "name": "SlasherSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": + [ + { + "indexed": true, + "internalType": "address", + "name": "msp", + "type": "address" + } + ], + "name": "StakingHubSet", + "type": "event" + }, + { + "inputs": [], + "name": "coordinator", + "outputs": + [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "creditCenter", + "outputs": + [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "epoch", + "outputs": + [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": + [ + { + "internalType": "uint256", + "name": "_proverId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "grant", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": + [ + { + "internalType": "uint256", + "name": "_minStake", + "type": "uint256" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": + [ + { + "internalType": "address", + "name": "_coordinator", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_projectId", + "type": "uint256" + } + ], + "name": "isActiveCoordinator", + "outputs": + [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": + [ + { + "internalType": "uint256", + "name": "_id", + "type": "uint256" + } + ], + "name": "isActiveProver", + "outputs": + [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "minStake", + "outputs": + [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": + [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": + [ + { + "internalType": "uint256", + "name": "_proverId", + "type": "uint256" + } + ], + "name": "ownerOfProver", + "outputs": + [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "proverStore", + "outputs": + [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "register", + "outputs": + [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "registrationFee", + "outputs": + [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": + [ + { + "internalType": "address", + "name": "_coordinator", + "type": "address" + } + ], + "name": "setCoordinator", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": + [ + { + "internalType": "address", + "name": "_creditCenter", + "type": "address" + } + ], + "name": "setCreditCenter", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": + [ + { + "internalType": "address", + "name": "_proverStore", + "type": "address" + } + ], + "name": "setProverStore", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": + [ + { + "internalType": "uint256", + "name": "_fee", + "type": "uint256" + } + ], + "name": "setRegistrationFee", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": + [ + { + "internalType": "address", + "name": "_slasher", + "type": "address" + } + ], + "name": "setSlasher", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": + [ + { + "internalType": "address", + "name": "_hub", + "type": "address" + } + ], + "name": "setStakingHub", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "slasher", + "outputs": + [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "stakingHub", + "outputs": + [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": + [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": + [ + { + "internalType": "address payable", + "name": "_account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "withdrawFee", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } +] \ No newline at end of file diff --git a/ioctl/cmd/ws/contracts/abis/ProjectDevice.json b/ioctl/cmd/ws/contracts/abis/ProjectDevice.json new file mode 100644 index 0000000000..f56646eb3b --- /dev/null +++ b/ioctl/cmd/ws/contracts/abis/ProjectDevice.json @@ -0,0 +1,157 @@ +[ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "projectId", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "device", + "type": "address" + } + ], + "name": "Approve", + "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": "projectId", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "device", + "type": "address" + } + ], + "name": "Unapprove", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_projectId", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "_devices", + "type": "address[]" + } + ], + "name": "approve", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_projectId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_device", + "type": "address" + } + ], + "name": "approved", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_ioIDRegistry", + "type": "address" + }, + { + "internalType": "address", + "name": "_w3bstreamProject", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "ioIDRegistry", + "outputs": [ + { + "internalType": "contract IioIDRegistry", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_projectId", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "_devices", + "type": "address[]" + } + ], + "name": "unapprove", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "w3bstreamProject", + "outputs": [ + { + "internalType": "contract IW3bstreamProject", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + } +] diff --git a/ioctl/cmd/ws/contracts/abis/ProjectRegistrar.json b/ioctl/cmd/ws/contracts/abis/ProjectRegistrar.json new file mode 100644 index 0000000000..d15d09179a --- /dev/null +++ b/ioctl/cmd/ws/contracts/abis/ProjectRegistrar.json @@ -0,0 +1,208 @@ +[ + { + "anonymous": false, + "inputs": + [ + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "FeeWithdrawn", + "type": "event" + }, + { + "anonymous": false, + "inputs": + [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": + [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": + [ + { + "indexed": true, + "internalType": "uint256", + "name": "projectId", + "type": "uint256" + } + ], + "name": "ProjectRegistered", + "type": "event" + }, + { + "anonymous": false, + "inputs": + [ + { + "indexed": false, + "internalType": "uint256", + "name": "fee", + "type": "uint256" + } + ], + "name": "RegistrationFeeSet", + "type": "event" + }, + { + "inputs": + [ + { + "internalType": "address", + "name": "_projectStore", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": + [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "projectStore", + "outputs": + [ + { + "internalType": "contract IProjectStore", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": + [ + { + "internalType": "uint256", + "name": "_projectId", + "type": "uint256" + } + ], + "name": "register", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "registrationFee", + "outputs": + [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": + [ + { + "internalType": "uint256", + "name": "_fee", + "type": "uint256" + } + ], + "name": "setRegistrationFee", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": + [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": + [ + { + "internalType": "address payable", + "name": "_account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "withdrawFee", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } +] \ No newline at end of file diff --git a/ioctl/cmd/ws/contracts/abis/W3bstreamProject.json b/ioctl/cmd/ws/contracts/abis/W3bstreamProject.json new file mode 100644 index 0000000000..21955aa503 --- /dev/null +++ b/ioctl/cmd/ws/contracts/abis/W3bstreamProject.json @@ -0,0 +1,514 @@ +[ + { + "anonymous": false, + "inputs": + [ + { + "indexed": true, + "internalType": "uint256", + "name": "projectId", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "key", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "value", + "type": "bytes" + } + ], + "name": "AttributeSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": + [ + { + "indexed": true, + "internalType": "address", + "name": "binder", + "type": "address" + } + ], + "name": "BinderSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": + [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": + [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": + [ + { + "indexed": true, + "internalType": "uint256", + "name": "projectId", + "type": "uint256" + } + ], + "name": "ProjectBinded", + "type": "event" + }, + { + "anonymous": false, + "inputs": + [ + { + "indexed": true, + "internalType": "uint256", + "name": "projectId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "uri", + "type": "string" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "hash", + "type": "bytes32" + } + ], + "name": "ProjectConfigUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": + [ + { + "indexed": true, + "internalType": "uint256", + "name": "projectId", + "type": "uint256" + } + ], + "name": "ProjectPaused", + "type": "event" + }, + { + "anonymous": false, + "inputs": + [ + { + "indexed": true, + "internalType": "uint256", + "name": "projectId", + "type": "uint256" + } + ], + "name": "ProjectResumed", + "type": "event" + }, + { + "inputs": + [ + { + "internalType": "uint256", + "name": "_projectId", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "_name", + "type": "bytes32" + } + ], + "name": "attribute", + "outputs": + [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": + [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "attributes", + "outputs": + [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": + [ + { + "internalType": "uint256", + "name": "_projectId", + "type": "uint256" + }, + { + "internalType": "bytes32[]", + "name": "_keys", + "type": "bytes32[]" + } + ], + "name": "attributesOf", + "outputs": + [ + { + "internalType": "bytes[]", + "name": "values_", + "type": "bytes[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": + [ + { + "internalType": "uint256", + "name": "_projectId", + "type": "uint256" + } + ], + "name": "bind", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "binder", + "outputs": + [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": + [ + { + "internalType": "uint256", + "name": "_projectId", + "type": "uint256" + } + ], + "name": "config", + "outputs": + [ + { + "components": + [ + { + "internalType": "string", + "name": "uri", + "type": "string" + }, + { + "internalType": "bytes32", + "name": "hash", + "type": "bytes32" + } + ], + "internalType": "struct W3bstreamProject.ProjectConfig", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "count", + "outputs": + [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": + [ + { + "internalType": "address", + "name": "_project", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": + [ + { + "internalType": "uint256", + "name": "_projectId", + "type": "uint256" + } + ], + "name": "isPaused", + "outputs": + [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": + [ + { + "internalType": "uint256", + "name": "_projectId", + "type": "uint256" + } + ], + "name": "isValidProject", + "outputs": + [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": + [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": + [ + { + "internalType": "uint256", + "name": "_projectId", + "type": "uint256" + } + ], + "name": "ownerOf", + "outputs": + [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": + [ + { + "internalType": "uint256", + "name": "_projectId", + "type": "uint256" + } + ], + "name": "pause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "project", + "outputs": + [ + { + "internalType": "contract IERC721", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": + [ + { + "internalType": "uint256", + "name": "_projectId", + "type": "uint256" + } + ], + "name": "resume", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": + [ + { + "internalType": "uint256", + "name": "_projectId", + "type": "uint256" + }, + { + "internalType": "bytes32[]", + "name": "_keys", + "type": "bytes32[]" + }, + { + "internalType": "bytes[]", + "name": "_values", + "type": "bytes[]" + } + ], + "name": "setAttributes", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": + [ + { + "internalType": "address", + "name": "_binder", + "type": "address" + } + ], + "name": "setBinder", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": + [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": + [ + { + "internalType": "uint256", + "name": "_projectId", + "type": "uint256" + }, + { + "internalType": "string", + "name": "_uri", + "type": "string" + }, + { + "internalType": "bytes32", + "name": "_hash", + "type": "bytes32" + } + ], + "name": "updateConfig", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } +] \ No newline at end of file diff --git a/ioctl/cmd/ws/contracts/abis/W3bstreamProver.json b/ioctl/cmd/ws/contracts/abis/W3bstreamProver.json new file mode 100644 index 0000000000..e1e3f4e3d8 --- /dev/null +++ b/ioctl/cmd/ws/contracts/abis/W3bstreamProver.json @@ -0,0 +1,763 @@ +[ + { + "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": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": + [ + { + "indexed": false, + "internalType": "address", + "name": "minter", + "type": "address" + } + ], + "name": "MinterSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": + [ + { + "indexed": true, + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "typ", + "type": "uint256" + } + ], + "name": "NodeTypeUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": + [ + { + "indexed": true, + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "OperatorSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": + [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": + [ + { + "indexed": true, + "internalType": "uint256", + "name": "id", + "type": "uint256" + } + ], + "name": "ProverPaused", + "type": "event" + }, + { + "anonymous": false, + "inputs": + [ + { + "indexed": true, + "internalType": "uint256", + "name": "id", + "type": "uint256" + } + ], + "name": "ProverResumed", + "type": "event" + }, + { + "anonymous": false, + "inputs": + [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": + [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": + [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": + [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": + [ + { + "internalType": "uint256", + "name": "_id", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_operator", + "type": "address" + } + ], + "name": "changeOperator", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "count", + "outputs": + [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "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": "string", + "name": "_name", + "type": "string" + }, + { + "internalType": "string", + "name": "_symbol", + "type": "string" + } + ], + "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": + [ + { + "internalType": "uint256", + "name": "_id", + "type": "uint256" + } + ], + "name": "isPaused", + "outputs": + [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": + [ + { + "internalType": "address", + "name": "_account", + "type": "address" + } + ], + "name": "mint", + "outputs": + [ + { + "internalType": "uint256", + "name": "id_", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "minter", + "outputs": + [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": + [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": + [ + { + "internalType": "uint256", + "name": "_id", + "type": "uint256" + } + ], + "name": "nodeType", + "outputs": + [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": + [ + { + "internalType": "uint256", + "name": "_id", + "type": "uint256" + } + ], + "name": "operator", + "outputs": + [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": + [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": + [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "ownerOf", + "outputs": + [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": + [ + { + "internalType": "address", + "name": "_operator", + "type": "address" + } + ], + "name": "ownerOfOperator", + "outputs": + [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": + [ + { + "internalType": "uint256", + "name": "_id", + "type": "uint256" + } + ], + "name": "pause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": + [ + { + "internalType": "uint256", + "name": "_id", + "type": "uint256" + } + ], + "name": "prover", + "outputs": + [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": + [ + { + "internalType": "uint256", + "name": "_id", + "type": "uint256" + } + ], + "name": "resume", + "outputs": [], + "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": "address", + "name": "_minter", + "type": "address" + } + ], + "name": "setMinter", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": + [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": + [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": + [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": + [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "tokenURI", + "outputs": + [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": + [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": + [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": + [ + { + "internalType": "uint256", + "name": "_id", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_type", + "type": "uint256" + } + ], + "name": "updateNodeType", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } +] \ No newline at end of file diff --git a/ioctl/cmd/ws/contracts/abis/W3bstreamRouter.json b/ioctl/cmd/ws/contracts/abis/W3bstreamRouter.json new file mode 100644 index 0000000000..7a7eb825ae --- /dev/null +++ b/ioctl/cmd/ws/contracts/abis/W3bstreamRouter.json @@ -0,0 +1,225 @@ +[ + { + "anonymous": false, + "inputs": + [ + { + "indexed": true, + "internalType": "uint256", + "name": "projectId", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "dapp", + "type": "address" + } + ], + "name": "DappBound", + "type": "event" + }, + { + "anonymous": false, + "inputs": + [ + { + "indexed": true, + "internalType": "uint256", + "name": "projectId", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "DappUnbound", + "type": "event" + }, + { + "anonymous": false, + "inputs": + [ + { + "indexed": true, + "internalType": "uint256", + "name": "projectId", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "router", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "success", + "type": "bool" + }, + { + "indexed": false, + "internalType": "string", + "name": "revertReason", + "type": "string" + } + ], + "name": "DataProcessed", + "type": "event" + }, + { + "anonymous": false, + "inputs": + [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "inputs": + [ + { + "internalType": "uint256", + "name": "_projectId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_dapp", + "type": "address" + } + ], + "name": "bindDapp", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": + [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "dapp", + "outputs": + [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "fleetManagement", + "outputs": + [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": + [ + { + "internalType": "address", + "name": "_fleetManagement", + "type": "address" + }, + { + "internalType": "address", + "name": "_projectStore", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "projectStore", + "outputs": + [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": + [ + { + "internalType": "uint256", + "name": "_projectId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_proverId", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "name": "route", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": + [ + { + "internalType": "uint256", + "name": "_projectId", + "type": "uint256" + } + ], + "name": "unbindDapp", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } +] \ No newline at end of file diff --git a/ioctl/cmd/ws/contracts/fleetmanagement.go b/ioctl/cmd/ws/contracts/fleetmanagement.go new file mode 100644 index 0000000000..54030e4a18 --- /dev/null +++ b/ioctl/cmd/ws/contracts/fleetmanagement.go @@ -0,0 +1,2091 @@ +// 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 +) + +// FleetManagementMetaData contains all meta data concerning the FleetManagement contract. +var FleetManagementMetaData = &bind.MetaData{ + ABI: "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"coordinator\",\"type\":\"address\"}],\"name\":\"CoordinatorSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"creditCenter\",\"type\":\"address\"}],\"name\":\"CreditCenterSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"FeeWithdrawn\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"prover\",\"type\":\"address\"}],\"name\":\"ProverStoreSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"}],\"name\":\"RegistrationFeeSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"slasher\",\"type\":\"address\"}],\"name\":\"SlasherSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"msp\",\"type\":\"address\"}],\"name\":\"StakingHubSet\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"coordinator\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"creditCenter\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epoch\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_proverId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"grant\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_minStake\",\"type\":\"uint256\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_coordinator\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_projectId\",\"type\":\"uint256\"}],\"name\":\"isActiveCoordinator\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_id\",\"type\":\"uint256\"}],\"name\":\"isActiveProver\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minStake\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_proverId\",\"type\":\"uint256\"}],\"name\":\"ownerOfProver\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"proverStore\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"register\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"registrationFee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_coordinator\",\"type\":\"address\"}],\"name\":\"setCoordinator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_creditCenter\",\"type\":\"address\"}],\"name\":\"setCreditCenter\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_proverStore\",\"type\":\"address\"}],\"name\":\"setProverStore\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_fee\",\"type\":\"uint256\"}],\"name\":\"setRegistrationFee\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_slasher\",\"type\":\"address\"}],\"name\":\"setSlasher\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_hub\",\"type\":\"address\"}],\"name\":\"setStakingHub\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"slasher\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"stakingHub\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"addresspayable\",\"name\":\"_account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"withdrawFee\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", +} + +// FleetManagementABI is the input ABI used to generate the binding from. +// Deprecated: Use FleetManagementMetaData.ABI instead. +var FleetManagementABI = FleetManagementMetaData.ABI + +// FleetManagement is an auto generated Go binding around an Ethereum contract. +type FleetManagement struct { + FleetManagementCaller // Read-only binding to the contract + FleetManagementTransactor // Write-only binding to the contract + FleetManagementFilterer // Log filterer for contract events +} + +// FleetManagementCaller is an auto generated read-only Go binding around an Ethereum contract. +type FleetManagementCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// FleetManagementTransactor is an auto generated write-only Go binding around an Ethereum contract. +type FleetManagementTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// FleetManagementFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type FleetManagementFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// FleetManagementSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type FleetManagementSession struct { + Contract *FleetManagement // 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 +} + +// FleetManagementCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type FleetManagementCallerSession struct { + Contract *FleetManagementCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// FleetManagementTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type FleetManagementTransactorSession struct { + Contract *FleetManagementTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// FleetManagementRaw is an auto generated low-level Go binding around an Ethereum contract. +type FleetManagementRaw struct { + Contract *FleetManagement // Generic contract binding to access the raw methods on +} + +// FleetManagementCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type FleetManagementCallerRaw struct { + Contract *FleetManagementCaller // Generic read-only contract binding to access the raw methods on +} + +// FleetManagementTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type FleetManagementTransactorRaw struct { + Contract *FleetManagementTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewFleetManagement creates a new instance of FleetManagement, bound to a specific deployed contract. +func NewFleetManagement(address common.Address, backend bind.ContractBackend) (*FleetManagement, error) { + contract, err := bindFleetManagement(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &FleetManagement{FleetManagementCaller: FleetManagementCaller{contract: contract}, FleetManagementTransactor: FleetManagementTransactor{contract: contract}, FleetManagementFilterer: FleetManagementFilterer{contract: contract}}, nil +} + +// NewFleetManagementCaller creates a new read-only instance of FleetManagement, bound to a specific deployed contract. +func NewFleetManagementCaller(address common.Address, caller bind.ContractCaller) (*FleetManagementCaller, error) { + contract, err := bindFleetManagement(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &FleetManagementCaller{contract: contract}, nil +} + +// NewFleetManagementTransactor creates a new write-only instance of FleetManagement, bound to a specific deployed contract. +func NewFleetManagementTransactor(address common.Address, transactor bind.ContractTransactor) (*FleetManagementTransactor, error) { + contract, err := bindFleetManagement(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &FleetManagementTransactor{contract: contract}, nil +} + +// NewFleetManagementFilterer creates a new log filterer instance of FleetManagement, bound to a specific deployed contract. +func NewFleetManagementFilterer(address common.Address, filterer bind.ContractFilterer) (*FleetManagementFilterer, error) { + contract, err := bindFleetManagement(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &FleetManagementFilterer{contract: contract}, nil +} + +// bindFleetManagement binds a generic wrapper to an already deployed contract. +func bindFleetManagement(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := FleetManagementMetaData.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 (_FleetManagement *FleetManagementRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _FleetManagement.Contract.FleetManagementCaller.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 (_FleetManagement *FleetManagementRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _FleetManagement.Contract.FleetManagementTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_FleetManagement *FleetManagementRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _FleetManagement.Contract.FleetManagementTransactor.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 (_FleetManagement *FleetManagementCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _FleetManagement.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 (_FleetManagement *FleetManagementTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _FleetManagement.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_FleetManagement *FleetManagementTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _FleetManagement.Contract.contract.Transact(opts, method, params...) +} + +// Coordinator is a free data retrieval call binding the contract method 0x0a009097. +// +// Solidity: function coordinator() view returns(address) +func (_FleetManagement *FleetManagementCaller) Coordinator(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _FleetManagement.contract.Call(opts, &out, "coordinator") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// Coordinator is a free data retrieval call binding the contract method 0x0a009097. +// +// Solidity: function coordinator() view returns(address) +func (_FleetManagement *FleetManagementSession) Coordinator() (common.Address, error) { + return _FleetManagement.Contract.Coordinator(&_FleetManagement.CallOpts) +} + +// Coordinator is a free data retrieval call binding the contract method 0x0a009097. +// +// Solidity: function coordinator() view returns(address) +func (_FleetManagement *FleetManagementCallerSession) Coordinator() (common.Address, error) { + return _FleetManagement.Contract.Coordinator(&_FleetManagement.CallOpts) +} + +// CreditCenter is a free data retrieval call binding the contract method 0x8c8ffa2e. +// +// Solidity: function creditCenter() view returns(address) +func (_FleetManagement *FleetManagementCaller) CreditCenter(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _FleetManagement.contract.Call(opts, &out, "creditCenter") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// CreditCenter is a free data retrieval call binding the contract method 0x8c8ffa2e. +// +// Solidity: function creditCenter() view returns(address) +func (_FleetManagement *FleetManagementSession) CreditCenter() (common.Address, error) { + return _FleetManagement.Contract.CreditCenter(&_FleetManagement.CallOpts) +} + +// CreditCenter is a free data retrieval call binding the contract method 0x8c8ffa2e. +// +// Solidity: function creditCenter() view returns(address) +func (_FleetManagement *FleetManagementCallerSession) CreditCenter() (common.Address, error) { + return _FleetManagement.Contract.CreditCenter(&_FleetManagement.CallOpts) +} + +// Epoch is a free data retrieval call binding the contract method 0x900cf0cf. +// +// Solidity: function epoch() view returns(uint256) +func (_FleetManagement *FleetManagementCaller) Epoch(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _FleetManagement.contract.Call(opts, &out, "epoch") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// Epoch is a free data retrieval call binding the contract method 0x900cf0cf. +// +// Solidity: function epoch() view returns(uint256) +func (_FleetManagement *FleetManagementSession) Epoch() (*big.Int, error) { + return _FleetManagement.Contract.Epoch(&_FleetManagement.CallOpts) +} + +// Epoch is a free data retrieval call binding the contract method 0x900cf0cf. +// +// Solidity: function epoch() view returns(uint256) +func (_FleetManagement *FleetManagementCallerSession) Epoch() (*big.Int, error) { + return _FleetManagement.Contract.Epoch(&_FleetManagement.CallOpts) +} + +// IsActiveCoordinator is a free data retrieval call binding the contract method 0xc6b4c7e9. +// +// Solidity: function isActiveCoordinator(address _coordinator, uint256 _projectId) view returns(bool) +func (_FleetManagement *FleetManagementCaller) IsActiveCoordinator(opts *bind.CallOpts, _coordinator common.Address, _projectId *big.Int) (bool, error) { + var out []interface{} + err := _FleetManagement.contract.Call(opts, &out, "isActiveCoordinator", _coordinator, _projectId) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// IsActiveCoordinator is a free data retrieval call binding the contract method 0xc6b4c7e9. +// +// Solidity: function isActiveCoordinator(address _coordinator, uint256 _projectId) view returns(bool) +func (_FleetManagement *FleetManagementSession) IsActiveCoordinator(_coordinator common.Address, _projectId *big.Int) (bool, error) { + return _FleetManagement.Contract.IsActiveCoordinator(&_FleetManagement.CallOpts, _coordinator, _projectId) +} + +// IsActiveCoordinator is a free data retrieval call binding the contract method 0xc6b4c7e9. +// +// Solidity: function isActiveCoordinator(address _coordinator, uint256 _projectId) view returns(bool) +func (_FleetManagement *FleetManagementCallerSession) IsActiveCoordinator(_coordinator common.Address, _projectId *big.Int) (bool, error) { + return _FleetManagement.Contract.IsActiveCoordinator(&_FleetManagement.CallOpts, _coordinator, _projectId) +} + +// IsActiveProver is a free data retrieval call binding the contract method 0x4f8d116a. +// +// Solidity: function isActiveProver(uint256 _id) view returns(bool) +func (_FleetManagement *FleetManagementCaller) IsActiveProver(opts *bind.CallOpts, _id *big.Int) (bool, error) { + var out []interface{} + err := _FleetManagement.contract.Call(opts, &out, "isActiveProver", _id) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// IsActiveProver is a free data retrieval call binding the contract method 0x4f8d116a. +// +// Solidity: function isActiveProver(uint256 _id) view returns(bool) +func (_FleetManagement *FleetManagementSession) IsActiveProver(_id *big.Int) (bool, error) { + return _FleetManagement.Contract.IsActiveProver(&_FleetManagement.CallOpts, _id) +} + +// IsActiveProver is a free data retrieval call binding the contract method 0x4f8d116a. +// +// Solidity: function isActiveProver(uint256 _id) view returns(bool) +func (_FleetManagement *FleetManagementCallerSession) IsActiveProver(_id *big.Int) (bool, error) { + return _FleetManagement.Contract.IsActiveProver(&_FleetManagement.CallOpts, _id) +} + +// MinStake is a free data retrieval call binding the contract method 0x375b3c0a. +// +// Solidity: function minStake() view returns(uint256) +func (_FleetManagement *FleetManagementCaller) MinStake(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _FleetManagement.contract.Call(opts, &out, "minStake") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// MinStake is a free data retrieval call binding the contract method 0x375b3c0a. +// +// Solidity: function minStake() view returns(uint256) +func (_FleetManagement *FleetManagementSession) MinStake() (*big.Int, error) { + return _FleetManagement.Contract.MinStake(&_FleetManagement.CallOpts) +} + +// MinStake is a free data retrieval call binding the contract method 0x375b3c0a. +// +// Solidity: function minStake() view returns(uint256) +func (_FleetManagement *FleetManagementCallerSession) MinStake() (*big.Int, error) { + return _FleetManagement.Contract.MinStake(&_FleetManagement.CallOpts) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_FleetManagement *FleetManagementCaller) Owner(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _FleetManagement.contract.Call(opts, &out, "owner") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_FleetManagement *FleetManagementSession) Owner() (common.Address, error) { + return _FleetManagement.Contract.Owner(&_FleetManagement.CallOpts) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_FleetManagement *FleetManagementCallerSession) Owner() (common.Address, error) { + return _FleetManagement.Contract.Owner(&_FleetManagement.CallOpts) +} + +// OwnerOfProver is a free data retrieval call binding the contract method 0x6441b1e0. +// +// Solidity: function ownerOfProver(uint256 _proverId) view returns(address) +func (_FleetManagement *FleetManagementCaller) OwnerOfProver(opts *bind.CallOpts, _proverId *big.Int) (common.Address, error) { + var out []interface{} + err := _FleetManagement.contract.Call(opts, &out, "ownerOfProver", _proverId) + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// OwnerOfProver is a free data retrieval call binding the contract method 0x6441b1e0. +// +// Solidity: function ownerOfProver(uint256 _proverId) view returns(address) +func (_FleetManagement *FleetManagementSession) OwnerOfProver(_proverId *big.Int) (common.Address, error) { + return _FleetManagement.Contract.OwnerOfProver(&_FleetManagement.CallOpts, _proverId) +} + +// OwnerOfProver is a free data retrieval call binding the contract method 0x6441b1e0. +// +// Solidity: function ownerOfProver(uint256 _proverId) view returns(address) +func (_FleetManagement *FleetManagementCallerSession) OwnerOfProver(_proverId *big.Int) (common.Address, error) { + return _FleetManagement.Contract.OwnerOfProver(&_FleetManagement.CallOpts, _proverId) +} + +// ProverStore is a free data retrieval call binding the contract method 0x79b851f6. +// +// Solidity: function proverStore() view returns(address) +func (_FleetManagement *FleetManagementCaller) ProverStore(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _FleetManagement.contract.Call(opts, &out, "proverStore") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// ProverStore is a free data retrieval call binding the contract method 0x79b851f6. +// +// Solidity: function proverStore() view returns(address) +func (_FleetManagement *FleetManagementSession) ProverStore() (common.Address, error) { + return _FleetManagement.Contract.ProverStore(&_FleetManagement.CallOpts) +} + +// ProverStore is a free data retrieval call binding the contract method 0x79b851f6. +// +// Solidity: function proverStore() view returns(address) +func (_FleetManagement *FleetManagementCallerSession) ProverStore() (common.Address, error) { + return _FleetManagement.Contract.ProverStore(&_FleetManagement.CallOpts) +} + +// RegistrationFee is a free data retrieval call binding the contract method 0x14c44e09. +// +// Solidity: function registrationFee() view returns(uint256) +func (_FleetManagement *FleetManagementCaller) RegistrationFee(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _FleetManagement.contract.Call(opts, &out, "registrationFee") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// RegistrationFee is a free data retrieval call binding the contract method 0x14c44e09. +// +// Solidity: function registrationFee() view returns(uint256) +func (_FleetManagement *FleetManagementSession) RegistrationFee() (*big.Int, error) { + return _FleetManagement.Contract.RegistrationFee(&_FleetManagement.CallOpts) +} + +// RegistrationFee is a free data retrieval call binding the contract method 0x14c44e09. +// +// Solidity: function registrationFee() view returns(uint256) +func (_FleetManagement *FleetManagementCallerSession) RegistrationFee() (*big.Int, error) { + return _FleetManagement.Contract.RegistrationFee(&_FleetManagement.CallOpts) +} + +// Slasher is a free data retrieval call binding the contract method 0xb1344271. +// +// Solidity: function slasher() view returns(address) +func (_FleetManagement *FleetManagementCaller) Slasher(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _FleetManagement.contract.Call(opts, &out, "slasher") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// Slasher is a free data retrieval call binding the contract method 0xb1344271. +// +// Solidity: function slasher() view returns(address) +func (_FleetManagement *FleetManagementSession) Slasher() (common.Address, error) { + return _FleetManagement.Contract.Slasher(&_FleetManagement.CallOpts) +} + +// Slasher is a free data retrieval call binding the contract method 0xb1344271. +// +// Solidity: function slasher() view returns(address) +func (_FleetManagement *FleetManagementCallerSession) Slasher() (common.Address, error) { + return _FleetManagement.Contract.Slasher(&_FleetManagement.CallOpts) +} + +// StakingHub is a free data retrieval call binding the contract method 0x4213ec0f. +// +// Solidity: function stakingHub() view returns(address) +func (_FleetManagement *FleetManagementCaller) StakingHub(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _FleetManagement.contract.Call(opts, &out, "stakingHub") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// StakingHub is a free data retrieval call binding the contract method 0x4213ec0f. +// +// Solidity: function stakingHub() view returns(address) +func (_FleetManagement *FleetManagementSession) StakingHub() (common.Address, error) { + return _FleetManagement.Contract.StakingHub(&_FleetManagement.CallOpts) +} + +// StakingHub is a free data retrieval call binding the contract method 0x4213ec0f. +// +// Solidity: function stakingHub() view returns(address) +func (_FleetManagement *FleetManagementCallerSession) StakingHub() (common.Address, error) { + return _FleetManagement.Contract.StakingHub(&_FleetManagement.CallOpts) +} + +// Grant is a paid mutator transaction binding the contract method 0x59f1c85e. +// +// Solidity: function grant(uint256 _proverId, uint256 _amount) returns() +func (_FleetManagement *FleetManagementTransactor) Grant(opts *bind.TransactOpts, _proverId *big.Int, _amount *big.Int) (*types.Transaction, error) { + return _FleetManagement.contract.Transact(opts, "grant", _proverId, _amount) +} + +// Grant is a paid mutator transaction binding the contract method 0x59f1c85e. +// +// Solidity: function grant(uint256 _proverId, uint256 _amount) returns() +func (_FleetManagement *FleetManagementSession) Grant(_proverId *big.Int, _amount *big.Int) (*types.Transaction, error) { + return _FleetManagement.Contract.Grant(&_FleetManagement.TransactOpts, _proverId, _amount) +} + +// Grant is a paid mutator transaction binding the contract method 0x59f1c85e. +// +// Solidity: function grant(uint256 _proverId, uint256 _amount) returns() +func (_FleetManagement *FleetManagementTransactorSession) Grant(_proverId *big.Int, _amount *big.Int) (*types.Transaction, error) { + return _FleetManagement.Contract.Grant(&_FleetManagement.TransactOpts, _proverId, _amount) +} + +// Initialize is a paid mutator transaction binding the contract method 0xfe4b84df. +// +// Solidity: function initialize(uint256 _minStake) returns() +func (_FleetManagement *FleetManagementTransactor) Initialize(opts *bind.TransactOpts, _minStake *big.Int) (*types.Transaction, error) { + return _FleetManagement.contract.Transact(opts, "initialize", _minStake) +} + +// Initialize is a paid mutator transaction binding the contract method 0xfe4b84df. +// +// Solidity: function initialize(uint256 _minStake) returns() +func (_FleetManagement *FleetManagementSession) Initialize(_minStake *big.Int) (*types.Transaction, error) { + return _FleetManagement.Contract.Initialize(&_FleetManagement.TransactOpts, _minStake) +} + +// Initialize is a paid mutator transaction binding the contract method 0xfe4b84df. +// +// Solidity: function initialize(uint256 _minStake) returns() +func (_FleetManagement *FleetManagementTransactorSession) Initialize(_minStake *big.Int) (*types.Transaction, error) { + return _FleetManagement.Contract.Initialize(&_FleetManagement.TransactOpts, _minStake) +} + +// Register is a paid mutator transaction binding the contract method 0x1aa3a008. +// +// Solidity: function register() payable returns(uint256) +func (_FleetManagement *FleetManagementTransactor) Register(opts *bind.TransactOpts) (*types.Transaction, error) { + return _FleetManagement.contract.Transact(opts, "register") +} + +// Register is a paid mutator transaction binding the contract method 0x1aa3a008. +// +// Solidity: function register() payable returns(uint256) +func (_FleetManagement *FleetManagementSession) Register() (*types.Transaction, error) { + return _FleetManagement.Contract.Register(&_FleetManagement.TransactOpts) +} + +// Register is a paid mutator transaction binding the contract method 0x1aa3a008. +// +// Solidity: function register() payable returns(uint256) +func (_FleetManagement *FleetManagementTransactorSession) Register() (*types.Transaction, error) { + return _FleetManagement.Contract.Register(&_FleetManagement.TransactOpts) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_FleetManagement *FleetManagementTransactor) RenounceOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { + return _FleetManagement.contract.Transact(opts, "renounceOwnership") +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_FleetManagement *FleetManagementSession) RenounceOwnership() (*types.Transaction, error) { + return _FleetManagement.Contract.RenounceOwnership(&_FleetManagement.TransactOpts) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_FleetManagement *FleetManagementTransactorSession) RenounceOwnership() (*types.Transaction, error) { + return _FleetManagement.Contract.RenounceOwnership(&_FleetManagement.TransactOpts) +} + +// SetCoordinator is a paid mutator transaction binding the contract method 0x8ea98117. +// +// Solidity: function setCoordinator(address _coordinator) returns() +func (_FleetManagement *FleetManagementTransactor) SetCoordinator(opts *bind.TransactOpts, _coordinator common.Address) (*types.Transaction, error) { + return _FleetManagement.contract.Transact(opts, "setCoordinator", _coordinator) +} + +// SetCoordinator is a paid mutator transaction binding the contract method 0x8ea98117. +// +// Solidity: function setCoordinator(address _coordinator) returns() +func (_FleetManagement *FleetManagementSession) SetCoordinator(_coordinator common.Address) (*types.Transaction, error) { + return _FleetManagement.Contract.SetCoordinator(&_FleetManagement.TransactOpts, _coordinator) +} + +// SetCoordinator is a paid mutator transaction binding the contract method 0x8ea98117. +// +// Solidity: function setCoordinator(address _coordinator) returns() +func (_FleetManagement *FleetManagementTransactorSession) SetCoordinator(_coordinator common.Address) (*types.Transaction, error) { + return _FleetManagement.Contract.SetCoordinator(&_FleetManagement.TransactOpts, _coordinator) +} + +// SetCreditCenter is a paid mutator transaction binding the contract method 0x3d625dc2. +// +// Solidity: function setCreditCenter(address _creditCenter) returns() +func (_FleetManagement *FleetManagementTransactor) SetCreditCenter(opts *bind.TransactOpts, _creditCenter common.Address) (*types.Transaction, error) { + return _FleetManagement.contract.Transact(opts, "setCreditCenter", _creditCenter) +} + +// SetCreditCenter is a paid mutator transaction binding the contract method 0x3d625dc2. +// +// Solidity: function setCreditCenter(address _creditCenter) returns() +func (_FleetManagement *FleetManagementSession) SetCreditCenter(_creditCenter common.Address) (*types.Transaction, error) { + return _FleetManagement.Contract.SetCreditCenter(&_FleetManagement.TransactOpts, _creditCenter) +} + +// SetCreditCenter is a paid mutator transaction binding the contract method 0x3d625dc2. +// +// Solidity: function setCreditCenter(address _creditCenter) returns() +func (_FleetManagement *FleetManagementTransactorSession) SetCreditCenter(_creditCenter common.Address) (*types.Transaction, error) { + return _FleetManagement.Contract.SetCreditCenter(&_FleetManagement.TransactOpts, _creditCenter) +} + +// SetProverStore is a paid mutator transaction binding the contract method 0x7037e334. +// +// Solidity: function setProverStore(address _proverStore) returns() +func (_FleetManagement *FleetManagementTransactor) SetProverStore(opts *bind.TransactOpts, _proverStore common.Address) (*types.Transaction, error) { + return _FleetManagement.contract.Transact(opts, "setProverStore", _proverStore) +} + +// SetProverStore is a paid mutator transaction binding the contract method 0x7037e334. +// +// Solidity: function setProverStore(address _proverStore) returns() +func (_FleetManagement *FleetManagementSession) SetProverStore(_proverStore common.Address) (*types.Transaction, error) { + return _FleetManagement.Contract.SetProverStore(&_FleetManagement.TransactOpts, _proverStore) +} + +// SetProverStore is a paid mutator transaction binding the contract method 0x7037e334. +// +// Solidity: function setProverStore(address _proverStore) returns() +func (_FleetManagement *FleetManagementTransactorSession) SetProverStore(_proverStore common.Address) (*types.Transaction, error) { + return _FleetManagement.Contract.SetProverStore(&_FleetManagement.TransactOpts, _proverStore) +} + +// SetRegistrationFee is a paid mutator transaction binding the contract method 0xc320c727. +// +// Solidity: function setRegistrationFee(uint256 _fee) returns() +func (_FleetManagement *FleetManagementTransactor) SetRegistrationFee(opts *bind.TransactOpts, _fee *big.Int) (*types.Transaction, error) { + return _FleetManagement.contract.Transact(opts, "setRegistrationFee", _fee) +} + +// SetRegistrationFee is a paid mutator transaction binding the contract method 0xc320c727. +// +// Solidity: function setRegistrationFee(uint256 _fee) returns() +func (_FleetManagement *FleetManagementSession) SetRegistrationFee(_fee *big.Int) (*types.Transaction, error) { + return _FleetManagement.Contract.SetRegistrationFee(&_FleetManagement.TransactOpts, _fee) +} + +// SetRegistrationFee is a paid mutator transaction binding the contract method 0xc320c727. +// +// Solidity: function setRegistrationFee(uint256 _fee) returns() +func (_FleetManagement *FleetManagementTransactorSession) SetRegistrationFee(_fee *big.Int) (*types.Transaction, error) { + return _FleetManagement.Contract.SetRegistrationFee(&_FleetManagement.TransactOpts, _fee) +} + +// SetSlasher is a paid mutator transaction binding the contract method 0xaabc2496. +// +// Solidity: function setSlasher(address _slasher) returns() +func (_FleetManagement *FleetManagementTransactor) SetSlasher(opts *bind.TransactOpts, _slasher common.Address) (*types.Transaction, error) { + return _FleetManagement.contract.Transact(opts, "setSlasher", _slasher) +} + +// SetSlasher is a paid mutator transaction binding the contract method 0xaabc2496. +// +// Solidity: function setSlasher(address _slasher) returns() +func (_FleetManagement *FleetManagementSession) SetSlasher(_slasher common.Address) (*types.Transaction, error) { + return _FleetManagement.Contract.SetSlasher(&_FleetManagement.TransactOpts, _slasher) +} + +// SetSlasher is a paid mutator transaction binding the contract method 0xaabc2496. +// +// Solidity: function setSlasher(address _slasher) returns() +func (_FleetManagement *FleetManagementTransactorSession) SetSlasher(_slasher common.Address) (*types.Transaction, error) { + return _FleetManagement.Contract.SetSlasher(&_FleetManagement.TransactOpts, _slasher) +} + +// SetStakingHub is a paid mutator transaction binding the contract method 0x5bee43c7. +// +// Solidity: function setStakingHub(address _hub) returns() +func (_FleetManagement *FleetManagementTransactor) SetStakingHub(opts *bind.TransactOpts, _hub common.Address) (*types.Transaction, error) { + return _FleetManagement.contract.Transact(opts, "setStakingHub", _hub) +} + +// SetStakingHub is a paid mutator transaction binding the contract method 0x5bee43c7. +// +// Solidity: function setStakingHub(address _hub) returns() +func (_FleetManagement *FleetManagementSession) SetStakingHub(_hub common.Address) (*types.Transaction, error) { + return _FleetManagement.Contract.SetStakingHub(&_FleetManagement.TransactOpts, _hub) +} + +// SetStakingHub is a paid mutator transaction binding the contract method 0x5bee43c7. +// +// Solidity: function setStakingHub(address _hub) returns() +func (_FleetManagement *FleetManagementTransactorSession) SetStakingHub(_hub common.Address) (*types.Transaction, error) { + return _FleetManagement.Contract.SetStakingHub(&_FleetManagement.TransactOpts, _hub) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_FleetManagement *FleetManagementTransactor) TransferOwnership(opts *bind.TransactOpts, newOwner common.Address) (*types.Transaction, error) { + return _FleetManagement.contract.Transact(opts, "transferOwnership", newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_FleetManagement *FleetManagementSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _FleetManagement.Contract.TransferOwnership(&_FleetManagement.TransactOpts, newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_FleetManagement *FleetManagementTransactorSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _FleetManagement.Contract.TransferOwnership(&_FleetManagement.TransactOpts, newOwner) +} + +// WithdrawFee is a paid mutator transaction binding the contract method 0xfd9be522. +// +// Solidity: function withdrawFee(address _account, uint256 _amount) returns() +func (_FleetManagement *FleetManagementTransactor) WithdrawFee(opts *bind.TransactOpts, _account common.Address, _amount *big.Int) (*types.Transaction, error) { + return _FleetManagement.contract.Transact(opts, "withdrawFee", _account, _amount) +} + +// WithdrawFee is a paid mutator transaction binding the contract method 0xfd9be522. +// +// Solidity: function withdrawFee(address _account, uint256 _amount) returns() +func (_FleetManagement *FleetManagementSession) WithdrawFee(_account common.Address, _amount *big.Int) (*types.Transaction, error) { + return _FleetManagement.Contract.WithdrawFee(&_FleetManagement.TransactOpts, _account, _amount) +} + +// WithdrawFee is a paid mutator transaction binding the contract method 0xfd9be522. +// +// Solidity: function withdrawFee(address _account, uint256 _amount) returns() +func (_FleetManagement *FleetManagementTransactorSession) WithdrawFee(_account common.Address, _amount *big.Int) (*types.Transaction, error) { + return _FleetManagement.Contract.WithdrawFee(&_FleetManagement.TransactOpts, _account, _amount) +} + +// FleetManagementCoordinatorSetIterator is returned from FilterCoordinatorSet and is used to iterate over the raw logs and unpacked data for CoordinatorSet events raised by the FleetManagement contract. +type FleetManagementCoordinatorSetIterator struct { + Event *FleetManagementCoordinatorSet // 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 *FleetManagementCoordinatorSetIterator) 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(FleetManagementCoordinatorSet) + 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(FleetManagementCoordinatorSet) + 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 *FleetManagementCoordinatorSetIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *FleetManagementCoordinatorSetIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// FleetManagementCoordinatorSet represents a CoordinatorSet event raised by the FleetManagement contract. +type FleetManagementCoordinatorSet struct { + Coordinator common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterCoordinatorSet is a free log retrieval operation binding the contract event 0xd1a6a14209a385a964d036e404cb5cfb71f4000cdb03c9366292430787261be6. +// +// Solidity: event CoordinatorSet(address indexed coordinator) +func (_FleetManagement *FleetManagementFilterer) FilterCoordinatorSet(opts *bind.FilterOpts, coordinator []common.Address) (*FleetManagementCoordinatorSetIterator, error) { + + var coordinatorRule []interface{} + for _, coordinatorItem := range coordinator { + coordinatorRule = append(coordinatorRule, coordinatorItem) + } + + logs, sub, err := _FleetManagement.contract.FilterLogs(opts, "CoordinatorSet", coordinatorRule) + if err != nil { + return nil, err + } + return &FleetManagementCoordinatorSetIterator{contract: _FleetManagement.contract, event: "CoordinatorSet", logs: logs, sub: sub}, nil +} + +// WatchCoordinatorSet is a free log subscription operation binding the contract event 0xd1a6a14209a385a964d036e404cb5cfb71f4000cdb03c9366292430787261be6. +// +// Solidity: event CoordinatorSet(address indexed coordinator) +func (_FleetManagement *FleetManagementFilterer) WatchCoordinatorSet(opts *bind.WatchOpts, sink chan<- *FleetManagementCoordinatorSet, coordinator []common.Address) (event.Subscription, error) { + + var coordinatorRule []interface{} + for _, coordinatorItem := range coordinator { + coordinatorRule = append(coordinatorRule, coordinatorItem) + } + + logs, sub, err := _FleetManagement.contract.WatchLogs(opts, "CoordinatorSet", coordinatorRule) + 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(FleetManagementCoordinatorSet) + if err := _FleetManagement.contract.UnpackLog(event, "CoordinatorSet", 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 +} + +// ParseCoordinatorSet is a log parse operation binding the contract event 0xd1a6a14209a385a964d036e404cb5cfb71f4000cdb03c9366292430787261be6. +// +// Solidity: event CoordinatorSet(address indexed coordinator) +func (_FleetManagement *FleetManagementFilterer) ParseCoordinatorSet(log types.Log) (*FleetManagementCoordinatorSet, error) { + event := new(FleetManagementCoordinatorSet) + if err := _FleetManagement.contract.UnpackLog(event, "CoordinatorSet", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// FleetManagementCreditCenterSetIterator is returned from FilterCreditCenterSet and is used to iterate over the raw logs and unpacked data for CreditCenterSet events raised by the FleetManagement contract. +type FleetManagementCreditCenterSetIterator struct { + Event *FleetManagementCreditCenterSet // 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 *FleetManagementCreditCenterSetIterator) 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(FleetManagementCreditCenterSet) + 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(FleetManagementCreditCenterSet) + 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 *FleetManagementCreditCenterSetIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *FleetManagementCreditCenterSetIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// FleetManagementCreditCenterSet represents a CreditCenterSet event raised by the FleetManagement contract. +type FleetManagementCreditCenterSet struct { + CreditCenter common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterCreditCenterSet is a free log retrieval operation binding the contract event 0xb139440c94b411ec448cfab90b78cc0c0a5b864ec2c00f0372f29c8234ffe6eb. +// +// Solidity: event CreditCenterSet(address indexed creditCenter) +func (_FleetManagement *FleetManagementFilterer) FilterCreditCenterSet(opts *bind.FilterOpts, creditCenter []common.Address) (*FleetManagementCreditCenterSetIterator, error) { + + var creditCenterRule []interface{} + for _, creditCenterItem := range creditCenter { + creditCenterRule = append(creditCenterRule, creditCenterItem) + } + + logs, sub, err := _FleetManagement.contract.FilterLogs(opts, "CreditCenterSet", creditCenterRule) + if err != nil { + return nil, err + } + return &FleetManagementCreditCenterSetIterator{contract: _FleetManagement.contract, event: "CreditCenterSet", logs: logs, sub: sub}, nil +} + +// WatchCreditCenterSet is a free log subscription operation binding the contract event 0xb139440c94b411ec448cfab90b78cc0c0a5b864ec2c00f0372f29c8234ffe6eb. +// +// Solidity: event CreditCenterSet(address indexed creditCenter) +func (_FleetManagement *FleetManagementFilterer) WatchCreditCenterSet(opts *bind.WatchOpts, sink chan<- *FleetManagementCreditCenterSet, creditCenter []common.Address) (event.Subscription, error) { + + var creditCenterRule []interface{} + for _, creditCenterItem := range creditCenter { + creditCenterRule = append(creditCenterRule, creditCenterItem) + } + + logs, sub, err := _FleetManagement.contract.WatchLogs(opts, "CreditCenterSet", creditCenterRule) + 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(FleetManagementCreditCenterSet) + if err := _FleetManagement.contract.UnpackLog(event, "CreditCenterSet", 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 +} + +// ParseCreditCenterSet is a log parse operation binding the contract event 0xb139440c94b411ec448cfab90b78cc0c0a5b864ec2c00f0372f29c8234ffe6eb. +// +// Solidity: event CreditCenterSet(address indexed creditCenter) +func (_FleetManagement *FleetManagementFilterer) ParseCreditCenterSet(log types.Log) (*FleetManagementCreditCenterSet, error) { + event := new(FleetManagementCreditCenterSet) + if err := _FleetManagement.contract.UnpackLog(event, "CreditCenterSet", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// FleetManagementFeeWithdrawnIterator is returned from FilterFeeWithdrawn and is used to iterate over the raw logs and unpacked data for FeeWithdrawn events raised by the FleetManagement contract. +type FleetManagementFeeWithdrawnIterator struct { + Event *FleetManagementFeeWithdrawn // 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 *FleetManagementFeeWithdrawnIterator) 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(FleetManagementFeeWithdrawn) + 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(FleetManagementFeeWithdrawn) + 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 *FleetManagementFeeWithdrawnIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *FleetManagementFeeWithdrawnIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// FleetManagementFeeWithdrawn represents a FeeWithdrawn event raised by the FleetManagement contract. +type FleetManagementFeeWithdrawn struct { + Account common.Address + Amount *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterFeeWithdrawn is a free log retrieval operation binding the contract event 0x78473f3f373f7673597f4f0fa5873cb4d375fea6d4339ad6b56dbd411513cb3f. +// +// Solidity: event FeeWithdrawn(address indexed account, uint256 amount) +func (_FleetManagement *FleetManagementFilterer) FilterFeeWithdrawn(opts *bind.FilterOpts, account []common.Address) (*FleetManagementFeeWithdrawnIterator, error) { + + var accountRule []interface{} + for _, accountItem := range account { + accountRule = append(accountRule, accountItem) + } + + logs, sub, err := _FleetManagement.contract.FilterLogs(opts, "FeeWithdrawn", accountRule) + if err != nil { + return nil, err + } + return &FleetManagementFeeWithdrawnIterator{contract: _FleetManagement.contract, event: "FeeWithdrawn", logs: logs, sub: sub}, nil +} + +// WatchFeeWithdrawn is a free log subscription operation binding the contract event 0x78473f3f373f7673597f4f0fa5873cb4d375fea6d4339ad6b56dbd411513cb3f. +// +// Solidity: event FeeWithdrawn(address indexed account, uint256 amount) +func (_FleetManagement *FleetManagementFilterer) WatchFeeWithdrawn(opts *bind.WatchOpts, sink chan<- *FleetManagementFeeWithdrawn, account []common.Address) (event.Subscription, error) { + + var accountRule []interface{} + for _, accountItem := range account { + accountRule = append(accountRule, accountItem) + } + + logs, sub, err := _FleetManagement.contract.WatchLogs(opts, "FeeWithdrawn", accountRule) + 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(FleetManagementFeeWithdrawn) + if err := _FleetManagement.contract.UnpackLog(event, "FeeWithdrawn", 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 +} + +// ParseFeeWithdrawn is a log parse operation binding the contract event 0x78473f3f373f7673597f4f0fa5873cb4d375fea6d4339ad6b56dbd411513cb3f. +// +// Solidity: event FeeWithdrawn(address indexed account, uint256 amount) +func (_FleetManagement *FleetManagementFilterer) ParseFeeWithdrawn(log types.Log) (*FleetManagementFeeWithdrawn, error) { + event := new(FleetManagementFeeWithdrawn) + if err := _FleetManagement.contract.UnpackLog(event, "FeeWithdrawn", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// FleetManagementInitializedIterator is returned from FilterInitialized and is used to iterate over the raw logs and unpacked data for Initialized events raised by the FleetManagement contract. +type FleetManagementInitializedIterator struct { + Event *FleetManagementInitialized // 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 *FleetManagementInitializedIterator) 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(FleetManagementInitialized) + 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(FleetManagementInitialized) + 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 *FleetManagementInitializedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *FleetManagementInitializedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// FleetManagementInitialized represents a Initialized event raised by the FleetManagement contract. +type FleetManagementInitialized struct { + Version uint8 + Raw types.Log // Blockchain specific contextual infos +} + +// FilterInitialized is a free log retrieval operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. +// +// Solidity: event Initialized(uint8 version) +func (_FleetManagement *FleetManagementFilterer) FilterInitialized(opts *bind.FilterOpts) (*FleetManagementInitializedIterator, error) { + + logs, sub, err := _FleetManagement.contract.FilterLogs(opts, "Initialized") + if err != nil { + return nil, err + } + return &FleetManagementInitializedIterator{contract: _FleetManagement.contract, event: "Initialized", logs: logs, sub: sub}, nil +} + +// WatchInitialized is a free log subscription operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. +// +// Solidity: event Initialized(uint8 version) +func (_FleetManagement *FleetManagementFilterer) WatchInitialized(opts *bind.WatchOpts, sink chan<- *FleetManagementInitialized) (event.Subscription, error) { + + logs, sub, err := _FleetManagement.contract.WatchLogs(opts, "Initialized") + 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(FleetManagementInitialized) + if err := _FleetManagement.contract.UnpackLog(event, "Initialized", 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 +} + +// ParseInitialized is a log parse operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. +// +// Solidity: event Initialized(uint8 version) +func (_FleetManagement *FleetManagementFilterer) ParseInitialized(log types.Log) (*FleetManagementInitialized, error) { + event := new(FleetManagementInitialized) + if err := _FleetManagement.contract.UnpackLog(event, "Initialized", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// FleetManagementOwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the FleetManagement contract. +type FleetManagementOwnershipTransferredIterator struct { + Event *FleetManagementOwnershipTransferred // 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 *FleetManagementOwnershipTransferredIterator) 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(FleetManagementOwnershipTransferred) + 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(FleetManagementOwnershipTransferred) + 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 *FleetManagementOwnershipTransferredIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *FleetManagementOwnershipTransferredIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// FleetManagementOwnershipTransferred represents a OwnershipTransferred event raised by the FleetManagement contract. +type FleetManagementOwnershipTransferred struct { + PreviousOwner common.Address + NewOwner common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterOwnershipTransferred is a free log retrieval operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_FleetManagement *FleetManagementFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*FleetManagementOwnershipTransferredIterator, error) { + + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + } + var newOwnerRule []interface{} + for _, newOwnerItem := range newOwner { + newOwnerRule = append(newOwnerRule, newOwnerItem) + } + + logs, sub, err := _FleetManagement.contract.FilterLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return &FleetManagementOwnershipTransferredIterator{contract: _FleetManagement.contract, event: "OwnershipTransferred", logs: logs, sub: sub}, nil +} + +// WatchOwnershipTransferred is a free log subscription operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_FleetManagement *FleetManagementFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *FleetManagementOwnershipTransferred, previousOwner []common.Address, newOwner []common.Address) (event.Subscription, error) { + + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + } + var newOwnerRule []interface{} + for _, newOwnerItem := range newOwner { + newOwnerRule = append(newOwnerRule, newOwnerItem) + } + + logs, sub, err := _FleetManagement.contract.WatchLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(FleetManagementOwnershipTransferred) + if err := _FleetManagement.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseOwnershipTransferred is a log parse operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_FleetManagement *FleetManagementFilterer) ParseOwnershipTransferred(log types.Log) (*FleetManagementOwnershipTransferred, error) { + event := new(FleetManagementOwnershipTransferred) + if err := _FleetManagement.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// FleetManagementProverStoreSetIterator is returned from FilterProverStoreSet and is used to iterate over the raw logs and unpacked data for ProverStoreSet events raised by the FleetManagement contract. +type FleetManagementProverStoreSetIterator struct { + Event *FleetManagementProverStoreSet // 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 *FleetManagementProverStoreSetIterator) 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(FleetManagementProverStoreSet) + 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(FleetManagementProverStoreSet) + 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 *FleetManagementProverStoreSetIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *FleetManagementProverStoreSetIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// FleetManagementProverStoreSet represents a ProverStoreSet event raised by the FleetManagement contract. +type FleetManagementProverStoreSet struct { + Prover common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterProverStoreSet is a free log retrieval operation binding the contract event 0xa548f7571b682f75eb09b6255cee4e7010a2136f2535aa8449ea00ad1483c641. +// +// Solidity: event ProverStoreSet(address indexed prover) +func (_FleetManagement *FleetManagementFilterer) FilterProverStoreSet(opts *bind.FilterOpts, prover []common.Address) (*FleetManagementProverStoreSetIterator, error) { + + var proverRule []interface{} + for _, proverItem := range prover { + proverRule = append(proverRule, proverItem) + } + + logs, sub, err := _FleetManagement.contract.FilterLogs(opts, "ProverStoreSet", proverRule) + if err != nil { + return nil, err + } + return &FleetManagementProverStoreSetIterator{contract: _FleetManagement.contract, event: "ProverStoreSet", logs: logs, sub: sub}, nil +} + +// WatchProverStoreSet is a free log subscription operation binding the contract event 0xa548f7571b682f75eb09b6255cee4e7010a2136f2535aa8449ea00ad1483c641. +// +// Solidity: event ProverStoreSet(address indexed prover) +func (_FleetManagement *FleetManagementFilterer) WatchProverStoreSet(opts *bind.WatchOpts, sink chan<- *FleetManagementProverStoreSet, prover []common.Address) (event.Subscription, error) { + + var proverRule []interface{} + for _, proverItem := range prover { + proverRule = append(proverRule, proverItem) + } + + logs, sub, err := _FleetManagement.contract.WatchLogs(opts, "ProverStoreSet", proverRule) + 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(FleetManagementProverStoreSet) + if err := _FleetManagement.contract.UnpackLog(event, "ProverStoreSet", 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 +} + +// ParseProverStoreSet is a log parse operation binding the contract event 0xa548f7571b682f75eb09b6255cee4e7010a2136f2535aa8449ea00ad1483c641. +// +// Solidity: event ProverStoreSet(address indexed prover) +func (_FleetManagement *FleetManagementFilterer) ParseProverStoreSet(log types.Log) (*FleetManagementProverStoreSet, error) { + event := new(FleetManagementProverStoreSet) + if err := _FleetManagement.contract.UnpackLog(event, "ProverStoreSet", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// FleetManagementRegistrationFeeSetIterator is returned from FilterRegistrationFeeSet and is used to iterate over the raw logs and unpacked data for RegistrationFeeSet events raised by the FleetManagement contract. +type FleetManagementRegistrationFeeSetIterator struct { + Event *FleetManagementRegistrationFeeSet // 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 *FleetManagementRegistrationFeeSetIterator) 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(FleetManagementRegistrationFeeSet) + 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(FleetManagementRegistrationFeeSet) + 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 *FleetManagementRegistrationFeeSetIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *FleetManagementRegistrationFeeSetIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// FleetManagementRegistrationFeeSet represents a RegistrationFeeSet event raised by the FleetManagement contract. +type FleetManagementRegistrationFeeSet struct { + Fee *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterRegistrationFeeSet is a free log retrieval operation binding the contract event 0x3836764761eb705a9815e9070541f9a604757da847d45d157a28f14b58b5f5e6. +// +// Solidity: event RegistrationFeeSet(uint256 fee) +func (_FleetManagement *FleetManagementFilterer) FilterRegistrationFeeSet(opts *bind.FilterOpts) (*FleetManagementRegistrationFeeSetIterator, error) { + + logs, sub, err := _FleetManagement.contract.FilterLogs(opts, "RegistrationFeeSet") + if err != nil { + return nil, err + } + return &FleetManagementRegistrationFeeSetIterator{contract: _FleetManagement.contract, event: "RegistrationFeeSet", logs: logs, sub: sub}, nil +} + +// WatchRegistrationFeeSet is a free log subscription operation binding the contract event 0x3836764761eb705a9815e9070541f9a604757da847d45d157a28f14b58b5f5e6. +// +// Solidity: event RegistrationFeeSet(uint256 fee) +func (_FleetManagement *FleetManagementFilterer) WatchRegistrationFeeSet(opts *bind.WatchOpts, sink chan<- *FleetManagementRegistrationFeeSet) (event.Subscription, error) { + + logs, sub, err := _FleetManagement.contract.WatchLogs(opts, "RegistrationFeeSet") + 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(FleetManagementRegistrationFeeSet) + if err := _FleetManagement.contract.UnpackLog(event, "RegistrationFeeSet", 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 +} + +// ParseRegistrationFeeSet is a log parse operation binding the contract event 0x3836764761eb705a9815e9070541f9a604757da847d45d157a28f14b58b5f5e6. +// +// Solidity: event RegistrationFeeSet(uint256 fee) +func (_FleetManagement *FleetManagementFilterer) ParseRegistrationFeeSet(log types.Log) (*FleetManagementRegistrationFeeSet, error) { + event := new(FleetManagementRegistrationFeeSet) + if err := _FleetManagement.contract.UnpackLog(event, "RegistrationFeeSet", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// FleetManagementSlasherSetIterator is returned from FilterSlasherSet and is used to iterate over the raw logs and unpacked data for SlasherSet events raised by the FleetManagement contract. +type FleetManagementSlasherSetIterator struct { + Event *FleetManagementSlasherSet // 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 *FleetManagementSlasherSetIterator) 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(FleetManagementSlasherSet) + 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(FleetManagementSlasherSet) + 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 *FleetManagementSlasherSetIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *FleetManagementSlasherSetIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// FleetManagementSlasherSet represents a SlasherSet event raised by the FleetManagement contract. +type FleetManagementSlasherSet struct { + Slasher common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterSlasherSet is a free log retrieval operation binding the contract event 0x93984378289228ac490c326f8dbcc3f9b2c703753c272e7c572949e115da985e. +// +// Solidity: event SlasherSet(address indexed slasher) +func (_FleetManagement *FleetManagementFilterer) FilterSlasherSet(opts *bind.FilterOpts, slasher []common.Address) (*FleetManagementSlasherSetIterator, error) { + + var slasherRule []interface{} + for _, slasherItem := range slasher { + slasherRule = append(slasherRule, slasherItem) + } + + logs, sub, err := _FleetManagement.contract.FilterLogs(opts, "SlasherSet", slasherRule) + if err != nil { + return nil, err + } + return &FleetManagementSlasherSetIterator{contract: _FleetManagement.contract, event: "SlasherSet", logs: logs, sub: sub}, nil +} + +// WatchSlasherSet is a free log subscription operation binding the contract event 0x93984378289228ac490c326f8dbcc3f9b2c703753c272e7c572949e115da985e. +// +// Solidity: event SlasherSet(address indexed slasher) +func (_FleetManagement *FleetManagementFilterer) WatchSlasherSet(opts *bind.WatchOpts, sink chan<- *FleetManagementSlasherSet, slasher []common.Address) (event.Subscription, error) { + + var slasherRule []interface{} + for _, slasherItem := range slasher { + slasherRule = append(slasherRule, slasherItem) + } + + logs, sub, err := _FleetManagement.contract.WatchLogs(opts, "SlasherSet", slasherRule) + 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(FleetManagementSlasherSet) + if err := _FleetManagement.contract.UnpackLog(event, "SlasherSet", 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 +} + +// ParseSlasherSet is a log parse operation binding the contract event 0x93984378289228ac490c326f8dbcc3f9b2c703753c272e7c572949e115da985e. +// +// Solidity: event SlasherSet(address indexed slasher) +func (_FleetManagement *FleetManagementFilterer) ParseSlasherSet(log types.Log) (*FleetManagementSlasherSet, error) { + event := new(FleetManagementSlasherSet) + if err := _FleetManagement.contract.UnpackLog(event, "SlasherSet", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// FleetManagementStakingHubSetIterator is returned from FilterStakingHubSet and is used to iterate over the raw logs and unpacked data for StakingHubSet events raised by the FleetManagement contract. +type FleetManagementStakingHubSetIterator struct { + Event *FleetManagementStakingHubSet // 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 *FleetManagementStakingHubSetIterator) 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(FleetManagementStakingHubSet) + 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(FleetManagementStakingHubSet) + 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 *FleetManagementStakingHubSetIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *FleetManagementStakingHubSetIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// FleetManagementStakingHubSet represents a StakingHubSet event raised by the FleetManagement contract. +type FleetManagementStakingHubSet struct { + Msp common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterStakingHubSet is a free log retrieval operation binding the contract event 0x4f6353da0125ceacadbf12ecb33e3bfbc7f14b1922bf5783daecf3bc7042bf7e. +// +// Solidity: event StakingHubSet(address indexed msp) +func (_FleetManagement *FleetManagementFilterer) FilterStakingHubSet(opts *bind.FilterOpts, msp []common.Address) (*FleetManagementStakingHubSetIterator, error) { + + var mspRule []interface{} + for _, mspItem := range msp { + mspRule = append(mspRule, mspItem) + } + + logs, sub, err := _FleetManagement.contract.FilterLogs(opts, "StakingHubSet", mspRule) + if err != nil { + return nil, err + } + return &FleetManagementStakingHubSetIterator{contract: _FleetManagement.contract, event: "StakingHubSet", logs: logs, sub: sub}, nil +} + +// WatchStakingHubSet is a free log subscription operation binding the contract event 0x4f6353da0125ceacadbf12ecb33e3bfbc7f14b1922bf5783daecf3bc7042bf7e. +// +// Solidity: event StakingHubSet(address indexed msp) +func (_FleetManagement *FleetManagementFilterer) WatchStakingHubSet(opts *bind.WatchOpts, sink chan<- *FleetManagementStakingHubSet, msp []common.Address) (event.Subscription, error) { + + var mspRule []interface{} + for _, mspItem := range msp { + mspRule = append(mspRule, mspItem) + } + + logs, sub, err := _FleetManagement.contract.WatchLogs(opts, "StakingHubSet", mspRule) + 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(FleetManagementStakingHubSet) + if err := _FleetManagement.contract.UnpackLog(event, "StakingHubSet", 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 +} + +// ParseStakingHubSet is a log parse operation binding the contract event 0x4f6353da0125ceacadbf12ecb33e3bfbc7f14b1922bf5783daecf3bc7042bf7e. +// +// Solidity: event StakingHubSet(address indexed msp) +func (_FleetManagement *FleetManagementFilterer) ParseStakingHubSet(log types.Log) (*FleetManagementStakingHubSet, error) { + event := new(FleetManagementStakingHubSet) + if err := _FleetManagement.contract.UnpackLog(event, "StakingHubSet", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} diff --git a/ioctl/cmd/ws/contracts/gen.go b/ioctl/cmd/ws/contracts/gen.go new file mode 100644 index 0000000000..06ded1d0a2 --- /dev/null +++ b/ioctl/cmd/ws/contracts/gen.go @@ -0,0 +1,8 @@ +package contracts + +//go:generate abigen --abi abis/W3bstreamProver.json --pkg contracts --type W3bstreamProver -out ./w3bstreamprover.go +//go:generate abigen --abi abis/W3bstreamProject.json --pkg contracts --type W3bstreamProject -out ./w3bstreamproject.go +//go:generate abigen --abi abis/ProjectRegistrar.json --pkg contracts --type ProjectRegistrar -out ./projectregistrar.go +//go:generate abigen --abi abis/FleetManagement.json --pkg contracts --type FleetManagement -out ./fleetmanagement.go +//go:generate abigen --abi abis/W3bstreamRouter.json --pkg contracts --type W3bstreamRouter -out ./w3bstreamrouter.go +//go:generate abigen --abi abis/ProjectDevice.json --pkg contracts --type ProjectDevice -out ./projectdevice.go diff --git a/ioctl/cmd/ws/contracts/projectdevice.go b/ioctl/cmd/ws/contracts/projectdevice.go new file mode 100644 index 0000000000..e69d5529e8 --- /dev/null +++ b/ioctl/cmd/ws/contracts/projectdevice.go @@ -0,0 +1,761 @@ +// 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 +) + +// ProjectDeviceMetaData contains all meta data concerning the ProjectDevice contract. +var ProjectDeviceMetaData = &bind.MetaData{ + ABI: "[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"projectId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"device\",\"type\":\"address\"}],\"name\":\"Approve\",\"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\":\"projectId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"device\",\"type\":\"address\"}],\"name\":\"Unapprove\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_projectId\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"_devices\",\"type\":\"address[]\"}],\"name\":\"approve\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_projectId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_device\",\"type\":\"address\"}],\"name\":\"approved\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_ioIDRegistry\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_w3bstreamProject\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"ioIDRegistry\",\"outputs\":[{\"internalType\":\"contractIioIDRegistry\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_projectId\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"_devices\",\"type\":\"address[]\"}],\"name\":\"unapprove\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"w3bstreamProject\",\"outputs\":[{\"internalType\":\"contractIW3bstreamProject\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]", +} + +// ProjectDeviceABI is the input ABI used to generate the binding from. +// Deprecated: Use ProjectDeviceMetaData.ABI instead. +var ProjectDeviceABI = ProjectDeviceMetaData.ABI + +// ProjectDevice is an auto generated Go binding around an Ethereum contract. +type ProjectDevice struct { + ProjectDeviceCaller // Read-only binding to the contract + ProjectDeviceTransactor // Write-only binding to the contract + ProjectDeviceFilterer // Log filterer for contract events +} + +// ProjectDeviceCaller is an auto generated read-only Go binding around an Ethereum contract. +type ProjectDeviceCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// ProjectDeviceTransactor is an auto generated write-only Go binding around an Ethereum contract. +type ProjectDeviceTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// ProjectDeviceFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type ProjectDeviceFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// ProjectDeviceSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type ProjectDeviceSession struct { + Contract *ProjectDevice // 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 +} + +// ProjectDeviceCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type ProjectDeviceCallerSession struct { + Contract *ProjectDeviceCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// ProjectDeviceTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type ProjectDeviceTransactorSession struct { + Contract *ProjectDeviceTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// ProjectDeviceRaw is an auto generated low-level Go binding around an Ethereum contract. +type ProjectDeviceRaw struct { + Contract *ProjectDevice // Generic contract binding to access the raw methods on +} + +// ProjectDeviceCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type ProjectDeviceCallerRaw struct { + Contract *ProjectDeviceCaller // Generic read-only contract binding to access the raw methods on +} + +// ProjectDeviceTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type ProjectDeviceTransactorRaw struct { + Contract *ProjectDeviceTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewProjectDevice creates a new instance of ProjectDevice, bound to a specific deployed contract. +func NewProjectDevice(address common.Address, backend bind.ContractBackend) (*ProjectDevice, error) { + contract, err := bindProjectDevice(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &ProjectDevice{ProjectDeviceCaller: ProjectDeviceCaller{contract: contract}, ProjectDeviceTransactor: ProjectDeviceTransactor{contract: contract}, ProjectDeviceFilterer: ProjectDeviceFilterer{contract: contract}}, nil +} + +// NewProjectDeviceCaller creates a new read-only instance of ProjectDevice, bound to a specific deployed contract. +func NewProjectDeviceCaller(address common.Address, caller bind.ContractCaller) (*ProjectDeviceCaller, error) { + contract, err := bindProjectDevice(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &ProjectDeviceCaller{contract: contract}, nil +} + +// NewProjectDeviceTransactor creates a new write-only instance of ProjectDevice, bound to a specific deployed contract. +func NewProjectDeviceTransactor(address common.Address, transactor bind.ContractTransactor) (*ProjectDeviceTransactor, error) { + contract, err := bindProjectDevice(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &ProjectDeviceTransactor{contract: contract}, nil +} + +// NewProjectDeviceFilterer creates a new log filterer instance of ProjectDevice, bound to a specific deployed contract. +func NewProjectDeviceFilterer(address common.Address, filterer bind.ContractFilterer) (*ProjectDeviceFilterer, error) { + contract, err := bindProjectDevice(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &ProjectDeviceFilterer{contract: contract}, nil +} + +// bindProjectDevice binds a generic wrapper to an already deployed contract. +func bindProjectDevice(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := ProjectDeviceMetaData.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 (_ProjectDevice *ProjectDeviceRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _ProjectDevice.Contract.ProjectDeviceCaller.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 (_ProjectDevice *ProjectDeviceRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _ProjectDevice.Contract.ProjectDeviceTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_ProjectDevice *ProjectDeviceRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _ProjectDevice.Contract.ProjectDeviceTransactor.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 (_ProjectDevice *ProjectDeviceCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _ProjectDevice.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 (_ProjectDevice *ProjectDeviceTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _ProjectDevice.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_ProjectDevice *ProjectDeviceTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _ProjectDevice.Contract.contract.Transact(opts, method, params...) +} + +// Approved is a free data retrieval call binding the contract method 0x8253951a. +// +// Solidity: function approved(uint256 _projectId, address _device) view returns(bool) +func (_ProjectDevice *ProjectDeviceCaller) Approved(opts *bind.CallOpts, _projectId *big.Int, _device common.Address) (bool, error) { + var out []interface{} + err := _ProjectDevice.contract.Call(opts, &out, "approved", _projectId, _device) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// Approved is a free data retrieval call binding the contract method 0x8253951a. +// +// Solidity: function approved(uint256 _projectId, address _device) view returns(bool) +func (_ProjectDevice *ProjectDeviceSession) Approved(_projectId *big.Int, _device common.Address) (bool, error) { + return _ProjectDevice.Contract.Approved(&_ProjectDevice.CallOpts, _projectId, _device) +} + +// Approved is a free data retrieval call binding the contract method 0x8253951a. +// +// Solidity: function approved(uint256 _projectId, address _device) view returns(bool) +func (_ProjectDevice *ProjectDeviceCallerSession) Approved(_projectId *big.Int, _device common.Address) (bool, error) { + return _ProjectDevice.Contract.Approved(&_ProjectDevice.CallOpts, _projectId, _device) +} + +// IoIDRegistry is a free data retrieval call binding the contract method 0x95cc7086. +// +// Solidity: function ioIDRegistry() view returns(address) +func (_ProjectDevice *ProjectDeviceCaller) IoIDRegistry(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _ProjectDevice.contract.Call(opts, &out, "ioIDRegistry") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// IoIDRegistry is a free data retrieval call binding the contract method 0x95cc7086. +// +// Solidity: function ioIDRegistry() view returns(address) +func (_ProjectDevice *ProjectDeviceSession) IoIDRegistry() (common.Address, error) { + return _ProjectDevice.Contract.IoIDRegistry(&_ProjectDevice.CallOpts) +} + +// IoIDRegistry is a free data retrieval call binding the contract method 0x95cc7086. +// +// Solidity: function ioIDRegistry() view returns(address) +func (_ProjectDevice *ProjectDeviceCallerSession) IoIDRegistry() (common.Address, error) { + return _ProjectDevice.Contract.IoIDRegistry(&_ProjectDevice.CallOpts) +} + +// W3bstreamProject is a free data retrieval call binding the contract method 0x561f1fc4. +// +// Solidity: function w3bstreamProject() view returns(address) +func (_ProjectDevice *ProjectDeviceCaller) W3bstreamProject(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _ProjectDevice.contract.Call(opts, &out, "w3bstreamProject") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// W3bstreamProject is a free data retrieval call binding the contract method 0x561f1fc4. +// +// Solidity: function w3bstreamProject() view returns(address) +func (_ProjectDevice *ProjectDeviceSession) W3bstreamProject() (common.Address, error) { + return _ProjectDevice.Contract.W3bstreamProject(&_ProjectDevice.CallOpts) +} + +// W3bstreamProject is a free data retrieval call binding the contract method 0x561f1fc4. +// +// Solidity: function w3bstreamProject() view returns(address) +func (_ProjectDevice *ProjectDeviceCallerSession) W3bstreamProject() (common.Address, error) { + return _ProjectDevice.Contract.W3bstreamProject(&_ProjectDevice.CallOpts) +} + +// Approve is a paid mutator transaction binding the contract method 0xd744d8dc. +// +// Solidity: function approve(uint256 _projectId, address[] _devices) returns() +func (_ProjectDevice *ProjectDeviceTransactor) Approve(opts *bind.TransactOpts, _projectId *big.Int, _devices []common.Address) (*types.Transaction, error) { + return _ProjectDevice.contract.Transact(opts, "approve", _projectId, _devices) +} + +// Approve is a paid mutator transaction binding the contract method 0xd744d8dc. +// +// Solidity: function approve(uint256 _projectId, address[] _devices) returns() +func (_ProjectDevice *ProjectDeviceSession) Approve(_projectId *big.Int, _devices []common.Address) (*types.Transaction, error) { + return _ProjectDevice.Contract.Approve(&_ProjectDevice.TransactOpts, _projectId, _devices) +} + +// Approve is a paid mutator transaction binding the contract method 0xd744d8dc. +// +// Solidity: function approve(uint256 _projectId, address[] _devices) returns() +func (_ProjectDevice *ProjectDeviceTransactorSession) Approve(_projectId *big.Int, _devices []common.Address) (*types.Transaction, error) { + return _ProjectDevice.Contract.Approve(&_ProjectDevice.TransactOpts, _projectId, _devices) +} + +// Initialize is a paid mutator transaction binding the contract method 0x485cc955. +// +// Solidity: function initialize(address _ioIDRegistry, address _w3bstreamProject) returns() +func (_ProjectDevice *ProjectDeviceTransactor) Initialize(opts *bind.TransactOpts, _ioIDRegistry common.Address, _w3bstreamProject common.Address) (*types.Transaction, error) { + return _ProjectDevice.contract.Transact(opts, "initialize", _ioIDRegistry, _w3bstreamProject) +} + +// Initialize is a paid mutator transaction binding the contract method 0x485cc955. +// +// Solidity: function initialize(address _ioIDRegistry, address _w3bstreamProject) returns() +func (_ProjectDevice *ProjectDeviceSession) Initialize(_ioIDRegistry common.Address, _w3bstreamProject common.Address) (*types.Transaction, error) { + return _ProjectDevice.Contract.Initialize(&_ProjectDevice.TransactOpts, _ioIDRegistry, _w3bstreamProject) +} + +// Initialize is a paid mutator transaction binding the contract method 0x485cc955. +// +// Solidity: function initialize(address _ioIDRegistry, address _w3bstreamProject) returns() +func (_ProjectDevice *ProjectDeviceTransactorSession) Initialize(_ioIDRegistry common.Address, _w3bstreamProject common.Address) (*types.Transaction, error) { + return _ProjectDevice.Contract.Initialize(&_ProjectDevice.TransactOpts, _ioIDRegistry, _w3bstreamProject) +} + +// Unapprove is a paid mutator transaction binding the contract method 0xfa6b352c. +// +// Solidity: function unapprove(uint256 _projectId, address[] _devices) returns() +func (_ProjectDevice *ProjectDeviceTransactor) Unapprove(opts *bind.TransactOpts, _projectId *big.Int, _devices []common.Address) (*types.Transaction, error) { + return _ProjectDevice.contract.Transact(opts, "unapprove", _projectId, _devices) +} + +// Unapprove is a paid mutator transaction binding the contract method 0xfa6b352c. +// +// Solidity: function unapprove(uint256 _projectId, address[] _devices) returns() +func (_ProjectDevice *ProjectDeviceSession) Unapprove(_projectId *big.Int, _devices []common.Address) (*types.Transaction, error) { + return _ProjectDevice.Contract.Unapprove(&_ProjectDevice.TransactOpts, _projectId, _devices) +} + +// Unapprove is a paid mutator transaction binding the contract method 0xfa6b352c. +// +// Solidity: function unapprove(uint256 _projectId, address[] _devices) returns() +func (_ProjectDevice *ProjectDeviceTransactorSession) Unapprove(_projectId *big.Int, _devices []common.Address) (*types.Transaction, error) { + return _ProjectDevice.Contract.Unapprove(&_ProjectDevice.TransactOpts, _projectId, _devices) +} + +// ProjectDeviceApproveIterator is returned from FilterApprove and is used to iterate over the raw logs and unpacked data for Approve events raised by the ProjectDevice contract. +type ProjectDeviceApproveIterator struct { + Event *ProjectDeviceApprove // 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 *ProjectDeviceApproveIterator) 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(ProjectDeviceApprove) + 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(ProjectDeviceApprove) + 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 *ProjectDeviceApproveIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ProjectDeviceApproveIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ProjectDeviceApprove represents a Approve event raised by the ProjectDevice contract. +type ProjectDeviceApprove struct { + ProjectId *big.Int + Device common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterApprove is a free log retrieval operation binding the contract event 0x47ad3e4b0f4bdbe3ac08708bbc45053d2ff616911b39e65563fd9bd781909645. +// +// Solidity: event Approve(uint256 projectId, address indexed device) +func (_ProjectDevice *ProjectDeviceFilterer) FilterApprove(opts *bind.FilterOpts, device []common.Address) (*ProjectDeviceApproveIterator, error) { + + var deviceRule []interface{} + for _, deviceItem := range device { + deviceRule = append(deviceRule, deviceItem) + } + + logs, sub, err := _ProjectDevice.contract.FilterLogs(opts, "Approve", deviceRule) + if err != nil { + return nil, err + } + return &ProjectDeviceApproveIterator{contract: _ProjectDevice.contract, event: "Approve", logs: logs, sub: sub}, nil +} + +// WatchApprove is a free log subscription operation binding the contract event 0x47ad3e4b0f4bdbe3ac08708bbc45053d2ff616911b39e65563fd9bd781909645. +// +// Solidity: event Approve(uint256 projectId, address indexed device) +func (_ProjectDevice *ProjectDeviceFilterer) WatchApprove(opts *bind.WatchOpts, sink chan<- *ProjectDeviceApprove, device []common.Address) (event.Subscription, error) { + + var deviceRule []interface{} + for _, deviceItem := range device { + deviceRule = append(deviceRule, deviceItem) + } + + logs, sub, err := _ProjectDevice.contract.WatchLogs(opts, "Approve", deviceRule) + 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(ProjectDeviceApprove) + if err := _ProjectDevice.contract.UnpackLog(event, "Approve", 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 +} + +// ParseApprove is a log parse operation binding the contract event 0x47ad3e4b0f4bdbe3ac08708bbc45053d2ff616911b39e65563fd9bd781909645. +// +// Solidity: event Approve(uint256 projectId, address indexed device) +func (_ProjectDevice *ProjectDeviceFilterer) ParseApprove(log types.Log) (*ProjectDeviceApprove, error) { + event := new(ProjectDeviceApprove) + if err := _ProjectDevice.contract.UnpackLog(event, "Approve", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// ProjectDeviceInitializedIterator is returned from FilterInitialized and is used to iterate over the raw logs and unpacked data for Initialized events raised by the ProjectDevice contract. +type ProjectDeviceInitializedIterator struct { + Event *ProjectDeviceInitialized // 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 *ProjectDeviceInitializedIterator) 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(ProjectDeviceInitialized) + 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(ProjectDeviceInitialized) + 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 *ProjectDeviceInitializedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ProjectDeviceInitializedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ProjectDeviceInitialized represents a Initialized event raised by the ProjectDevice contract. +type ProjectDeviceInitialized struct { + Version uint8 + Raw types.Log // Blockchain specific contextual infos +} + +// FilterInitialized is a free log retrieval operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. +// +// Solidity: event Initialized(uint8 version) +func (_ProjectDevice *ProjectDeviceFilterer) FilterInitialized(opts *bind.FilterOpts) (*ProjectDeviceInitializedIterator, error) { + + logs, sub, err := _ProjectDevice.contract.FilterLogs(opts, "Initialized") + if err != nil { + return nil, err + } + return &ProjectDeviceInitializedIterator{contract: _ProjectDevice.contract, event: "Initialized", logs: logs, sub: sub}, nil +} + +// WatchInitialized is a free log subscription operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. +// +// Solidity: event Initialized(uint8 version) +func (_ProjectDevice *ProjectDeviceFilterer) WatchInitialized(opts *bind.WatchOpts, sink chan<- *ProjectDeviceInitialized) (event.Subscription, error) { + + logs, sub, err := _ProjectDevice.contract.WatchLogs(opts, "Initialized") + 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(ProjectDeviceInitialized) + if err := _ProjectDevice.contract.UnpackLog(event, "Initialized", 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 +} + +// ParseInitialized is a log parse operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. +// +// Solidity: event Initialized(uint8 version) +func (_ProjectDevice *ProjectDeviceFilterer) ParseInitialized(log types.Log) (*ProjectDeviceInitialized, error) { + event := new(ProjectDeviceInitialized) + if err := _ProjectDevice.contract.UnpackLog(event, "Initialized", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// ProjectDeviceUnapproveIterator is returned from FilterUnapprove and is used to iterate over the raw logs and unpacked data for Unapprove events raised by the ProjectDevice contract. +type ProjectDeviceUnapproveIterator struct { + Event *ProjectDeviceUnapprove // 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 *ProjectDeviceUnapproveIterator) 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(ProjectDeviceUnapprove) + 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(ProjectDeviceUnapprove) + 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 *ProjectDeviceUnapproveIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ProjectDeviceUnapproveIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ProjectDeviceUnapprove represents a Unapprove event raised by the ProjectDevice contract. +type ProjectDeviceUnapprove struct { + ProjectId *big.Int + Device common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterUnapprove is a free log retrieval operation binding the contract event 0x958e4c39d74f2f6ff958f2ff19d4cf29448476d9e44e9aab9547f7e30d4cc86b. +// +// Solidity: event Unapprove(uint256 projectId, address indexed device) +func (_ProjectDevice *ProjectDeviceFilterer) FilterUnapprove(opts *bind.FilterOpts, device []common.Address) (*ProjectDeviceUnapproveIterator, error) { + + var deviceRule []interface{} + for _, deviceItem := range device { + deviceRule = append(deviceRule, deviceItem) + } + + logs, sub, err := _ProjectDevice.contract.FilterLogs(opts, "Unapprove", deviceRule) + if err != nil { + return nil, err + } + return &ProjectDeviceUnapproveIterator{contract: _ProjectDevice.contract, event: "Unapprove", logs: logs, sub: sub}, nil +} + +// WatchUnapprove is a free log subscription operation binding the contract event 0x958e4c39d74f2f6ff958f2ff19d4cf29448476d9e44e9aab9547f7e30d4cc86b. +// +// Solidity: event Unapprove(uint256 projectId, address indexed device) +func (_ProjectDevice *ProjectDeviceFilterer) WatchUnapprove(opts *bind.WatchOpts, sink chan<- *ProjectDeviceUnapprove, device []common.Address) (event.Subscription, error) { + + var deviceRule []interface{} + for _, deviceItem := range device { + deviceRule = append(deviceRule, deviceItem) + } + + logs, sub, err := _ProjectDevice.contract.WatchLogs(opts, "Unapprove", deviceRule) + 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(ProjectDeviceUnapprove) + if err := _ProjectDevice.contract.UnpackLog(event, "Unapprove", 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 +} + +// ParseUnapprove is a log parse operation binding the contract event 0x958e4c39d74f2f6ff958f2ff19d4cf29448476d9e44e9aab9547f7e30d4cc86b. +// +// Solidity: event Unapprove(uint256 projectId, address indexed device) +func (_ProjectDevice *ProjectDeviceFilterer) ParseUnapprove(log types.Log) (*ProjectDeviceUnapprove, error) { + event := new(ProjectDeviceUnapprove) + if err := _ProjectDevice.contract.UnpackLog(event, "Unapprove", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} diff --git a/ioctl/cmd/ws/contracts/projectregistrar.go b/ioctl/cmd/ws/contracts/projectregistrar.go new file mode 100644 index 0000000000..6fec7ae650 --- /dev/null +++ b/ioctl/cmd/ws/contracts/projectregistrar.go @@ -0,0 +1,1110 @@ +// 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 +) + +// ProjectRegistrarMetaData contains all meta data concerning the ProjectRegistrar contract. +var ProjectRegistrarMetaData = &bind.MetaData{ + ABI: "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"FeeWithdrawn\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"projectId\",\"type\":\"uint256\"}],\"name\":\"ProjectRegistered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"}],\"name\":\"RegistrationFeeSet\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_projectStore\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"projectStore\",\"outputs\":[{\"internalType\":\"contractIProjectStore\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_projectId\",\"type\":\"uint256\"}],\"name\":\"register\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"registrationFee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_fee\",\"type\":\"uint256\"}],\"name\":\"setRegistrationFee\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"addresspayable\",\"name\":\"_account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"withdrawFee\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", +} + +// ProjectRegistrarABI is the input ABI used to generate the binding from. +// Deprecated: Use ProjectRegistrarMetaData.ABI instead. +var ProjectRegistrarABI = ProjectRegistrarMetaData.ABI + +// ProjectRegistrar is an auto generated Go binding around an Ethereum contract. +type ProjectRegistrar struct { + ProjectRegistrarCaller // Read-only binding to the contract + ProjectRegistrarTransactor // Write-only binding to the contract + ProjectRegistrarFilterer // Log filterer for contract events +} + +// ProjectRegistrarCaller is an auto generated read-only Go binding around an Ethereum contract. +type ProjectRegistrarCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// ProjectRegistrarTransactor is an auto generated write-only Go binding around an Ethereum contract. +type ProjectRegistrarTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// ProjectRegistrarFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type ProjectRegistrarFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// ProjectRegistrarSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type ProjectRegistrarSession struct { + Contract *ProjectRegistrar // 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 +} + +// ProjectRegistrarCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type ProjectRegistrarCallerSession struct { + Contract *ProjectRegistrarCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// ProjectRegistrarTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type ProjectRegistrarTransactorSession struct { + Contract *ProjectRegistrarTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// ProjectRegistrarRaw is an auto generated low-level Go binding around an Ethereum contract. +type ProjectRegistrarRaw struct { + Contract *ProjectRegistrar // Generic contract binding to access the raw methods on +} + +// ProjectRegistrarCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type ProjectRegistrarCallerRaw struct { + Contract *ProjectRegistrarCaller // Generic read-only contract binding to access the raw methods on +} + +// ProjectRegistrarTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type ProjectRegistrarTransactorRaw struct { + Contract *ProjectRegistrarTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewProjectRegistrar creates a new instance of ProjectRegistrar, bound to a specific deployed contract. +func NewProjectRegistrar(address common.Address, backend bind.ContractBackend) (*ProjectRegistrar, error) { + contract, err := bindProjectRegistrar(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &ProjectRegistrar{ProjectRegistrarCaller: ProjectRegistrarCaller{contract: contract}, ProjectRegistrarTransactor: ProjectRegistrarTransactor{contract: contract}, ProjectRegistrarFilterer: ProjectRegistrarFilterer{contract: contract}}, nil +} + +// NewProjectRegistrarCaller creates a new read-only instance of ProjectRegistrar, bound to a specific deployed contract. +func NewProjectRegistrarCaller(address common.Address, caller bind.ContractCaller) (*ProjectRegistrarCaller, error) { + contract, err := bindProjectRegistrar(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &ProjectRegistrarCaller{contract: contract}, nil +} + +// NewProjectRegistrarTransactor creates a new write-only instance of ProjectRegistrar, bound to a specific deployed contract. +func NewProjectRegistrarTransactor(address common.Address, transactor bind.ContractTransactor) (*ProjectRegistrarTransactor, error) { + contract, err := bindProjectRegistrar(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &ProjectRegistrarTransactor{contract: contract}, nil +} + +// NewProjectRegistrarFilterer creates a new log filterer instance of ProjectRegistrar, bound to a specific deployed contract. +func NewProjectRegistrarFilterer(address common.Address, filterer bind.ContractFilterer) (*ProjectRegistrarFilterer, error) { + contract, err := bindProjectRegistrar(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &ProjectRegistrarFilterer{contract: contract}, nil +} + +// bindProjectRegistrar binds a generic wrapper to an already deployed contract. +func bindProjectRegistrar(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := ProjectRegistrarMetaData.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 (_ProjectRegistrar *ProjectRegistrarRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _ProjectRegistrar.Contract.ProjectRegistrarCaller.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 (_ProjectRegistrar *ProjectRegistrarRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _ProjectRegistrar.Contract.ProjectRegistrarTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_ProjectRegistrar *ProjectRegistrarRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _ProjectRegistrar.Contract.ProjectRegistrarTransactor.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 (_ProjectRegistrar *ProjectRegistrarCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _ProjectRegistrar.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 (_ProjectRegistrar *ProjectRegistrarTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _ProjectRegistrar.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_ProjectRegistrar *ProjectRegistrarTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _ProjectRegistrar.Contract.contract.Transact(opts, method, params...) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_ProjectRegistrar *ProjectRegistrarCaller) Owner(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _ProjectRegistrar.contract.Call(opts, &out, "owner") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_ProjectRegistrar *ProjectRegistrarSession) Owner() (common.Address, error) { + return _ProjectRegistrar.Contract.Owner(&_ProjectRegistrar.CallOpts) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_ProjectRegistrar *ProjectRegistrarCallerSession) Owner() (common.Address, error) { + return _ProjectRegistrar.Contract.Owner(&_ProjectRegistrar.CallOpts) +} + +// ProjectStore is a free data retrieval call binding the contract method 0xa0fadaaa. +// +// Solidity: function projectStore() view returns(address) +func (_ProjectRegistrar *ProjectRegistrarCaller) ProjectStore(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _ProjectRegistrar.contract.Call(opts, &out, "projectStore") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// ProjectStore is a free data retrieval call binding the contract method 0xa0fadaaa. +// +// Solidity: function projectStore() view returns(address) +func (_ProjectRegistrar *ProjectRegistrarSession) ProjectStore() (common.Address, error) { + return _ProjectRegistrar.Contract.ProjectStore(&_ProjectRegistrar.CallOpts) +} + +// ProjectStore is a free data retrieval call binding the contract method 0xa0fadaaa. +// +// Solidity: function projectStore() view returns(address) +func (_ProjectRegistrar *ProjectRegistrarCallerSession) ProjectStore() (common.Address, error) { + return _ProjectRegistrar.Contract.ProjectStore(&_ProjectRegistrar.CallOpts) +} + +// RegistrationFee is a free data retrieval call binding the contract method 0x14c44e09. +// +// Solidity: function registrationFee() view returns(uint256) +func (_ProjectRegistrar *ProjectRegistrarCaller) RegistrationFee(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _ProjectRegistrar.contract.Call(opts, &out, "registrationFee") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// RegistrationFee is a free data retrieval call binding the contract method 0x14c44e09. +// +// Solidity: function registrationFee() view returns(uint256) +func (_ProjectRegistrar *ProjectRegistrarSession) RegistrationFee() (*big.Int, error) { + return _ProjectRegistrar.Contract.RegistrationFee(&_ProjectRegistrar.CallOpts) +} + +// RegistrationFee is a free data retrieval call binding the contract method 0x14c44e09. +// +// Solidity: function registrationFee() view returns(uint256) +func (_ProjectRegistrar *ProjectRegistrarCallerSession) RegistrationFee() (*big.Int, error) { + return _ProjectRegistrar.Contract.RegistrationFee(&_ProjectRegistrar.CallOpts) +} + +// Initialize is a paid mutator transaction binding the contract method 0xc4d66de8. +// +// Solidity: function initialize(address _projectStore) returns() +func (_ProjectRegistrar *ProjectRegistrarTransactor) Initialize(opts *bind.TransactOpts, _projectStore common.Address) (*types.Transaction, error) { + return _ProjectRegistrar.contract.Transact(opts, "initialize", _projectStore) +} + +// Initialize is a paid mutator transaction binding the contract method 0xc4d66de8. +// +// Solidity: function initialize(address _projectStore) returns() +func (_ProjectRegistrar *ProjectRegistrarSession) Initialize(_projectStore common.Address) (*types.Transaction, error) { + return _ProjectRegistrar.Contract.Initialize(&_ProjectRegistrar.TransactOpts, _projectStore) +} + +// Initialize is a paid mutator transaction binding the contract method 0xc4d66de8. +// +// Solidity: function initialize(address _projectStore) returns() +func (_ProjectRegistrar *ProjectRegistrarTransactorSession) Initialize(_projectStore common.Address) (*types.Transaction, error) { + return _ProjectRegistrar.Contract.Initialize(&_ProjectRegistrar.TransactOpts, _projectStore) +} + +// Register is a paid mutator transaction binding the contract method 0xf207564e. +// +// Solidity: function register(uint256 _projectId) payable returns() +func (_ProjectRegistrar *ProjectRegistrarTransactor) Register(opts *bind.TransactOpts, _projectId *big.Int) (*types.Transaction, error) { + return _ProjectRegistrar.contract.Transact(opts, "register", _projectId) +} + +// Register is a paid mutator transaction binding the contract method 0xf207564e. +// +// Solidity: function register(uint256 _projectId) payable returns() +func (_ProjectRegistrar *ProjectRegistrarSession) Register(_projectId *big.Int) (*types.Transaction, error) { + return _ProjectRegistrar.Contract.Register(&_ProjectRegistrar.TransactOpts, _projectId) +} + +// Register is a paid mutator transaction binding the contract method 0xf207564e. +// +// Solidity: function register(uint256 _projectId) payable returns() +func (_ProjectRegistrar *ProjectRegistrarTransactorSession) Register(_projectId *big.Int) (*types.Transaction, error) { + return _ProjectRegistrar.Contract.Register(&_ProjectRegistrar.TransactOpts, _projectId) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_ProjectRegistrar *ProjectRegistrarTransactor) RenounceOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { + return _ProjectRegistrar.contract.Transact(opts, "renounceOwnership") +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_ProjectRegistrar *ProjectRegistrarSession) RenounceOwnership() (*types.Transaction, error) { + return _ProjectRegistrar.Contract.RenounceOwnership(&_ProjectRegistrar.TransactOpts) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_ProjectRegistrar *ProjectRegistrarTransactorSession) RenounceOwnership() (*types.Transaction, error) { + return _ProjectRegistrar.Contract.RenounceOwnership(&_ProjectRegistrar.TransactOpts) +} + +// SetRegistrationFee is a paid mutator transaction binding the contract method 0xc320c727. +// +// Solidity: function setRegistrationFee(uint256 _fee) returns() +func (_ProjectRegistrar *ProjectRegistrarTransactor) SetRegistrationFee(opts *bind.TransactOpts, _fee *big.Int) (*types.Transaction, error) { + return _ProjectRegistrar.contract.Transact(opts, "setRegistrationFee", _fee) +} + +// SetRegistrationFee is a paid mutator transaction binding the contract method 0xc320c727. +// +// Solidity: function setRegistrationFee(uint256 _fee) returns() +func (_ProjectRegistrar *ProjectRegistrarSession) SetRegistrationFee(_fee *big.Int) (*types.Transaction, error) { + return _ProjectRegistrar.Contract.SetRegistrationFee(&_ProjectRegistrar.TransactOpts, _fee) +} + +// SetRegistrationFee is a paid mutator transaction binding the contract method 0xc320c727. +// +// Solidity: function setRegistrationFee(uint256 _fee) returns() +func (_ProjectRegistrar *ProjectRegistrarTransactorSession) SetRegistrationFee(_fee *big.Int) (*types.Transaction, error) { + return _ProjectRegistrar.Contract.SetRegistrationFee(&_ProjectRegistrar.TransactOpts, _fee) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_ProjectRegistrar *ProjectRegistrarTransactor) TransferOwnership(opts *bind.TransactOpts, newOwner common.Address) (*types.Transaction, error) { + return _ProjectRegistrar.contract.Transact(opts, "transferOwnership", newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_ProjectRegistrar *ProjectRegistrarSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _ProjectRegistrar.Contract.TransferOwnership(&_ProjectRegistrar.TransactOpts, newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_ProjectRegistrar *ProjectRegistrarTransactorSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _ProjectRegistrar.Contract.TransferOwnership(&_ProjectRegistrar.TransactOpts, newOwner) +} + +// WithdrawFee is a paid mutator transaction binding the contract method 0xfd9be522. +// +// Solidity: function withdrawFee(address _account, uint256 _amount) returns() +func (_ProjectRegistrar *ProjectRegistrarTransactor) WithdrawFee(opts *bind.TransactOpts, _account common.Address, _amount *big.Int) (*types.Transaction, error) { + return _ProjectRegistrar.contract.Transact(opts, "withdrawFee", _account, _amount) +} + +// WithdrawFee is a paid mutator transaction binding the contract method 0xfd9be522. +// +// Solidity: function withdrawFee(address _account, uint256 _amount) returns() +func (_ProjectRegistrar *ProjectRegistrarSession) WithdrawFee(_account common.Address, _amount *big.Int) (*types.Transaction, error) { + return _ProjectRegistrar.Contract.WithdrawFee(&_ProjectRegistrar.TransactOpts, _account, _amount) +} + +// WithdrawFee is a paid mutator transaction binding the contract method 0xfd9be522. +// +// Solidity: function withdrawFee(address _account, uint256 _amount) returns() +func (_ProjectRegistrar *ProjectRegistrarTransactorSession) WithdrawFee(_account common.Address, _amount *big.Int) (*types.Transaction, error) { + return _ProjectRegistrar.Contract.WithdrawFee(&_ProjectRegistrar.TransactOpts, _account, _amount) +} + +// ProjectRegistrarFeeWithdrawnIterator is returned from FilterFeeWithdrawn and is used to iterate over the raw logs and unpacked data for FeeWithdrawn events raised by the ProjectRegistrar contract. +type ProjectRegistrarFeeWithdrawnIterator struct { + Event *ProjectRegistrarFeeWithdrawn // 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 *ProjectRegistrarFeeWithdrawnIterator) 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(ProjectRegistrarFeeWithdrawn) + 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(ProjectRegistrarFeeWithdrawn) + 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 *ProjectRegistrarFeeWithdrawnIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ProjectRegistrarFeeWithdrawnIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ProjectRegistrarFeeWithdrawn represents a FeeWithdrawn event raised by the ProjectRegistrar contract. +type ProjectRegistrarFeeWithdrawn struct { + Account common.Address + Amount *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterFeeWithdrawn is a free log retrieval operation binding the contract event 0x78473f3f373f7673597f4f0fa5873cb4d375fea6d4339ad6b56dbd411513cb3f. +// +// Solidity: event FeeWithdrawn(address indexed account, uint256 amount) +func (_ProjectRegistrar *ProjectRegistrarFilterer) FilterFeeWithdrawn(opts *bind.FilterOpts, account []common.Address) (*ProjectRegistrarFeeWithdrawnIterator, error) { + + var accountRule []interface{} + for _, accountItem := range account { + accountRule = append(accountRule, accountItem) + } + + logs, sub, err := _ProjectRegistrar.contract.FilterLogs(opts, "FeeWithdrawn", accountRule) + if err != nil { + return nil, err + } + return &ProjectRegistrarFeeWithdrawnIterator{contract: _ProjectRegistrar.contract, event: "FeeWithdrawn", logs: logs, sub: sub}, nil +} + +// WatchFeeWithdrawn is a free log subscription operation binding the contract event 0x78473f3f373f7673597f4f0fa5873cb4d375fea6d4339ad6b56dbd411513cb3f. +// +// Solidity: event FeeWithdrawn(address indexed account, uint256 amount) +func (_ProjectRegistrar *ProjectRegistrarFilterer) WatchFeeWithdrawn(opts *bind.WatchOpts, sink chan<- *ProjectRegistrarFeeWithdrawn, account []common.Address) (event.Subscription, error) { + + var accountRule []interface{} + for _, accountItem := range account { + accountRule = append(accountRule, accountItem) + } + + logs, sub, err := _ProjectRegistrar.contract.WatchLogs(opts, "FeeWithdrawn", accountRule) + 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(ProjectRegistrarFeeWithdrawn) + if err := _ProjectRegistrar.contract.UnpackLog(event, "FeeWithdrawn", 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 +} + +// ParseFeeWithdrawn is a log parse operation binding the contract event 0x78473f3f373f7673597f4f0fa5873cb4d375fea6d4339ad6b56dbd411513cb3f. +// +// Solidity: event FeeWithdrawn(address indexed account, uint256 amount) +func (_ProjectRegistrar *ProjectRegistrarFilterer) ParseFeeWithdrawn(log types.Log) (*ProjectRegistrarFeeWithdrawn, error) { + event := new(ProjectRegistrarFeeWithdrawn) + if err := _ProjectRegistrar.contract.UnpackLog(event, "FeeWithdrawn", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// ProjectRegistrarInitializedIterator is returned from FilterInitialized and is used to iterate over the raw logs and unpacked data for Initialized events raised by the ProjectRegistrar contract. +type ProjectRegistrarInitializedIterator struct { + Event *ProjectRegistrarInitialized // 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 *ProjectRegistrarInitializedIterator) 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(ProjectRegistrarInitialized) + 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(ProjectRegistrarInitialized) + 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 *ProjectRegistrarInitializedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ProjectRegistrarInitializedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ProjectRegistrarInitialized represents a Initialized event raised by the ProjectRegistrar contract. +type ProjectRegistrarInitialized struct { + Version uint8 + Raw types.Log // Blockchain specific contextual infos +} + +// FilterInitialized is a free log retrieval operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. +// +// Solidity: event Initialized(uint8 version) +func (_ProjectRegistrar *ProjectRegistrarFilterer) FilterInitialized(opts *bind.FilterOpts) (*ProjectRegistrarInitializedIterator, error) { + + logs, sub, err := _ProjectRegistrar.contract.FilterLogs(opts, "Initialized") + if err != nil { + return nil, err + } + return &ProjectRegistrarInitializedIterator{contract: _ProjectRegistrar.contract, event: "Initialized", logs: logs, sub: sub}, nil +} + +// WatchInitialized is a free log subscription operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. +// +// Solidity: event Initialized(uint8 version) +func (_ProjectRegistrar *ProjectRegistrarFilterer) WatchInitialized(opts *bind.WatchOpts, sink chan<- *ProjectRegistrarInitialized) (event.Subscription, error) { + + logs, sub, err := _ProjectRegistrar.contract.WatchLogs(opts, "Initialized") + 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(ProjectRegistrarInitialized) + if err := _ProjectRegistrar.contract.UnpackLog(event, "Initialized", 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 +} + +// ParseInitialized is a log parse operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. +// +// Solidity: event Initialized(uint8 version) +func (_ProjectRegistrar *ProjectRegistrarFilterer) ParseInitialized(log types.Log) (*ProjectRegistrarInitialized, error) { + event := new(ProjectRegistrarInitialized) + if err := _ProjectRegistrar.contract.UnpackLog(event, "Initialized", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// ProjectRegistrarOwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the ProjectRegistrar contract. +type ProjectRegistrarOwnershipTransferredIterator struct { + Event *ProjectRegistrarOwnershipTransferred // 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 *ProjectRegistrarOwnershipTransferredIterator) 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(ProjectRegistrarOwnershipTransferred) + 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(ProjectRegistrarOwnershipTransferred) + 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 *ProjectRegistrarOwnershipTransferredIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ProjectRegistrarOwnershipTransferredIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ProjectRegistrarOwnershipTransferred represents a OwnershipTransferred event raised by the ProjectRegistrar contract. +type ProjectRegistrarOwnershipTransferred struct { + PreviousOwner common.Address + NewOwner common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterOwnershipTransferred is a free log retrieval operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_ProjectRegistrar *ProjectRegistrarFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*ProjectRegistrarOwnershipTransferredIterator, error) { + + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + } + var newOwnerRule []interface{} + for _, newOwnerItem := range newOwner { + newOwnerRule = append(newOwnerRule, newOwnerItem) + } + + logs, sub, err := _ProjectRegistrar.contract.FilterLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return &ProjectRegistrarOwnershipTransferredIterator{contract: _ProjectRegistrar.contract, event: "OwnershipTransferred", logs: logs, sub: sub}, nil +} + +// WatchOwnershipTransferred is a free log subscription operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_ProjectRegistrar *ProjectRegistrarFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *ProjectRegistrarOwnershipTransferred, previousOwner []common.Address, newOwner []common.Address) (event.Subscription, error) { + + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + } + var newOwnerRule []interface{} + for _, newOwnerItem := range newOwner { + newOwnerRule = append(newOwnerRule, newOwnerItem) + } + + logs, sub, err := _ProjectRegistrar.contract.WatchLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(ProjectRegistrarOwnershipTransferred) + if err := _ProjectRegistrar.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseOwnershipTransferred is a log parse operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_ProjectRegistrar *ProjectRegistrarFilterer) ParseOwnershipTransferred(log types.Log) (*ProjectRegistrarOwnershipTransferred, error) { + event := new(ProjectRegistrarOwnershipTransferred) + if err := _ProjectRegistrar.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// ProjectRegistrarProjectRegisteredIterator is returned from FilterProjectRegistered and is used to iterate over the raw logs and unpacked data for ProjectRegistered events raised by the ProjectRegistrar contract. +type ProjectRegistrarProjectRegisteredIterator struct { + Event *ProjectRegistrarProjectRegistered // 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 *ProjectRegistrarProjectRegisteredIterator) 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(ProjectRegistrarProjectRegistered) + 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(ProjectRegistrarProjectRegistered) + 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 *ProjectRegistrarProjectRegisteredIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ProjectRegistrarProjectRegisteredIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ProjectRegistrarProjectRegistered represents a ProjectRegistered event raised by the ProjectRegistrar contract. +type ProjectRegistrarProjectRegistered struct { + ProjectId *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterProjectRegistered is a free log retrieval operation binding the contract event 0xfee73c70d73668319c51a83ac3b19cbe37da12af171bec2e93cadea345ff13bd. +// +// Solidity: event ProjectRegistered(uint256 indexed projectId) +func (_ProjectRegistrar *ProjectRegistrarFilterer) FilterProjectRegistered(opts *bind.FilterOpts, projectId []*big.Int) (*ProjectRegistrarProjectRegisteredIterator, error) { + + var projectIdRule []interface{} + for _, projectIdItem := range projectId { + projectIdRule = append(projectIdRule, projectIdItem) + } + + logs, sub, err := _ProjectRegistrar.contract.FilterLogs(opts, "ProjectRegistered", projectIdRule) + if err != nil { + return nil, err + } + return &ProjectRegistrarProjectRegisteredIterator{contract: _ProjectRegistrar.contract, event: "ProjectRegistered", logs: logs, sub: sub}, nil +} + +// WatchProjectRegistered is a free log subscription operation binding the contract event 0xfee73c70d73668319c51a83ac3b19cbe37da12af171bec2e93cadea345ff13bd. +// +// Solidity: event ProjectRegistered(uint256 indexed projectId) +func (_ProjectRegistrar *ProjectRegistrarFilterer) WatchProjectRegistered(opts *bind.WatchOpts, sink chan<- *ProjectRegistrarProjectRegistered, projectId []*big.Int) (event.Subscription, error) { + + var projectIdRule []interface{} + for _, projectIdItem := range projectId { + projectIdRule = append(projectIdRule, projectIdItem) + } + + logs, sub, err := _ProjectRegistrar.contract.WatchLogs(opts, "ProjectRegistered", projectIdRule) + 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(ProjectRegistrarProjectRegistered) + if err := _ProjectRegistrar.contract.UnpackLog(event, "ProjectRegistered", 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 +} + +// ParseProjectRegistered is a log parse operation binding the contract event 0xfee73c70d73668319c51a83ac3b19cbe37da12af171bec2e93cadea345ff13bd. +// +// Solidity: event ProjectRegistered(uint256 indexed projectId) +func (_ProjectRegistrar *ProjectRegistrarFilterer) ParseProjectRegistered(log types.Log) (*ProjectRegistrarProjectRegistered, error) { + event := new(ProjectRegistrarProjectRegistered) + if err := _ProjectRegistrar.contract.UnpackLog(event, "ProjectRegistered", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// ProjectRegistrarRegistrationFeeSetIterator is returned from FilterRegistrationFeeSet and is used to iterate over the raw logs and unpacked data for RegistrationFeeSet events raised by the ProjectRegistrar contract. +type ProjectRegistrarRegistrationFeeSetIterator struct { + Event *ProjectRegistrarRegistrationFeeSet // 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 *ProjectRegistrarRegistrationFeeSetIterator) 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(ProjectRegistrarRegistrationFeeSet) + 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(ProjectRegistrarRegistrationFeeSet) + 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 *ProjectRegistrarRegistrationFeeSetIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ProjectRegistrarRegistrationFeeSetIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ProjectRegistrarRegistrationFeeSet represents a RegistrationFeeSet event raised by the ProjectRegistrar contract. +type ProjectRegistrarRegistrationFeeSet struct { + Fee *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterRegistrationFeeSet is a free log retrieval operation binding the contract event 0x3836764761eb705a9815e9070541f9a604757da847d45d157a28f14b58b5f5e6. +// +// Solidity: event RegistrationFeeSet(uint256 fee) +func (_ProjectRegistrar *ProjectRegistrarFilterer) FilterRegistrationFeeSet(opts *bind.FilterOpts) (*ProjectRegistrarRegistrationFeeSetIterator, error) { + + logs, sub, err := _ProjectRegistrar.contract.FilterLogs(opts, "RegistrationFeeSet") + if err != nil { + return nil, err + } + return &ProjectRegistrarRegistrationFeeSetIterator{contract: _ProjectRegistrar.contract, event: "RegistrationFeeSet", logs: logs, sub: sub}, nil +} + +// WatchRegistrationFeeSet is a free log subscription operation binding the contract event 0x3836764761eb705a9815e9070541f9a604757da847d45d157a28f14b58b5f5e6. +// +// Solidity: event RegistrationFeeSet(uint256 fee) +func (_ProjectRegistrar *ProjectRegistrarFilterer) WatchRegistrationFeeSet(opts *bind.WatchOpts, sink chan<- *ProjectRegistrarRegistrationFeeSet) (event.Subscription, error) { + + logs, sub, err := _ProjectRegistrar.contract.WatchLogs(opts, "RegistrationFeeSet") + 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(ProjectRegistrarRegistrationFeeSet) + if err := _ProjectRegistrar.contract.UnpackLog(event, "RegistrationFeeSet", 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 +} + +// ParseRegistrationFeeSet is a log parse operation binding the contract event 0x3836764761eb705a9815e9070541f9a604757da847d45d157a28f14b58b5f5e6. +// +// Solidity: event RegistrationFeeSet(uint256 fee) +func (_ProjectRegistrar *ProjectRegistrarFilterer) ParseRegistrationFeeSet(log types.Log) (*ProjectRegistrarRegistrationFeeSet, error) { + event := new(ProjectRegistrarRegistrationFeeSet) + if err := _ProjectRegistrar.contract.UnpackLog(event, "RegistrationFeeSet", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} diff --git a/ioctl/cmd/ws/contracts/w3bstreamproject.go b/ioctl/cmd/ws/contracts/w3bstreamproject.go new file mode 100644 index 0000000000..f9beaad93a --- /dev/null +++ b/ioctl/cmd/ws/contracts/w3bstreamproject.go @@ -0,0 +1,1880 @@ +// 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 +) + +// W3bstreamProjectProjectConfig is an auto generated low-level Go binding around an user-defined struct. +type W3bstreamProjectProjectConfig struct { + Uri string + Hash [32]byte +} + +// W3bstreamProjectMetaData contains all meta data concerning the W3bstreamProject contract. +var W3bstreamProjectMetaData = &bind.MetaData{ + ABI: "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"projectId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"key\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"value\",\"type\":\"bytes\"}],\"name\":\"AttributeSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"binder\",\"type\":\"address\"}],\"name\":\"BinderSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"projectId\",\"type\":\"uint256\"}],\"name\":\"ProjectBinded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"projectId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"uri\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"hash\",\"type\":\"bytes32\"}],\"name\":\"ProjectConfigUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"projectId\",\"type\":\"uint256\"}],\"name\":\"ProjectPaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"projectId\",\"type\":\"uint256\"}],\"name\":\"ProjectResumed\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_projectId\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_name\",\"type\":\"bytes32\"}],\"name\":\"attribute\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"attributes\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_projectId\",\"type\":\"uint256\"},{\"internalType\":\"bytes32[]\",\"name\":\"_keys\",\"type\":\"bytes32[]\"}],\"name\":\"attributesOf\",\"outputs\":[{\"internalType\":\"bytes[]\",\"name\":\"values_\",\"type\":\"bytes[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_projectId\",\"type\":\"uint256\"}],\"name\":\"bind\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"binder\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_projectId\",\"type\":\"uint256\"}],\"name\":\"config\",\"outputs\":[{\"components\":[{\"internalType\":\"string\",\"name\":\"uri\",\"type\":\"string\"},{\"internalType\":\"bytes32\",\"name\":\"hash\",\"type\":\"bytes32\"}],\"internalType\":\"structW3bstreamProject.ProjectConfig\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"count\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_project\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_projectId\",\"type\":\"uint256\"}],\"name\":\"isPaused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_projectId\",\"type\":\"uint256\"}],\"name\":\"isValidProject\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_projectId\",\"type\":\"uint256\"}],\"name\":\"ownerOf\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_projectId\",\"type\":\"uint256\"}],\"name\":\"pause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"project\",\"outputs\":[{\"internalType\":\"contractIERC721\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_projectId\",\"type\":\"uint256\"}],\"name\":\"resume\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_projectId\",\"type\":\"uint256\"},{\"internalType\":\"bytes32[]\",\"name\":\"_keys\",\"type\":\"bytes32[]\"},{\"internalType\":\"bytes[]\",\"name\":\"_values\",\"type\":\"bytes[]\"}],\"name\":\"setAttributes\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_binder\",\"type\":\"address\"}],\"name\":\"setBinder\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_projectId\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"_uri\",\"type\":\"string\"},{\"internalType\":\"bytes32\",\"name\":\"_hash\",\"type\":\"bytes32\"}],\"name\":\"updateConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", +} + +// W3bstreamProjectABI is the input ABI used to generate the binding from. +// Deprecated: Use W3bstreamProjectMetaData.ABI instead. +var W3bstreamProjectABI = W3bstreamProjectMetaData.ABI + +// W3bstreamProject is an auto generated Go binding around an Ethereum contract. +type W3bstreamProject struct { + W3bstreamProjectCaller // Read-only binding to the contract + W3bstreamProjectTransactor // Write-only binding to the contract + W3bstreamProjectFilterer // Log filterer for contract events +} + +// W3bstreamProjectCaller is an auto generated read-only Go binding around an Ethereum contract. +type W3bstreamProjectCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// W3bstreamProjectTransactor is an auto generated write-only Go binding around an Ethereum contract. +type W3bstreamProjectTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// W3bstreamProjectFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type W3bstreamProjectFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// W3bstreamProjectSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type W3bstreamProjectSession struct { + Contract *W3bstreamProject // 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 +} + +// W3bstreamProjectCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type W3bstreamProjectCallerSession struct { + Contract *W3bstreamProjectCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// W3bstreamProjectTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type W3bstreamProjectTransactorSession struct { + Contract *W3bstreamProjectTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// W3bstreamProjectRaw is an auto generated low-level Go binding around an Ethereum contract. +type W3bstreamProjectRaw struct { + Contract *W3bstreamProject // Generic contract binding to access the raw methods on +} + +// W3bstreamProjectCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type W3bstreamProjectCallerRaw struct { + Contract *W3bstreamProjectCaller // Generic read-only contract binding to access the raw methods on +} + +// W3bstreamProjectTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type W3bstreamProjectTransactorRaw struct { + Contract *W3bstreamProjectTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewW3bstreamProject creates a new instance of W3bstreamProject, bound to a specific deployed contract. +func NewW3bstreamProject(address common.Address, backend bind.ContractBackend) (*W3bstreamProject, error) { + contract, err := bindW3bstreamProject(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &W3bstreamProject{W3bstreamProjectCaller: W3bstreamProjectCaller{contract: contract}, W3bstreamProjectTransactor: W3bstreamProjectTransactor{contract: contract}, W3bstreamProjectFilterer: W3bstreamProjectFilterer{contract: contract}}, nil +} + +// NewW3bstreamProjectCaller creates a new read-only instance of W3bstreamProject, bound to a specific deployed contract. +func NewW3bstreamProjectCaller(address common.Address, caller bind.ContractCaller) (*W3bstreamProjectCaller, error) { + contract, err := bindW3bstreamProject(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &W3bstreamProjectCaller{contract: contract}, nil +} + +// NewW3bstreamProjectTransactor creates a new write-only instance of W3bstreamProject, bound to a specific deployed contract. +func NewW3bstreamProjectTransactor(address common.Address, transactor bind.ContractTransactor) (*W3bstreamProjectTransactor, error) { + contract, err := bindW3bstreamProject(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &W3bstreamProjectTransactor{contract: contract}, nil +} + +// NewW3bstreamProjectFilterer creates a new log filterer instance of W3bstreamProject, bound to a specific deployed contract. +func NewW3bstreamProjectFilterer(address common.Address, filterer bind.ContractFilterer) (*W3bstreamProjectFilterer, error) { + contract, err := bindW3bstreamProject(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &W3bstreamProjectFilterer{contract: contract}, nil +} + +// bindW3bstreamProject binds a generic wrapper to an already deployed contract. +func bindW3bstreamProject(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := W3bstreamProjectMetaData.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 (_W3bstreamProject *W3bstreamProjectRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _W3bstreamProject.Contract.W3bstreamProjectCaller.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 (_W3bstreamProject *W3bstreamProjectRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _W3bstreamProject.Contract.W3bstreamProjectTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_W3bstreamProject *W3bstreamProjectRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _W3bstreamProject.Contract.W3bstreamProjectTransactor.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 (_W3bstreamProject *W3bstreamProjectCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _W3bstreamProject.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 (_W3bstreamProject *W3bstreamProjectTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _W3bstreamProject.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_W3bstreamProject *W3bstreamProjectTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _W3bstreamProject.Contract.contract.Transact(opts, method, params...) +} + +// Attribute is a free data retrieval call binding the contract method 0x40341e4b. +// +// Solidity: function attribute(uint256 _projectId, bytes32 _name) view returns(bytes) +func (_W3bstreamProject *W3bstreamProjectCaller) Attribute(opts *bind.CallOpts, _projectId *big.Int, _name [32]byte) ([]byte, error) { + var out []interface{} + err := _W3bstreamProject.contract.Call(opts, &out, "attribute", _projectId, _name) + + if err != nil { + return *new([]byte), err + } + + out0 := *abi.ConvertType(out[0], new([]byte)).(*[]byte) + + return out0, err + +} + +// Attribute is a free data retrieval call binding the contract method 0x40341e4b. +// +// Solidity: function attribute(uint256 _projectId, bytes32 _name) view returns(bytes) +func (_W3bstreamProject *W3bstreamProjectSession) Attribute(_projectId *big.Int, _name [32]byte) ([]byte, error) { + return _W3bstreamProject.Contract.Attribute(&_W3bstreamProject.CallOpts, _projectId, _name) +} + +// Attribute is a free data retrieval call binding the contract method 0x40341e4b. +// +// Solidity: function attribute(uint256 _projectId, bytes32 _name) view returns(bytes) +func (_W3bstreamProject *W3bstreamProjectCallerSession) Attribute(_projectId *big.Int, _name [32]byte) ([]byte, error) { + return _W3bstreamProject.Contract.Attribute(&_W3bstreamProject.CallOpts, _projectId, _name) +} + +// Attributes is a free data retrieval call binding the contract method 0x73c773db. +// +// Solidity: function attributes(uint256 , bytes32 ) view returns(bytes) +func (_W3bstreamProject *W3bstreamProjectCaller) Attributes(opts *bind.CallOpts, arg0 *big.Int, arg1 [32]byte) ([]byte, error) { + var out []interface{} + err := _W3bstreamProject.contract.Call(opts, &out, "attributes", arg0, arg1) + + if err != nil { + return *new([]byte), err + } + + out0 := *abi.ConvertType(out[0], new([]byte)).(*[]byte) + + return out0, err + +} + +// Attributes is a free data retrieval call binding the contract method 0x73c773db. +// +// Solidity: function attributes(uint256 , bytes32 ) view returns(bytes) +func (_W3bstreamProject *W3bstreamProjectSession) Attributes(arg0 *big.Int, arg1 [32]byte) ([]byte, error) { + return _W3bstreamProject.Contract.Attributes(&_W3bstreamProject.CallOpts, arg0, arg1) +} + +// Attributes is a free data retrieval call binding the contract method 0x73c773db. +// +// Solidity: function attributes(uint256 , bytes32 ) view returns(bytes) +func (_W3bstreamProject *W3bstreamProjectCallerSession) Attributes(arg0 *big.Int, arg1 [32]byte) ([]byte, error) { + return _W3bstreamProject.Contract.Attributes(&_W3bstreamProject.CallOpts, arg0, arg1) +} + +// AttributesOf is a free data retrieval call binding the contract method 0xe76d621c. +// +// Solidity: function attributesOf(uint256 _projectId, bytes32[] _keys) view returns(bytes[] values_) +func (_W3bstreamProject *W3bstreamProjectCaller) AttributesOf(opts *bind.CallOpts, _projectId *big.Int, _keys [][32]byte) ([][]byte, error) { + var out []interface{} + err := _W3bstreamProject.contract.Call(opts, &out, "attributesOf", _projectId, _keys) + + if err != nil { + return *new([][]byte), err + } + + out0 := *abi.ConvertType(out[0], new([][]byte)).(*[][]byte) + + return out0, err + +} + +// AttributesOf is a free data retrieval call binding the contract method 0xe76d621c. +// +// Solidity: function attributesOf(uint256 _projectId, bytes32[] _keys) view returns(bytes[] values_) +func (_W3bstreamProject *W3bstreamProjectSession) AttributesOf(_projectId *big.Int, _keys [][32]byte) ([][]byte, error) { + return _W3bstreamProject.Contract.AttributesOf(&_W3bstreamProject.CallOpts, _projectId, _keys) +} + +// AttributesOf is a free data retrieval call binding the contract method 0xe76d621c. +// +// Solidity: function attributesOf(uint256 _projectId, bytes32[] _keys) view returns(bytes[] values_) +func (_W3bstreamProject *W3bstreamProjectCallerSession) AttributesOf(_projectId *big.Int, _keys [][32]byte) ([][]byte, error) { + return _W3bstreamProject.Contract.AttributesOf(&_W3bstreamProject.CallOpts, _projectId, _keys) +} + +// Binder is a free data retrieval call binding the contract method 0xacba7b42. +// +// Solidity: function binder() view returns(address) +func (_W3bstreamProject *W3bstreamProjectCaller) Binder(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _W3bstreamProject.contract.Call(opts, &out, "binder") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// Binder is a free data retrieval call binding the contract method 0xacba7b42. +// +// Solidity: function binder() view returns(address) +func (_W3bstreamProject *W3bstreamProjectSession) Binder() (common.Address, error) { + return _W3bstreamProject.Contract.Binder(&_W3bstreamProject.CallOpts) +} + +// Binder is a free data retrieval call binding the contract method 0xacba7b42. +// +// Solidity: function binder() view returns(address) +func (_W3bstreamProject *W3bstreamProjectCallerSession) Binder() (common.Address, error) { + return _W3bstreamProject.Contract.Binder(&_W3bstreamProject.CallOpts) +} + +// Config is a free data retrieval call binding the contract method 0x84691767. +// +// Solidity: function config(uint256 _projectId) view returns((string,bytes32)) +func (_W3bstreamProject *W3bstreamProjectCaller) Config(opts *bind.CallOpts, _projectId *big.Int) (W3bstreamProjectProjectConfig, error) { + var out []interface{} + err := _W3bstreamProject.contract.Call(opts, &out, "config", _projectId) + + if err != nil { + return *new(W3bstreamProjectProjectConfig), err + } + + out0 := *abi.ConvertType(out[0], new(W3bstreamProjectProjectConfig)).(*W3bstreamProjectProjectConfig) + + return out0, err + +} + +// Config is a free data retrieval call binding the contract method 0x84691767. +// +// Solidity: function config(uint256 _projectId) view returns((string,bytes32)) +func (_W3bstreamProject *W3bstreamProjectSession) Config(_projectId *big.Int) (W3bstreamProjectProjectConfig, error) { + return _W3bstreamProject.Contract.Config(&_W3bstreamProject.CallOpts, _projectId) +} + +// Config is a free data retrieval call binding the contract method 0x84691767. +// +// Solidity: function config(uint256 _projectId) view returns((string,bytes32)) +func (_W3bstreamProject *W3bstreamProjectCallerSession) Config(_projectId *big.Int) (W3bstreamProjectProjectConfig, error) { + return _W3bstreamProject.Contract.Config(&_W3bstreamProject.CallOpts, _projectId) +} + +// Count is a free data retrieval call binding the contract method 0x06661abd. +// +// Solidity: function count() view returns(uint256) +func (_W3bstreamProject *W3bstreamProjectCaller) Count(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _W3bstreamProject.contract.Call(opts, &out, "count") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// Count is a free data retrieval call binding the contract method 0x06661abd. +// +// Solidity: function count() view returns(uint256) +func (_W3bstreamProject *W3bstreamProjectSession) Count() (*big.Int, error) { + return _W3bstreamProject.Contract.Count(&_W3bstreamProject.CallOpts) +} + +// Count is a free data retrieval call binding the contract method 0x06661abd. +// +// Solidity: function count() view returns(uint256) +func (_W3bstreamProject *W3bstreamProjectCallerSession) Count() (*big.Int, error) { + return _W3bstreamProject.Contract.Count(&_W3bstreamProject.CallOpts) +} + +// IsPaused is a free data retrieval call binding the contract method 0xbdf2a43c. +// +// Solidity: function isPaused(uint256 _projectId) view returns(bool) +func (_W3bstreamProject *W3bstreamProjectCaller) IsPaused(opts *bind.CallOpts, _projectId *big.Int) (bool, error) { + var out []interface{} + err := _W3bstreamProject.contract.Call(opts, &out, "isPaused", _projectId) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// IsPaused is a free data retrieval call binding the contract method 0xbdf2a43c. +// +// Solidity: function isPaused(uint256 _projectId) view returns(bool) +func (_W3bstreamProject *W3bstreamProjectSession) IsPaused(_projectId *big.Int) (bool, error) { + return _W3bstreamProject.Contract.IsPaused(&_W3bstreamProject.CallOpts, _projectId) +} + +// IsPaused is a free data retrieval call binding the contract method 0xbdf2a43c. +// +// Solidity: function isPaused(uint256 _projectId) view returns(bool) +func (_W3bstreamProject *W3bstreamProjectCallerSession) IsPaused(_projectId *big.Int) (bool, error) { + return _W3bstreamProject.Contract.IsPaused(&_W3bstreamProject.CallOpts, _projectId) +} + +// IsValidProject is a free data retrieval call binding the contract method 0x2c7caaf1. +// +// Solidity: function isValidProject(uint256 _projectId) view returns(bool) +func (_W3bstreamProject *W3bstreamProjectCaller) IsValidProject(opts *bind.CallOpts, _projectId *big.Int) (bool, error) { + var out []interface{} + err := _W3bstreamProject.contract.Call(opts, &out, "isValidProject", _projectId) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// IsValidProject is a free data retrieval call binding the contract method 0x2c7caaf1. +// +// Solidity: function isValidProject(uint256 _projectId) view returns(bool) +func (_W3bstreamProject *W3bstreamProjectSession) IsValidProject(_projectId *big.Int) (bool, error) { + return _W3bstreamProject.Contract.IsValidProject(&_W3bstreamProject.CallOpts, _projectId) +} + +// IsValidProject is a free data retrieval call binding the contract method 0x2c7caaf1. +// +// Solidity: function isValidProject(uint256 _projectId) view returns(bool) +func (_W3bstreamProject *W3bstreamProjectCallerSession) IsValidProject(_projectId *big.Int) (bool, error) { + return _W3bstreamProject.Contract.IsValidProject(&_W3bstreamProject.CallOpts, _projectId) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_W3bstreamProject *W3bstreamProjectCaller) Owner(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _W3bstreamProject.contract.Call(opts, &out, "owner") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_W3bstreamProject *W3bstreamProjectSession) Owner() (common.Address, error) { + return _W3bstreamProject.Contract.Owner(&_W3bstreamProject.CallOpts) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_W3bstreamProject *W3bstreamProjectCallerSession) Owner() (common.Address, error) { + return _W3bstreamProject.Contract.Owner(&_W3bstreamProject.CallOpts) +} + +// OwnerOf is a free data retrieval call binding the contract method 0x6352211e. +// +// Solidity: function ownerOf(uint256 _projectId) view returns(address) +func (_W3bstreamProject *W3bstreamProjectCaller) OwnerOf(opts *bind.CallOpts, _projectId *big.Int) (common.Address, error) { + var out []interface{} + err := _W3bstreamProject.contract.Call(opts, &out, "ownerOf", _projectId) + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// OwnerOf is a free data retrieval call binding the contract method 0x6352211e. +// +// Solidity: function ownerOf(uint256 _projectId) view returns(address) +func (_W3bstreamProject *W3bstreamProjectSession) OwnerOf(_projectId *big.Int) (common.Address, error) { + return _W3bstreamProject.Contract.OwnerOf(&_W3bstreamProject.CallOpts, _projectId) +} + +// OwnerOf is a free data retrieval call binding the contract method 0x6352211e. +// +// Solidity: function ownerOf(uint256 _projectId) view returns(address) +func (_W3bstreamProject *W3bstreamProjectCallerSession) OwnerOf(_projectId *big.Int) (common.Address, error) { + return _W3bstreamProject.Contract.OwnerOf(&_W3bstreamProject.CallOpts, _projectId) +} + +// Project is a free data retrieval call binding the contract method 0xf60ca60d. +// +// Solidity: function project() view returns(address) +func (_W3bstreamProject *W3bstreamProjectCaller) Project(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _W3bstreamProject.contract.Call(opts, &out, "project") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// Project is a free data retrieval call binding the contract method 0xf60ca60d. +// +// Solidity: function project() view returns(address) +func (_W3bstreamProject *W3bstreamProjectSession) Project() (common.Address, error) { + return _W3bstreamProject.Contract.Project(&_W3bstreamProject.CallOpts) +} + +// Project is a free data retrieval call binding the contract method 0xf60ca60d. +// +// Solidity: function project() view returns(address) +func (_W3bstreamProject *W3bstreamProjectCallerSession) Project() (common.Address, error) { + return _W3bstreamProject.Contract.Project(&_W3bstreamProject.CallOpts) +} + +// Bind is a paid mutator transaction binding the contract method 0x1fb8b00e. +// +// Solidity: function bind(uint256 _projectId) returns() +func (_W3bstreamProject *W3bstreamProjectTransactor) Bind(opts *bind.TransactOpts, _projectId *big.Int) (*types.Transaction, error) { + return _W3bstreamProject.contract.Transact(opts, "bind", _projectId) +} + +// Bind is a paid mutator transaction binding the contract method 0x1fb8b00e. +// +// Solidity: function bind(uint256 _projectId) returns() +func (_W3bstreamProject *W3bstreamProjectSession) Bind(_projectId *big.Int) (*types.Transaction, error) { + return _W3bstreamProject.Contract.Bind(&_W3bstreamProject.TransactOpts, _projectId) +} + +// Bind is a paid mutator transaction binding the contract method 0x1fb8b00e. +// +// Solidity: function bind(uint256 _projectId) returns() +func (_W3bstreamProject *W3bstreamProjectTransactorSession) Bind(_projectId *big.Int) (*types.Transaction, error) { + return _W3bstreamProject.Contract.Bind(&_W3bstreamProject.TransactOpts, _projectId) +} + +// Initialize is a paid mutator transaction binding the contract method 0xc4d66de8. +// +// Solidity: function initialize(address _project) returns() +func (_W3bstreamProject *W3bstreamProjectTransactor) Initialize(opts *bind.TransactOpts, _project common.Address) (*types.Transaction, error) { + return _W3bstreamProject.contract.Transact(opts, "initialize", _project) +} + +// Initialize is a paid mutator transaction binding the contract method 0xc4d66de8. +// +// Solidity: function initialize(address _project) returns() +func (_W3bstreamProject *W3bstreamProjectSession) Initialize(_project common.Address) (*types.Transaction, error) { + return _W3bstreamProject.Contract.Initialize(&_W3bstreamProject.TransactOpts, _project) +} + +// Initialize is a paid mutator transaction binding the contract method 0xc4d66de8. +// +// Solidity: function initialize(address _project) returns() +func (_W3bstreamProject *W3bstreamProjectTransactorSession) Initialize(_project common.Address) (*types.Transaction, error) { + return _W3bstreamProject.Contract.Initialize(&_W3bstreamProject.TransactOpts, _project) +} + +// Pause is a paid mutator transaction binding the contract method 0x136439dd. +// +// Solidity: function pause(uint256 _projectId) returns() +func (_W3bstreamProject *W3bstreamProjectTransactor) Pause(opts *bind.TransactOpts, _projectId *big.Int) (*types.Transaction, error) { + return _W3bstreamProject.contract.Transact(opts, "pause", _projectId) +} + +// Pause is a paid mutator transaction binding the contract method 0x136439dd. +// +// Solidity: function pause(uint256 _projectId) returns() +func (_W3bstreamProject *W3bstreamProjectSession) Pause(_projectId *big.Int) (*types.Transaction, error) { + return _W3bstreamProject.Contract.Pause(&_W3bstreamProject.TransactOpts, _projectId) +} + +// Pause is a paid mutator transaction binding the contract method 0x136439dd. +// +// Solidity: function pause(uint256 _projectId) returns() +func (_W3bstreamProject *W3bstreamProjectTransactorSession) Pause(_projectId *big.Int) (*types.Transaction, error) { + return _W3bstreamProject.Contract.Pause(&_W3bstreamProject.TransactOpts, _projectId) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_W3bstreamProject *W3bstreamProjectTransactor) RenounceOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { + return _W3bstreamProject.contract.Transact(opts, "renounceOwnership") +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_W3bstreamProject *W3bstreamProjectSession) RenounceOwnership() (*types.Transaction, error) { + return _W3bstreamProject.Contract.RenounceOwnership(&_W3bstreamProject.TransactOpts) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_W3bstreamProject *W3bstreamProjectTransactorSession) RenounceOwnership() (*types.Transaction, error) { + return _W3bstreamProject.Contract.RenounceOwnership(&_W3bstreamProject.TransactOpts) +} + +// Resume is a paid mutator transaction binding the contract method 0x414000b5. +// +// Solidity: function resume(uint256 _projectId) returns() +func (_W3bstreamProject *W3bstreamProjectTransactor) Resume(opts *bind.TransactOpts, _projectId *big.Int) (*types.Transaction, error) { + return _W3bstreamProject.contract.Transact(opts, "resume", _projectId) +} + +// Resume is a paid mutator transaction binding the contract method 0x414000b5. +// +// Solidity: function resume(uint256 _projectId) returns() +func (_W3bstreamProject *W3bstreamProjectSession) Resume(_projectId *big.Int) (*types.Transaction, error) { + return _W3bstreamProject.Contract.Resume(&_W3bstreamProject.TransactOpts, _projectId) +} + +// Resume is a paid mutator transaction binding the contract method 0x414000b5. +// +// Solidity: function resume(uint256 _projectId) returns() +func (_W3bstreamProject *W3bstreamProjectTransactorSession) Resume(_projectId *big.Int) (*types.Transaction, error) { + return _W3bstreamProject.Contract.Resume(&_W3bstreamProject.TransactOpts, _projectId) +} + +// SetAttributes is a paid mutator transaction binding the contract method 0xa122effb. +// +// Solidity: function setAttributes(uint256 _projectId, bytes32[] _keys, bytes[] _values) returns() +func (_W3bstreamProject *W3bstreamProjectTransactor) SetAttributes(opts *bind.TransactOpts, _projectId *big.Int, _keys [][32]byte, _values [][]byte) (*types.Transaction, error) { + return _W3bstreamProject.contract.Transact(opts, "setAttributes", _projectId, _keys, _values) +} + +// SetAttributes is a paid mutator transaction binding the contract method 0xa122effb. +// +// Solidity: function setAttributes(uint256 _projectId, bytes32[] _keys, bytes[] _values) returns() +func (_W3bstreamProject *W3bstreamProjectSession) SetAttributes(_projectId *big.Int, _keys [][32]byte, _values [][]byte) (*types.Transaction, error) { + return _W3bstreamProject.Contract.SetAttributes(&_W3bstreamProject.TransactOpts, _projectId, _keys, _values) +} + +// SetAttributes is a paid mutator transaction binding the contract method 0xa122effb. +// +// Solidity: function setAttributes(uint256 _projectId, bytes32[] _keys, bytes[] _values) returns() +func (_W3bstreamProject *W3bstreamProjectTransactorSession) SetAttributes(_projectId *big.Int, _keys [][32]byte, _values [][]byte) (*types.Transaction, error) { + return _W3bstreamProject.Contract.SetAttributes(&_W3bstreamProject.TransactOpts, _projectId, _keys, _values) +} + +// SetBinder is a paid mutator transaction binding the contract method 0x536c54fa. +// +// Solidity: function setBinder(address _binder) returns() +func (_W3bstreamProject *W3bstreamProjectTransactor) SetBinder(opts *bind.TransactOpts, _binder common.Address) (*types.Transaction, error) { + return _W3bstreamProject.contract.Transact(opts, "setBinder", _binder) +} + +// SetBinder is a paid mutator transaction binding the contract method 0x536c54fa. +// +// Solidity: function setBinder(address _binder) returns() +func (_W3bstreamProject *W3bstreamProjectSession) SetBinder(_binder common.Address) (*types.Transaction, error) { + return _W3bstreamProject.Contract.SetBinder(&_W3bstreamProject.TransactOpts, _binder) +} + +// SetBinder is a paid mutator transaction binding the contract method 0x536c54fa. +// +// Solidity: function setBinder(address _binder) returns() +func (_W3bstreamProject *W3bstreamProjectTransactorSession) SetBinder(_binder common.Address) (*types.Transaction, error) { + return _W3bstreamProject.Contract.SetBinder(&_W3bstreamProject.TransactOpts, _binder) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_W3bstreamProject *W3bstreamProjectTransactor) TransferOwnership(opts *bind.TransactOpts, newOwner common.Address) (*types.Transaction, error) { + return _W3bstreamProject.contract.Transact(opts, "transferOwnership", newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_W3bstreamProject *W3bstreamProjectSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _W3bstreamProject.Contract.TransferOwnership(&_W3bstreamProject.TransactOpts, newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_W3bstreamProject *W3bstreamProjectTransactorSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _W3bstreamProject.Contract.TransferOwnership(&_W3bstreamProject.TransactOpts, newOwner) +} + +// UpdateConfig is a paid mutator transaction binding the contract method 0x4b597aa3. +// +// Solidity: function updateConfig(uint256 _projectId, string _uri, bytes32 _hash) returns() +func (_W3bstreamProject *W3bstreamProjectTransactor) UpdateConfig(opts *bind.TransactOpts, _projectId *big.Int, _uri string, _hash [32]byte) (*types.Transaction, error) { + return _W3bstreamProject.contract.Transact(opts, "updateConfig", _projectId, _uri, _hash) +} + +// UpdateConfig is a paid mutator transaction binding the contract method 0x4b597aa3. +// +// Solidity: function updateConfig(uint256 _projectId, string _uri, bytes32 _hash) returns() +func (_W3bstreamProject *W3bstreamProjectSession) UpdateConfig(_projectId *big.Int, _uri string, _hash [32]byte) (*types.Transaction, error) { + return _W3bstreamProject.Contract.UpdateConfig(&_W3bstreamProject.TransactOpts, _projectId, _uri, _hash) +} + +// UpdateConfig is a paid mutator transaction binding the contract method 0x4b597aa3. +// +// Solidity: function updateConfig(uint256 _projectId, string _uri, bytes32 _hash) returns() +func (_W3bstreamProject *W3bstreamProjectTransactorSession) UpdateConfig(_projectId *big.Int, _uri string, _hash [32]byte) (*types.Transaction, error) { + return _W3bstreamProject.Contract.UpdateConfig(&_W3bstreamProject.TransactOpts, _projectId, _uri, _hash) +} + +// W3bstreamProjectAttributeSetIterator is returned from FilterAttributeSet and is used to iterate over the raw logs and unpacked data for AttributeSet events raised by the W3bstreamProject contract. +type W3bstreamProjectAttributeSetIterator struct { + Event *W3bstreamProjectAttributeSet // 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 *W3bstreamProjectAttributeSetIterator) 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(W3bstreamProjectAttributeSet) + 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(W3bstreamProjectAttributeSet) + 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 *W3bstreamProjectAttributeSetIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *W3bstreamProjectAttributeSetIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// W3bstreamProjectAttributeSet represents a AttributeSet event raised by the W3bstreamProject contract. +type W3bstreamProjectAttributeSet struct { + ProjectId *big.Int + Key [32]byte + Value []byte + Raw types.Log // Blockchain specific contextual infos +} + +// FilterAttributeSet is a free log retrieval operation binding the contract event 0x840db4c564ec8ec61fd9377b125346993b20659d558d2e066e33c588b60f9fc3. +// +// Solidity: event AttributeSet(uint256 indexed projectId, bytes32 indexed key, bytes value) +func (_W3bstreamProject *W3bstreamProjectFilterer) FilterAttributeSet(opts *bind.FilterOpts, projectId []*big.Int, key [][32]byte) (*W3bstreamProjectAttributeSetIterator, error) { + + var projectIdRule []interface{} + for _, projectIdItem := range projectId { + projectIdRule = append(projectIdRule, projectIdItem) + } + var keyRule []interface{} + for _, keyItem := range key { + keyRule = append(keyRule, keyItem) + } + + logs, sub, err := _W3bstreamProject.contract.FilterLogs(opts, "AttributeSet", projectIdRule, keyRule) + if err != nil { + return nil, err + } + return &W3bstreamProjectAttributeSetIterator{contract: _W3bstreamProject.contract, event: "AttributeSet", logs: logs, sub: sub}, nil +} + +// WatchAttributeSet is a free log subscription operation binding the contract event 0x840db4c564ec8ec61fd9377b125346993b20659d558d2e066e33c588b60f9fc3. +// +// Solidity: event AttributeSet(uint256 indexed projectId, bytes32 indexed key, bytes value) +func (_W3bstreamProject *W3bstreamProjectFilterer) WatchAttributeSet(opts *bind.WatchOpts, sink chan<- *W3bstreamProjectAttributeSet, projectId []*big.Int, key [][32]byte) (event.Subscription, error) { + + var projectIdRule []interface{} + for _, projectIdItem := range projectId { + projectIdRule = append(projectIdRule, projectIdItem) + } + var keyRule []interface{} + for _, keyItem := range key { + keyRule = append(keyRule, keyItem) + } + + logs, sub, err := _W3bstreamProject.contract.WatchLogs(opts, "AttributeSet", projectIdRule, keyRule) + 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(W3bstreamProjectAttributeSet) + if err := _W3bstreamProject.contract.UnpackLog(event, "AttributeSet", 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 +} + +// ParseAttributeSet is a log parse operation binding the contract event 0x840db4c564ec8ec61fd9377b125346993b20659d558d2e066e33c588b60f9fc3. +// +// Solidity: event AttributeSet(uint256 indexed projectId, bytes32 indexed key, bytes value) +func (_W3bstreamProject *W3bstreamProjectFilterer) ParseAttributeSet(log types.Log) (*W3bstreamProjectAttributeSet, error) { + event := new(W3bstreamProjectAttributeSet) + if err := _W3bstreamProject.contract.UnpackLog(event, "AttributeSet", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// W3bstreamProjectBinderSetIterator is returned from FilterBinderSet and is used to iterate over the raw logs and unpacked data for BinderSet events raised by the W3bstreamProject contract. +type W3bstreamProjectBinderSetIterator struct { + Event *W3bstreamProjectBinderSet // 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 *W3bstreamProjectBinderSetIterator) 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(W3bstreamProjectBinderSet) + 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(W3bstreamProjectBinderSet) + 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 *W3bstreamProjectBinderSetIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *W3bstreamProjectBinderSetIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// W3bstreamProjectBinderSet represents a BinderSet event raised by the W3bstreamProject contract. +type W3bstreamProjectBinderSet struct { + Binder common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterBinderSet is a free log retrieval operation binding the contract event 0xb19637e660a60813c298ad7ddbf824f445fc38044f48e8ad24dc0ac64646f29b. +// +// Solidity: event BinderSet(address indexed binder) +func (_W3bstreamProject *W3bstreamProjectFilterer) FilterBinderSet(opts *bind.FilterOpts, binder []common.Address) (*W3bstreamProjectBinderSetIterator, error) { + + var binderRule []interface{} + for _, binderItem := range binder { + binderRule = append(binderRule, binderItem) + } + + logs, sub, err := _W3bstreamProject.contract.FilterLogs(opts, "BinderSet", binderRule) + if err != nil { + return nil, err + } + return &W3bstreamProjectBinderSetIterator{contract: _W3bstreamProject.contract, event: "BinderSet", logs: logs, sub: sub}, nil +} + +// WatchBinderSet is a free log subscription operation binding the contract event 0xb19637e660a60813c298ad7ddbf824f445fc38044f48e8ad24dc0ac64646f29b. +// +// Solidity: event BinderSet(address indexed binder) +func (_W3bstreamProject *W3bstreamProjectFilterer) WatchBinderSet(opts *bind.WatchOpts, sink chan<- *W3bstreamProjectBinderSet, binder []common.Address) (event.Subscription, error) { + + var binderRule []interface{} + for _, binderItem := range binder { + binderRule = append(binderRule, binderItem) + } + + logs, sub, err := _W3bstreamProject.contract.WatchLogs(opts, "BinderSet", binderRule) + 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(W3bstreamProjectBinderSet) + if err := _W3bstreamProject.contract.UnpackLog(event, "BinderSet", 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 +} + +// ParseBinderSet is a log parse operation binding the contract event 0xb19637e660a60813c298ad7ddbf824f445fc38044f48e8ad24dc0ac64646f29b. +// +// Solidity: event BinderSet(address indexed binder) +func (_W3bstreamProject *W3bstreamProjectFilterer) ParseBinderSet(log types.Log) (*W3bstreamProjectBinderSet, error) { + event := new(W3bstreamProjectBinderSet) + if err := _W3bstreamProject.contract.UnpackLog(event, "BinderSet", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// W3bstreamProjectInitializedIterator is returned from FilterInitialized and is used to iterate over the raw logs and unpacked data for Initialized events raised by the W3bstreamProject contract. +type W3bstreamProjectInitializedIterator struct { + Event *W3bstreamProjectInitialized // 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 *W3bstreamProjectInitializedIterator) 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(W3bstreamProjectInitialized) + 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(W3bstreamProjectInitialized) + 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 *W3bstreamProjectInitializedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *W3bstreamProjectInitializedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// W3bstreamProjectInitialized represents a Initialized event raised by the W3bstreamProject contract. +type W3bstreamProjectInitialized struct { + Version uint8 + Raw types.Log // Blockchain specific contextual infos +} + +// FilterInitialized is a free log retrieval operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. +// +// Solidity: event Initialized(uint8 version) +func (_W3bstreamProject *W3bstreamProjectFilterer) FilterInitialized(opts *bind.FilterOpts) (*W3bstreamProjectInitializedIterator, error) { + + logs, sub, err := _W3bstreamProject.contract.FilterLogs(opts, "Initialized") + if err != nil { + return nil, err + } + return &W3bstreamProjectInitializedIterator{contract: _W3bstreamProject.contract, event: "Initialized", logs: logs, sub: sub}, nil +} + +// WatchInitialized is a free log subscription operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. +// +// Solidity: event Initialized(uint8 version) +func (_W3bstreamProject *W3bstreamProjectFilterer) WatchInitialized(opts *bind.WatchOpts, sink chan<- *W3bstreamProjectInitialized) (event.Subscription, error) { + + logs, sub, err := _W3bstreamProject.contract.WatchLogs(opts, "Initialized") + 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(W3bstreamProjectInitialized) + if err := _W3bstreamProject.contract.UnpackLog(event, "Initialized", 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 +} + +// ParseInitialized is a log parse operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. +// +// Solidity: event Initialized(uint8 version) +func (_W3bstreamProject *W3bstreamProjectFilterer) ParseInitialized(log types.Log) (*W3bstreamProjectInitialized, error) { + event := new(W3bstreamProjectInitialized) + if err := _W3bstreamProject.contract.UnpackLog(event, "Initialized", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// W3bstreamProjectOwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the W3bstreamProject contract. +type W3bstreamProjectOwnershipTransferredIterator struct { + Event *W3bstreamProjectOwnershipTransferred // 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 *W3bstreamProjectOwnershipTransferredIterator) 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(W3bstreamProjectOwnershipTransferred) + 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(W3bstreamProjectOwnershipTransferred) + 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 *W3bstreamProjectOwnershipTransferredIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *W3bstreamProjectOwnershipTransferredIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// W3bstreamProjectOwnershipTransferred represents a OwnershipTransferred event raised by the W3bstreamProject contract. +type W3bstreamProjectOwnershipTransferred struct { + PreviousOwner common.Address + NewOwner common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterOwnershipTransferred is a free log retrieval operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_W3bstreamProject *W3bstreamProjectFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*W3bstreamProjectOwnershipTransferredIterator, error) { + + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + } + var newOwnerRule []interface{} + for _, newOwnerItem := range newOwner { + newOwnerRule = append(newOwnerRule, newOwnerItem) + } + + logs, sub, err := _W3bstreamProject.contract.FilterLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return &W3bstreamProjectOwnershipTransferredIterator{contract: _W3bstreamProject.contract, event: "OwnershipTransferred", logs: logs, sub: sub}, nil +} + +// WatchOwnershipTransferred is a free log subscription operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_W3bstreamProject *W3bstreamProjectFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *W3bstreamProjectOwnershipTransferred, previousOwner []common.Address, newOwner []common.Address) (event.Subscription, error) { + + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + } + var newOwnerRule []interface{} + for _, newOwnerItem := range newOwner { + newOwnerRule = append(newOwnerRule, newOwnerItem) + } + + logs, sub, err := _W3bstreamProject.contract.WatchLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(W3bstreamProjectOwnershipTransferred) + if err := _W3bstreamProject.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseOwnershipTransferred is a log parse operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_W3bstreamProject *W3bstreamProjectFilterer) ParseOwnershipTransferred(log types.Log) (*W3bstreamProjectOwnershipTransferred, error) { + event := new(W3bstreamProjectOwnershipTransferred) + if err := _W3bstreamProject.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// W3bstreamProjectProjectBindedIterator is returned from FilterProjectBinded and is used to iterate over the raw logs and unpacked data for ProjectBinded events raised by the W3bstreamProject contract. +type W3bstreamProjectProjectBindedIterator struct { + Event *W3bstreamProjectProjectBinded // 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 *W3bstreamProjectProjectBindedIterator) 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(W3bstreamProjectProjectBinded) + 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(W3bstreamProjectProjectBinded) + 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 *W3bstreamProjectProjectBindedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *W3bstreamProjectProjectBindedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// W3bstreamProjectProjectBinded represents a ProjectBinded event raised by the W3bstreamProject contract. +type W3bstreamProjectProjectBinded struct { + ProjectId *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterProjectBinded is a free log retrieval operation binding the contract event 0x333b64ed2eccc26c75dc26694a75281557fd03abd4b4f13cc7399ab89ad0761a. +// +// Solidity: event ProjectBinded(uint256 indexed projectId) +func (_W3bstreamProject *W3bstreamProjectFilterer) FilterProjectBinded(opts *bind.FilterOpts, projectId []*big.Int) (*W3bstreamProjectProjectBindedIterator, error) { + + var projectIdRule []interface{} + for _, projectIdItem := range projectId { + projectIdRule = append(projectIdRule, projectIdItem) + } + + logs, sub, err := _W3bstreamProject.contract.FilterLogs(opts, "ProjectBinded", projectIdRule) + if err != nil { + return nil, err + } + return &W3bstreamProjectProjectBindedIterator{contract: _W3bstreamProject.contract, event: "ProjectBinded", logs: logs, sub: sub}, nil +} + +// WatchProjectBinded is a free log subscription operation binding the contract event 0x333b64ed2eccc26c75dc26694a75281557fd03abd4b4f13cc7399ab89ad0761a. +// +// Solidity: event ProjectBinded(uint256 indexed projectId) +func (_W3bstreamProject *W3bstreamProjectFilterer) WatchProjectBinded(opts *bind.WatchOpts, sink chan<- *W3bstreamProjectProjectBinded, projectId []*big.Int) (event.Subscription, error) { + + var projectIdRule []interface{} + for _, projectIdItem := range projectId { + projectIdRule = append(projectIdRule, projectIdItem) + } + + logs, sub, err := _W3bstreamProject.contract.WatchLogs(opts, "ProjectBinded", projectIdRule) + 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(W3bstreamProjectProjectBinded) + if err := _W3bstreamProject.contract.UnpackLog(event, "ProjectBinded", 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 +} + +// ParseProjectBinded is a log parse operation binding the contract event 0x333b64ed2eccc26c75dc26694a75281557fd03abd4b4f13cc7399ab89ad0761a. +// +// Solidity: event ProjectBinded(uint256 indexed projectId) +func (_W3bstreamProject *W3bstreamProjectFilterer) ParseProjectBinded(log types.Log) (*W3bstreamProjectProjectBinded, error) { + event := new(W3bstreamProjectProjectBinded) + if err := _W3bstreamProject.contract.UnpackLog(event, "ProjectBinded", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// W3bstreamProjectProjectConfigUpdatedIterator is returned from FilterProjectConfigUpdated and is used to iterate over the raw logs and unpacked data for ProjectConfigUpdated events raised by the W3bstreamProject contract. +type W3bstreamProjectProjectConfigUpdatedIterator struct { + Event *W3bstreamProjectProjectConfigUpdated // 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 *W3bstreamProjectProjectConfigUpdatedIterator) 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(W3bstreamProjectProjectConfigUpdated) + 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(W3bstreamProjectProjectConfigUpdated) + 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 *W3bstreamProjectProjectConfigUpdatedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *W3bstreamProjectProjectConfigUpdatedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// W3bstreamProjectProjectConfigUpdated represents a ProjectConfigUpdated event raised by the W3bstreamProject contract. +type W3bstreamProjectProjectConfigUpdated struct { + ProjectId *big.Int + Uri string + Hash [32]byte + Raw types.Log // Blockchain specific contextual infos +} + +// FilterProjectConfigUpdated is a free log retrieval operation binding the contract event 0xa9ee0c223bc138bec6ebb21e09d00d5423fc3bbc210bdb6aef9d190b0641aecb. +// +// Solidity: event ProjectConfigUpdated(uint256 indexed projectId, string uri, bytes32 hash) +func (_W3bstreamProject *W3bstreamProjectFilterer) FilterProjectConfigUpdated(opts *bind.FilterOpts, projectId []*big.Int) (*W3bstreamProjectProjectConfigUpdatedIterator, error) { + + var projectIdRule []interface{} + for _, projectIdItem := range projectId { + projectIdRule = append(projectIdRule, projectIdItem) + } + + logs, sub, err := _W3bstreamProject.contract.FilterLogs(opts, "ProjectConfigUpdated", projectIdRule) + if err != nil { + return nil, err + } + return &W3bstreamProjectProjectConfigUpdatedIterator{contract: _W3bstreamProject.contract, event: "ProjectConfigUpdated", logs: logs, sub: sub}, nil +} + +// WatchProjectConfigUpdated is a free log subscription operation binding the contract event 0xa9ee0c223bc138bec6ebb21e09d00d5423fc3bbc210bdb6aef9d190b0641aecb. +// +// Solidity: event ProjectConfigUpdated(uint256 indexed projectId, string uri, bytes32 hash) +func (_W3bstreamProject *W3bstreamProjectFilterer) WatchProjectConfigUpdated(opts *bind.WatchOpts, sink chan<- *W3bstreamProjectProjectConfigUpdated, projectId []*big.Int) (event.Subscription, error) { + + var projectIdRule []interface{} + for _, projectIdItem := range projectId { + projectIdRule = append(projectIdRule, projectIdItem) + } + + logs, sub, err := _W3bstreamProject.contract.WatchLogs(opts, "ProjectConfigUpdated", projectIdRule) + 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(W3bstreamProjectProjectConfigUpdated) + if err := _W3bstreamProject.contract.UnpackLog(event, "ProjectConfigUpdated", 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 +} + +// ParseProjectConfigUpdated is a log parse operation binding the contract event 0xa9ee0c223bc138bec6ebb21e09d00d5423fc3bbc210bdb6aef9d190b0641aecb. +// +// Solidity: event ProjectConfigUpdated(uint256 indexed projectId, string uri, bytes32 hash) +func (_W3bstreamProject *W3bstreamProjectFilterer) ParseProjectConfigUpdated(log types.Log) (*W3bstreamProjectProjectConfigUpdated, error) { + event := new(W3bstreamProjectProjectConfigUpdated) + if err := _W3bstreamProject.contract.UnpackLog(event, "ProjectConfigUpdated", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// W3bstreamProjectProjectPausedIterator is returned from FilterProjectPaused and is used to iterate over the raw logs and unpacked data for ProjectPaused events raised by the W3bstreamProject contract. +type W3bstreamProjectProjectPausedIterator struct { + Event *W3bstreamProjectProjectPaused // 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 *W3bstreamProjectProjectPausedIterator) 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(W3bstreamProjectProjectPaused) + 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(W3bstreamProjectProjectPaused) + 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 *W3bstreamProjectProjectPausedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *W3bstreamProjectProjectPausedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// W3bstreamProjectProjectPaused represents a ProjectPaused event raised by the W3bstreamProject contract. +type W3bstreamProjectProjectPaused struct { + ProjectId *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterProjectPaused is a free log retrieval operation binding the contract event 0x9f505f325627bdd7f5a6dd8bcceecdc48a989f647561427d61d35b7a50703f79. +// +// Solidity: event ProjectPaused(uint256 indexed projectId) +func (_W3bstreamProject *W3bstreamProjectFilterer) FilterProjectPaused(opts *bind.FilterOpts, projectId []*big.Int) (*W3bstreamProjectProjectPausedIterator, error) { + + var projectIdRule []interface{} + for _, projectIdItem := range projectId { + projectIdRule = append(projectIdRule, projectIdItem) + } + + logs, sub, err := _W3bstreamProject.contract.FilterLogs(opts, "ProjectPaused", projectIdRule) + if err != nil { + return nil, err + } + return &W3bstreamProjectProjectPausedIterator{contract: _W3bstreamProject.contract, event: "ProjectPaused", logs: logs, sub: sub}, nil +} + +// WatchProjectPaused is a free log subscription operation binding the contract event 0x9f505f325627bdd7f5a6dd8bcceecdc48a989f647561427d61d35b7a50703f79. +// +// Solidity: event ProjectPaused(uint256 indexed projectId) +func (_W3bstreamProject *W3bstreamProjectFilterer) WatchProjectPaused(opts *bind.WatchOpts, sink chan<- *W3bstreamProjectProjectPaused, projectId []*big.Int) (event.Subscription, error) { + + var projectIdRule []interface{} + for _, projectIdItem := range projectId { + projectIdRule = append(projectIdRule, projectIdItem) + } + + logs, sub, err := _W3bstreamProject.contract.WatchLogs(opts, "ProjectPaused", projectIdRule) + 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(W3bstreamProjectProjectPaused) + if err := _W3bstreamProject.contract.UnpackLog(event, "ProjectPaused", 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 +} + +// ParseProjectPaused is a log parse operation binding the contract event 0x9f505f325627bdd7f5a6dd8bcceecdc48a989f647561427d61d35b7a50703f79. +// +// Solidity: event ProjectPaused(uint256 indexed projectId) +func (_W3bstreamProject *W3bstreamProjectFilterer) ParseProjectPaused(log types.Log) (*W3bstreamProjectProjectPaused, error) { + event := new(W3bstreamProjectProjectPaused) + if err := _W3bstreamProject.contract.UnpackLog(event, "ProjectPaused", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// W3bstreamProjectProjectResumedIterator is returned from FilterProjectResumed and is used to iterate over the raw logs and unpacked data for ProjectResumed events raised by the W3bstreamProject contract. +type W3bstreamProjectProjectResumedIterator struct { + Event *W3bstreamProjectProjectResumed // 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 *W3bstreamProjectProjectResumedIterator) 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(W3bstreamProjectProjectResumed) + 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(W3bstreamProjectProjectResumed) + 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 *W3bstreamProjectProjectResumedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *W3bstreamProjectProjectResumedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// W3bstreamProjectProjectResumed represents a ProjectResumed event raised by the W3bstreamProject contract. +type W3bstreamProjectProjectResumed struct { + ProjectId *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterProjectResumed is a free log retrieval operation binding the contract event 0x8c936416fd11c0291d9c7f69aad7e8847c5228b15a3969a1ac6a1c7bf394cd75. +// +// Solidity: event ProjectResumed(uint256 indexed projectId) +func (_W3bstreamProject *W3bstreamProjectFilterer) FilterProjectResumed(opts *bind.FilterOpts, projectId []*big.Int) (*W3bstreamProjectProjectResumedIterator, error) { + + var projectIdRule []interface{} + for _, projectIdItem := range projectId { + projectIdRule = append(projectIdRule, projectIdItem) + } + + logs, sub, err := _W3bstreamProject.contract.FilterLogs(opts, "ProjectResumed", projectIdRule) + if err != nil { + return nil, err + } + return &W3bstreamProjectProjectResumedIterator{contract: _W3bstreamProject.contract, event: "ProjectResumed", logs: logs, sub: sub}, nil +} + +// WatchProjectResumed is a free log subscription operation binding the contract event 0x8c936416fd11c0291d9c7f69aad7e8847c5228b15a3969a1ac6a1c7bf394cd75. +// +// Solidity: event ProjectResumed(uint256 indexed projectId) +func (_W3bstreamProject *W3bstreamProjectFilterer) WatchProjectResumed(opts *bind.WatchOpts, sink chan<- *W3bstreamProjectProjectResumed, projectId []*big.Int) (event.Subscription, error) { + + var projectIdRule []interface{} + for _, projectIdItem := range projectId { + projectIdRule = append(projectIdRule, projectIdItem) + } + + logs, sub, err := _W3bstreamProject.contract.WatchLogs(opts, "ProjectResumed", projectIdRule) + 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(W3bstreamProjectProjectResumed) + if err := _W3bstreamProject.contract.UnpackLog(event, "ProjectResumed", 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 +} + +// ParseProjectResumed is a log parse operation binding the contract event 0x8c936416fd11c0291d9c7f69aad7e8847c5228b15a3969a1ac6a1c7bf394cd75. +// +// Solidity: event ProjectResumed(uint256 indexed projectId) +func (_W3bstreamProject *W3bstreamProjectFilterer) ParseProjectResumed(log types.Log) (*W3bstreamProjectProjectResumed, error) { + event := new(W3bstreamProjectProjectResumed) + if err := _W3bstreamProject.contract.UnpackLog(event, "ProjectResumed", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} diff --git a/ioctl/cmd/ws/contracts/w3bstreamprover.go b/ioctl/cmd/ws/contracts/w3bstreamprover.go new file mode 100644 index 0000000000..12ec262de0 --- /dev/null +++ b/ioctl/cmd/ws/contracts/w3bstreamprover.go @@ -0,0 +1,2457 @@ +// 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 +) + +// W3bstreamProverMetaData contains all meta data concerning the W3bstreamProver contract. +var W3bstreamProverMetaData = &bind.MetaData{ + ABI: "[{\"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\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"minter\",\"type\":\"address\"}],\"name\":\"MinterSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"typ\",\"type\":\"uint256\"}],\"name\":\"NodeTypeUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"OperatorSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"ProverPaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"ProverResumed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_id\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_operator\",\"type\":\"address\"}],\"name\":\"changeOperator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"count\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"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\":\"string\",\"name\":\"_name\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_symbol\",\"type\":\"string\"}],\"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\":[{\"internalType\":\"uint256\",\"name\":\"_id\",\"type\":\"uint256\"}],\"name\":\"isPaused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"}],\"name\":\"mint\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"id_\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minter\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_id\",\"type\":\"uint256\"}],\"name\":\"nodeType\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_id\",\"type\":\"uint256\"}],\"name\":\"operator\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"ownerOf\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_operator\",\"type\":\"address\"}],\"name\":\"ownerOfOperator\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_id\",\"type\":\"uint256\"}],\"name\":\"pause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_id\",\"type\":\"uint256\"}],\"name\":\"prover\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_id\",\"type\":\"uint256\"}],\"name\":\"resume\",\"outputs\":[],\"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\":\"address\",\"name\":\"_minter\",\"type\":\"address\"}],\"name\":\"setMinter\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"tokenURI\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_id\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_type\",\"type\":\"uint256\"}],\"name\":\"updateNodeType\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", +} + +// W3bstreamProverABI is the input ABI used to generate the binding from. +// Deprecated: Use W3bstreamProverMetaData.ABI instead. +var W3bstreamProverABI = W3bstreamProverMetaData.ABI + +// W3bstreamProver is an auto generated Go binding around an Ethereum contract. +type W3bstreamProver struct { + W3bstreamProverCaller // Read-only binding to the contract + W3bstreamProverTransactor // Write-only binding to the contract + W3bstreamProverFilterer // Log filterer for contract events +} + +// W3bstreamProverCaller is an auto generated read-only Go binding around an Ethereum contract. +type W3bstreamProverCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// W3bstreamProverTransactor is an auto generated write-only Go binding around an Ethereum contract. +type W3bstreamProverTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// W3bstreamProverFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type W3bstreamProverFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// W3bstreamProverSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type W3bstreamProverSession struct { + Contract *W3bstreamProver // 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 +} + +// W3bstreamProverCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type W3bstreamProverCallerSession struct { + Contract *W3bstreamProverCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// W3bstreamProverTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type W3bstreamProverTransactorSession struct { + Contract *W3bstreamProverTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// W3bstreamProverRaw is an auto generated low-level Go binding around an Ethereum contract. +type W3bstreamProverRaw struct { + Contract *W3bstreamProver // Generic contract binding to access the raw methods on +} + +// W3bstreamProverCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type W3bstreamProverCallerRaw struct { + Contract *W3bstreamProverCaller // Generic read-only contract binding to access the raw methods on +} + +// W3bstreamProverTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type W3bstreamProverTransactorRaw struct { + Contract *W3bstreamProverTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewW3bstreamProver creates a new instance of W3bstreamProver, bound to a specific deployed contract. +func NewW3bstreamProver(address common.Address, backend bind.ContractBackend) (*W3bstreamProver, error) { + contract, err := bindW3bstreamProver(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &W3bstreamProver{W3bstreamProverCaller: W3bstreamProverCaller{contract: contract}, W3bstreamProverTransactor: W3bstreamProverTransactor{contract: contract}, W3bstreamProverFilterer: W3bstreamProverFilterer{contract: contract}}, nil +} + +// NewW3bstreamProverCaller creates a new read-only instance of W3bstreamProver, bound to a specific deployed contract. +func NewW3bstreamProverCaller(address common.Address, caller bind.ContractCaller) (*W3bstreamProverCaller, error) { + contract, err := bindW3bstreamProver(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &W3bstreamProverCaller{contract: contract}, nil +} + +// NewW3bstreamProverTransactor creates a new write-only instance of W3bstreamProver, bound to a specific deployed contract. +func NewW3bstreamProverTransactor(address common.Address, transactor bind.ContractTransactor) (*W3bstreamProverTransactor, error) { + contract, err := bindW3bstreamProver(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &W3bstreamProverTransactor{contract: contract}, nil +} + +// NewW3bstreamProverFilterer creates a new log filterer instance of W3bstreamProver, bound to a specific deployed contract. +func NewW3bstreamProverFilterer(address common.Address, filterer bind.ContractFilterer) (*W3bstreamProverFilterer, error) { + contract, err := bindW3bstreamProver(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &W3bstreamProverFilterer{contract: contract}, nil +} + +// bindW3bstreamProver binds a generic wrapper to an already deployed contract. +func bindW3bstreamProver(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := W3bstreamProverMetaData.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 (_W3bstreamProver *W3bstreamProverRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _W3bstreamProver.Contract.W3bstreamProverCaller.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 (_W3bstreamProver *W3bstreamProverRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _W3bstreamProver.Contract.W3bstreamProverTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_W3bstreamProver *W3bstreamProverRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _W3bstreamProver.Contract.W3bstreamProverTransactor.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 (_W3bstreamProver *W3bstreamProverCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _W3bstreamProver.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 (_W3bstreamProver *W3bstreamProverTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _W3bstreamProver.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_W3bstreamProver *W3bstreamProverTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _W3bstreamProver.Contract.contract.Transact(opts, method, params...) +} + +// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. +// +// Solidity: function balanceOf(address owner) view returns(uint256) +func (_W3bstreamProver *W3bstreamProverCaller) BalanceOf(opts *bind.CallOpts, owner common.Address) (*big.Int, error) { + var out []interface{} + err := _W3bstreamProver.contract.Call(opts, &out, "balanceOf", owner) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. +// +// Solidity: function balanceOf(address owner) view returns(uint256) +func (_W3bstreamProver *W3bstreamProverSession) BalanceOf(owner common.Address) (*big.Int, error) { + return _W3bstreamProver.Contract.BalanceOf(&_W3bstreamProver.CallOpts, owner) +} + +// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. +// +// Solidity: function balanceOf(address owner) view returns(uint256) +func (_W3bstreamProver *W3bstreamProverCallerSession) BalanceOf(owner common.Address) (*big.Int, error) { + return _W3bstreamProver.Contract.BalanceOf(&_W3bstreamProver.CallOpts, owner) +} + +// Count is a free data retrieval call binding the contract method 0x06661abd. +// +// Solidity: function count() view returns(uint256) +func (_W3bstreamProver *W3bstreamProverCaller) Count(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _W3bstreamProver.contract.Call(opts, &out, "count") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// Count is a free data retrieval call binding the contract method 0x06661abd. +// +// Solidity: function count() view returns(uint256) +func (_W3bstreamProver *W3bstreamProverSession) Count() (*big.Int, error) { + return _W3bstreamProver.Contract.Count(&_W3bstreamProver.CallOpts) +} + +// Count is a free data retrieval call binding the contract method 0x06661abd. +// +// Solidity: function count() view returns(uint256) +func (_W3bstreamProver *W3bstreamProverCallerSession) Count() (*big.Int, error) { + return _W3bstreamProver.Contract.Count(&_W3bstreamProver.CallOpts) +} + +// GetApproved is a free data retrieval call binding the contract method 0x081812fc. +// +// Solidity: function getApproved(uint256 tokenId) view returns(address) +func (_W3bstreamProver *W3bstreamProverCaller) GetApproved(opts *bind.CallOpts, tokenId *big.Int) (common.Address, error) { + var out []interface{} + err := _W3bstreamProver.contract.Call(opts, &out, "getApproved", tokenId) + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// GetApproved is a free data retrieval call binding the contract method 0x081812fc. +// +// Solidity: function getApproved(uint256 tokenId) view returns(address) +func (_W3bstreamProver *W3bstreamProverSession) GetApproved(tokenId *big.Int) (common.Address, error) { + return _W3bstreamProver.Contract.GetApproved(&_W3bstreamProver.CallOpts, tokenId) +} + +// GetApproved is a free data retrieval call binding the contract method 0x081812fc. +// +// Solidity: function getApproved(uint256 tokenId) view returns(address) +func (_W3bstreamProver *W3bstreamProverCallerSession) GetApproved(tokenId *big.Int) (common.Address, error) { + return _W3bstreamProver.Contract.GetApproved(&_W3bstreamProver.CallOpts, tokenId) +} + +// IsApprovedForAll is a free data retrieval call binding the contract method 0xe985e9c5. +// +// Solidity: function isApprovedForAll(address owner, address operator) view returns(bool) +func (_W3bstreamProver *W3bstreamProverCaller) IsApprovedForAll(opts *bind.CallOpts, owner common.Address, operator common.Address) (bool, error) { + var out []interface{} + err := _W3bstreamProver.contract.Call(opts, &out, "isApprovedForAll", owner, operator) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// IsApprovedForAll is a free data retrieval call binding the contract method 0xe985e9c5. +// +// Solidity: function isApprovedForAll(address owner, address operator) view returns(bool) +func (_W3bstreamProver *W3bstreamProverSession) IsApprovedForAll(owner common.Address, operator common.Address) (bool, error) { + return _W3bstreamProver.Contract.IsApprovedForAll(&_W3bstreamProver.CallOpts, owner, operator) +} + +// IsApprovedForAll is a free data retrieval call binding the contract method 0xe985e9c5. +// +// Solidity: function isApprovedForAll(address owner, address operator) view returns(bool) +func (_W3bstreamProver *W3bstreamProverCallerSession) IsApprovedForAll(owner common.Address, operator common.Address) (bool, error) { + return _W3bstreamProver.Contract.IsApprovedForAll(&_W3bstreamProver.CallOpts, owner, operator) +} + +// IsPaused is a free data retrieval call binding the contract method 0xbdf2a43c. +// +// Solidity: function isPaused(uint256 _id) view returns(bool) +func (_W3bstreamProver *W3bstreamProverCaller) IsPaused(opts *bind.CallOpts, _id *big.Int) (bool, error) { + var out []interface{} + err := _W3bstreamProver.contract.Call(opts, &out, "isPaused", _id) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// IsPaused is a free data retrieval call binding the contract method 0xbdf2a43c. +// +// Solidity: function isPaused(uint256 _id) view returns(bool) +func (_W3bstreamProver *W3bstreamProverSession) IsPaused(_id *big.Int) (bool, error) { + return _W3bstreamProver.Contract.IsPaused(&_W3bstreamProver.CallOpts, _id) +} + +// IsPaused is a free data retrieval call binding the contract method 0xbdf2a43c. +// +// Solidity: function isPaused(uint256 _id) view returns(bool) +func (_W3bstreamProver *W3bstreamProverCallerSession) IsPaused(_id *big.Int) (bool, error) { + return _W3bstreamProver.Contract.IsPaused(&_W3bstreamProver.CallOpts, _id) +} + +// Minter is a free data retrieval call binding the contract method 0x07546172. +// +// Solidity: function minter() view returns(address) +func (_W3bstreamProver *W3bstreamProverCaller) Minter(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _W3bstreamProver.contract.Call(opts, &out, "minter") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// Minter is a free data retrieval call binding the contract method 0x07546172. +// +// Solidity: function minter() view returns(address) +func (_W3bstreamProver *W3bstreamProverSession) Minter() (common.Address, error) { + return _W3bstreamProver.Contract.Minter(&_W3bstreamProver.CallOpts) +} + +// Minter is a free data retrieval call binding the contract method 0x07546172. +// +// Solidity: function minter() view returns(address) +func (_W3bstreamProver *W3bstreamProverCallerSession) Minter() (common.Address, error) { + return _W3bstreamProver.Contract.Minter(&_W3bstreamProver.CallOpts) +} + +// Name is a free data retrieval call binding the contract method 0x06fdde03. +// +// Solidity: function name() view returns(string) +func (_W3bstreamProver *W3bstreamProverCaller) Name(opts *bind.CallOpts) (string, error) { + var out []interface{} + err := _W3bstreamProver.contract.Call(opts, &out, "name") + + if err != nil { + return *new(string), err + } + + out0 := *abi.ConvertType(out[0], new(string)).(*string) + + return out0, err + +} + +// Name is a free data retrieval call binding the contract method 0x06fdde03. +// +// Solidity: function name() view returns(string) +func (_W3bstreamProver *W3bstreamProverSession) Name() (string, error) { + return _W3bstreamProver.Contract.Name(&_W3bstreamProver.CallOpts) +} + +// Name is a free data retrieval call binding the contract method 0x06fdde03. +// +// Solidity: function name() view returns(string) +func (_W3bstreamProver *W3bstreamProverCallerSession) Name() (string, error) { + return _W3bstreamProver.Contract.Name(&_W3bstreamProver.CallOpts) +} + +// NodeType is a free data retrieval call binding the contract method 0x1c794b84. +// +// Solidity: function nodeType(uint256 _id) view returns(uint256) +func (_W3bstreamProver *W3bstreamProverCaller) NodeType(opts *bind.CallOpts, _id *big.Int) (*big.Int, error) { + var out []interface{} + err := _W3bstreamProver.contract.Call(opts, &out, "nodeType", _id) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// NodeType is a free data retrieval call binding the contract method 0x1c794b84. +// +// Solidity: function nodeType(uint256 _id) view returns(uint256) +func (_W3bstreamProver *W3bstreamProverSession) NodeType(_id *big.Int) (*big.Int, error) { + return _W3bstreamProver.Contract.NodeType(&_W3bstreamProver.CallOpts, _id) +} + +// NodeType is a free data retrieval call binding the contract method 0x1c794b84. +// +// Solidity: function nodeType(uint256 _id) view returns(uint256) +func (_W3bstreamProver *W3bstreamProverCallerSession) NodeType(_id *big.Int) (*big.Int, error) { + return _W3bstreamProver.Contract.NodeType(&_W3bstreamProver.CallOpts, _id) +} + +// Operator is a free data retrieval call binding the contract method 0xab3d047f. +// +// Solidity: function operator(uint256 _id) view returns(address) +func (_W3bstreamProver *W3bstreamProverCaller) Operator(opts *bind.CallOpts, _id *big.Int) (common.Address, error) { + var out []interface{} + err := _W3bstreamProver.contract.Call(opts, &out, "operator", _id) + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// Operator is a free data retrieval call binding the contract method 0xab3d047f. +// +// Solidity: function operator(uint256 _id) view returns(address) +func (_W3bstreamProver *W3bstreamProverSession) Operator(_id *big.Int) (common.Address, error) { + return _W3bstreamProver.Contract.Operator(&_W3bstreamProver.CallOpts, _id) +} + +// Operator is a free data retrieval call binding the contract method 0xab3d047f. +// +// Solidity: function operator(uint256 _id) view returns(address) +func (_W3bstreamProver *W3bstreamProverCallerSession) Operator(_id *big.Int) (common.Address, error) { + return _W3bstreamProver.Contract.Operator(&_W3bstreamProver.CallOpts, _id) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_W3bstreamProver *W3bstreamProverCaller) Owner(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _W3bstreamProver.contract.Call(opts, &out, "owner") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_W3bstreamProver *W3bstreamProverSession) Owner() (common.Address, error) { + return _W3bstreamProver.Contract.Owner(&_W3bstreamProver.CallOpts) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_W3bstreamProver *W3bstreamProverCallerSession) Owner() (common.Address, error) { + return _W3bstreamProver.Contract.Owner(&_W3bstreamProver.CallOpts) +} + +// OwnerOf is a free data retrieval call binding the contract method 0x6352211e. +// +// Solidity: function ownerOf(uint256 tokenId) view returns(address) +func (_W3bstreamProver *W3bstreamProverCaller) OwnerOf(opts *bind.CallOpts, tokenId *big.Int) (common.Address, error) { + var out []interface{} + err := _W3bstreamProver.contract.Call(opts, &out, "ownerOf", tokenId) + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// OwnerOf is a free data retrieval call binding the contract method 0x6352211e. +// +// Solidity: function ownerOf(uint256 tokenId) view returns(address) +func (_W3bstreamProver *W3bstreamProverSession) OwnerOf(tokenId *big.Int) (common.Address, error) { + return _W3bstreamProver.Contract.OwnerOf(&_W3bstreamProver.CallOpts, tokenId) +} + +// OwnerOf is a free data retrieval call binding the contract method 0x6352211e. +// +// Solidity: function ownerOf(uint256 tokenId) view returns(address) +func (_W3bstreamProver *W3bstreamProverCallerSession) OwnerOf(tokenId *big.Int) (common.Address, error) { + return _W3bstreamProver.Contract.OwnerOf(&_W3bstreamProver.CallOpts, tokenId) +} + +// OwnerOfOperator is a free data retrieval call binding the contract method 0xaeb44406. +// +// Solidity: function ownerOfOperator(address _operator) view returns(uint256, address) +func (_W3bstreamProver *W3bstreamProverCaller) OwnerOfOperator(opts *bind.CallOpts, _operator common.Address) (*big.Int, common.Address, error) { + var out []interface{} + err := _W3bstreamProver.contract.Call(opts, &out, "ownerOfOperator", _operator) + + if err != nil { + return *new(*big.Int), *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + out1 := *abi.ConvertType(out[1], new(common.Address)).(*common.Address) + + return out0, out1, err + +} + +// OwnerOfOperator is a free data retrieval call binding the contract method 0xaeb44406. +// +// Solidity: function ownerOfOperator(address _operator) view returns(uint256, address) +func (_W3bstreamProver *W3bstreamProverSession) OwnerOfOperator(_operator common.Address) (*big.Int, common.Address, error) { + return _W3bstreamProver.Contract.OwnerOfOperator(&_W3bstreamProver.CallOpts, _operator) +} + +// OwnerOfOperator is a free data retrieval call binding the contract method 0xaeb44406. +// +// Solidity: function ownerOfOperator(address _operator) view returns(uint256, address) +func (_W3bstreamProver *W3bstreamProverCallerSession) OwnerOfOperator(_operator common.Address) (*big.Int, common.Address, error) { + return _W3bstreamProver.Contract.OwnerOfOperator(&_W3bstreamProver.CallOpts, _operator) +} + +// Prover is a free data retrieval call binding the contract method 0x2becbd3e. +// +// Solidity: function prover(uint256 _id) view returns(address) +func (_W3bstreamProver *W3bstreamProverCaller) Prover(opts *bind.CallOpts, _id *big.Int) (common.Address, error) { + var out []interface{} + err := _W3bstreamProver.contract.Call(opts, &out, "prover", _id) + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// Prover is a free data retrieval call binding the contract method 0x2becbd3e. +// +// Solidity: function prover(uint256 _id) view returns(address) +func (_W3bstreamProver *W3bstreamProverSession) Prover(_id *big.Int) (common.Address, error) { + return _W3bstreamProver.Contract.Prover(&_W3bstreamProver.CallOpts, _id) +} + +// Prover is a free data retrieval call binding the contract method 0x2becbd3e. +// +// Solidity: function prover(uint256 _id) view returns(address) +func (_W3bstreamProver *W3bstreamProverCallerSession) Prover(_id *big.Int) (common.Address, error) { + return _W3bstreamProver.Contract.Prover(&_W3bstreamProver.CallOpts, _id) +} + +// SupportsInterface is a free data retrieval call binding the contract method 0x01ffc9a7. +// +// Solidity: function supportsInterface(bytes4 interfaceId) view returns(bool) +func (_W3bstreamProver *W3bstreamProverCaller) SupportsInterface(opts *bind.CallOpts, interfaceId [4]byte) (bool, error) { + var out []interface{} + err := _W3bstreamProver.contract.Call(opts, &out, "supportsInterface", interfaceId) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// SupportsInterface is a free data retrieval call binding the contract method 0x01ffc9a7. +// +// Solidity: function supportsInterface(bytes4 interfaceId) view returns(bool) +func (_W3bstreamProver *W3bstreamProverSession) SupportsInterface(interfaceId [4]byte) (bool, error) { + return _W3bstreamProver.Contract.SupportsInterface(&_W3bstreamProver.CallOpts, interfaceId) +} + +// SupportsInterface is a free data retrieval call binding the contract method 0x01ffc9a7. +// +// Solidity: function supportsInterface(bytes4 interfaceId) view returns(bool) +func (_W3bstreamProver *W3bstreamProverCallerSession) SupportsInterface(interfaceId [4]byte) (bool, error) { + return _W3bstreamProver.Contract.SupportsInterface(&_W3bstreamProver.CallOpts, interfaceId) +} + +// Symbol is a free data retrieval call binding the contract method 0x95d89b41. +// +// Solidity: function symbol() view returns(string) +func (_W3bstreamProver *W3bstreamProverCaller) Symbol(opts *bind.CallOpts) (string, error) { + var out []interface{} + err := _W3bstreamProver.contract.Call(opts, &out, "symbol") + + if err != nil { + return *new(string), err + } + + out0 := *abi.ConvertType(out[0], new(string)).(*string) + + return out0, err + +} + +// Symbol is a free data retrieval call binding the contract method 0x95d89b41. +// +// Solidity: function symbol() view returns(string) +func (_W3bstreamProver *W3bstreamProverSession) Symbol() (string, error) { + return _W3bstreamProver.Contract.Symbol(&_W3bstreamProver.CallOpts) +} + +// Symbol is a free data retrieval call binding the contract method 0x95d89b41. +// +// Solidity: function symbol() view returns(string) +func (_W3bstreamProver *W3bstreamProverCallerSession) Symbol() (string, error) { + return _W3bstreamProver.Contract.Symbol(&_W3bstreamProver.CallOpts) +} + +// TokenURI is a free data retrieval call binding the contract method 0xc87b56dd. +// +// Solidity: function tokenURI(uint256 tokenId) view returns(string) +func (_W3bstreamProver *W3bstreamProverCaller) TokenURI(opts *bind.CallOpts, tokenId *big.Int) (string, error) { + var out []interface{} + err := _W3bstreamProver.contract.Call(opts, &out, "tokenURI", tokenId) + + if err != nil { + return *new(string), err + } + + out0 := *abi.ConvertType(out[0], new(string)).(*string) + + return out0, err + +} + +// TokenURI is a free data retrieval call binding the contract method 0xc87b56dd. +// +// Solidity: function tokenURI(uint256 tokenId) view returns(string) +func (_W3bstreamProver *W3bstreamProverSession) TokenURI(tokenId *big.Int) (string, error) { + return _W3bstreamProver.Contract.TokenURI(&_W3bstreamProver.CallOpts, tokenId) +} + +// TokenURI is a free data retrieval call binding the contract method 0xc87b56dd. +// +// Solidity: function tokenURI(uint256 tokenId) view returns(string) +func (_W3bstreamProver *W3bstreamProverCallerSession) TokenURI(tokenId *big.Int) (string, error) { + return _W3bstreamProver.Contract.TokenURI(&_W3bstreamProver.CallOpts, tokenId) +} + +// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. +// +// Solidity: function approve(address to, uint256 tokenId) returns() +func (_W3bstreamProver *W3bstreamProverTransactor) Approve(opts *bind.TransactOpts, to common.Address, tokenId *big.Int) (*types.Transaction, error) { + return _W3bstreamProver.contract.Transact(opts, "approve", to, tokenId) +} + +// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. +// +// Solidity: function approve(address to, uint256 tokenId) returns() +func (_W3bstreamProver *W3bstreamProverSession) Approve(to common.Address, tokenId *big.Int) (*types.Transaction, error) { + return _W3bstreamProver.Contract.Approve(&_W3bstreamProver.TransactOpts, to, tokenId) +} + +// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. +// +// Solidity: function approve(address to, uint256 tokenId) returns() +func (_W3bstreamProver *W3bstreamProverTransactorSession) Approve(to common.Address, tokenId *big.Int) (*types.Transaction, error) { + return _W3bstreamProver.Contract.Approve(&_W3bstreamProver.TransactOpts, to, tokenId) +} + +// ChangeOperator is a paid mutator transaction binding the contract method 0x7a3bc817. +// +// Solidity: function changeOperator(uint256 _id, address _operator) returns() +func (_W3bstreamProver *W3bstreamProverTransactor) ChangeOperator(opts *bind.TransactOpts, _id *big.Int, _operator common.Address) (*types.Transaction, error) { + return _W3bstreamProver.contract.Transact(opts, "changeOperator", _id, _operator) +} + +// ChangeOperator is a paid mutator transaction binding the contract method 0x7a3bc817. +// +// Solidity: function changeOperator(uint256 _id, address _operator) returns() +func (_W3bstreamProver *W3bstreamProverSession) ChangeOperator(_id *big.Int, _operator common.Address) (*types.Transaction, error) { + return _W3bstreamProver.Contract.ChangeOperator(&_W3bstreamProver.TransactOpts, _id, _operator) +} + +// ChangeOperator is a paid mutator transaction binding the contract method 0x7a3bc817. +// +// Solidity: function changeOperator(uint256 _id, address _operator) returns() +func (_W3bstreamProver *W3bstreamProverTransactorSession) ChangeOperator(_id *big.Int, _operator common.Address) (*types.Transaction, error) { + return _W3bstreamProver.Contract.ChangeOperator(&_W3bstreamProver.TransactOpts, _id, _operator) +} + +// Initialize is a paid mutator transaction binding the contract method 0x4cd88b76. +// +// Solidity: function initialize(string _name, string _symbol) returns() +func (_W3bstreamProver *W3bstreamProverTransactor) Initialize(opts *bind.TransactOpts, _name string, _symbol string) (*types.Transaction, error) { + return _W3bstreamProver.contract.Transact(opts, "initialize", _name, _symbol) +} + +// Initialize is a paid mutator transaction binding the contract method 0x4cd88b76. +// +// Solidity: function initialize(string _name, string _symbol) returns() +func (_W3bstreamProver *W3bstreamProverSession) Initialize(_name string, _symbol string) (*types.Transaction, error) { + return _W3bstreamProver.Contract.Initialize(&_W3bstreamProver.TransactOpts, _name, _symbol) +} + +// Initialize is a paid mutator transaction binding the contract method 0x4cd88b76. +// +// Solidity: function initialize(string _name, string _symbol) returns() +func (_W3bstreamProver *W3bstreamProverTransactorSession) Initialize(_name string, _symbol string) (*types.Transaction, error) { + return _W3bstreamProver.Contract.Initialize(&_W3bstreamProver.TransactOpts, _name, _symbol) +} + +// Mint is a paid mutator transaction binding the contract method 0x6a627842. +// +// Solidity: function mint(address _account) returns(uint256 id_) +func (_W3bstreamProver *W3bstreamProverTransactor) Mint(opts *bind.TransactOpts, _account common.Address) (*types.Transaction, error) { + return _W3bstreamProver.contract.Transact(opts, "mint", _account) +} + +// Mint is a paid mutator transaction binding the contract method 0x6a627842. +// +// Solidity: function mint(address _account) returns(uint256 id_) +func (_W3bstreamProver *W3bstreamProverSession) Mint(_account common.Address) (*types.Transaction, error) { + return _W3bstreamProver.Contract.Mint(&_W3bstreamProver.TransactOpts, _account) +} + +// Mint is a paid mutator transaction binding the contract method 0x6a627842. +// +// Solidity: function mint(address _account) returns(uint256 id_) +func (_W3bstreamProver *W3bstreamProverTransactorSession) Mint(_account common.Address) (*types.Transaction, error) { + return _W3bstreamProver.Contract.Mint(&_W3bstreamProver.TransactOpts, _account) +} + +// Pause is a paid mutator transaction binding the contract method 0x136439dd. +// +// Solidity: function pause(uint256 _id) returns() +func (_W3bstreamProver *W3bstreamProverTransactor) Pause(opts *bind.TransactOpts, _id *big.Int) (*types.Transaction, error) { + return _W3bstreamProver.contract.Transact(opts, "pause", _id) +} + +// Pause is a paid mutator transaction binding the contract method 0x136439dd. +// +// Solidity: function pause(uint256 _id) returns() +func (_W3bstreamProver *W3bstreamProverSession) Pause(_id *big.Int) (*types.Transaction, error) { + return _W3bstreamProver.Contract.Pause(&_W3bstreamProver.TransactOpts, _id) +} + +// Pause is a paid mutator transaction binding the contract method 0x136439dd. +// +// Solidity: function pause(uint256 _id) returns() +func (_W3bstreamProver *W3bstreamProverTransactorSession) Pause(_id *big.Int) (*types.Transaction, error) { + return _W3bstreamProver.Contract.Pause(&_W3bstreamProver.TransactOpts, _id) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_W3bstreamProver *W3bstreamProverTransactor) RenounceOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { + return _W3bstreamProver.contract.Transact(opts, "renounceOwnership") +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_W3bstreamProver *W3bstreamProverSession) RenounceOwnership() (*types.Transaction, error) { + return _W3bstreamProver.Contract.RenounceOwnership(&_W3bstreamProver.TransactOpts) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_W3bstreamProver *W3bstreamProverTransactorSession) RenounceOwnership() (*types.Transaction, error) { + return _W3bstreamProver.Contract.RenounceOwnership(&_W3bstreamProver.TransactOpts) +} + +// Resume is a paid mutator transaction binding the contract method 0x414000b5. +// +// Solidity: function resume(uint256 _id) returns() +func (_W3bstreamProver *W3bstreamProverTransactor) Resume(opts *bind.TransactOpts, _id *big.Int) (*types.Transaction, error) { + return _W3bstreamProver.contract.Transact(opts, "resume", _id) +} + +// Resume is a paid mutator transaction binding the contract method 0x414000b5. +// +// Solidity: function resume(uint256 _id) returns() +func (_W3bstreamProver *W3bstreamProverSession) Resume(_id *big.Int) (*types.Transaction, error) { + return _W3bstreamProver.Contract.Resume(&_W3bstreamProver.TransactOpts, _id) +} + +// Resume is a paid mutator transaction binding the contract method 0x414000b5. +// +// Solidity: function resume(uint256 _id) returns() +func (_W3bstreamProver *W3bstreamProverTransactorSession) Resume(_id *big.Int) (*types.Transaction, error) { + return _W3bstreamProver.Contract.Resume(&_W3bstreamProver.TransactOpts, _id) +} + +// SafeTransferFrom is a paid mutator transaction binding the contract method 0x42842e0e. +// +// Solidity: function safeTransferFrom(address from, address to, uint256 tokenId) returns() +func (_W3bstreamProver *W3bstreamProverTransactor) SafeTransferFrom(opts *bind.TransactOpts, from common.Address, to common.Address, tokenId *big.Int) (*types.Transaction, error) { + return _W3bstreamProver.contract.Transact(opts, "safeTransferFrom", from, to, tokenId) +} + +// SafeTransferFrom is a paid mutator transaction binding the contract method 0x42842e0e. +// +// Solidity: function safeTransferFrom(address from, address to, uint256 tokenId) returns() +func (_W3bstreamProver *W3bstreamProverSession) SafeTransferFrom(from common.Address, to common.Address, tokenId *big.Int) (*types.Transaction, error) { + return _W3bstreamProver.Contract.SafeTransferFrom(&_W3bstreamProver.TransactOpts, from, to, tokenId) +} + +// SafeTransferFrom is a paid mutator transaction binding the contract method 0x42842e0e. +// +// Solidity: function safeTransferFrom(address from, address to, uint256 tokenId) returns() +func (_W3bstreamProver *W3bstreamProverTransactorSession) SafeTransferFrom(from common.Address, to common.Address, tokenId *big.Int) (*types.Transaction, error) { + return _W3bstreamProver.Contract.SafeTransferFrom(&_W3bstreamProver.TransactOpts, from, to, tokenId) +} + +// SafeTransferFrom0 is a paid mutator transaction binding the contract method 0xb88d4fde. +// +// Solidity: function safeTransferFrom(address from, address to, uint256 tokenId, bytes data) returns() +func (_W3bstreamProver *W3bstreamProverTransactor) SafeTransferFrom0(opts *bind.TransactOpts, from common.Address, to common.Address, tokenId *big.Int, data []byte) (*types.Transaction, error) { + return _W3bstreamProver.contract.Transact(opts, "safeTransferFrom0", from, to, tokenId, data) +} + +// SafeTransferFrom0 is a paid mutator transaction binding the contract method 0xb88d4fde. +// +// Solidity: function safeTransferFrom(address from, address to, uint256 tokenId, bytes data) returns() +func (_W3bstreamProver *W3bstreamProverSession) SafeTransferFrom0(from common.Address, to common.Address, tokenId *big.Int, data []byte) (*types.Transaction, error) { + return _W3bstreamProver.Contract.SafeTransferFrom0(&_W3bstreamProver.TransactOpts, from, to, tokenId, data) +} + +// SafeTransferFrom0 is a paid mutator transaction binding the contract method 0xb88d4fde. +// +// Solidity: function safeTransferFrom(address from, address to, uint256 tokenId, bytes data) returns() +func (_W3bstreamProver *W3bstreamProverTransactorSession) SafeTransferFrom0(from common.Address, to common.Address, tokenId *big.Int, data []byte) (*types.Transaction, error) { + return _W3bstreamProver.Contract.SafeTransferFrom0(&_W3bstreamProver.TransactOpts, from, to, tokenId, data) +} + +// SetApprovalForAll is a paid mutator transaction binding the contract method 0xa22cb465. +// +// Solidity: function setApprovalForAll(address operator, bool approved) returns() +func (_W3bstreamProver *W3bstreamProverTransactor) SetApprovalForAll(opts *bind.TransactOpts, operator common.Address, approved bool) (*types.Transaction, error) { + return _W3bstreamProver.contract.Transact(opts, "setApprovalForAll", operator, approved) +} + +// SetApprovalForAll is a paid mutator transaction binding the contract method 0xa22cb465. +// +// Solidity: function setApprovalForAll(address operator, bool approved) returns() +func (_W3bstreamProver *W3bstreamProverSession) SetApprovalForAll(operator common.Address, approved bool) (*types.Transaction, error) { + return _W3bstreamProver.Contract.SetApprovalForAll(&_W3bstreamProver.TransactOpts, operator, approved) +} + +// SetApprovalForAll is a paid mutator transaction binding the contract method 0xa22cb465. +// +// Solidity: function setApprovalForAll(address operator, bool approved) returns() +func (_W3bstreamProver *W3bstreamProverTransactorSession) SetApprovalForAll(operator common.Address, approved bool) (*types.Transaction, error) { + return _W3bstreamProver.Contract.SetApprovalForAll(&_W3bstreamProver.TransactOpts, operator, approved) +} + +// SetMinter is a paid mutator transaction binding the contract method 0xfca3b5aa. +// +// Solidity: function setMinter(address _minter) returns() +func (_W3bstreamProver *W3bstreamProverTransactor) SetMinter(opts *bind.TransactOpts, _minter common.Address) (*types.Transaction, error) { + return _W3bstreamProver.contract.Transact(opts, "setMinter", _minter) +} + +// SetMinter is a paid mutator transaction binding the contract method 0xfca3b5aa. +// +// Solidity: function setMinter(address _minter) returns() +func (_W3bstreamProver *W3bstreamProverSession) SetMinter(_minter common.Address) (*types.Transaction, error) { + return _W3bstreamProver.Contract.SetMinter(&_W3bstreamProver.TransactOpts, _minter) +} + +// SetMinter is a paid mutator transaction binding the contract method 0xfca3b5aa. +// +// Solidity: function setMinter(address _minter) returns() +func (_W3bstreamProver *W3bstreamProverTransactorSession) SetMinter(_minter common.Address) (*types.Transaction, error) { + return _W3bstreamProver.Contract.SetMinter(&_W3bstreamProver.TransactOpts, _minter) +} + +// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. +// +// Solidity: function transferFrom(address from, address to, uint256 tokenId) returns() +func (_W3bstreamProver *W3bstreamProverTransactor) TransferFrom(opts *bind.TransactOpts, from common.Address, to common.Address, tokenId *big.Int) (*types.Transaction, error) { + return _W3bstreamProver.contract.Transact(opts, "transferFrom", from, to, tokenId) +} + +// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. +// +// Solidity: function transferFrom(address from, address to, uint256 tokenId) returns() +func (_W3bstreamProver *W3bstreamProverSession) TransferFrom(from common.Address, to common.Address, tokenId *big.Int) (*types.Transaction, error) { + return _W3bstreamProver.Contract.TransferFrom(&_W3bstreamProver.TransactOpts, from, to, tokenId) +} + +// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. +// +// Solidity: function transferFrom(address from, address to, uint256 tokenId) returns() +func (_W3bstreamProver *W3bstreamProverTransactorSession) TransferFrom(from common.Address, to common.Address, tokenId *big.Int) (*types.Transaction, error) { + return _W3bstreamProver.Contract.TransferFrom(&_W3bstreamProver.TransactOpts, from, to, tokenId) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_W3bstreamProver *W3bstreamProverTransactor) TransferOwnership(opts *bind.TransactOpts, newOwner common.Address) (*types.Transaction, error) { + return _W3bstreamProver.contract.Transact(opts, "transferOwnership", newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_W3bstreamProver *W3bstreamProverSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _W3bstreamProver.Contract.TransferOwnership(&_W3bstreamProver.TransactOpts, newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_W3bstreamProver *W3bstreamProverTransactorSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _W3bstreamProver.Contract.TransferOwnership(&_W3bstreamProver.TransactOpts, newOwner) +} + +// UpdateNodeType is a paid mutator transaction binding the contract method 0x6a07973f. +// +// Solidity: function updateNodeType(uint256 _id, uint256 _type) returns() +func (_W3bstreamProver *W3bstreamProverTransactor) UpdateNodeType(opts *bind.TransactOpts, _id *big.Int, _type *big.Int) (*types.Transaction, error) { + return _W3bstreamProver.contract.Transact(opts, "updateNodeType", _id, _type) +} + +// UpdateNodeType is a paid mutator transaction binding the contract method 0x6a07973f. +// +// Solidity: function updateNodeType(uint256 _id, uint256 _type) returns() +func (_W3bstreamProver *W3bstreamProverSession) UpdateNodeType(_id *big.Int, _type *big.Int) (*types.Transaction, error) { + return _W3bstreamProver.Contract.UpdateNodeType(&_W3bstreamProver.TransactOpts, _id, _type) +} + +// UpdateNodeType is a paid mutator transaction binding the contract method 0x6a07973f. +// +// Solidity: function updateNodeType(uint256 _id, uint256 _type) returns() +func (_W3bstreamProver *W3bstreamProverTransactorSession) UpdateNodeType(_id *big.Int, _type *big.Int) (*types.Transaction, error) { + return _W3bstreamProver.Contract.UpdateNodeType(&_W3bstreamProver.TransactOpts, _id, _type) +} + +// W3bstreamProverApprovalIterator is returned from FilterApproval and is used to iterate over the raw logs and unpacked data for Approval events raised by the W3bstreamProver contract. +type W3bstreamProverApprovalIterator struct { + Event *W3bstreamProverApproval // 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 *W3bstreamProverApprovalIterator) 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(W3bstreamProverApproval) + 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(W3bstreamProverApproval) + 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 *W3bstreamProverApprovalIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *W3bstreamProverApprovalIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// W3bstreamProverApproval represents a Approval event raised by the W3bstreamProver contract. +type W3bstreamProverApproval struct { + Owner common.Address + Approved common.Address + TokenId *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterApproval is a free log retrieval operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. +// +// Solidity: event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId) +func (_W3bstreamProver *W3bstreamProverFilterer) FilterApproval(opts *bind.FilterOpts, owner []common.Address, approved []common.Address, tokenId []*big.Int) (*W3bstreamProverApprovalIterator, error) { + + var ownerRule []interface{} + for _, ownerItem := range owner { + ownerRule = append(ownerRule, ownerItem) + } + var approvedRule []interface{} + for _, approvedItem := range approved { + approvedRule = append(approvedRule, approvedItem) + } + var tokenIdRule []interface{} + for _, tokenIdItem := range tokenId { + tokenIdRule = append(tokenIdRule, tokenIdItem) + } + + logs, sub, err := _W3bstreamProver.contract.FilterLogs(opts, "Approval", ownerRule, approvedRule, tokenIdRule) + if err != nil { + return nil, err + } + return &W3bstreamProverApprovalIterator{contract: _W3bstreamProver.contract, event: "Approval", logs: logs, sub: sub}, nil +} + +// WatchApproval is a free log subscription operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. +// +// Solidity: event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId) +func (_W3bstreamProver *W3bstreamProverFilterer) WatchApproval(opts *bind.WatchOpts, sink chan<- *W3bstreamProverApproval, owner []common.Address, approved []common.Address, tokenId []*big.Int) (event.Subscription, error) { + + var ownerRule []interface{} + for _, ownerItem := range owner { + ownerRule = append(ownerRule, ownerItem) + } + var approvedRule []interface{} + for _, approvedItem := range approved { + approvedRule = append(approvedRule, approvedItem) + } + var tokenIdRule []interface{} + for _, tokenIdItem := range tokenId { + tokenIdRule = append(tokenIdRule, tokenIdItem) + } + + logs, sub, err := _W3bstreamProver.contract.WatchLogs(opts, "Approval", ownerRule, approvedRule, tokenIdRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(W3bstreamProverApproval) + if err := _W3bstreamProver.contract.UnpackLog(event, "Approval", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseApproval is a log parse operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. +// +// Solidity: event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId) +func (_W3bstreamProver *W3bstreamProverFilterer) ParseApproval(log types.Log) (*W3bstreamProverApproval, error) { + event := new(W3bstreamProverApproval) + if err := _W3bstreamProver.contract.UnpackLog(event, "Approval", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// W3bstreamProverApprovalForAllIterator is returned from FilterApprovalForAll and is used to iterate over the raw logs and unpacked data for ApprovalForAll events raised by the W3bstreamProver contract. +type W3bstreamProverApprovalForAllIterator struct { + Event *W3bstreamProverApprovalForAll // 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 *W3bstreamProverApprovalForAllIterator) 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(W3bstreamProverApprovalForAll) + 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(W3bstreamProverApprovalForAll) + 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 *W3bstreamProverApprovalForAllIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *W3bstreamProverApprovalForAllIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// W3bstreamProverApprovalForAll represents a ApprovalForAll event raised by the W3bstreamProver contract. +type W3bstreamProverApprovalForAll struct { + Owner common.Address + Operator common.Address + Approved bool + Raw types.Log // Blockchain specific contextual infos +} + +// FilterApprovalForAll is a free log retrieval operation binding the contract event 0x17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31. +// +// Solidity: event ApprovalForAll(address indexed owner, address indexed operator, bool approved) +func (_W3bstreamProver *W3bstreamProverFilterer) FilterApprovalForAll(opts *bind.FilterOpts, owner []common.Address, operator []common.Address) (*W3bstreamProverApprovalForAllIterator, error) { + + var ownerRule []interface{} + for _, ownerItem := range owner { + ownerRule = append(ownerRule, ownerItem) + } + var operatorRule []interface{} + for _, operatorItem := range operator { + operatorRule = append(operatorRule, operatorItem) + } + + logs, sub, err := _W3bstreamProver.contract.FilterLogs(opts, "ApprovalForAll", ownerRule, operatorRule) + if err != nil { + return nil, err + } + return &W3bstreamProverApprovalForAllIterator{contract: _W3bstreamProver.contract, event: "ApprovalForAll", logs: logs, sub: sub}, nil +} + +// WatchApprovalForAll is a free log subscription operation binding the contract event 0x17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31. +// +// Solidity: event ApprovalForAll(address indexed owner, address indexed operator, bool approved) +func (_W3bstreamProver *W3bstreamProverFilterer) WatchApprovalForAll(opts *bind.WatchOpts, sink chan<- *W3bstreamProverApprovalForAll, owner []common.Address, operator []common.Address) (event.Subscription, error) { + + var ownerRule []interface{} + for _, ownerItem := range owner { + ownerRule = append(ownerRule, ownerItem) + } + var operatorRule []interface{} + for _, operatorItem := range operator { + operatorRule = append(operatorRule, operatorItem) + } + + logs, sub, err := _W3bstreamProver.contract.WatchLogs(opts, "ApprovalForAll", ownerRule, operatorRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(W3bstreamProverApprovalForAll) + if err := _W3bstreamProver.contract.UnpackLog(event, "ApprovalForAll", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseApprovalForAll is a log parse operation binding the contract event 0x17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31. +// +// Solidity: event ApprovalForAll(address indexed owner, address indexed operator, bool approved) +func (_W3bstreamProver *W3bstreamProverFilterer) ParseApprovalForAll(log types.Log) (*W3bstreamProverApprovalForAll, error) { + event := new(W3bstreamProverApprovalForAll) + if err := _W3bstreamProver.contract.UnpackLog(event, "ApprovalForAll", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// W3bstreamProverInitializedIterator is returned from FilterInitialized and is used to iterate over the raw logs and unpacked data for Initialized events raised by the W3bstreamProver contract. +type W3bstreamProverInitializedIterator struct { + Event *W3bstreamProverInitialized // 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 *W3bstreamProverInitializedIterator) 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(W3bstreamProverInitialized) + 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(W3bstreamProverInitialized) + 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 *W3bstreamProverInitializedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *W3bstreamProverInitializedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// W3bstreamProverInitialized represents a Initialized event raised by the W3bstreamProver contract. +type W3bstreamProverInitialized struct { + Version uint8 + Raw types.Log // Blockchain specific contextual infos +} + +// FilterInitialized is a free log retrieval operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. +// +// Solidity: event Initialized(uint8 version) +func (_W3bstreamProver *W3bstreamProverFilterer) FilterInitialized(opts *bind.FilterOpts) (*W3bstreamProverInitializedIterator, error) { + + logs, sub, err := _W3bstreamProver.contract.FilterLogs(opts, "Initialized") + if err != nil { + return nil, err + } + return &W3bstreamProverInitializedIterator{contract: _W3bstreamProver.contract, event: "Initialized", logs: logs, sub: sub}, nil +} + +// WatchInitialized is a free log subscription operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. +// +// Solidity: event Initialized(uint8 version) +func (_W3bstreamProver *W3bstreamProverFilterer) WatchInitialized(opts *bind.WatchOpts, sink chan<- *W3bstreamProverInitialized) (event.Subscription, error) { + + logs, sub, err := _W3bstreamProver.contract.WatchLogs(opts, "Initialized") + 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(W3bstreamProverInitialized) + if err := _W3bstreamProver.contract.UnpackLog(event, "Initialized", 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 +} + +// ParseInitialized is a log parse operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. +// +// Solidity: event Initialized(uint8 version) +func (_W3bstreamProver *W3bstreamProverFilterer) ParseInitialized(log types.Log) (*W3bstreamProverInitialized, error) { + event := new(W3bstreamProverInitialized) + if err := _W3bstreamProver.contract.UnpackLog(event, "Initialized", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// W3bstreamProverMinterSetIterator is returned from FilterMinterSet and is used to iterate over the raw logs and unpacked data for MinterSet events raised by the W3bstreamProver contract. +type W3bstreamProverMinterSetIterator struct { + Event *W3bstreamProverMinterSet // 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 *W3bstreamProverMinterSetIterator) 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(W3bstreamProverMinterSet) + 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(W3bstreamProverMinterSet) + 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 *W3bstreamProverMinterSetIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *W3bstreamProverMinterSetIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// W3bstreamProverMinterSet represents a MinterSet event raised by the W3bstreamProver contract. +type W3bstreamProverMinterSet struct { + Minter common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterMinterSet is a free log retrieval operation binding the contract event 0x726b590ef91a8c76ad05bbe91a57ef84605276528f49cd47d787f558a4e755b6. +// +// Solidity: event MinterSet(address minter) +func (_W3bstreamProver *W3bstreamProverFilterer) FilterMinterSet(opts *bind.FilterOpts) (*W3bstreamProverMinterSetIterator, error) { + + logs, sub, err := _W3bstreamProver.contract.FilterLogs(opts, "MinterSet") + if err != nil { + return nil, err + } + return &W3bstreamProverMinterSetIterator{contract: _W3bstreamProver.contract, event: "MinterSet", logs: logs, sub: sub}, nil +} + +// WatchMinterSet is a free log subscription operation binding the contract event 0x726b590ef91a8c76ad05bbe91a57ef84605276528f49cd47d787f558a4e755b6. +// +// Solidity: event MinterSet(address minter) +func (_W3bstreamProver *W3bstreamProverFilterer) WatchMinterSet(opts *bind.WatchOpts, sink chan<- *W3bstreamProverMinterSet) (event.Subscription, error) { + + logs, sub, err := _W3bstreamProver.contract.WatchLogs(opts, "MinterSet") + 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(W3bstreamProverMinterSet) + if err := _W3bstreamProver.contract.UnpackLog(event, "MinterSet", 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 +} + +// ParseMinterSet is a log parse operation binding the contract event 0x726b590ef91a8c76ad05bbe91a57ef84605276528f49cd47d787f558a4e755b6. +// +// Solidity: event MinterSet(address minter) +func (_W3bstreamProver *W3bstreamProverFilterer) ParseMinterSet(log types.Log) (*W3bstreamProverMinterSet, error) { + event := new(W3bstreamProverMinterSet) + if err := _W3bstreamProver.contract.UnpackLog(event, "MinterSet", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// W3bstreamProverNodeTypeUpdatedIterator is returned from FilterNodeTypeUpdated and is used to iterate over the raw logs and unpacked data for NodeTypeUpdated events raised by the W3bstreamProver contract. +type W3bstreamProverNodeTypeUpdatedIterator struct { + Event *W3bstreamProverNodeTypeUpdated // 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 *W3bstreamProverNodeTypeUpdatedIterator) 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(W3bstreamProverNodeTypeUpdated) + 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(W3bstreamProverNodeTypeUpdated) + 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 *W3bstreamProverNodeTypeUpdatedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *W3bstreamProverNodeTypeUpdatedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// W3bstreamProverNodeTypeUpdated represents a NodeTypeUpdated event raised by the W3bstreamProver contract. +type W3bstreamProverNodeTypeUpdated struct { + Id *big.Int + Typ *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterNodeTypeUpdated is a free log retrieval operation binding the contract event 0x09e65b7abf1ac020ee57d85addfaffc3466fbaa144c58cf8d736f09de55820ab. +// +// Solidity: event NodeTypeUpdated(uint256 indexed id, uint256 typ) +func (_W3bstreamProver *W3bstreamProverFilterer) FilterNodeTypeUpdated(opts *bind.FilterOpts, id []*big.Int) (*W3bstreamProverNodeTypeUpdatedIterator, error) { + + var idRule []interface{} + for _, idItem := range id { + idRule = append(idRule, idItem) + } + + logs, sub, err := _W3bstreamProver.contract.FilterLogs(opts, "NodeTypeUpdated", idRule) + if err != nil { + return nil, err + } + return &W3bstreamProverNodeTypeUpdatedIterator{contract: _W3bstreamProver.contract, event: "NodeTypeUpdated", logs: logs, sub: sub}, nil +} + +// WatchNodeTypeUpdated is a free log subscription operation binding the contract event 0x09e65b7abf1ac020ee57d85addfaffc3466fbaa144c58cf8d736f09de55820ab. +// +// Solidity: event NodeTypeUpdated(uint256 indexed id, uint256 typ) +func (_W3bstreamProver *W3bstreamProverFilterer) WatchNodeTypeUpdated(opts *bind.WatchOpts, sink chan<- *W3bstreamProverNodeTypeUpdated, id []*big.Int) (event.Subscription, error) { + + var idRule []interface{} + for _, idItem := range id { + idRule = append(idRule, idItem) + } + + logs, sub, err := _W3bstreamProver.contract.WatchLogs(opts, "NodeTypeUpdated", idRule) + 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(W3bstreamProverNodeTypeUpdated) + if err := _W3bstreamProver.contract.UnpackLog(event, "NodeTypeUpdated", 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 +} + +// ParseNodeTypeUpdated is a log parse operation binding the contract event 0x09e65b7abf1ac020ee57d85addfaffc3466fbaa144c58cf8d736f09de55820ab. +// +// Solidity: event NodeTypeUpdated(uint256 indexed id, uint256 typ) +func (_W3bstreamProver *W3bstreamProverFilterer) ParseNodeTypeUpdated(log types.Log) (*W3bstreamProverNodeTypeUpdated, error) { + event := new(W3bstreamProverNodeTypeUpdated) + if err := _W3bstreamProver.contract.UnpackLog(event, "NodeTypeUpdated", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// W3bstreamProverOperatorSetIterator is returned from FilterOperatorSet and is used to iterate over the raw logs and unpacked data for OperatorSet events raised by the W3bstreamProver contract. +type W3bstreamProverOperatorSetIterator struct { + Event *W3bstreamProverOperatorSet // 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 *W3bstreamProverOperatorSetIterator) 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(W3bstreamProverOperatorSet) + 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(W3bstreamProverOperatorSet) + 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 *W3bstreamProverOperatorSetIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *W3bstreamProverOperatorSetIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// W3bstreamProverOperatorSet represents a OperatorSet event raised by the W3bstreamProver contract. +type W3bstreamProverOperatorSet struct { + Id *big.Int + Operator common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterOperatorSet is a free log retrieval operation binding the contract event 0x712369dba77e7931b9ec3bd57319108256b9f79ea5b5255122e3c06117421593. +// +// Solidity: event OperatorSet(uint256 indexed id, address indexed operator) +func (_W3bstreamProver *W3bstreamProverFilterer) FilterOperatorSet(opts *bind.FilterOpts, id []*big.Int, operator []common.Address) (*W3bstreamProverOperatorSetIterator, error) { + + var idRule []interface{} + for _, idItem := range id { + idRule = append(idRule, idItem) + } + var operatorRule []interface{} + for _, operatorItem := range operator { + operatorRule = append(operatorRule, operatorItem) + } + + logs, sub, err := _W3bstreamProver.contract.FilterLogs(opts, "OperatorSet", idRule, operatorRule) + if err != nil { + return nil, err + } + return &W3bstreamProverOperatorSetIterator{contract: _W3bstreamProver.contract, event: "OperatorSet", logs: logs, sub: sub}, nil +} + +// WatchOperatorSet is a free log subscription operation binding the contract event 0x712369dba77e7931b9ec3bd57319108256b9f79ea5b5255122e3c06117421593. +// +// Solidity: event OperatorSet(uint256 indexed id, address indexed operator) +func (_W3bstreamProver *W3bstreamProverFilterer) WatchOperatorSet(opts *bind.WatchOpts, sink chan<- *W3bstreamProverOperatorSet, id []*big.Int, operator []common.Address) (event.Subscription, error) { + + var idRule []interface{} + for _, idItem := range id { + idRule = append(idRule, idItem) + } + var operatorRule []interface{} + for _, operatorItem := range operator { + operatorRule = append(operatorRule, operatorItem) + } + + logs, sub, err := _W3bstreamProver.contract.WatchLogs(opts, "OperatorSet", idRule, operatorRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(W3bstreamProverOperatorSet) + if err := _W3bstreamProver.contract.UnpackLog(event, "OperatorSet", 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 +} + +// ParseOperatorSet is a log parse operation binding the contract event 0x712369dba77e7931b9ec3bd57319108256b9f79ea5b5255122e3c06117421593. +// +// Solidity: event OperatorSet(uint256 indexed id, address indexed operator) +func (_W3bstreamProver *W3bstreamProverFilterer) ParseOperatorSet(log types.Log) (*W3bstreamProverOperatorSet, error) { + event := new(W3bstreamProverOperatorSet) + if err := _W3bstreamProver.contract.UnpackLog(event, "OperatorSet", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// W3bstreamProverOwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the W3bstreamProver contract. +type W3bstreamProverOwnershipTransferredIterator struct { + Event *W3bstreamProverOwnershipTransferred // 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 *W3bstreamProverOwnershipTransferredIterator) 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(W3bstreamProverOwnershipTransferred) + 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(W3bstreamProverOwnershipTransferred) + 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 *W3bstreamProverOwnershipTransferredIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *W3bstreamProverOwnershipTransferredIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// W3bstreamProverOwnershipTransferred represents a OwnershipTransferred event raised by the W3bstreamProver contract. +type W3bstreamProverOwnershipTransferred struct { + PreviousOwner common.Address + NewOwner common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterOwnershipTransferred is a free log retrieval operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_W3bstreamProver *W3bstreamProverFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*W3bstreamProverOwnershipTransferredIterator, error) { + + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + } + var newOwnerRule []interface{} + for _, newOwnerItem := range newOwner { + newOwnerRule = append(newOwnerRule, newOwnerItem) + } + + logs, sub, err := _W3bstreamProver.contract.FilterLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return &W3bstreamProverOwnershipTransferredIterator{contract: _W3bstreamProver.contract, event: "OwnershipTransferred", logs: logs, sub: sub}, nil +} + +// WatchOwnershipTransferred is a free log subscription operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_W3bstreamProver *W3bstreamProverFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *W3bstreamProverOwnershipTransferred, previousOwner []common.Address, newOwner []common.Address) (event.Subscription, error) { + + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + } + var newOwnerRule []interface{} + for _, newOwnerItem := range newOwner { + newOwnerRule = append(newOwnerRule, newOwnerItem) + } + + logs, sub, err := _W3bstreamProver.contract.WatchLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(W3bstreamProverOwnershipTransferred) + if err := _W3bstreamProver.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseOwnershipTransferred is a log parse operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_W3bstreamProver *W3bstreamProverFilterer) ParseOwnershipTransferred(log types.Log) (*W3bstreamProverOwnershipTransferred, error) { + event := new(W3bstreamProverOwnershipTransferred) + if err := _W3bstreamProver.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// W3bstreamProverProverPausedIterator is returned from FilterProverPaused and is used to iterate over the raw logs and unpacked data for ProverPaused events raised by the W3bstreamProver contract. +type W3bstreamProverProverPausedIterator struct { + Event *W3bstreamProverProverPaused // 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 *W3bstreamProverProverPausedIterator) 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(W3bstreamProverProverPaused) + 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(W3bstreamProverProverPaused) + 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 *W3bstreamProverProverPausedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *W3bstreamProverProverPausedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// W3bstreamProverProverPaused represents a ProverPaused event raised by the W3bstreamProver contract. +type W3bstreamProverProverPaused struct { + Id *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterProverPaused is a free log retrieval operation binding the contract event 0x09c10a851184c6f4c4f912c821413d9b27d48061ecf90d270551f40a23131a88. +// +// Solidity: event ProverPaused(uint256 indexed id) +func (_W3bstreamProver *W3bstreamProverFilterer) FilterProverPaused(opts *bind.FilterOpts, id []*big.Int) (*W3bstreamProverProverPausedIterator, error) { + + var idRule []interface{} + for _, idItem := range id { + idRule = append(idRule, idItem) + } + + logs, sub, err := _W3bstreamProver.contract.FilterLogs(opts, "ProverPaused", idRule) + if err != nil { + return nil, err + } + return &W3bstreamProverProverPausedIterator{contract: _W3bstreamProver.contract, event: "ProverPaused", logs: logs, sub: sub}, nil +} + +// WatchProverPaused is a free log subscription operation binding the contract event 0x09c10a851184c6f4c4f912c821413d9b27d48061ecf90d270551f40a23131a88. +// +// Solidity: event ProverPaused(uint256 indexed id) +func (_W3bstreamProver *W3bstreamProverFilterer) WatchProverPaused(opts *bind.WatchOpts, sink chan<- *W3bstreamProverProverPaused, id []*big.Int) (event.Subscription, error) { + + var idRule []interface{} + for _, idItem := range id { + idRule = append(idRule, idItem) + } + + logs, sub, err := _W3bstreamProver.contract.WatchLogs(opts, "ProverPaused", idRule) + 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(W3bstreamProverProverPaused) + if err := _W3bstreamProver.contract.UnpackLog(event, "ProverPaused", 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 +} + +// ParseProverPaused is a log parse operation binding the contract event 0x09c10a851184c6f4c4f912c821413d9b27d48061ecf90d270551f40a23131a88. +// +// Solidity: event ProverPaused(uint256 indexed id) +func (_W3bstreamProver *W3bstreamProverFilterer) ParseProverPaused(log types.Log) (*W3bstreamProverProverPaused, error) { + event := new(W3bstreamProverProverPaused) + if err := _W3bstreamProver.contract.UnpackLog(event, "ProverPaused", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// W3bstreamProverProverResumedIterator is returned from FilterProverResumed and is used to iterate over the raw logs and unpacked data for ProverResumed events raised by the W3bstreamProver contract. +type W3bstreamProverProverResumedIterator struct { + Event *W3bstreamProverProverResumed // 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 *W3bstreamProverProverResumedIterator) 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(W3bstreamProverProverResumed) + 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(W3bstreamProverProverResumed) + 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 *W3bstreamProverProverResumedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *W3bstreamProverProverResumedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// W3bstreamProverProverResumed represents a ProverResumed event raised by the W3bstreamProver contract. +type W3bstreamProverProverResumed struct { + Id *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterProverResumed is a free log retrieval operation binding the contract event 0xd5c12038aca4e36d3193c55c06f70eee8f829f1165a9e383c70b00d28e3bfdb9. +// +// Solidity: event ProverResumed(uint256 indexed id) +func (_W3bstreamProver *W3bstreamProverFilterer) FilterProverResumed(opts *bind.FilterOpts, id []*big.Int) (*W3bstreamProverProverResumedIterator, error) { + + var idRule []interface{} + for _, idItem := range id { + idRule = append(idRule, idItem) + } + + logs, sub, err := _W3bstreamProver.contract.FilterLogs(opts, "ProverResumed", idRule) + if err != nil { + return nil, err + } + return &W3bstreamProverProverResumedIterator{contract: _W3bstreamProver.contract, event: "ProverResumed", logs: logs, sub: sub}, nil +} + +// WatchProverResumed is a free log subscription operation binding the contract event 0xd5c12038aca4e36d3193c55c06f70eee8f829f1165a9e383c70b00d28e3bfdb9. +// +// Solidity: event ProverResumed(uint256 indexed id) +func (_W3bstreamProver *W3bstreamProverFilterer) WatchProverResumed(opts *bind.WatchOpts, sink chan<- *W3bstreamProverProverResumed, id []*big.Int) (event.Subscription, error) { + + var idRule []interface{} + for _, idItem := range id { + idRule = append(idRule, idItem) + } + + logs, sub, err := _W3bstreamProver.contract.WatchLogs(opts, "ProverResumed", idRule) + 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(W3bstreamProverProverResumed) + if err := _W3bstreamProver.contract.UnpackLog(event, "ProverResumed", 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 +} + +// ParseProverResumed is a log parse operation binding the contract event 0xd5c12038aca4e36d3193c55c06f70eee8f829f1165a9e383c70b00d28e3bfdb9. +// +// Solidity: event ProverResumed(uint256 indexed id) +func (_W3bstreamProver *W3bstreamProverFilterer) ParseProverResumed(log types.Log) (*W3bstreamProverProverResumed, error) { + event := new(W3bstreamProverProverResumed) + if err := _W3bstreamProver.contract.UnpackLog(event, "ProverResumed", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// W3bstreamProverTransferIterator is returned from FilterTransfer and is used to iterate over the raw logs and unpacked data for Transfer events raised by the W3bstreamProver contract. +type W3bstreamProverTransferIterator struct { + Event *W3bstreamProverTransfer // 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 *W3bstreamProverTransferIterator) 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(W3bstreamProverTransfer) + 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(W3bstreamProverTransfer) + 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 *W3bstreamProverTransferIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *W3bstreamProverTransferIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// W3bstreamProverTransfer represents a Transfer event raised by the W3bstreamProver contract. +type W3bstreamProverTransfer struct { + From common.Address + To common.Address + TokenId *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterTransfer is a free log retrieval operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. +// +// Solidity: event Transfer(address indexed from, address indexed to, uint256 indexed tokenId) +func (_W3bstreamProver *W3bstreamProverFilterer) FilterTransfer(opts *bind.FilterOpts, from []common.Address, to []common.Address, tokenId []*big.Int) (*W3bstreamProverTransferIterator, error) { + + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + var tokenIdRule []interface{} + for _, tokenIdItem := range tokenId { + tokenIdRule = append(tokenIdRule, tokenIdItem) + } + + logs, sub, err := _W3bstreamProver.contract.FilterLogs(opts, "Transfer", fromRule, toRule, tokenIdRule) + if err != nil { + return nil, err + } + return &W3bstreamProverTransferIterator{contract: _W3bstreamProver.contract, event: "Transfer", logs: logs, sub: sub}, nil +} + +// WatchTransfer is a free log subscription operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. +// +// Solidity: event Transfer(address indexed from, address indexed to, uint256 indexed tokenId) +func (_W3bstreamProver *W3bstreamProverFilterer) WatchTransfer(opts *bind.WatchOpts, sink chan<- *W3bstreamProverTransfer, from []common.Address, to []common.Address, tokenId []*big.Int) (event.Subscription, error) { + + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + var tokenIdRule []interface{} + for _, tokenIdItem := range tokenId { + tokenIdRule = append(tokenIdRule, tokenIdItem) + } + + logs, sub, err := _W3bstreamProver.contract.WatchLogs(opts, "Transfer", fromRule, toRule, tokenIdRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(W3bstreamProverTransfer) + if err := _W3bstreamProver.contract.UnpackLog(event, "Transfer", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseTransfer is a log parse operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. +// +// Solidity: event Transfer(address indexed from, address indexed to, uint256 indexed tokenId) +func (_W3bstreamProver *W3bstreamProverFilterer) ParseTransfer(log types.Log) (*W3bstreamProverTransfer, error) { + event := new(W3bstreamProverTransfer) + if err := _W3bstreamProver.contract.UnpackLog(event, "Transfer", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} diff --git a/ioctl/cmd/ws/contracts/w3bstreamrouter.go b/ioctl/cmd/ws/contracts/w3bstreamrouter.go new file mode 100644 index 0000000000..ccb315cf5c --- /dev/null +++ b/ioctl/cmd/ws/contracts/w3bstreamrouter.go @@ -0,0 +1,963 @@ +// 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 +) + +// W3bstreamRouterMetaData contains all meta data concerning the W3bstreamRouter contract. +var W3bstreamRouterMetaData = &bind.MetaData{ + ABI: "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"projectId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"dapp\",\"type\":\"address\"}],\"name\":\"DappBound\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"projectId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"DappUnbound\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"projectId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"router\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"revertReason\",\"type\":\"string\"}],\"name\":\"DataProcessed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_projectId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_dapp\",\"type\":\"address\"}],\"name\":\"bindDapp\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"dapp\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"fleetManagement\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_fleetManagement\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_projectStore\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"projectStore\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_projectId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_proverId\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"route\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_projectId\",\"type\":\"uint256\"}],\"name\":\"unbindDapp\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", +} + +// W3bstreamRouterABI is the input ABI used to generate the binding from. +// Deprecated: Use W3bstreamRouterMetaData.ABI instead. +var W3bstreamRouterABI = W3bstreamRouterMetaData.ABI + +// W3bstreamRouter is an auto generated Go binding around an Ethereum contract. +type W3bstreamRouter struct { + W3bstreamRouterCaller // Read-only binding to the contract + W3bstreamRouterTransactor // Write-only binding to the contract + W3bstreamRouterFilterer // Log filterer for contract events +} + +// W3bstreamRouterCaller is an auto generated read-only Go binding around an Ethereum contract. +type W3bstreamRouterCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// W3bstreamRouterTransactor is an auto generated write-only Go binding around an Ethereum contract. +type W3bstreamRouterTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// W3bstreamRouterFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type W3bstreamRouterFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// W3bstreamRouterSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type W3bstreamRouterSession struct { + Contract *W3bstreamRouter // 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 +} + +// W3bstreamRouterCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type W3bstreamRouterCallerSession struct { + Contract *W3bstreamRouterCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// W3bstreamRouterTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type W3bstreamRouterTransactorSession struct { + Contract *W3bstreamRouterTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// W3bstreamRouterRaw is an auto generated low-level Go binding around an Ethereum contract. +type W3bstreamRouterRaw struct { + Contract *W3bstreamRouter // Generic contract binding to access the raw methods on +} + +// W3bstreamRouterCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type W3bstreamRouterCallerRaw struct { + Contract *W3bstreamRouterCaller // Generic read-only contract binding to access the raw methods on +} + +// W3bstreamRouterTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type W3bstreamRouterTransactorRaw struct { + Contract *W3bstreamRouterTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewW3bstreamRouter creates a new instance of W3bstreamRouter, bound to a specific deployed contract. +func NewW3bstreamRouter(address common.Address, backend bind.ContractBackend) (*W3bstreamRouter, error) { + contract, err := bindW3bstreamRouter(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &W3bstreamRouter{W3bstreamRouterCaller: W3bstreamRouterCaller{contract: contract}, W3bstreamRouterTransactor: W3bstreamRouterTransactor{contract: contract}, W3bstreamRouterFilterer: W3bstreamRouterFilterer{contract: contract}}, nil +} + +// NewW3bstreamRouterCaller creates a new read-only instance of W3bstreamRouter, bound to a specific deployed contract. +func NewW3bstreamRouterCaller(address common.Address, caller bind.ContractCaller) (*W3bstreamRouterCaller, error) { + contract, err := bindW3bstreamRouter(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &W3bstreamRouterCaller{contract: contract}, nil +} + +// NewW3bstreamRouterTransactor creates a new write-only instance of W3bstreamRouter, bound to a specific deployed contract. +func NewW3bstreamRouterTransactor(address common.Address, transactor bind.ContractTransactor) (*W3bstreamRouterTransactor, error) { + contract, err := bindW3bstreamRouter(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &W3bstreamRouterTransactor{contract: contract}, nil +} + +// NewW3bstreamRouterFilterer creates a new log filterer instance of W3bstreamRouter, bound to a specific deployed contract. +func NewW3bstreamRouterFilterer(address common.Address, filterer bind.ContractFilterer) (*W3bstreamRouterFilterer, error) { + contract, err := bindW3bstreamRouter(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &W3bstreamRouterFilterer{contract: contract}, nil +} + +// bindW3bstreamRouter binds a generic wrapper to an already deployed contract. +func bindW3bstreamRouter(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := W3bstreamRouterMetaData.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 (_W3bstreamRouter *W3bstreamRouterRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _W3bstreamRouter.Contract.W3bstreamRouterCaller.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 (_W3bstreamRouter *W3bstreamRouterRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _W3bstreamRouter.Contract.W3bstreamRouterTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_W3bstreamRouter *W3bstreamRouterRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _W3bstreamRouter.Contract.W3bstreamRouterTransactor.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 (_W3bstreamRouter *W3bstreamRouterCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _W3bstreamRouter.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 (_W3bstreamRouter *W3bstreamRouterTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _W3bstreamRouter.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_W3bstreamRouter *W3bstreamRouterTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _W3bstreamRouter.Contract.contract.Transact(opts, method, params...) +} + +// Dapp is a free data retrieval call binding the contract method 0x1bf8131f. +// +// Solidity: function dapp(uint256 ) view returns(address) +func (_W3bstreamRouter *W3bstreamRouterCaller) Dapp(opts *bind.CallOpts, arg0 *big.Int) (common.Address, error) { + var out []interface{} + err := _W3bstreamRouter.contract.Call(opts, &out, "dapp", arg0) + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// Dapp is a free data retrieval call binding the contract method 0x1bf8131f. +// +// Solidity: function dapp(uint256 ) view returns(address) +func (_W3bstreamRouter *W3bstreamRouterSession) Dapp(arg0 *big.Int) (common.Address, error) { + return _W3bstreamRouter.Contract.Dapp(&_W3bstreamRouter.CallOpts, arg0) +} + +// Dapp is a free data retrieval call binding the contract method 0x1bf8131f. +// +// Solidity: function dapp(uint256 ) view returns(address) +func (_W3bstreamRouter *W3bstreamRouterCallerSession) Dapp(arg0 *big.Int) (common.Address, error) { + return _W3bstreamRouter.Contract.Dapp(&_W3bstreamRouter.CallOpts, arg0) +} + +// FleetManagement is a free data retrieval call binding the contract method 0x53ef0542. +// +// Solidity: function fleetManagement() view returns(address) +func (_W3bstreamRouter *W3bstreamRouterCaller) FleetManagement(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _W3bstreamRouter.contract.Call(opts, &out, "fleetManagement") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// FleetManagement is a free data retrieval call binding the contract method 0x53ef0542. +// +// Solidity: function fleetManagement() view returns(address) +func (_W3bstreamRouter *W3bstreamRouterSession) FleetManagement() (common.Address, error) { + return _W3bstreamRouter.Contract.FleetManagement(&_W3bstreamRouter.CallOpts) +} + +// FleetManagement is a free data retrieval call binding the contract method 0x53ef0542. +// +// Solidity: function fleetManagement() view returns(address) +func (_W3bstreamRouter *W3bstreamRouterCallerSession) FleetManagement() (common.Address, error) { + return _W3bstreamRouter.Contract.FleetManagement(&_W3bstreamRouter.CallOpts) +} + +// ProjectStore is a free data retrieval call binding the contract method 0xa0fadaaa. +// +// Solidity: function projectStore() view returns(address) +func (_W3bstreamRouter *W3bstreamRouterCaller) ProjectStore(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _W3bstreamRouter.contract.Call(opts, &out, "projectStore") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// ProjectStore is a free data retrieval call binding the contract method 0xa0fadaaa. +// +// Solidity: function projectStore() view returns(address) +func (_W3bstreamRouter *W3bstreamRouterSession) ProjectStore() (common.Address, error) { + return _W3bstreamRouter.Contract.ProjectStore(&_W3bstreamRouter.CallOpts) +} + +// ProjectStore is a free data retrieval call binding the contract method 0xa0fadaaa. +// +// Solidity: function projectStore() view returns(address) +func (_W3bstreamRouter *W3bstreamRouterCallerSession) ProjectStore() (common.Address, error) { + return _W3bstreamRouter.Contract.ProjectStore(&_W3bstreamRouter.CallOpts) +} + +// BindDapp is a paid mutator transaction binding the contract method 0x85a7d275. +// +// Solidity: function bindDapp(uint256 _projectId, address _dapp) returns() +func (_W3bstreamRouter *W3bstreamRouterTransactor) BindDapp(opts *bind.TransactOpts, _projectId *big.Int, _dapp common.Address) (*types.Transaction, error) { + return _W3bstreamRouter.contract.Transact(opts, "bindDapp", _projectId, _dapp) +} + +// BindDapp is a paid mutator transaction binding the contract method 0x85a7d275. +// +// Solidity: function bindDapp(uint256 _projectId, address _dapp) returns() +func (_W3bstreamRouter *W3bstreamRouterSession) BindDapp(_projectId *big.Int, _dapp common.Address) (*types.Transaction, error) { + return _W3bstreamRouter.Contract.BindDapp(&_W3bstreamRouter.TransactOpts, _projectId, _dapp) +} + +// BindDapp is a paid mutator transaction binding the contract method 0x85a7d275. +// +// Solidity: function bindDapp(uint256 _projectId, address _dapp) returns() +func (_W3bstreamRouter *W3bstreamRouterTransactorSession) BindDapp(_projectId *big.Int, _dapp common.Address) (*types.Transaction, error) { + return _W3bstreamRouter.Contract.BindDapp(&_W3bstreamRouter.TransactOpts, _projectId, _dapp) +} + +// Initialize is a paid mutator transaction binding the contract method 0x485cc955. +// +// Solidity: function initialize(address _fleetManagement, address _projectStore) returns() +func (_W3bstreamRouter *W3bstreamRouterTransactor) Initialize(opts *bind.TransactOpts, _fleetManagement common.Address, _projectStore common.Address) (*types.Transaction, error) { + return _W3bstreamRouter.contract.Transact(opts, "initialize", _fleetManagement, _projectStore) +} + +// Initialize is a paid mutator transaction binding the contract method 0x485cc955. +// +// Solidity: function initialize(address _fleetManagement, address _projectStore) returns() +func (_W3bstreamRouter *W3bstreamRouterSession) Initialize(_fleetManagement common.Address, _projectStore common.Address) (*types.Transaction, error) { + return _W3bstreamRouter.Contract.Initialize(&_W3bstreamRouter.TransactOpts, _fleetManagement, _projectStore) +} + +// Initialize is a paid mutator transaction binding the contract method 0x485cc955. +// +// Solidity: function initialize(address _fleetManagement, address _projectStore) returns() +func (_W3bstreamRouter *W3bstreamRouterTransactorSession) Initialize(_fleetManagement common.Address, _projectStore common.Address) (*types.Transaction, error) { + return _W3bstreamRouter.Contract.Initialize(&_W3bstreamRouter.TransactOpts, _fleetManagement, _projectStore) +} + +// Route is a paid mutator transaction binding the contract method 0x388ac07e. +// +// Solidity: function route(uint256 _projectId, uint256 _proverId, bytes _data) returns() +func (_W3bstreamRouter *W3bstreamRouterTransactor) Route(opts *bind.TransactOpts, _projectId *big.Int, _proverId *big.Int, _data []byte) (*types.Transaction, error) { + return _W3bstreamRouter.contract.Transact(opts, "route", _projectId, _proverId, _data) +} + +// Route is a paid mutator transaction binding the contract method 0x388ac07e. +// +// Solidity: function route(uint256 _projectId, uint256 _proverId, bytes _data) returns() +func (_W3bstreamRouter *W3bstreamRouterSession) Route(_projectId *big.Int, _proverId *big.Int, _data []byte) (*types.Transaction, error) { + return _W3bstreamRouter.Contract.Route(&_W3bstreamRouter.TransactOpts, _projectId, _proverId, _data) +} + +// Route is a paid mutator transaction binding the contract method 0x388ac07e. +// +// Solidity: function route(uint256 _projectId, uint256 _proverId, bytes _data) returns() +func (_W3bstreamRouter *W3bstreamRouterTransactorSession) Route(_projectId *big.Int, _proverId *big.Int, _data []byte) (*types.Transaction, error) { + return _W3bstreamRouter.Contract.Route(&_W3bstreamRouter.TransactOpts, _projectId, _proverId, _data) +} + +// UnbindDapp is a paid mutator transaction binding the contract method 0xd869758c. +// +// Solidity: function unbindDapp(uint256 _projectId) returns() +func (_W3bstreamRouter *W3bstreamRouterTransactor) UnbindDapp(opts *bind.TransactOpts, _projectId *big.Int) (*types.Transaction, error) { + return _W3bstreamRouter.contract.Transact(opts, "unbindDapp", _projectId) +} + +// UnbindDapp is a paid mutator transaction binding the contract method 0xd869758c. +// +// Solidity: function unbindDapp(uint256 _projectId) returns() +func (_W3bstreamRouter *W3bstreamRouterSession) UnbindDapp(_projectId *big.Int) (*types.Transaction, error) { + return _W3bstreamRouter.Contract.UnbindDapp(&_W3bstreamRouter.TransactOpts, _projectId) +} + +// UnbindDapp is a paid mutator transaction binding the contract method 0xd869758c. +// +// Solidity: function unbindDapp(uint256 _projectId) returns() +func (_W3bstreamRouter *W3bstreamRouterTransactorSession) UnbindDapp(_projectId *big.Int) (*types.Transaction, error) { + return _W3bstreamRouter.Contract.UnbindDapp(&_W3bstreamRouter.TransactOpts, _projectId) +} + +// W3bstreamRouterDappBoundIterator is returned from FilterDappBound and is used to iterate over the raw logs and unpacked data for DappBound events raised by the W3bstreamRouter contract. +type W3bstreamRouterDappBoundIterator struct { + Event *W3bstreamRouterDappBound // 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 *W3bstreamRouterDappBoundIterator) 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(W3bstreamRouterDappBound) + 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(W3bstreamRouterDappBound) + 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 *W3bstreamRouterDappBoundIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *W3bstreamRouterDappBoundIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// W3bstreamRouterDappBound represents a DappBound event raised by the W3bstreamRouter contract. +type W3bstreamRouterDappBound struct { + ProjectId *big.Int + Operator common.Address + Dapp common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterDappBound is a free log retrieval operation binding the contract event 0xf121fc55c0fd19e108d2d5642aff2967949fb708d9b985093c530a8a1fb97778. +// +// Solidity: event DappBound(uint256 indexed projectId, address indexed operator, address dapp) +func (_W3bstreamRouter *W3bstreamRouterFilterer) FilterDappBound(opts *bind.FilterOpts, projectId []*big.Int, operator []common.Address) (*W3bstreamRouterDappBoundIterator, error) { + + var projectIdRule []interface{} + for _, projectIdItem := range projectId { + projectIdRule = append(projectIdRule, projectIdItem) + } + var operatorRule []interface{} + for _, operatorItem := range operator { + operatorRule = append(operatorRule, operatorItem) + } + + logs, sub, err := _W3bstreamRouter.contract.FilterLogs(opts, "DappBound", projectIdRule, operatorRule) + if err != nil { + return nil, err + } + return &W3bstreamRouterDappBoundIterator{contract: _W3bstreamRouter.contract, event: "DappBound", logs: logs, sub: sub}, nil +} + +// WatchDappBound is a free log subscription operation binding the contract event 0xf121fc55c0fd19e108d2d5642aff2967949fb708d9b985093c530a8a1fb97778. +// +// Solidity: event DappBound(uint256 indexed projectId, address indexed operator, address dapp) +func (_W3bstreamRouter *W3bstreamRouterFilterer) WatchDappBound(opts *bind.WatchOpts, sink chan<- *W3bstreamRouterDappBound, projectId []*big.Int, operator []common.Address) (event.Subscription, error) { + + var projectIdRule []interface{} + for _, projectIdItem := range projectId { + projectIdRule = append(projectIdRule, projectIdItem) + } + var operatorRule []interface{} + for _, operatorItem := range operator { + operatorRule = append(operatorRule, operatorItem) + } + + logs, sub, err := _W3bstreamRouter.contract.WatchLogs(opts, "DappBound", projectIdRule, operatorRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(W3bstreamRouterDappBound) + if err := _W3bstreamRouter.contract.UnpackLog(event, "DappBound", 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 +} + +// ParseDappBound is a log parse operation binding the contract event 0xf121fc55c0fd19e108d2d5642aff2967949fb708d9b985093c530a8a1fb97778. +// +// Solidity: event DappBound(uint256 indexed projectId, address indexed operator, address dapp) +func (_W3bstreamRouter *W3bstreamRouterFilterer) ParseDappBound(log types.Log) (*W3bstreamRouterDappBound, error) { + event := new(W3bstreamRouterDappBound) + if err := _W3bstreamRouter.contract.UnpackLog(event, "DappBound", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// W3bstreamRouterDappUnboundIterator is returned from FilterDappUnbound and is used to iterate over the raw logs and unpacked data for DappUnbound events raised by the W3bstreamRouter contract. +type W3bstreamRouterDappUnboundIterator struct { + Event *W3bstreamRouterDappUnbound // 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 *W3bstreamRouterDappUnboundIterator) 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(W3bstreamRouterDappUnbound) + 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(W3bstreamRouterDappUnbound) + 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 *W3bstreamRouterDappUnboundIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *W3bstreamRouterDappUnboundIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// W3bstreamRouterDappUnbound represents a DappUnbound event raised by the W3bstreamRouter contract. +type W3bstreamRouterDappUnbound struct { + ProjectId *big.Int + Operator common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterDappUnbound is a free log retrieval operation binding the contract event 0x7019ee8601397d5c4fe244404e2428a9c0b0a4d8679186133186cc01376ee9f1. +// +// Solidity: event DappUnbound(uint256 indexed projectId, address indexed operator) +func (_W3bstreamRouter *W3bstreamRouterFilterer) FilterDappUnbound(opts *bind.FilterOpts, projectId []*big.Int, operator []common.Address) (*W3bstreamRouterDappUnboundIterator, error) { + + var projectIdRule []interface{} + for _, projectIdItem := range projectId { + projectIdRule = append(projectIdRule, projectIdItem) + } + var operatorRule []interface{} + for _, operatorItem := range operator { + operatorRule = append(operatorRule, operatorItem) + } + + logs, sub, err := _W3bstreamRouter.contract.FilterLogs(opts, "DappUnbound", projectIdRule, operatorRule) + if err != nil { + return nil, err + } + return &W3bstreamRouterDappUnboundIterator{contract: _W3bstreamRouter.contract, event: "DappUnbound", logs: logs, sub: sub}, nil +} + +// WatchDappUnbound is a free log subscription operation binding the contract event 0x7019ee8601397d5c4fe244404e2428a9c0b0a4d8679186133186cc01376ee9f1. +// +// Solidity: event DappUnbound(uint256 indexed projectId, address indexed operator) +func (_W3bstreamRouter *W3bstreamRouterFilterer) WatchDappUnbound(opts *bind.WatchOpts, sink chan<- *W3bstreamRouterDappUnbound, projectId []*big.Int, operator []common.Address) (event.Subscription, error) { + + var projectIdRule []interface{} + for _, projectIdItem := range projectId { + projectIdRule = append(projectIdRule, projectIdItem) + } + var operatorRule []interface{} + for _, operatorItem := range operator { + operatorRule = append(operatorRule, operatorItem) + } + + logs, sub, err := _W3bstreamRouter.contract.WatchLogs(opts, "DappUnbound", projectIdRule, operatorRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(W3bstreamRouterDappUnbound) + if err := _W3bstreamRouter.contract.UnpackLog(event, "DappUnbound", 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 +} + +// ParseDappUnbound is a log parse operation binding the contract event 0x7019ee8601397d5c4fe244404e2428a9c0b0a4d8679186133186cc01376ee9f1. +// +// Solidity: event DappUnbound(uint256 indexed projectId, address indexed operator) +func (_W3bstreamRouter *W3bstreamRouterFilterer) ParseDappUnbound(log types.Log) (*W3bstreamRouterDappUnbound, error) { + event := new(W3bstreamRouterDappUnbound) + if err := _W3bstreamRouter.contract.UnpackLog(event, "DappUnbound", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// W3bstreamRouterDataProcessedIterator is returned from FilterDataProcessed and is used to iterate over the raw logs and unpacked data for DataProcessed events raised by the W3bstreamRouter contract. +type W3bstreamRouterDataProcessedIterator struct { + Event *W3bstreamRouterDataProcessed // 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 *W3bstreamRouterDataProcessedIterator) 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(W3bstreamRouterDataProcessed) + 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(W3bstreamRouterDataProcessed) + 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 *W3bstreamRouterDataProcessedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *W3bstreamRouterDataProcessedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// W3bstreamRouterDataProcessed represents a DataProcessed event raised by the W3bstreamRouter contract. +type W3bstreamRouterDataProcessed struct { + ProjectId *big.Int + Router *big.Int + Operator common.Address + Success bool + RevertReason string + Raw types.Log // Blockchain specific contextual infos +} + +// FilterDataProcessed is a free log retrieval operation binding the contract event 0x1e0d5999e38157a2e2bd253650b56ee404b74b94ada45cca65a8d79222fa9290. +// +// Solidity: event DataProcessed(uint256 indexed projectId, uint256 indexed router, address indexed operator, bool success, string revertReason) +func (_W3bstreamRouter *W3bstreamRouterFilterer) FilterDataProcessed(opts *bind.FilterOpts, projectId []*big.Int, router []*big.Int, operator []common.Address) (*W3bstreamRouterDataProcessedIterator, error) { + + var projectIdRule []interface{} + for _, projectIdItem := range projectId { + projectIdRule = append(projectIdRule, projectIdItem) + } + var routerRule []interface{} + for _, routerItem := range router { + routerRule = append(routerRule, routerItem) + } + var operatorRule []interface{} + for _, operatorItem := range operator { + operatorRule = append(operatorRule, operatorItem) + } + + logs, sub, err := _W3bstreamRouter.contract.FilterLogs(opts, "DataProcessed", projectIdRule, routerRule, operatorRule) + if err != nil { + return nil, err + } + return &W3bstreamRouterDataProcessedIterator{contract: _W3bstreamRouter.contract, event: "DataProcessed", logs: logs, sub: sub}, nil +} + +// WatchDataProcessed is a free log subscription operation binding the contract event 0x1e0d5999e38157a2e2bd253650b56ee404b74b94ada45cca65a8d79222fa9290. +// +// Solidity: event DataProcessed(uint256 indexed projectId, uint256 indexed router, address indexed operator, bool success, string revertReason) +func (_W3bstreamRouter *W3bstreamRouterFilterer) WatchDataProcessed(opts *bind.WatchOpts, sink chan<- *W3bstreamRouterDataProcessed, projectId []*big.Int, router []*big.Int, operator []common.Address) (event.Subscription, error) { + + var projectIdRule []interface{} + for _, projectIdItem := range projectId { + projectIdRule = append(projectIdRule, projectIdItem) + } + var routerRule []interface{} + for _, routerItem := range router { + routerRule = append(routerRule, routerItem) + } + var operatorRule []interface{} + for _, operatorItem := range operator { + operatorRule = append(operatorRule, operatorItem) + } + + logs, sub, err := _W3bstreamRouter.contract.WatchLogs(opts, "DataProcessed", projectIdRule, routerRule, operatorRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(W3bstreamRouterDataProcessed) + if err := _W3bstreamRouter.contract.UnpackLog(event, "DataProcessed", 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 +} + +// ParseDataProcessed is a log parse operation binding the contract event 0x1e0d5999e38157a2e2bd253650b56ee404b74b94ada45cca65a8d79222fa9290. +// +// Solidity: event DataProcessed(uint256 indexed projectId, uint256 indexed router, address indexed operator, bool success, string revertReason) +func (_W3bstreamRouter *W3bstreamRouterFilterer) ParseDataProcessed(log types.Log) (*W3bstreamRouterDataProcessed, error) { + event := new(W3bstreamRouterDataProcessed) + if err := _W3bstreamRouter.contract.UnpackLog(event, "DataProcessed", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// W3bstreamRouterInitializedIterator is returned from FilterInitialized and is used to iterate over the raw logs and unpacked data for Initialized events raised by the W3bstreamRouter contract. +type W3bstreamRouterInitializedIterator struct { + Event *W3bstreamRouterInitialized // 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 *W3bstreamRouterInitializedIterator) 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(W3bstreamRouterInitialized) + 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(W3bstreamRouterInitialized) + 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 *W3bstreamRouterInitializedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *W3bstreamRouterInitializedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// W3bstreamRouterInitialized represents a Initialized event raised by the W3bstreamRouter contract. +type W3bstreamRouterInitialized struct { + Version uint8 + Raw types.Log // Blockchain specific contextual infos +} + +// FilterInitialized is a free log retrieval operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. +// +// Solidity: event Initialized(uint8 version) +func (_W3bstreamRouter *W3bstreamRouterFilterer) FilterInitialized(opts *bind.FilterOpts) (*W3bstreamRouterInitializedIterator, error) { + + logs, sub, err := _W3bstreamRouter.contract.FilterLogs(opts, "Initialized") + if err != nil { + return nil, err + } + return &W3bstreamRouterInitializedIterator{contract: _W3bstreamRouter.contract, event: "Initialized", logs: logs, sub: sub}, nil +} + +// WatchInitialized is a free log subscription operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. +// +// Solidity: event Initialized(uint8 version) +func (_W3bstreamRouter *W3bstreamRouterFilterer) WatchInitialized(opts *bind.WatchOpts, sink chan<- *W3bstreamRouterInitialized) (event.Subscription, error) { + + logs, sub, err := _W3bstreamRouter.contract.WatchLogs(opts, "Initialized") + 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(W3bstreamRouterInitialized) + if err := _W3bstreamRouter.contract.UnpackLog(event, "Initialized", 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 +} + +// ParseInitialized is a log parse operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. +// +// Solidity: event Initialized(uint8 version) +func (_W3bstreamRouter *W3bstreamRouterFilterer) ParseInitialized(log types.Log) (*W3bstreamRouterInitialized, error) { + event := new(W3bstreamRouterInitialized) + if err := _W3bstreamRouter.contract.UnpackLog(event, "Initialized", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +}