[ { "inputs": [ { "internalType": "address", "name": "_clrToken", "type": "address" } ], "stateMutability": "nonpayable", "type": "constructor" }, { "inputs": [ { "internalType": "address", "name": "owner", "type": "address" } ], "name": "OwnableInvalidOwner", "type": "error" }, { "inputs": [ { "internalType": "address", "name": "account", "type": "address" } ], "name": "OwnableUnauthorizedAccount", "type": "error" }, { "inputs": [], "name": "ReentrancyGuardReentrantCall", "type": "error" }, { "inputs": [ { "internalType": "address", "name": "token", "type": "address" } ], "name": "SafeERC20FailedOperation", "type": "error" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "client", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "connectionStartTime", "type": "uint256" }, { "indexed": false, "internalType": "uint256", "name": "abortTime", "type": "uint256" } ], "name": "ConnectionAborted", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "currentGovernance", "type": "address" }, { "indexed": true, "internalType": "address", "name": "pendingGovernance", "type": "address" } ], "name": "GovernanceTransferInitiated", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "previousGovernance", "type": "address" }, { "indexed": true, "internalType": "address", "name": "newGovernance", "type": "address" } ], "name": "GovernanceTransferred", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "nodeID", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "returnedStake", "type": "uint256" } ], "name": "NodeDeregistered", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "nodeID", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "newPricePerMinute", "type": "uint256" } ], "name": "NodePriceUpdated", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "nodeID", "type": "address" }, { "indexed": false, "internalType": "string", "name": "ipAddress", "type": "string" }, { "indexed": false, "internalType": "uint16", "name": "port", "type": "uint16" }, { "indexed": false, "internalType": "uint256", "name": "pricePerMinute", "type": "uint256" }, { "indexed": false, "internalType": "uint256", "name": "stakeAmount", "type": "uint256" } ], "name": "NodeRegistered", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "nodeID", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "slashAmount", "type": "uint256" }, { "indexed": false, "internalType": "uint256", "name": "remainingStake", "type": "uint256" } ], "name": "NodeSlashed", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "nodeID", "type": "address" }, { "indexed": false, "internalType": "string", "name": "newIp", "type": "string" }, { "indexed": false, "internalType": "uint16", "name": "newPort", "type": "uint16" } ], "name": "NodeUpdated", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "ownerAccount", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" } ], "name": "OwnerShareAccrued", "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": "account", "type": "address" } ], "name": "Paused", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "client", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "refundAmount", "type": "uint256" } ], "name": "PaymentChannelClosed", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "client", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" } ], "name": "PaymentChannelOpened", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "client", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" }, { "indexed": false, "internalType": "uint256", "name": "newBalance", "type": "uint256" } ], "name": "PaymentChannelToppedUp", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "client", "type": "address" }, { "indexed": true, "internalType": "address", "name": "nodeID", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" }, { "indexed": false, "internalType": "uint256", "name": "minutesUsed", "type": "uint256" }, { "indexed": false, "internalType": "uint256", "name": "nodeShare", "type": "uint256" }, { "indexed": false, "internalType": "uint256", "name": "treasuryShare", "type": "uint256" }, { "indexed": false, "internalType": "uint256", "name": "ownerShare", "type": "uint256" }, { "indexed": false, "internalType": "bool", "name": "ratingProvided", "type": "bool" }, { "indexed": false, "internalType": "uint256", "name": "rating", "type": "uint256" } ], "name": "PaymentProcessed", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "nodeID", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "newScore", "type": "uint256" } ], "name": "ReputationUpdated", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "account", "type": "address" } ], "name": "Unpaused", "type": "event" }, { "inputs": [], "name": "ABORT_WINDOW", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "INITIAL_REPUTATION", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "MAX_MINUTES_PER_PAYMENT", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "MAX_PRICE_PER_MIN", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "MAX_REPUTATION", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "MIN_CHANNEL_BALANCE", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "MIN_PRICE_PER_MIN", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "MIN_STAKE", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "MIN_STAKE_THRESHOLD", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "NODE_SHARE", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "OWNER_SHARE", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "SHARE_DENOMINATOR", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "TREASURY_SHARE", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "string", "name": "vpnClientPublicKey", "type": "string" }, { "internalType": "uint256", "name": "_connectionStartTime", "type": "uint256" }, { "internalType": "uint256", "name": "_agreedPricePerMinute", "type": "uint256" }, { "internalType": "bytes", "name": "_clientSignature", "type": "bytes" } ], "name": "abortConnection", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "acceptGovernanceTransfer", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "name": "activeChannelIds", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "name": "activeNodeIds", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "_nodeID", "type": "address" }, { "internalType": "uint256", "name": "_minutesUsed", "type": "uint256" } ], "name": "calculateCost", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "closePaymentChannel", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "clrToken", "outputs": [ { "internalType": "contract IERC20", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "deregisterNode", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "getActiveNodes", "outputs": [ { "internalType": "address[]", "name": "", "type": "address[]" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "_offset", "type": "uint256" }, { "internalType": "uint256", "name": "_limit", "type": "uint256" } ], "name": "getActiveNodesPaginated", "outputs": [ { "internalType": "address[]", "name": "nodes", "type": "address[]" }, { "internalType": "uint256", "name": "total", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "getActivePaymentChannels", "outputs": [ { "internalType": "address[]", "name": "", "type": "address[]" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "_offset", "type": "uint256" }, { "internalType": "uint256", "name": "_limit", "type": "uint256" } ], "name": "getActivePaymentChannelsPaginated", "outputs": [ { "internalType": "address[]", "name": "channels", "type": "address[]" }, { "internalType": "uint256", "name": "total", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "getContractStats", "outputs": [ { "internalType": "uint256", "name": "totalNodes", "type": "uint256" }, { "internalType": "uint256", "name": "totalChannels", "type": "uint256" }, { "internalType": "uint256", "name": "totalMinutes", "type": "uint256" }, { "internalType": "uint256", "name": "treasuryBalance", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "_nodeID", "type": "address" } ], "name": "getNodeInfo", "outputs": [ { "internalType": "string", "name": "ipAddress", "type": "string" }, { "internalType": "uint16", "name": "port", "type": "uint16" }, { "internalType": "uint256", "name": "pricePerMinute", "type": "uint256" }, { "internalType": "uint256", "name": "reputationScore", "type": "uint256" }, { "internalType": "uint256", "name": "totalMinutesServed", "type": "uint256" }, { "internalType": "uint256", "name": "totalEarnings", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "_client", "type": "address" } ], "name": "getPaymentChannelInfo", "outputs": [ { "internalType": "uint256", "name": "balance", "type": "uint256" }, { "internalType": "uint256", "name": "nonce", "type": "uint256" }, { "internalType": "bool", "name": "isActive", "type": "bool" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "governanceContract", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "_newGovernance", "type": "address" } ], "name": "initiateGovernanceTransfer", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "bytes32", "name": "_messageHash", "type": "bytes32" } ], "name": "isSignatureUsed", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "", "type": "address" } ], "name": "nodes", "outputs": [ { "internalType": "string", "name": "ipAddress", "type": "string" }, { "internalType": "uint16", "name": "port", "type": "uint16" }, { "internalType": "bool", "name": "isActive", "type": "bool" }, { "internalType": "uint256", "name": "stakeAmount", "type": "uint256" }, { "internalType": "uint256", "name": "reputationScore", "type": "uint256" }, { "internalType": "uint256", "name": "pricePerMinute", "type": "uint256" }, { "internalType": "uint256", "name": "totalMinutesServed", "type": "uint256" }, { "internalType": "uint256", "name": "totalEarnings", "type": "uint256" }, { "internalType": "uint256", "name": "lastActivity", "type": "uint256" }, { "internalType": "uint256", "name": "totalRatingValue", "type": "uint256" }, { "internalType": "uint256", "name": "totalRatingCount", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "_amount", "type": "uint256" } ], "name": "openPaymentChannel", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "owner", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "pause", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "paused", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "", "type": "address" } ], "name": "paymentChannels", "outputs": [ { "internalType": "uint256", "name": "balance", "type": "uint256" }, { "internalType": "uint256", "name": "nonce", "type": "uint256" }, { "internalType": "bool", "name": "isActive", "type": "bool" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "pendingGovernance", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "_client", "type": "address" }, { "internalType": "address", "name": "_node", "type": "address" }, { "internalType": "string", "name": "vpnClientPublicKey", "type": "string" }, { "internalType": "uint256", "name": "_connectionStartTime", "type": "uint256" }, { "internalType": "uint256", "name": "_agreedPricePerMinute", "type": "uint256" }, { "internalType": "bool", "name": "_ratingProvided", "type": "bool" }, { "internalType": "uint256", "name": "_rating", "type": "uint256" }, { "internalType": "bytes", "name": "_clientSignature", "type": "bytes" }, { "internalType": "bytes", "name": "_nodeSignature", "type": "bytes" } ], "name": "processPayment", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "string", "name": "_ipAddress", "type": "string" }, { "internalType": "uint16", "name": "_port", "type": "uint16" }, { "internalType": "uint256", "name": "_pricePerMinute", "type": "uint256" } ], "name": "registerNode", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "renounceOwnership", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "_nodeID", "type": "address" }, { "internalType": "uint256", "name": "_slashAmount", "type": "uint256" } ], "name": "slashNode", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "_amount", "type": "uint256" } ], "name": "topUpPaymentChannel", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "totalBandwidthMinutes", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "totalProtocolFees", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "newOwner", "type": "address" } ], "name": "transferOwnership", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "_value", "type": "uint256" } ], "name": "uintToString", "outputs": [ { "internalType": "string", "name": "", "type": "string" } ], "stateMutability": "pure", "type": "function" }, { "inputs": [], "name": "unpause", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "string", "name": "_newIpAddress", "type": "string" }, { "internalType": "uint16", "name": "_newPort", "type": "uint16" } ], "name": "updateNodeInfo", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "_newPricePerMinute", "type": "uint256" } ], "name": "updatePrice", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "bytes32", "name": "", "type": "bytes32" } ], "name": "usedSignatures", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "_amount", "type": "uint256" } ], "name": "withdrawTreasuryFunds", "outputs": [], "stateMutability": "nonpayable", "type": "function" } ]