Compare commits
15 Commits
19825d5561
...
main
Author | SHA1 | Date | |
---|---|---|---|
aedfc0374b | |||
bf45c32758 | |||
8ee55c5172 | |||
65ffe60540 | |||
83bcb52887 | |||
017d055aaa | |||
99eb3ed087 | |||
6d1f826e42 | |||
781cb24d36 | |||
fc0ab5feb5 | |||
a6ea49764e | |||
9300121088 | |||
4b14b6d51b | |||
552641d06c | |||
0612b4800f |
836
0x8d871ef2826ac9001fb2e33fdd6379b6aabf449c_abi.json
Normal file
836
0x8d871ef2826ac9001fb2e33fdd6379b6aabf449c_abi.json
Normal file
@ -0,0 +1,836 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"inputs": [
|
||||||
|
{
|
||||||
|
"internalType": "uint32",
|
||||||
|
"name": "cooldownStart",
|
||||||
|
"type": "uint32"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"name": "CooldownActive",
|
||||||
|
"type": "error"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [],
|
||||||
|
"name": "GasLimitExceeded",
|
||||||
|
"type": "error"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [],
|
||||||
|
"name": "GasPriceExceeded",
|
||||||
|
"type": "error"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [],
|
||||||
|
"name": "IntervalCompleted",
|
||||||
|
"type": "error"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [],
|
||||||
|
"name": "IntervalMismatch",
|
||||||
|
"type": "error"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [
|
||||||
|
{
|
||||||
|
"internalType": "enum Manager.NodeStatus",
|
||||||
|
"name": "status",
|
||||||
|
"type": "uint8"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"name": "NodeNotActivateable",
|
||||||
|
"type": "error"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [],
|
||||||
|
"name": "NodeNotActive",
|
||||||
|
"type": "error"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [
|
||||||
|
{
|
||||||
|
"internalType": "address",
|
||||||
|
"name": "node",
|
||||||
|
"type": "address"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "enum Manager.NodeStatus",
|
||||||
|
"name": "status",
|
||||||
|
"type": "uint8"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"name": "NodeNotRegisterable",
|
||||||
|
"type": "error"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [],
|
||||||
|
"name": "NodeRespondedAlready",
|
||||||
|
"type": "error"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [],
|
||||||
|
"name": "NotSubscriptionOwner",
|
||||||
|
"type": "error"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [],
|
||||||
|
"name": "SignatureExpired",
|
||||||
|
"type": "error"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [],
|
||||||
|
"name": "SignerMismatch",
|
||||||
|
"type": "error"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [],
|
||||||
|
"name": "SubscriptionCompleted",
|
||||||
|
"type": "error"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [],
|
||||||
|
"name": "SubscriptionNotActive",
|
||||||
|
"type": "error"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [],
|
||||||
|
"name": "SubscriptionNotFound",
|
||||||
|
"type": "error"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"anonymous": false,
|
||||||
|
"inputs": [
|
||||||
|
{
|
||||||
|
"indexed": true,
|
||||||
|
"internalType": "address",
|
||||||
|
"name": "node",
|
||||||
|
"type": "address"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"name": "NodeActivated",
|
||||||
|
"type": "event"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"anonymous": false,
|
||||||
|
"inputs": [
|
||||||
|
{
|
||||||
|
"indexed": true,
|
||||||
|
"internalType": "address",
|
||||||
|
"name": "node",
|
||||||
|
"type": "address"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"name": "NodeDeactivated",
|
||||||
|
"type": "event"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"anonymous": false,
|
||||||
|
"inputs": [
|
||||||
|
{
|
||||||
|
"indexed": true,
|
||||||
|
"internalType": "address",
|
||||||
|
"name": "node",
|
||||||
|
"type": "address"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"indexed": true,
|
||||||
|
"internalType": "address",
|
||||||
|
"name": "registerer",
|
||||||
|
"type": "address"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"indexed": false,
|
||||||
|
"internalType": "uint32",
|
||||||
|
"name": "cooldownStart",
|
||||||
|
"type": "uint32"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"name": "NodeRegistered",
|
||||||
|
"type": "event"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"anonymous": false,
|
||||||
|
"inputs": [
|
||||||
|
{
|
||||||
|
"indexed": true,
|
||||||
|
"internalType": "uint32",
|
||||||
|
"name": "id",
|
||||||
|
"type": "uint32"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"name": "SubscriptionCancelled",
|
||||||
|
"type": "event"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"anonymous": false,
|
||||||
|
"inputs": [
|
||||||
|
{
|
||||||
|
"indexed": true,
|
||||||
|
"internalType": "uint32",
|
||||||
|
"name": "id",
|
||||||
|
"type": "uint32"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"name": "SubscriptionCreated",
|
||||||
|
"type": "event"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"anonymous": false,
|
||||||
|
"inputs": [
|
||||||
|
{
|
||||||
|
"indexed": true,
|
||||||
|
"internalType": "uint32",
|
||||||
|
"name": "id",
|
||||||
|
"type": "uint32"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"indexed": true,
|
||||||
|
"internalType": "address",
|
||||||
|
"name": "node",
|
||||||
|
"type": "address"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"name": "SubscriptionFulfilled",
|
||||||
|
"type": "event"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [],
|
||||||
|
"name": "DELEGATEE_OVERHEAD_CACHED_WEI",
|
||||||
|
"outputs": [
|
||||||
|
{
|
||||||
|
"internalType": "uint256",
|
||||||
|
"name": "",
|
||||||
|
"type": "uint256"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"stateMutability": "view",
|
||||||
|
"type": "function"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [],
|
||||||
|
"name": "DELEGATEE_OVERHEAD_CREATE_WEI",
|
||||||
|
"outputs": [
|
||||||
|
{
|
||||||
|
"internalType": "uint256",
|
||||||
|
"name": "",
|
||||||
|
"type": "uint256"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"stateMutability": "view",
|
||||||
|
"type": "function"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [],
|
||||||
|
"name": "DELIVERY_OVERHEAD_WEI",
|
||||||
|
"outputs": [
|
||||||
|
{
|
||||||
|
"internalType": "uint256",
|
||||||
|
"name": "",
|
||||||
|
"type": "uint256"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"stateMutability": "view",
|
||||||
|
"type": "function"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [],
|
||||||
|
"name": "EIP712_NAME",
|
||||||
|
"outputs": [
|
||||||
|
{
|
||||||
|
"internalType": "string",
|
||||||
|
"name": "",
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"stateMutability": "view",
|
||||||
|
"type": "function"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [],
|
||||||
|
"name": "EIP712_VERSION",
|
||||||
|
"outputs": [
|
||||||
|
{
|
||||||
|
"internalType": "string",
|
||||||
|
"name": "",
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"stateMutability": "view",
|
||||||
|
"type": "function"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [],
|
||||||
|
"name": "activateNode",
|
||||||
|
"outputs": [],
|
||||||
|
"stateMutability": "nonpayable",
|
||||||
|
"type": "function"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [
|
||||||
|
{
|
||||||
|
"internalType": "uint32",
|
||||||
|
"name": "subscriptionId",
|
||||||
|
"type": "uint32"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"name": "cancelSubscription",
|
||||||
|
"outputs": [],
|
||||||
|
"stateMutability": "nonpayable",
|
||||||
|
"type": "function"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [],
|
||||||
|
"name": "cooldown",
|
||||||
|
"outputs": [
|
||||||
|
{
|
||||||
|
"internalType": "uint256",
|
||||||
|
"name": "",
|
||||||
|
"type": "uint256"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"stateMutability": "view",
|
||||||
|
"type": "function"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [
|
||||||
|
{
|
||||||
|
"internalType": "string",
|
||||||
|
"name": "containerId",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "bytes",
|
||||||
|
"name": "inputs",
|
||||||
|
"type": "bytes"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "uint48",
|
||||||
|
"name": "maxGasPrice",
|
||||||
|
"type": "uint48"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "uint32",
|
||||||
|
"name": "maxGasLimit",
|
||||||
|
"type": "uint32"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "uint32",
|
||||||
|
"name": "frequency",
|
||||||
|
"type": "uint32"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "uint32",
|
||||||
|
"name": "period",
|
||||||
|
"type": "uint32"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "uint16",
|
||||||
|
"name": "redundancy",
|
||||||
|
"type": "uint16"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"name": "createSubscription",
|
||||||
|
"outputs": [
|
||||||
|
{
|
||||||
|
"internalType": "uint32",
|
||||||
|
"name": "",
|
||||||
|
"type": "uint32"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"stateMutability": "nonpayable",
|
||||||
|
"type": "function"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [
|
||||||
|
{
|
||||||
|
"internalType": "uint32",
|
||||||
|
"name": "nonce",
|
||||||
|
"type": "uint32"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "uint32",
|
||||||
|
"name": "expiry",
|
||||||
|
"type": "uint32"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"components": [
|
||||||
|
{
|
||||||
|
"internalType": "address",
|
||||||
|
"name": "owner",
|
||||||
|
"type": "address"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "uint32",
|
||||||
|
"name": "activeAt",
|
||||||
|
"type": "uint32"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "uint32",
|
||||||
|
"name": "period",
|
||||||
|
"type": "uint32"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "uint32",
|
||||||
|
"name": "frequency",
|
||||||
|
"type": "uint32"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "uint16",
|
||||||
|
"name": "redundancy",
|
||||||
|
"type": "uint16"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "uint48",
|
||||||
|
"name": "maxGasPrice",
|
||||||
|
"type": "uint48"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "uint32",
|
||||||
|
"name": "maxGasLimit",
|
||||||
|
"type": "uint32"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "string",
|
||||||
|
"name": "containerId",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "bytes",
|
||||||
|
"name": "inputs",
|
||||||
|
"type": "bytes"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"internalType": "struct Coordinator.Subscription",
|
||||||
|
"name": "sub",
|
||||||
|
"type": "tuple"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "uint8",
|
||||||
|
"name": "v",
|
||||||
|
"type": "uint8"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "bytes32",
|
||||||
|
"name": "r",
|
||||||
|
"type": "bytes32"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "bytes32",
|
||||||
|
"name": "s",
|
||||||
|
"type": "bytes32"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"name": "createSubscriptionDelegatee",
|
||||||
|
"outputs": [
|
||||||
|
{
|
||||||
|
"internalType": "uint32",
|
||||||
|
"name": "",
|
||||||
|
"type": "uint32"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "bool",
|
||||||
|
"name": "",
|
||||||
|
"type": "bool"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"stateMutability": "nonpayable",
|
||||||
|
"type": "function"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [],
|
||||||
|
"name": "deactivateNode",
|
||||||
|
"outputs": [],
|
||||||
|
"stateMutability": "nonpayable",
|
||||||
|
"type": "function"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [
|
||||||
|
{
|
||||||
|
"internalType": "bytes32",
|
||||||
|
"name": "",
|
||||||
|
"type": "bytes32"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"name": "delegateCreatedIds",
|
||||||
|
"outputs": [
|
||||||
|
{
|
||||||
|
"internalType": "uint32",
|
||||||
|
"name": "",
|
||||||
|
"type": "uint32"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"stateMutability": "view",
|
||||||
|
"type": "function"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [
|
||||||
|
{
|
||||||
|
"internalType": "uint32",
|
||||||
|
"name": "subscriptionId",
|
||||||
|
"type": "uint32"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "uint32",
|
||||||
|
"name": "deliveryInterval",
|
||||||
|
"type": "uint32"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "bytes",
|
||||||
|
"name": "input",
|
||||||
|
"type": "bytes"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "bytes",
|
||||||
|
"name": "output",
|
||||||
|
"type": "bytes"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "bytes",
|
||||||
|
"name": "proof",
|
||||||
|
"type": "bytes"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"name": "deliverCompute",
|
||||||
|
"outputs": [],
|
||||||
|
"stateMutability": "nonpayable",
|
||||||
|
"type": "function"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [
|
||||||
|
{
|
||||||
|
"internalType": "uint32",
|
||||||
|
"name": "nonce",
|
||||||
|
"type": "uint32"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "uint32",
|
||||||
|
"name": "expiry",
|
||||||
|
"type": "uint32"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"components": [
|
||||||
|
{
|
||||||
|
"internalType": "address",
|
||||||
|
"name": "owner",
|
||||||
|
"type": "address"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "uint32",
|
||||||
|
"name": "activeAt",
|
||||||
|
"type": "uint32"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "uint32",
|
||||||
|
"name": "period",
|
||||||
|
"type": "uint32"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "uint32",
|
||||||
|
"name": "frequency",
|
||||||
|
"type": "uint32"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "uint16",
|
||||||
|
"name": "redundancy",
|
||||||
|
"type": "uint16"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "uint48",
|
||||||
|
"name": "maxGasPrice",
|
||||||
|
"type": "uint48"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "uint32",
|
||||||
|
"name": "maxGasLimit",
|
||||||
|
"type": "uint32"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "string",
|
||||||
|
"name": "containerId",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "bytes",
|
||||||
|
"name": "inputs",
|
||||||
|
"type": "bytes"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"internalType": "struct Coordinator.Subscription",
|
||||||
|
"name": "sub",
|
||||||
|
"type": "tuple"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "uint8",
|
||||||
|
"name": "v",
|
||||||
|
"type": "uint8"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "bytes32",
|
||||||
|
"name": "r",
|
||||||
|
"type": "bytes32"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "bytes32",
|
||||||
|
"name": "s",
|
||||||
|
"type": "bytes32"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "uint32",
|
||||||
|
"name": "deliveryInterval",
|
||||||
|
"type": "uint32"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "bytes",
|
||||||
|
"name": "input",
|
||||||
|
"type": "bytes"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "bytes",
|
||||||
|
"name": "output",
|
||||||
|
"type": "bytes"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "bytes",
|
||||||
|
"name": "proof",
|
||||||
|
"type": "bytes"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"name": "deliverComputeDelegatee",
|
||||||
|
"outputs": [],
|
||||||
|
"stateMutability": "nonpayable",
|
||||||
|
"type": "function"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [],
|
||||||
|
"name": "eip712Domain",
|
||||||
|
"outputs": [
|
||||||
|
{
|
||||||
|
"internalType": "bytes1",
|
||||||
|
"name": "fields",
|
||||||
|
"type": "bytes1"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "string",
|
||||||
|
"name": "name",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "string",
|
||||||
|
"name": "version",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "uint256",
|
||||||
|
"name": "chainId",
|
||||||
|
"type": "uint256"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "address",
|
||||||
|
"name": "verifyingContract",
|
||||||
|
"type": "address"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "bytes32",
|
||||||
|
"name": "salt",
|
||||||
|
"type": "bytes32"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "uint256[]",
|
||||||
|
"name": "extensions",
|
||||||
|
"type": "uint256[]"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"stateMutability": "view",
|
||||||
|
"type": "function"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [
|
||||||
|
{
|
||||||
|
"internalType": "uint32",
|
||||||
|
"name": "activeAt",
|
||||||
|
"type": "uint32"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "uint32",
|
||||||
|
"name": "period",
|
||||||
|
"type": "uint32"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"name": "getSubscriptionInterval",
|
||||||
|
"outputs": [
|
||||||
|
{
|
||||||
|
"internalType": "uint32",
|
||||||
|
"name": "",
|
||||||
|
"type": "uint32"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"stateMutability": "view",
|
||||||
|
"type": "function"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [],
|
||||||
|
"name": "id",
|
||||||
|
"outputs": [
|
||||||
|
{
|
||||||
|
"internalType": "uint32",
|
||||||
|
"name": "",
|
||||||
|
"type": "uint32"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"stateMutability": "view",
|
||||||
|
"type": "function"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [
|
||||||
|
{
|
||||||
|
"internalType": "address",
|
||||||
|
"name": "",
|
||||||
|
"type": "address"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"name": "maxSubscriberNonce",
|
||||||
|
"outputs": [
|
||||||
|
{
|
||||||
|
"internalType": "uint32",
|
||||||
|
"name": "",
|
||||||
|
"type": "uint32"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"stateMutability": "view",
|
||||||
|
"type": "function"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [
|
||||||
|
{
|
||||||
|
"internalType": "address",
|
||||||
|
"name": "",
|
||||||
|
"type": "address"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"name": "nodeInfo",
|
||||||
|
"outputs": [
|
||||||
|
{
|
||||||
|
"internalType": "enum Manager.NodeStatus",
|
||||||
|
"name": "status",
|
||||||
|
"type": "uint8"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "uint32",
|
||||||
|
"name": "cooldownStart",
|
||||||
|
"type": "uint32"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"stateMutability": "view",
|
||||||
|
"type": "function"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [
|
||||||
|
{
|
||||||
|
"internalType": "bytes32",
|
||||||
|
"name": "",
|
||||||
|
"type": "bytes32"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"name": "nodeResponded",
|
||||||
|
"outputs": [
|
||||||
|
{
|
||||||
|
"internalType": "bool",
|
||||||
|
"name": "",
|
||||||
|
"type": "bool"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"stateMutability": "view",
|
||||||
|
"type": "function"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [
|
||||||
|
{
|
||||||
|
"internalType": "bytes32",
|
||||||
|
"name": "",
|
||||||
|
"type": "bytes32"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"name": "redundancyCount",
|
||||||
|
"outputs": [
|
||||||
|
{
|
||||||
|
"internalType": "uint16",
|
||||||
|
"name": "",
|
||||||
|
"type": "uint16"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"stateMutability": "view",
|
||||||
|
"type": "function"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [
|
||||||
|
{
|
||||||
|
"internalType": "address",
|
||||||
|
"name": "node",
|
||||||
|
"type": "address"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"name": "registerNode",
|
||||||
|
"outputs": [],
|
||||||
|
"stateMutability": "nonpayable",
|
||||||
|
"type": "function"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [
|
||||||
|
{
|
||||||
|
"internalType": "uint32",
|
||||||
|
"name": "",
|
||||||
|
"type": "uint32"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"name": "subscriptions",
|
||||||
|
"outputs": [
|
||||||
|
{
|
||||||
|
"internalType": "address",
|
||||||
|
"name": "owner",
|
||||||
|
"type": "address"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "uint32",
|
||||||
|
"name": "activeAt",
|
||||||
|
"type": "uint32"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "uint32",
|
||||||
|
"name": "period",
|
||||||
|
"type": "uint32"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "uint32",
|
||||||
|
"name": "frequency",
|
||||||
|
"type": "uint32"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "uint16",
|
||||||
|
"name": "redundancy",
|
||||||
|
"type": "uint16"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "uint48",
|
||||||
|
"name": "maxGasPrice",
|
||||||
|
"type": "uint48"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "uint32",
|
||||||
|
"name": "maxGasLimit",
|
||||||
|
"type": "uint32"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "string",
|
||||||
|
"name": "containerId",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "bytes",
|
||||||
|
"name": "inputs",
|
||||||
|
"type": "bytes"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"stateMutability": "view",
|
||||||
|
"type": "function"
|
||||||
|
}
|
||||||
|
]
|
1
Makefile
1
Makefile
@ -15,7 +15,6 @@ build-multiplatform:
|
|||||||
deploy-container: stop-container
|
deploy-container: stop-container
|
||||||
cp ./projects/$(project)/container/config.json deploy/config.json
|
cp ./projects/$(project)/container/config.json deploy/config.json
|
||||||
docker compose -f deploy/docker-compose.yaml up -d
|
docker compose -f deploy/docker-compose.yaml up -d
|
||||||
docker logs infernet-node -f
|
|
||||||
|
|
||||||
stop-container:
|
stop-container:
|
||||||
docker compose -f deploy/docker-compose.yaml kill || true
|
docker compose -f deploy/docker-compose.yaml kill || true
|
||||||
|
@ -2,7 +2,7 @@ version: '3'
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
node:
|
node:
|
||||||
image: ritualnetwork/infernet-node:1.0.0
|
image: ritualnetwork/infernet-node:1.2.0
|
||||||
ports:
|
ports:
|
||||||
- "0.0.0.0:4000:4000"
|
- "0.0.0.0:4000:4000"
|
||||||
volumes:
|
volumes:
|
||||||
@ -16,7 +16,7 @@ services:
|
|||||||
- redis
|
- redis
|
||||||
- infernet-anvil
|
- infernet-anvil
|
||||||
restart:
|
restart:
|
||||||
on-failure
|
unless-stopped
|
||||||
extra_hosts:
|
extra_hosts:
|
||||||
- "host.docker.internal:host-gateway"
|
- "host.docker.internal:host-gateway"
|
||||||
stop_grace_period: 1m
|
stop_grace_period: 1m
|
||||||
@ -32,7 +32,7 @@ services:
|
|||||||
- ./redis.conf:/usr/local/etc/redis/redis.conf
|
- ./redis.conf:/usr/local/etc/redis/redis.conf
|
||||||
- redis-data:/data
|
- redis-data:/data
|
||||||
restart:
|
restart:
|
||||||
on-failure
|
unless-stopped
|
||||||
|
|
||||||
fluentbit:
|
fluentbit:
|
||||||
image: fluent/fluent-bit:latest
|
image: fluent/fluent-bit:latest
|
||||||
@ -46,16 +46,18 @@ services:
|
|||||||
networks:
|
networks:
|
||||||
- network
|
- network
|
||||||
restart:
|
restart:
|
||||||
on-failure
|
unless-stopped
|
||||||
|
|
||||||
infernet-anvil:
|
infernet-anvil:
|
||||||
image: ritualnetwork/infernet-anvil:1.0.0
|
image: ritualnetwork/infernet-anvil:1.0.0
|
||||||
command: --host 0.0.0.0 --port 3000 --load-state infernet_deployed.json -b 1
|
command: --host 0.0.0.0 --port 3000 --load-state infernet_deployed.json --prune-history -b 1
|
||||||
ports:
|
ports:
|
||||||
- "8545:3000"
|
- "8545:3000"
|
||||||
networks:
|
networks:
|
||||||
- network
|
- network
|
||||||
container_name: infernet-anvil
|
container_name: infernet-anvil
|
||||||
|
restart:
|
||||||
|
unless-stopped
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
network:
|
network:
|
||||||
|
214
playbook.yml
Normal file
214
playbook.yml
Normal file
@ -0,0 +1,214 @@
|
|||||||
|
---
|
||||||
|
- name: System Setup and Configuration
|
||||||
|
hosts: all
|
||||||
|
become: yes
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
tasks:
|
||||||
|
- name: Set locale to C.UTF-8
|
||||||
|
command: localectl set-locale LANG=C.UTF-8
|
||||||
|
|
||||||
|
- name: Update /etc/bash.bashrc
|
||||||
|
blockinfile:
|
||||||
|
path: /etc/bash.bashrc
|
||||||
|
block: |
|
||||||
|
export HISTTIMEFORMAT='%F, %T '
|
||||||
|
export HISTSIZE=10000
|
||||||
|
export HISTFILESIZE=10000
|
||||||
|
shopt -s histappend
|
||||||
|
export PROMPT_COMMAND='history -a'
|
||||||
|
export HISTCONTROL=ignoredups
|
||||||
|
export LANG=C.UTF-8
|
||||||
|
export LC_ALL=C.UTF-8
|
||||||
|
alias ls='ls --color=auto'
|
||||||
|
shopt -s cmdhist
|
||||||
|
|
||||||
|
- name: Ensure ~/.inputrc exists
|
||||||
|
file:
|
||||||
|
path: /root/.inputrc
|
||||||
|
state: touch
|
||||||
|
|
||||||
|
- name: Update ~/.inputrc
|
||||||
|
blockinfile:
|
||||||
|
path: ~/.inputrc
|
||||||
|
block: |
|
||||||
|
"\e[A": history-search-backward
|
||||||
|
"\e[B": history-search-forward
|
||||||
|
|
||||||
|
- name: Ensure ~/.nanorc exists
|
||||||
|
file:
|
||||||
|
path: /root/.nanorc
|
||||||
|
state: touch
|
||||||
|
|
||||||
|
- name: Update ~/.nanorc
|
||||||
|
blockinfile:
|
||||||
|
path: ~/.nanorc
|
||||||
|
block: |
|
||||||
|
set nohelp
|
||||||
|
set tabsize 4
|
||||||
|
set tabstospaces
|
||||||
|
set autoindent
|
||||||
|
set positionlog
|
||||||
|
set backup
|
||||||
|
set backupdir /tmp/
|
||||||
|
set locking
|
||||||
|
include /usr/share/nano/*.nanorc
|
||||||
|
|
||||||
|
- name: Set hostname
|
||||||
|
shell: |
|
||||||
|
hostnamectl set-hostname {{ serverid }}
|
||||||
|
echo "127.0.1.1 {{ serverid }}" >> /etc/hosts
|
||||||
|
|
||||||
|
- name: Update and upgrade apt
|
||||||
|
apt:
|
||||||
|
update_cache: yes
|
||||||
|
upgrade: dist
|
||||||
|
force_apt_get: yes
|
||||||
|
register: apt_update_result
|
||||||
|
retries: 50
|
||||||
|
delay: 50
|
||||||
|
until: apt_update_result is succeeded
|
||||||
|
|
||||||
|
- name: Install necessary packages
|
||||||
|
apt:
|
||||||
|
name:
|
||||||
|
- apt-transport-https
|
||||||
|
- ca-certificates
|
||||||
|
- curl
|
||||||
|
- software-properties-common
|
||||||
|
- make
|
||||||
|
- iftop
|
||||||
|
- python3
|
||||||
|
state: present
|
||||||
|
|
||||||
|
- name: Install pip package web3
|
||||||
|
pip:
|
||||||
|
name: web3
|
||||||
|
extra_args: --break-system-packages
|
||||||
|
|
||||||
|
- name: Install Docker
|
||||||
|
shell: curl -sL https://get.docker.com | sudo sh -
|
||||||
|
|
||||||
|
- name: Ensure /etc/docker/daemon.json exists
|
||||||
|
file:
|
||||||
|
path: /etc/docker/daemon.json
|
||||||
|
state: touch
|
||||||
|
|
||||||
|
- name: Update Docker daemon configuration for journald logging
|
||||||
|
copy:
|
||||||
|
dest: /etc/docker/daemon.json
|
||||||
|
content: |
|
||||||
|
{
|
||||||
|
"log-driver": "journald"
|
||||||
|
}
|
||||||
|
|
||||||
|
- name: Restart Docker
|
||||||
|
service:
|
||||||
|
name: docker
|
||||||
|
state: restarted
|
||||||
|
|
||||||
|
- name: Docker login
|
||||||
|
shell: docker login -u {{ docker_username }} -p {{ docker_password }}
|
||||||
|
|
||||||
|
- name: Update journald log SystemMaxUse=2G configuration
|
||||||
|
lineinfile:
|
||||||
|
path: /etc/systemd/journald.conf
|
||||||
|
line: 'SystemMaxUse=2G'
|
||||||
|
insertafter: EOF
|
||||||
|
create: yes
|
||||||
|
|
||||||
|
- name: Restart journald
|
||||||
|
service:
|
||||||
|
name: systemd-journald
|
||||||
|
state: restarted
|
||||||
|
|
||||||
|
- name: Setup Foundry
|
||||||
|
shell: |
|
||||||
|
mkdir -p ~/foundry && cd ~/foundry
|
||||||
|
curl -L https://foundry.paradigm.xyz | bash
|
||||||
|
args:
|
||||||
|
executable: /bin/bash
|
||||||
|
|
||||||
|
- name: Run foundryup
|
||||||
|
shell: |
|
||||||
|
source ~/.bashrc && foundryup
|
||||||
|
args:
|
||||||
|
executable: /bin/bash
|
||||||
|
|
||||||
|
- name: Clone ritual-says-gm repository
|
||||||
|
git:
|
||||||
|
repo: https://gitea.vvzvlad.xyz/vvzvlad/ritual-says-gm.git
|
||||||
|
dest: ~/ritual-says-gm
|
||||||
|
force: yes
|
||||||
|
|
||||||
|
- name: Update wallet, private key and RPC URL in project
|
||||||
|
shell: |
|
||||||
|
cd ~/ritual-says-gm
|
||||||
|
bash update.sh {{ wallet }} {{ private_key }} {{ rpc_url }}
|
||||||
|
|
||||||
|
- name: Remove old Forge and Infernet SDK
|
||||||
|
shell: |
|
||||||
|
cd ~/ritual-says-gm
|
||||||
|
rm -rf projects/hello-world/contracts/lib/forge-std
|
||||||
|
rm -rf projects/hello-world/contracts/lib/infernet-sdk
|
||||||
|
|
||||||
|
- name: Install Forge and Infernet SDK
|
||||||
|
shell: |
|
||||||
|
cd ~/foundry && source ~/.bashrc && foundryup
|
||||||
|
cd ~/ritual-says-gm
|
||||||
|
cd projects/hello-world/contracts
|
||||||
|
forge install --no-commit foundry-rs/forge-std
|
||||||
|
forge install --no-commit ritual-net/infernet-sdk
|
||||||
|
args:
|
||||||
|
executable: /bin/bash
|
||||||
|
|
||||||
|
- name: Deploy container
|
||||||
|
shell: |
|
||||||
|
cd ~/ritual-says-gm && project=hello-world make deploy-container
|
||||||
|
|
||||||
|
- name: Deploy contracts
|
||||||
|
shell: cd ~/ritual-says-gm && project=hello-world make deploy-contracts 2>&1
|
||||||
|
register: contract_deploy_output
|
||||||
|
ignore_errors: yes
|
||||||
|
retries: 3
|
||||||
|
delay: 53
|
||||||
|
until: '"ONCHAIN EXECUTION COMPLETE & SUCCESSFUL" in contract_deploy_output.stdout'
|
||||||
|
|
||||||
|
- name: Update CallContract.s.sol with contract address
|
||||||
|
shell: |
|
||||||
|
cd ~/ritual-says-gm
|
||||||
|
contract_address=$(jq -r '.transactions[0].contractAddress' projects/hello-world/contracts/broadcast/Deploy.s.sol/8453/run-latest.json)
|
||||||
|
checksum_address=$(python3 toChecksumAddress.py $contract_address)
|
||||||
|
sed -i "s/SaysGM(.*/SaysGM($checksum_address);/" projects/hello-world/contracts/script/CallContract.s.sol
|
||||||
|
|
||||||
|
- name: Call contract
|
||||||
|
shell: cd ~/ritual-says-gm && project=hello-world make call-contract 2>&1
|
||||||
|
register: contract_output
|
||||||
|
ignore_errors: yes
|
||||||
|
retries: 3
|
||||||
|
delay: 55
|
||||||
|
until: '"ONCHAIN EXECUTION COMPLETE & SUCCESSFUL" in contract_output.stdout'
|
||||||
|
|
||||||
|
- name: Set Docker containers to restart unless stopped
|
||||||
|
shell: |
|
||||||
|
docker update --restart unless-stopped hello-world
|
||||||
|
docker update --restart unless-stopped infernet-node
|
||||||
|
docker update --restart unless-stopped deploy-redis-1
|
||||||
|
docker update --restart unless-stopped infernet-anvil
|
||||||
|
docker update --restart unless-stopped deploy-fluentbit-1
|
||||||
|
|
||||||
|
- name: Create APT configuration file to assume yes
|
||||||
|
copy:
|
||||||
|
dest: /etc/apt/apt.conf.d/90forceyes
|
||||||
|
content: |
|
||||||
|
APT::Get::Assume-Yes "true";
|
||||||
|
|
||||||
|
- name: Set permissions on APT configuration file
|
||||||
|
file:
|
||||||
|
path: /etc/apt/apt.conf.d/90forceyes
|
||||||
|
mode: '0644'
|
||||||
|
|
||||||
|
- name: Remove docker login credentials
|
||||||
|
shell: rm -rf /root/.docker/config.json
|
||||||
|
ignore_errors: yes
|
@ -11,6 +11,7 @@ update-tag:
|
|||||||
|
|
||||||
run: build
|
run: build
|
||||||
docker run \
|
docker run \
|
||||||
|
--restart unless-stopped \
|
||||||
-p 3000:3000 $(TAG)
|
-p 3000:3000 $(TAG)
|
||||||
|
|
||||||
# You may need to set up a docker builder, to do so run:
|
# You may need to set up a docker builder, to do so run:
|
||||||
|
@ -6,17 +6,13 @@
|
|||||||
"chain": {
|
"chain": {
|
||||||
"enabled": true,
|
"enabled": true,
|
||||||
"trail_head_blocks": 0,
|
"trail_head_blocks": 0,
|
||||||
"rpc_url": "https://base-rpc.publicnode.com",
|
"rpc_url": "###RPC_URL###",
|
||||||
"registry_address": "0x8D871Ef2826ac9001fB2e33fDD6379b6aaBF449c",
|
"registry_address": "0x3B1554f346DFe5c482Bb4BA31b880c1C18412170",
|
||||||
"wallet": {
|
"wallet": {
|
||||||
"max_gas_limit": 4000000,
|
"max_gas_limit": 4000000,
|
||||||
"private_key": "###PRIVATE_KEY###"
|
"private_key": "###PRIVATE_KEY###"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"snapshot_sync": {
|
|
||||||
"sleep": 5,
|
|
||||||
"batch_size": 100
|
|
||||||
},
|
|
||||||
"startup_wait": 1.0,
|
"startup_wait": 1.0,
|
||||||
"docker": {
|
"docker": {
|
||||||
"username": "your-username",
|
"username": "your-username",
|
||||||
@ -28,8 +24,9 @@
|
|||||||
},
|
},
|
||||||
"forward_stats": true,
|
"forward_stats": true,
|
||||||
"snapshot_sync": {
|
"snapshot_sync": {
|
||||||
"sleep": 3,
|
"sleep": 2,
|
||||||
"batch_size": 100
|
"batch_size": 10000,
|
||||||
|
"starting_sub_id": 100000
|
||||||
},
|
},
|
||||||
"containers": [
|
"containers": [
|
||||||
{
|
{
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
# anvil's third default address
|
# anvil's third default address
|
||||||
sender := ###PRIVATE_KEY###
|
sender := ###PRIVATE_KEY###
|
||||||
RPC_URL := https://base-rpc.publicnode.com
|
RPC_URL := ###RPC_URL###
|
||||||
|
|
||||||
# deploying the contract
|
# deploying the contract
|
||||||
deploy:
|
deploy:
|
||||||
|
@ -14,7 +14,7 @@ contract Deploy is Script {
|
|||||||
address deployerAddress = vm.addr(deployerPrivateKey);
|
address deployerAddress = vm.addr(deployerPrivateKey);
|
||||||
console2.log("Loaded deployer: ", deployerAddress);
|
console2.log("Loaded deployer: ", deployerAddress);
|
||||||
|
|
||||||
address registry = 0x8D871Ef2826ac9001fB2e33fDD6379b6aaBF449c;
|
address registry = 0x3B1554f346DFe5c482Bb4BA31b880c1C18412170;
|
||||||
// Create consumer
|
// Create consumer
|
||||||
SaysGM saysGm = new SaysGM(registry);
|
SaysGM saysGm = new SaysGM(registry);
|
||||||
console2.log("Deployed SaysHello: ", address(saysGm));
|
console2.log("Deployed SaysHello: ", address(saysGm));
|
||||||
|
6
toChecksumAddress.py
Normal file
6
toChecksumAddress.py
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
import sys
|
||||||
|
from web3 import Web3
|
||||||
|
|
||||||
|
address = sys.argv[1]
|
||||||
|
checksum_address = Web3.to_checksum_address(address)
|
||||||
|
print(checksum_address)
|
12
update.sh
12
update.sh
@ -1,14 +1,15 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
if [ "$#" -ne 2 ]; then
|
if [ "$#" -ne 3 ]; then
|
||||||
echo "Usage: $0 <wallet_address> <private_key>"
|
echo "Usage: $0 <wallet_address> <private_key> <rpc_url>"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
WALLET_ADDRESS=$1
|
WALLET_ADDRESS=$1
|
||||||
PRIVATE_KEY=$2
|
PRIVATE_KEY=$2
|
||||||
|
RPC_URL=$3
|
||||||
|
|
||||||
# Список файлов
|
# List of files
|
||||||
FILES=(
|
FILES=(
|
||||||
"./projects/hello-world/container/config.json"
|
"./projects/hello-world/container/config.json"
|
||||||
"./projects/hello-world/contracts/Makefile"
|
"./projects/hello-world/contracts/Makefile"
|
||||||
@ -16,6 +17,7 @@ FILES=(
|
|||||||
|
|
||||||
for FILE in "${FILES[@]}"; do
|
for FILE in "${FILES[@]}"; do
|
||||||
EXPANDED_FILE=$(eval echo "$FILE")
|
EXPANDED_FILE=$(eval echo "$FILE")
|
||||||
sed -i "s/###WALLET_ADDRESS###/$WALLET_ADDRESS/g" "$EXPANDED_FILE"
|
sed -i "s|###WALLET_ADDRESS###|$WALLET_ADDRESS|g" "$EXPANDED_FILE"
|
||||||
sed -i "s/###PRIVATE_KEY###/$PRIVATE_KEY/g" "$EXPANDED_FILE"
|
sed -i "s|###PRIVATE_KEY###|$PRIVATE_KEY|g" "$EXPANDED_FILE"
|
||||||
|
sed -i "s|###RPC_URL###|$RPC_URL|g" "$EXPANDED_FILE"
|
||||||
done
|
done
|
||||||
|
Reference in New Issue
Block a user