From a1fabe044d0c8b6b1f1f64c0201f09c9f6975823 Mon Sep 17 00:00:00 2001 From: sirpy Date: Wed, 31 Jul 2024 17:36:41 +0300 Subject: [PATCH] add: ubipool subgraph --- packages/contracts/contracts/UBI/UBIPool.sol | 11 +- packages/contracts/releases/deployment.json | 13037 ++++++++-------- packages/subgraph/config/celo-dev.json | 3 +- packages/subgraph/config/celo.json | 3 +- packages/subgraph/package.json | 6 +- packages/subgraph/schema.graphql | 28 +- .../subgraph/src/mappings/ipfsCollective.ts | 9 +- packages/subgraph/src/mappings/pool.ts | 3 +- packages/subgraph/src/mappings/poolFactory.ts | 60 +- packages/subgraph/src/mappings/ubipool.ts | 109 + packages/subgraph/subgraph.template.yaml | 56 + packages/subgraph/subgraph.yaml | 60 +- 12 files changed, 6841 insertions(+), 6544 deletions(-) create mode 100644 packages/subgraph/src/mappings/ubipool.ts diff --git a/packages/contracts/contracts/UBI/UBIPool.sol b/packages/contracts/contracts/UBI/UBIPool.sol index ae2d2bc4..300792e1 100644 --- a/packages/contracts/contracts/UBI/UBIPool.sol +++ b/packages/contracts/contracts/UBI/UBIPool.sol @@ -124,6 +124,7 @@ contract UBIPool is AccessControlUpgradeable, GoodCollectiveSuperApp, UUPSUpgrad registry = _registry; settings = _settings; ubiSettings = _ubiSettings; + _verifyPoolSettings(_settings); _verifyUBISettings(_ubiSettings); _setupRole(DEFAULT_ADMIN_ROLE, msg.sender); _setupRole(MANAGER_ROLE, _settings.manager); @@ -321,7 +322,7 @@ contract UBIPool is AccessControlUpgradeable, GoodCollectiveSuperApp, UUPSUpgrad * @param _settings The new pool settings. */ function setPoolSettings(PoolSettings memory _settings) public onlyRole(MANAGER_ROLE) { - if (_settings.manager == address(0)) revert EMPTY_MANAGER(); + _verifyPoolSettings(_settings); if (_settings.manager != settings.manager) { _revokeRole(MANAGER_ROLE, settings.manager); @@ -331,6 +332,14 @@ contract UBIPool is AccessControlUpgradeable, GoodCollectiveSuperApp, UUPSUpgrad emit PoolSettingsChanged(_settings); } + function _verifyPoolSettings(PoolSettings memory _poolSettings) internal pure { + if ( + _poolSettings.manager == address(0) || + address(_poolSettings.uniquenessValidator) == address(0) || + address(_poolSettings.rewardToken) == address(0) + ) revert INVALID_0_VALUE(); + } + function estimateNextDailyUBI() public view returns (uint256) { uint256 currentBalance = settings.rewardToken.balanceOf(address(this)); //start early cycle if we can increase the daily UBI pool diff --git a/packages/contracts/releases/deployment.json b/packages/contracts/releases/deployment.json index eeb5f7b8..79bf7f8a 100644 --- a/packages/contracts/releases/deployment.json +++ b/packages/contracts/releases/deployment.json @@ -99,13 +99,13 @@ } } ], - "31337": [ + "42220": [ { - "name": "localhost", - "chainId": "31337", + "name": "celo", + "chainId": "42220", "contracts": { "DirectPaymentsFactory": { - "address": "0x998abeb3E57409262aE5b751f60747921B33613E", + "address": "0x58b5E37c5aFad520dD93E92A5D11B8721A9115F0", "abi": [ { "anonymous": false, @@ -160,11 +160,6 @@ "stateMutability": "payable", "type": "receive" }, - { - "inputs": [], - "name": "NOT_POOL", - "type": "error" - }, { "inputs": [], "name": "NOT_PROJECT_OWNER", @@ -424,19 +419,6 @@ "stateMutability": "view", "type": "function" }, - { - "inputs": [ - { - "internalType": "address", - "name": "member", - "type": "address" - } - ], - "name": "addMember", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, { "inputs": [ { @@ -774,30 +756,6 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "memberPools", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, { "inputs": [], "name": "nextNftType", @@ -824,25 +782,6 @@ "stateMutability": "view", "type": "function" }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "pools", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, { "inputs": [ { @@ -904,19 +843,6 @@ "stateMutability": "view", "type": "function" }, - { - "inputs": [ - { - "internalType": "address", - "name": "member", - "type": "address" - } - ], - "name": "removeMember", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, { "inputs": [ { @@ -1071,13 +997,8 @@ ] }, "DirectPaymentsFactory_Implementation": { - "address": "0x95401dc811bb5740090279Ba06cfA8fcF6113778", + "address": "0xBc1d6cDB7Bc2BFF1091A3db1CCCc4506EBb6d466", "abi": [ - { - "inputs": [], - "name": "NOT_POOL", - "type": "error" - }, { "inputs": [], "name": "NOT_PROJECT_OWNER", @@ -1382,19 +1303,6 @@ "stateMutability": "view", "type": "function" }, - { - "inputs": [ - { - "internalType": "address", - "name": "member", - "type": "address" - } - ], - "name": "addMember", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, { "inputs": [ { @@ -1732,30 +1640,6 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "memberPools", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, { "inputs": [], "name": "nextNftType", @@ -1782,25 +1666,6 @@ "stateMutability": "view", "type": "function" }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "pools", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, { "inputs": [ { @@ -1862,19 +1727,6 @@ "stateMutability": "view", "type": "function" }, - { - "inputs": [ - { - "internalType": "address", - "name": "member", - "type": "address" - } - ], - "name": "removeMember", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, { "inputs": [ { @@ -2013,7 +1865,7 @@ ] }, "DirectPaymentsFactory_Proxy": { - "address": "0x998abeb3E57409262aE5b751f60747921B33613E", + "address": "0x58b5E37c5aFad520dD93E92A5D11B8721A9115F0", "abi": [ { "inputs": [ @@ -2087,7 +1939,7 @@ ] }, "DirectPaymentsPool": { - "address": "0x1613beB3B2C4f22Ee086B2b38C1476A3cE7f78E8", + "address": "0xB8cc664aC448dBd6a16247849a454F1D0a7448Bc", "abi": [ { "inputs": [ @@ -3181,7 +3033,7 @@ "name": "getRegistry", "outputs": [ { - "internalType": "contract IRegistry", + "internalType": "contract DirectPaymentsFactory", "name": "", "type": "address" } @@ -3933,62 +3785,6 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "inputs": [ - { - "internalType": "address", - "name": "_sender", - "type": "address" - }, - { - "components": [ - { - "internalType": "address", - "name": "swapFrom", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "minReturn", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "path", - "type": "bytes" - } - ], - "internalType": "struct HelperLibrary.SwapData", - "name": "_customData", - "type": "tuple" - }, - { - "internalType": "bytes", - "name": "_ctx", - "type": "bytes" - } - ], - "name": "supportWithSwap", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, { "inputs": [ { @@ -4096,155 +3892,8 @@ } ] }, - "GoodDollar": { - "address": "0xc5a5C42992dECbae36851359345FE25997F5C42d", - "abi": [ - "constructor(address _host)", - "error SF_TOKEN_AGREEMENT_ALREADY_EXISTS()", - "error SF_TOKEN_AGREEMENT_DOES_NOT_EXIST()", - "error SF_TOKEN_BURN_INSUFFICIENT_BALANCE()", - "error SF_TOKEN_MOVE_INSUFFICIENT_BALANCE()", - "error SF_TOKEN_ONLY_HOST()", - "error SF_TOKEN_ONLY_LISTED_AGREEMENT()", - "error SUPER_TOKEN_APPROVE_FROM_ZERO_ADDRESS()", - "error SUPER_TOKEN_APPROVE_TO_ZERO_ADDRESS()", - "error SUPER_TOKEN_BURN_FROM_ZERO_ADDRESS()", - "error SUPER_TOKEN_CALLER_IS_NOT_OPERATOR_FOR_HOLDER()", - "error SUPER_TOKEN_INFLATIONARY_DEFLATIONARY_NOT_SUPPORTED()", - "error SUPER_TOKEN_MINT_TO_ZERO_ADDRESS()", - "error SUPER_TOKEN_NFT_PROXY_ALREADY_SET()", - "error SUPER_TOKEN_NOT_ERC777_TOKENS_RECIPIENT()", - "error SUPER_TOKEN_NO_UNDERLYING_TOKEN()", - "error SUPER_TOKEN_ONLY_GOV_OWNER()", - "error SUPER_TOKEN_ONLY_HOST()", - "error SUPER_TOKEN_ONLY_SELF()", - "error SUPER_TOKEN_TRANSFER_FROM_ZERO_ADDRESS()", - "error SUPER_TOKEN_TRANSFER_TO_ZERO_ADDRESS()", - "event AgreementCreated(address indexed agreementClass, bytes32 id, bytes32[] data)", - "event AgreementLiquidated(address indexed agreementClass, bytes32 id, address indexed penaltyAccount, address indexed rewardAccount, uint256 rewardAmount)", - "event AgreementLiquidatedBy(address liquidatorAccount, address indexed agreementClass, bytes32 id, address indexed penaltyAccount, address indexed bondAccount, uint256 rewardAmount, uint256 bailoutAmount)", - "event AgreementLiquidatedV2(address indexed agreementClass, bytes32 id, address indexed liquidatorAccount, address indexed targetAccount, address rewardAmountReceiver, uint256 rewardAmount, int256 targetAccountBalanceDelta, bytes liquidationTypeData)", - "event AgreementStateUpdated(address indexed agreementClass, address indexed account, uint256 slotId)", - "event AgreementTerminated(address indexed agreementClass, bytes32 id)", - "event AgreementUpdated(address indexed agreementClass, bytes32 id, bytes32[] data)", - "event Approval(address indexed owner, address indexed spender, uint256 value)", - "event AuthorizedOperator(address indexed operator, address indexed tokenHolder)", - "event Bailout(address indexed bailoutAccount, uint256 bailoutAmount)", - "event Burned(address indexed operator, address indexed from, uint256 amount, bytes data, bytes operatorData)", - "event CodeUpdated(bytes32 uuid, address codeAddress)", - "event ConstantInflowNFTCreated(address indexed constantInflowNFT)", - "event ConstantOutflowNFTCreated(address indexed constantOutflowNFT)", - "event Initialized(uint8 version)", - "event Minted(address indexed operator, address indexed to, uint256 amount, bytes data, bytes operatorData)", - "event Paused(address account)", - "event RevokedOperator(address indexed operator, address indexed tokenHolder)", - "event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole)", - "event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender)", - "event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender)", - "event Sent(address indexed operator, address indexed from, address indexed to, uint256 amount, bytes data, bytes operatorData)", - "event Transfer(address indexed from, address indexed to, uint256 value, bytes data)", - "event Transfer(address indexed from, address indexed to, uint256 value)", - "event TransferFee(address from, address to, uint256 amount, uint256 fee, bool senderPays)", - "event Unpaused(address account)", - "function CONSTANT_INFLOW_NFT() view returns (address)", - "function CONSTANT_OUTFLOW_NFT() view returns (address)", - "function DEFAULT_ADMIN_ROLE() view returns (bytes32)", - "function DOMAIN_SEPARATOR() view returns (bytes32)", - "function MINTER_ROLE() view returns (bytes32)", - "function PAUSER_ROLE() view returns (bytes32)", - "function addMinter(address _minter)", - "function addPauser(address _pauser)", - "function allowance(address account, address spender) view returns (uint256)", - "function approve(address spender, uint256 amount) returns (bool)", - "function authorizeOperator(address operator)", - "function balanceOf(address account) view returns (uint256 balance)", - "function burn(uint256 amount)", - "function burn(uint256 amount, bytes data)", - "function burnFrom(address account, uint256 amount)", - "function cap() view returns (uint256)", - "function castrate()", - "function createAgreement(bytes32 id, bytes32[] data)", - "function creditGasFees(address from, address feeRecipient, address gatewayFeeRecipient, address baseFeeRecipient, uint256 refund, uint256 tipTxFee, uint256 gatewayFee, uint256 baseTxFee)", - "function debitGasFees(address from, uint256 value)", - "function decimals() pure returns (uint8)", - "function decreaseAllowance(address spender, uint256 subtractedValue) returns (bool)", - "function defaultOperators() view returns (address[])", - "function disableHostOperations() view returns (bool)", - "function enableHostOperations(bool enabled)", - "function feeRecipient() view returns (address)", - "function formula() view returns (address)", - "function getAccountActiveAgreements(address account) view returns (address[])", - "function getAgreementData(address agreementClass, bytes32 id, uint256 dataLength) view returns (bytes32[] data)", - "function getAgreementStateSlot(address agreementClass, address account, uint256 slotId, uint256 dataLength) view returns (bytes32[] slotData)", - "function getCodeAddress() view returns (address codeAddress)", - "function getFees(uint256 amount, address sender, address recipient) view returns (uint256 fee, bool senderPays)", - "function getFees(uint256 amount) view returns (uint256 fee, bool senderPays)", - "function getHost() view returns (address host)", - "function getRoleAdmin(bytes32 role) view returns (bytes32)", - "function getRoleMember(bytes32 role, uint256 index) view returns (address)", - "function getRoleMemberCount(bytes32 role) view returns (uint256)", - "function getUnderlyingToken() view returns (address)", - "function grantRole(bytes32 role, address account)", - "function granularity() pure returns (uint256)", - "function hasRole(bytes32 role, address account) view returns (bool)", - "function identity() view returns (address)", - "function increaseAllowance(address spender, uint256 addedValue) returns (bool)", - "function initialize(address underlyingToken, uint8 underlyingDecimals, string n, string s)", - "function initialize(string n, string s, uint256 _cap, address _formula, address _identity, address _feeRecipient, address _owner, address _outflowNFT, address _inflowNFT)", - "function isAccountCritical(address account, uint256 timestamp) view returns (bool isCritical)", - "function isAccountCriticalNow(address account) view returns (bool isCritical)", - "function isAccountSolvent(address account, uint256 timestamp) view returns (bool isSolvent)", - "function isAccountSolventNow(address account) view returns (bool isSolvent)", - "function isMinter(address _minter) view returns (bool)", - "function isOperatorFor(address operator, address tokenHolder) view returns (bool)", - "function isPauser(address _pauser) view returns (bool)", - "function makeLiquidationPayoutsV2(bytes32 id, bytes liquidationTypeData, address liquidatorAccount, bool useDefaultRewardAccount, address targetAccount, uint256 rewardAmount, int256 targetAccountBalanceDelta)", - "function mint(address to, uint256 amount) returns (bool)", - "function name() view returns (string)", - "function nonces(address owner) view returns (uint256)", - "function operationApprove(address account, address spender, uint256 amount)", - "function operationDecreaseAllowance(address account, address spender, uint256 subtractedValue)", - "function operationIncreaseAllowance(address account, address spender, uint256 addedValue)", - "function operationSend(address spender, address recipient, uint256 amount, bytes userData)", - "function operationTransferFrom(address account, address spender, address recipient, uint256 amount)", - "function operatorBurn(address account, uint256 amount, bytes data, bytes operatorData)", - "function operatorSend(address sender, address recipient, uint256 amount, bytes data, bytes operatorData)", - "function owner() view returns (address)", - "function pause()", - "function paused() view returns (bool)", - "function permit(address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s)", - "function poolAdminNFT() view returns (address)", - "function poolMemberNFT() view returns (address)", - "function proxiableUUID() pure returns (bytes32)", - "function realtimeBalanceOf(address account, uint256 timestamp) view returns (int256 availableBalance, uint256 deposit, uint256 owedDeposit)", - "function realtimeBalanceOfNow(address account) view returns (int256 availableBalance, uint256 deposit, uint256 owedDeposit, uint256 timestamp)", - "function renounceMinter()", - "function renounceRole(bytes32 role, address account)", - "function revokeOperator(address operator)", - "function revokeRole(bytes32 role, address account)", - "function selfApproveFor(address account, address spender, uint256 amount)", - "function send(address recipient, uint256 amount, bytes data)", - "function setFeeRecipient(address _feeRecipient)", - "function setFormula(address _formula)", - "function setIdentity(address _identity)", - "function setNFTProxyContracts(address _constantOutflowNFT, address _constantInflowNFT, address _poolAdminNFT, address _poolMemberNFT)", - "function settleBalance(address account, int256 delta)", - "function supportsInterface(bytes4 interfaceId) view returns (bool)", - "function symbol() view returns (string)", - "function terminateAgreement(bytes32 id, uint256 dataLength)", - "function totalSupply() view returns (uint256)", - "function transfer(address to, uint256 amount) returns (bool)", - "function transferAndCall(address to, uint256 amount, bytes data) returns (bool)", - "function transferFrom(address holder, address recipient, uint256 amount) returns (bool)", - "function transferOwnership(address _owner)", - "function unpause()", - "function updateAgreementData(bytes32 id, bytes32[] data)", - "function updateAgreementStateSlot(address account, uint256 slotId, bytes32[] slotData)", - "function updateCode(address newAddress)" - ] - }, - "HelperLibrary": { - "address": "0xa82fF9aFd8f496c3d6ac40E2a0F282E47488CFc9", + "HelperLibrary": { + "address": "0xE5a388DF47839BbC6227f52FB622DeB523079Aa8", "abi": [ { "inputs": [ @@ -4407,7 +4056,7 @@ ] }, "ProvableNFT": { - "address": "0xf5059a5D33d5853360D16C683c16e67980206f36", + "address": "0x2AF5DB8249229ba696E0bac1a382aDb1fee040A6", "abi": [ { "anonymous": false, @@ -5612,7 +5261,7 @@ ] }, "ProvableNFT_Implementation": { - "address": "0x851356ae760d987E095750cCeb3bC6014560891C", + "address": "0x4D76c54D6a9F381018fEA7BaC515ae590A1D476a", "abi": [ { "inputs": [ @@ -6793,7 +6442,7 @@ ] }, "ProvableNFT_Proxy": { - "address": "0xf5059a5D33d5853360D16C683c16e67980206f36", + "address": "0x2AF5DB8249229ba696E0bac1a382aDb1fee040A6", "abi": [ { "inputs": [ @@ -6865,281 +6514,305 @@ "type": "receive" } ] - }, - "SuperFluidResolver": { - "address": "0x02330b5Be8EBD0D4d354813a7BB535140A77C881", - "abi": [] - }, - "SwapRouterMock": { - "address": "0xc3e53F4d16Ae77Db1c982e75a937B9f60FE63690", + } + } + }, + { + "name": "localhost", + "chainId": "42220", + "contracts": { + "DirectPaymentsFactory": { + "address": "0x998abeb3E57409262aE5b751f60747921B33613E", "abi": [ { + "anonymous": false, "inputs": [ { + "indexed": false, "internalType": "address", - "name": "token", + "name": "previousAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAdmin", "type": "address" } ], - "stateMutability": "nonpayable", - "type": "constructor" + "name": "AdminChanged", + "type": "event" }, { + "anonymous": false, "inputs": [ { - "components": [ - { - "internalType": "bytes", - "name": "path", - "type": "bytes" - }, - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amountIn", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amountOutMinimum", - "type": "uint256" - } - ], - "internalType": "struct IV3SwapRouter.ExactInputParams", - "name": "params", - "type": "tuple" + "indexed": true, + "internalType": "address", + "name": "beacon", + "type": "address" } ], - "name": "exactInput", - "outputs": [ + "name": "BeaconUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ { - "internalType": "uint256", - "name": "amountOut", - "type": "uint256" + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" } ], + "name": "Upgraded", + "type": "event" + }, + { "stateMutability": "payable", - "type": "function" + "type": "fallback" + }, + { + "stateMutability": "payable", + "type": "receive" + }, + { + "inputs": [], + "name": "NOT_POOL", + "type": "error" + }, + { + "inputs": [], + "name": "NOT_PROJECT_OWNER", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" }, { + "anonymous": false, "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "pool", + "type": "address" + }, + { + "indexed": true, + "internalType": "string", + "name": "projectId", + "type": "string" + }, + { + "indexed": false, + "internalType": "string", + "name": "ipfs", + "type": "string" + }, + { + "indexed": true, + "internalType": "uint32", + "name": "nftType", + "type": "uint32" + }, { "components": [ { - "internalType": "address", - "name": "tokenIn", - "type": "address" - }, + "internalType": "uint32", + "name": "nftType", + "type": "uint32" + }, + { + "internalType": "uint16[]", + "name": "validEvents", + "type": "uint16[]" + }, + { + "internalType": "uint128[]", + "name": "rewardPerEvent", + "type": "uint128[]" + }, { "internalType": "address", - "name": "tokenOut", + "name": "manager", "type": "address" }, { - "internalType": "uint24", - "name": "fee", - "type": "uint24" + "internalType": "contract IMembersValidator", + "name": "membersValidator", + "type": "address" }, { - "internalType": "address", - "name": "recipient", + "internalType": "contract IIdentityV2", + "name": "uniquenessValidator", + "type": "address" + }, + { + "internalType": "contract IERC20Upgradeable", + "name": "rewardToken", "type": "address" }, + { + "internalType": "bool", + "name": "allowRewardOverride", + "type": "bool" + } + ], + "indexed": false, + "internalType": "struct DirectPaymentsPool.PoolSettings", + "name": "poolSettings", + "type": "tuple" + }, + { + "components": [ { "internalType": "uint256", - "name": "amountIn", + "name": "maxTotalPerMonth", "type": "uint256" }, { "internalType": "uint256", - "name": "amountOutMinimum", + "name": "maxMemberPerMonth", "type": "uint256" }, { - "internalType": "uint160", - "name": "sqrtPriceLimitX96", - "type": "uint160" + "internalType": "uint256", + "name": "maxMemberPerDay", + "type": "uint256" } ], - "internalType": "struct IV3SwapRouter.ExactInputSingleParams", - "name": "params", + "indexed": false, + "internalType": "struct DirectPaymentsPool.SafetyLimits", + "name": "poolLimits", "type": "tuple" } ], - "name": "exactInputSingle", - "outputs": [ - { - "internalType": "uint256", - "name": "amountOut", - "type": "uint256" - } - ], - "stateMutability": "payable", - "type": "function" - } - ] - }, - "UBIPool": { - "address": "0x4826533B4897376654Bb4d4AD88B7faFD0C98528", - "abi": [ + "name": "PoolCreated", + "type": "event" + }, { + "anonymous": false, "inputs": [ { - "internalType": "contract ISuperfluid", - "name": "_host", + "indexed": true, + "internalType": "address", + "name": "pool", "type": "address" }, { - "internalType": "contract IV3SwapRouter", - "name": "_swapRouter", - "type": "address" + "indexed": false, + "internalType": "string", + "name": "ipfs", + "type": "string" } ], - "stateMutability": "nonpayable", - "type": "constructor" + "name": "PoolDetailsChanged", + "type": "event" }, { + "anonymous": false, "inputs": [ { + "indexed": true, "internalType": "address", - "name": "whitelistedRoot", + "name": "pool", "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "isVerified", + "type": "bool" } ], - "name": "ALREADY_CLAIMED", - "type": "error" - }, - { - "inputs": [], - "name": "CLAIMFOR_DISABLED", - "type": "error" - }, - { - "inputs": [], - "name": "EMPTY_MANAGER", - "type": "error" + "name": "PoolVerifiedChanged", + "type": "event" }, { + "anonymous": false, "inputs": [ { - "internalType": "int96", - "name": "curFeeRate", - "type": "int96" + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" }, { - "internalType": "int96", - "name": "newFeeRate", - "type": "int96" - } - ], - "name": "FEE_FLOW_FAILED", - "type": "error" - }, - { - "inputs": [], - "name": "INVALID_0_VALUE", - "type": "error" - }, - { - "inputs": [], - "name": "MAX_CLAIMERS_REACHED", - "type": "error" - }, - { - "inputs": [ + "indexed": true, + "internalType": "bytes32", + "name": "previousAdminRole", + "type": "bytes32" + }, { - "internalType": "int96", - "name": "flowRate", - "type": "int96" + "indexed": true, + "internalType": "bytes32", + "name": "newAdminRole", + "type": "bytes32" } ], - "name": "MIN_FLOWRATE", - "type": "error" + "name": "RoleAdminChanged", + "type": "event" }, { + "anonymous": false, "inputs": [ { - "internalType": "address", - "name": "claimer", - "type": "address" - } - ], - "name": "NOT_MEMBER", - "type": "error" - }, - { - "inputs": [ + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, { + "indexed": true, "internalType": "address", - "name": "whitelistedRoot", + "name": "account", "type": "address" - } - ], - "name": "NOT_WHITELISTED", - "type": "error" - }, - { - "inputs": [], - "name": "NotAcceptedSuperToken", - "type": "error" - }, - { - "inputs": [], - "name": "NotImplemented", - "type": "error" - }, - { - "inputs": [ + }, { + "indexed": true, "internalType": "address", - "name": "", + "name": "sender", "type": "address" } ], - "name": "ONLY_HOST_OR_SENDER", - "type": "error" - }, - { - "inputs": [], - "name": "UNSUPPORTED_TOKEN", - "type": "error" - }, - { - "inputs": [], - "name": "UnauthorizedHost", - "type": "error" - }, - { - "inputs": [], - "name": "ZERO_ADDRESS", - "type": "error" - }, - { - "inputs": [], - "name": "ZERO_AMOUNT", - "type": "error" + "name": "RoleGranted", + "type": "event" }, { "anonymous": false, "inputs": [ { - "indexed": false, + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, "internalType": "address", - "name": "previousAdmin", + "name": "account", "type": "address" }, { - "indexed": false, + "indexed": true, "internalType": "address", - "name": "newAdmin", + "name": "sender", "type": "address" } ], - "name": "AdminChanged", + "name": "RoleRevoked", "type": "event" }, { @@ -7148,31 +6821,86 @@ { "indexed": true, "internalType": "address", - "name": "beacon", + "name": "impl", "type": "address" } ], - "name": "BeaconUpgraded", + "name": "UpdatedImpl", "type": "event" }, { - "anonymous": false, - "inputs": [ + "inputs": [], + "name": "DEFAULT_ADMIN_ROLE", + "outputs": [ { - "indexed": false, - "internalType": "uint8", - "name": "version", - "type": "uint8" + "internalType": "bytes32", + "name": "", + "type": "bytes32" } ], - "name": "Initialized", - "type": "event" + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "member", + "type": "address" + } + ], + "name": "addMember", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract DirectPaymentsPool", + "name": "_pool", + "type": "address" + }, + { + "internalType": "string", + "name": "_ipfs", + "type": "string" + } + ], + "name": "changePoolDetails", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - "anonymous": false, "inputs": [ + { + "internalType": "string", + "name": "_projectId", + "type": "string" + }, + { + "internalType": "string", + "name": "_ipfs", + "type": "string" + }, { "components": [ + { + "internalType": "uint32", + "name": "nftType", + "type": "uint32" + }, + { + "internalType": "uint16[]", + "name": "validEvents", + "type": "uint16[]" + }, + { + "internalType": "uint128[]", + "name": "rewardPerEvent", + "type": "uint128[]" + }, { "internalType": "address", "name": "manager", @@ -7192,299 +6920,309 @@ "internalType": "contract IERC20Upgradeable", "name": "rewardToken", "type": "address" + }, + { + "internalType": "bool", + "name": "allowRewardOverride", + "type": "bool" } ], - "indexed": false, - "internalType": "struct UBIPool.PoolSettings", - "name": "settings", + "internalType": "struct DirectPaymentsPool.PoolSettings", + "name": "_settings", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "maxTotalPerMonth", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "maxMemberPerMonth", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "maxMemberPerDay", + "type": "uint256" + } + ], + "internalType": "struct DirectPaymentsPool.SafetyLimits", + "name": "_limits", "type": "tuple" } ], - "name": "PoolSettingsChanged", - "type": "event" + "name": "createBeaconPool", + "outputs": [ + { + "internalType": "contract DirectPaymentsPool", + "name": "pool", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" }, { - "anonymous": false, "inputs": [ { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" + "internalType": "string", + "name": "_projectId", + "type": "string" }, { - "indexed": true, - "internalType": "bytes32", - "name": "previousAdminRole", - "type": "bytes32" + "internalType": "string", + "name": "_ipfs", + "type": "string" }, { - "indexed": true, - "internalType": "bytes32", - "name": "newAdminRole", - "type": "bytes32" + "components": [ + { + "internalType": "uint32", + "name": "nftType", + "type": "uint32" + }, + { + "internalType": "uint16[]", + "name": "validEvents", + "type": "uint16[]" + }, + { + "internalType": "uint128[]", + "name": "rewardPerEvent", + "type": "uint128[]" + }, + { + "internalType": "address", + "name": "manager", + "type": "address" + }, + { + "internalType": "contract IMembersValidator", + "name": "membersValidator", + "type": "address" + }, + { + "internalType": "contract IIdentityV2", + "name": "uniquenessValidator", + "type": "address" + }, + { + "internalType": "contract IERC20Upgradeable", + "name": "rewardToken", + "type": "address" + }, + { + "internalType": "bool", + "name": "allowRewardOverride", + "type": "bool" + } + ], + "internalType": "struct DirectPaymentsPool.PoolSettings", + "name": "_settings", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "maxTotalPerMonth", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "maxMemberPerMonth", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "maxMemberPerDay", + "type": "uint256" + } + ], + "internalType": "struct DirectPaymentsPool.SafetyLimits", + "name": "_limits", + "type": "tuple" } ], - "name": "RoleAdminChanged", - "type": "event" + "name": "createPool", + "outputs": [ + { + "internalType": "contract DirectPaymentsPool", + "name": "pool", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" }, { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, + "inputs": [], + "name": "feeBps", + "outputs": [ { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "feeRecipient", + "outputs": [ { - "indexed": true, "internalType": "address", - "name": "sender", + "name": "", "type": "address" } ], - "name": "RoleGranted", - "type": "event" + "stateMutability": "view", + "type": "function" }, { - "anonymous": false, "inputs": [ { - "indexed": true, "internalType": "bytes32", "name": "role", "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" } ], - "name": "RoleRevoked", - "type": "event" + "name": "getRoleAdmin", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" }, { - "anonymous": false, "inputs": [ { - "indexed": true, - "internalType": "address", - "name": "supporter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "previousContribution", - "type": "uint256" + "internalType": "bytes32", + "name": "role", + "type": "bytes32" }, { - "indexed": false, - "internalType": "uint256", - "name": "contribution", - "type": "uint256" - }, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "grantRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ { - "indexed": false, - "internalType": "int96", - "name": "previousFlowRate", - "type": "int96" + "internalType": "bytes32", + "name": "role", + "type": "bytes32" }, { - "indexed": false, - "internalType": "int96", - "name": "flowRate", - "type": "int96" - }, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasRole", + "outputs": [ { - "indexed": false, "internalType": "bool", - "name": "isFlowUpdate", + "name": "", "type": "bool" } ], - "name": "SupporterUpdated", - "type": "event" + "stateMutability": "view", + "type": "function" }, { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "day", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "dailyUbi", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "blockNumber", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "periodClaimers", - "type": "uint256" - }, + "inputs": [], + "name": "impl", + "outputs": [ { - "indexed": false, - "internalType": "uint256", - "name": "periodDistributed", - "type": "uint256" + "internalType": "contract UpgradeableBeacon", + "name": "", + "type": "address" } ], - "name": "UBICalculated", - "type": "event" + "stateMutability": "view", + "type": "function" }, { - "anonymous": false, "inputs": [ { - "indexed": true, "internalType": "address", - "name": "whitelistedRoot", + "name": "_owner", "type": "address" }, { - "indexed": true, "internalType": "address", - "name": "claimer", + "name": "_dpimpl", "type": "address" }, { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "UBIClaimed", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "day", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "pool", - "type": "uint256" + "internalType": "contract ProvableNFT", + "name": "_nft", + "type": "address" }, { - "indexed": false, - "internalType": "uint256", - "name": "cycleLength", - "type": "uint256" + "internalType": "address", + "name": "_feeRecipient", + "type": "address" }, { - "indexed": false, - "internalType": "uint256", - "name": "dailyUBIPool", - "type": "uint256" + "internalType": "uint32", + "name": "_feeBps", + "type": "uint32" } ], - "name": "UBICycleCalculated", - "type": "event" + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - "anonymous": false, "inputs": [ { - "components": [ - { - "internalType": "uint32", - "name": "cycleLengthDays", - "type": "uint32" - }, - { - "internalType": "uint32", - "name": "claimPeriodDays", - "type": "uint32" - }, - { - "internalType": "uint32", - "name": "minActiveUsers", - "type": "uint32" - }, - { - "internalType": "bool", - "name": "claimForEnabled", - "type": "bool" - }, - { - "internalType": "uint256", - "name": "maxClaimAmount", - "type": "uint256" - }, - { - "internalType": "uint32", - "name": "maxClaimers", - "type": "uint32" - }, - { - "internalType": "bool", - "name": "onlyMembers", - "type": "bool" - } - ], - "indexed": false, - "internalType": "struct UBIPool.UBISettings", - "name": "settings", - "type": "tuple" + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" } ], - "name": "UBISettingsChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ + "name": "memberPools", + "outputs": [ { - "indexed": true, "internalType": "address", - "name": "implementation", + "name": "", "type": "address" } ], - "name": "Upgraded", - "type": "event" + "stateMutability": "view", + "type": "function" }, { "inputs": [], - "name": "CFAV1_TYPE", + "name": "nextNftType", "outputs": [ { - "internalType": "bytes32", + "internalType": "uint32", "name": "", - "type": "bytes32" + "type": "uint32" } ], "stateMutability": "view", @@ -7492,51 +7230,63 @@ }, { "inputs": [], - "name": "DEFAULT_ADMIN_ROLE", + "name": "nft", "outputs": [ { - "internalType": "bytes32", + "internalType": "contract ProvableNFT", "name": "", - "type": "bytes32" + "type": "address" } ], "stateMutability": "view", "type": "function" }, { - "inputs": [], - "name": "MANAGER_ROLE", + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "pools", "outputs": [ { - "internalType": "bytes32", + "internalType": "address", "name": "", - "type": "bytes32" + "type": "address" } ], "stateMutability": "view", "type": "function" }, { - "inputs": [], - "name": "MEMBER_ROLE", - "outputs": [ + "inputs": [ { "internalType": "bytes32", "name": "", "type": "bytes32" } ], + "name": "projectIdToControlPool", + "outputs": [ + { + "internalType": "contract DirectPaymentsPool", + "name": "", + "type": "address" + } + ], "stateMutability": "view", "type": "function" }, { "inputs": [], - "name": "MIN_FLOW_RATE", + "name": "proxiableUUID", "outputs": [ { - "internalType": "int96", + "internalType": "bytes32", "name": "", - "type": "int96" + "type": "bytes32" } ], "stateMutability": "view", @@ -7546,24 +7296,29 @@ "inputs": [ { "internalType": "address", - "name": "member", + "name": "", "type": "address" - }, - { - "internalType": "bytes", - "name": "extraData", - "type": "bytes" } ], - "name": "addMember", + "name": "registry", "outputs": [ + { + "internalType": "string", + "name": "ipfs", + "type": "string" + }, { "internalType": "bool", - "name": "isMember", + "name": "isVerified", "type": "bool" + }, + { + "internalType": "string", + "name": "projectId", + "type": "string" } ], - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { @@ -7574,183 +7329,97 @@ "type": "address" } ], - "name": "addMemberByManager", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], + "name": "removeMember", + "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ - { - "internalType": "contract ISuperToken", - "name": "superToken", - "type": "address" - }, - { - "internalType": "address", - "name": "", - "type": "address" - }, { "internalType": "bytes32", - "name": "", + "name": "role", "type": "bytes32" }, { - "internalType": "bytes", - "name": "agreementData", - "type": "bytes" - }, - { - "internalType": "bytes", - "name": "", - "type": "bytes" - }, - { - "internalType": "bytes", - "name": "ctx", - "type": "bytes" - } - ], - "name": "afterAgreementCreated", - "outputs": [ - { - "internalType": "bytes", - "name": "newCtx", - "type": "bytes" + "internalType": "address", + "name": "account", + "type": "address" } ], + "name": "renounceRole", + "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ - { - "internalType": "contract ISuperToken", - "name": "superToken", - "type": "address" - }, - { - "internalType": "address", - "name": "agreementClass", - "type": "address" - }, { "internalType": "bytes32", - "name": "", + "name": "role", "type": "bytes32" }, { - "internalType": "bytes", - "name": "agreementData", - "type": "bytes" - }, - { - "internalType": "bytes", - "name": "cbdata", - "type": "bytes" - }, - { - "internalType": "bytes", - "name": "ctx", - "type": "bytes" - } - ], - "name": "afterAgreementTerminated", - "outputs": [ - { - "internalType": "bytes", - "name": "newCtx", - "type": "bytes" + "internalType": "address", + "name": "account", + "type": "address" } ], + "name": "revokeRole", + "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ - { - "internalType": "contract ISuperToken", - "name": "superToken", - "type": "address" - }, { "internalType": "address", - "name": "", + "name": "_feeRecipient", "type": "address" }, { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - }, - { - "internalType": "bytes", - "name": "agreementData", - "type": "bytes" - }, - { - "internalType": "bytes", - "name": "cbdata", - "type": "bytes" - }, - { - "internalType": "bytes", - "name": "ctx", - "type": "bytes" - } - ], - "name": "afterAgreementUpdated", - "outputs": [ - { - "internalType": "bytes", - "name": "newCtx", - "type": "bytes" + "internalType": "uint32", + "name": "_feeBps", + "type": "uint32" } ], + "name": "setFeeInfo", + "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { - "internalType": "contract ISuperToken", - "name": "superToken", - "type": "address" - }, - { - "internalType": "address", - "name": "agreementClass", + "internalType": "contract DirectPaymentsPool", + "name": "_pool", "type": "address" }, { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - }, - { - "internalType": "bytes", - "name": "", - "type": "bytes" - }, + "internalType": "bool", + "name": "_isVerified", + "type": "bool" + } + ], + "name": "setVerified", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ { - "internalType": "bytes", - "name": "", - "type": "bytes" + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" } ], - "name": "beforeAgreementCreated", + "name": "supportsInterface", "outputs": [ { - "internalType": "bytes", + "internalType": "bool", "name": "", - "type": "bytes" + "type": "bool" } ], "stateMutability": "view", @@ -7758,409 +7427,438 @@ }, { "inputs": [ - { - "internalType": "contract ISuperToken", - "name": "superToken", - "type": "address" - }, { "internalType": "address", - "name": "agreementClass", + "name": "_impl", "type": "address" - }, - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - }, - { - "internalType": "bytes", - "name": "agreementData", - "type": "bytes" - }, - { - "internalType": "bytes", - "name": "", - "type": "bytes" } ], - "name": "beforeAgreementTerminated", - "outputs": [ + "name": "updateImpl", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ { - "internalType": "bytes", - "name": "", - "type": "bytes" + "internalType": "address", + "name": "newImplementation", + "type": "address" } ], - "stateMutability": "view", + "name": "upgradeTo", + "outputs": [], + "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ - { - "internalType": "contract ISuperToken", - "name": "superToken", - "type": "address" - }, { "internalType": "address", - "name": "agreementClass", + "name": "newImplementation", "type": "address" }, - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - }, { "internalType": "bytes", - "name": "agreementData", - "type": "bytes" - }, - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "name": "beforeAgreementUpdated", - "outputs": [ - { - "internalType": "bytes", - "name": "", + "name": "data", "type": "bytes" } ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "cfaV1", - "outputs": [ - { - "internalType": "contract ISuperfluid", - "name": "host", - "type": "address" - }, - { - "internalType": "contract IConstantFlowAgreementV1", - "name": "cfa", - "type": "address" - } - ], - "stateMutability": "view", + "name": "upgradeToAndCall", + "outputs": [], + "stateMutability": "payable", "type": "function" }, { "inputs": [ { "internalType": "address", - "name": "_member", + "name": "_logic", "type": "address" - } - ], - "name": "checkEntitlement", - "outputs": [ + }, { - "internalType": "uint256", - "name": "", - "type": "uint256" + "internalType": "bytes", + "name": "_data", + "type": "bytes" } ], - "stateMutability": "view", - "type": "function" - }, + "stateMutability": "payable", + "type": "constructor" + } + ] + }, + "DirectPaymentsFactory_Implementation": { + "address": "0x95401dc811bb5740090279Ba06cfA8fcF6113778", + "abi": [ { "inputs": [], - "name": "checkEntitlement", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" + "name": "NOT_POOL", + "type": "error" }, { "inputs": [], - "name": "claim", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "name": "NOT_PROJECT_OWNER", + "type": "error" }, { + "anonymous": false, "inputs": [ { + "indexed": false, "internalType": "address", - "name": "claimer", + "name": "previousAdmin", "type": "address" }, { - "internalType": "bool", - "name": "sendToWhitelistedRoot", - "type": "bool" - } - ], - "name": "claimFor", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "currentDayInCycle", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" } ], - "stateMutability": "view", - "type": "function" + "name": "AdminChanged", + "type": "event" }, { - "inputs": [], - "name": "estimateNextDailyUBI", - "outputs": [ + "anonymous": false, + "inputs": [ { - "internalType": "uint256", - "name": "", - "type": "uint256" + "indexed": true, + "internalType": "address", + "name": "beacon", + "type": "address" } ], - "stateMutability": "view", - "type": "function" + "name": "BeaconUpgraded", + "type": "event" }, { - "inputs": [], - "name": "getCurrentDay", - "outputs": [ + "anonymous": false, + "inputs": [ { - "internalType": "uint256", - "name": "", - "type": "uint256" + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" } ], - "stateMutability": "view", - "type": "function" + "name": "Initialized", + "type": "event" }, { + "anonymous": false, "inputs": [ { + "indexed": true, "internalType": "address", - "name": "_user", + "name": "pool", "type": "address" - } - ], - "name": "getRealtimeContribution", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getRealtimeStats", - "outputs": [ - { - "internalType": "uint256", - "name": "netIncome", - "type": "uint256" }, { - "internalType": "uint256", - "name": "totalFees", - "type": "uint256" + "indexed": true, + "internalType": "string", + "name": "projectId", + "type": "string" }, { - "internalType": "int96", - "name": "incomeFlowRate", - "type": "int96" + "indexed": false, + "internalType": "string", + "name": "ipfs", + "type": "string" }, { - "internalType": "int96", - "name": "feeRate", - "type": "int96" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getRegistry", - "outputs": [ - { - "internalType": "contract IRegistry", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleAdmin", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" + "indexed": true, + "internalType": "uint32", + "name": "nftType", + "type": "uint32" }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "grantRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ { "components": [ { - "internalType": "address", - "name": "swapFrom", - "type": "address" + "internalType": "uint32", + "name": "nftType", + "type": "uint32" }, { - "internalType": "uint256", - "name": "amount", - "type": "uint256" + "internalType": "uint16[]", + "name": "validEvents", + "type": "uint16[]" }, { - "internalType": "uint256", - "name": "minReturn", + "internalType": "uint128[]", + "name": "rewardPerEvent", + "type": "uint128[]" + }, + { + "internalType": "address", + "name": "manager", + "type": "address" + }, + { + "internalType": "contract IMembersValidator", + "name": "membersValidator", + "type": "address" + }, + { + "internalType": "contract IIdentityV2", + "name": "uniquenessValidator", + "type": "address" + }, + { + "internalType": "contract IERC20Upgradeable", + "name": "rewardToken", + "type": "address" + }, + { + "internalType": "bool", + "name": "allowRewardOverride", + "type": "bool" + } + ], + "indexed": false, + "internalType": "struct DirectPaymentsPool.PoolSettings", + "name": "poolSettings", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "maxTotalPerMonth", "type": "uint256" }, { "internalType": "uint256", - "name": "deadline", + "name": "maxMemberPerMonth", "type": "uint256" }, { - "internalType": "bytes", - "name": "path", - "type": "bytes" + "internalType": "uint256", + "name": "maxMemberPerDay", + "type": "uint256" } ], - "internalType": "struct HelperLibrary.SwapData", - "name": "_customData", + "indexed": false, + "internalType": "struct DirectPaymentsPool.SafetyLimits", + "name": "poolLimits", "type": "tuple" + } + ], + "name": "PoolCreated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "pool", + "type": "address" }, { + "indexed": false, + "internalType": "string", + "name": "ipfs", + "type": "string" + } + ], + "name": "PoolDetailsChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, "internalType": "address", - "name": "_sender", + "name": "pool", "type": "address" }, { - "internalType": "bytes", - "name": "_ctx", - "type": "bytes" + "indexed": false, + "internalType": "bool", + "name": "isVerified", + "type": "bool" } ], - "name": "handleSwap", - "outputs": [ + "name": "PoolVerifiedChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ { - "internalType": "bytes", - "name": "", - "type": "bytes" + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "previousAdminRole", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "newAdminRole", + "type": "bytes32" } ], - "stateMutability": "nonpayable", - "type": "function" + "name": "RoleAdminChanged", + "type": "event" }, { + "anonymous": false, "inputs": [ { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, "internalType": "address", - "name": "_member", + "name": "account", "type": "address" - } - ], - "name": "hasClaimed", - "outputs": [ + }, { - "internalType": "bool", - "name": "", - "type": "bool" + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" } ], - "stateMutability": "view", - "type": "function" + "name": "RoleGranted", + "type": "event" }, { + "anonymous": false, "inputs": [ { + "indexed": true, "internalType": "bytes32", "name": "role", "type": "bytes32" }, { + "indexed": true, "internalType": "address", "name": "account", "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" } ], - "name": "hasRole", + "name": "RoleRevoked", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "impl", + "type": "address" + } + ], + "name": "UpdatedImpl", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "inputs": [], + "name": "DEFAULT_ADMIN_ROLE", "outputs": [ { - "internalType": "bool", + "internalType": "bytes32", "name": "", - "type": "bool" + "type": "bytes32" } ], "stateMutability": "view", "type": "function" }, { - "inputs": [], - "name": "host", - "outputs": [ + "inputs": [ { - "internalType": "contract ISuperfluid", - "name": "", + "internalType": "address", + "name": "member", "type": "address" } ], - "stateMutability": "view", + "name": "addMember", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract DirectPaymentsPool", + "name": "_pool", + "type": "address" + }, + { + "internalType": "string", + "name": "_ipfs", + "type": "string" + } + ], + "name": "changePoolDetails", + "outputs": [], + "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ + { + "internalType": "string", + "name": "_projectId", + "type": "string" + }, + { + "internalType": "string", + "name": "_ipfs", + "type": "string" + }, { "components": [ + { + "internalType": "uint32", + "name": "nftType", + "type": "uint32" + }, + { + "internalType": "uint16[]", + "name": "validEvents", + "type": "uint16[]" + }, + { + "internalType": "uint128[]", + "name": "rewardPerEvent", + "type": "uint128[]" + }, { "internalType": "address", "name": "manager", @@ -8180,79 +7878,152 @@ "internalType": "contract IERC20Upgradeable", "name": "rewardToken", "type": "address" + }, + { + "internalType": "bool", + "name": "allowRewardOverride", + "type": "bool" } ], - "internalType": "struct UBIPool.PoolSettings", + "internalType": "struct DirectPaymentsPool.PoolSettings", "name": "_settings", "type": "tuple" }, { "components": [ { - "internalType": "uint32", - "name": "cycleLengthDays", - "type": "uint32" + "internalType": "uint256", + "name": "maxTotalPerMonth", + "type": "uint256" }, { - "internalType": "uint32", - "name": "claimPeriodDays", - "type": "uint32" + "internalType": "uint256", + "name": "maxMemberPerMonth", + "type": "uint256" }, + { + "internalType": "uint256", + "name": "maxMemberPerDay", + "type": "uint256" + } + ], + "internalType": "struct DirectPaymentsPool.SafetyLimits", + "name": "_limits", + "type": "tuple" + } + ], + "name": "createBeaconPool", + "outputs": [ + { + "internalType": "contract DirectPaymentsPool", + "name": "pool", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "_projectId", + "type": "string" + }, + { + "internalType": "string", + "name": "_ipfs", + "type": "string" + }, + { + "components": [ { "internalType": "uint32", - "name": "minActiveUsers", + "name": "nftType", "type": "uint32" }, { - "internalType": "bool", - "name": "claimForEnabled", - "type": "bool" + "internalType": "uint16[]", + "name": "validEvents", + "type": "uint16[]" }, { - "internalType": "uint256", - "name": "maxClaimAmount", - "type": "uint256" + "internalType": "uint128[]", + "name": "rewardPerEvent", + "type": "uint128[]" }, { - "internalType": "uint32", - "name": "maxClaimers", - "type": "uint32" + "internalType": "address", + "name": "manager", + "type": "address" + }, + { + "internalType": "contract IMembersValidator", + "name": "membersValidator", + "type": "address" + }, + { + "internalType": "contract IIdentityV2", + "name": "uniquenessValidator", + "type": "address" + }, + { + "internalType": "contract IERC20Upgradeable", + "name": "rewardToken", + "type": "address" }, { "internalType": "bool", - "name": "onlyMembers", + "name": "allowRewardOverride", "type": "bool" } ], - "internalType": "struct UBIPool.UBISettings", - "name": "_ubiSettings", + "internalType": "struct DirectPaymentsPool.PoolSettings", + "name": "_settings", "type": "tuple" }, { - "internalType": "contract UBIPoolFactory", - "name": "_registry", + "components": [ + { + "internalType": "uint256", + "name": "maxTotalPerMonth", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "maxMemberPerMonth", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "maxMemberPerDay", + "type": "uint256" + } + ], + "internalType": "struct DirectPaymentsPool.SafetyLimits", + "name": "_limits", + "type": "tuple" + } + ], + "name": "createPool", + "outputs": [ + { + "internalType": "contract DirectPaymentsPool", + "name": "pool", "type": "address" } ], - "name": "initialize", - "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { - "inputs": [ - { - "internalType": "contract ISuperToken", - "name": "_superToken", - "type": "address" - } - ], - "name": "isAcceptedSuperToken", + "inputs": [], + "name": "feeBps", "outputs": [ { - "internalType": "bool", + "internalType": "uint32", "name": "", - "type": "bool" + "type": "uint32" } ], "stateMutability": "view", @@ -8260,12 +8031,12 @@ }, { "inputs": [], - "name": "nextClaimTime", + "name": "feeRecipient", "outputs": [ { - "internalType": "uint256", + "internalType": "address", "name": "", - "type": "uint256" + "type": "address" } ], "stateMutability": "view", @@ -8274,40 +8045,59 @@ { "inputs": [ { - "internalType": "address", - "name": "_sender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "", - "type": "bytes" + "internalType": "bytes32", + "name": "role", + "type": "bytes32" } ], - "name": "onTokenTransfer", + "name": "getRoleAdmin", "outputs": [ { - "internalType": "bool", + "internalType": "bytes32", "name": "", - "type": "bool" + "type": "bytes32" } ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "grantRole", + "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { - "inputs": [], - "name": "proxiableUUID", - "outputs": [ + "inputs": [ { "internalType": "bytes32", - "name": "", + "name": "role", "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasRole", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" } ], "stateMutability": "view", @@ -8315,10 +8105,10 @@ }, { "inputs": [], - "name": "registry", + "name": "impl", "outputs": [ { - "internalType": "contract UBIPoolFactory", + "internalType": "contract UpgradeableBeacon", "name": "", "type": "address" } @@ -8329,17 +8119,32 @@ { "inputs": [ { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" + "internalType": "address", + "name": "_owner", + "type": "address" }, { "internalType": "address", - "name": "account", + "name": "_dpimpl", + "type": "address" + }, + { + "internalType": "contract ProvableNFT", + "name": "_nft", + "type": "address" + }, + { + "internalType": "address", + "name": "_feeRecipient", "type": "address" + }, + { + "internalType": "uint32", + "name": "_feeBps", + "type": "uint32" } ], - "name": "renounceRole", + "name": "initialize", "outputs": [], "stateMutability": "nonpayable", "type": "function" @@ -8347,128 +8152,66 @@ { "inputs": [ { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" + "internalType": "address", + "name": "", + "type": "address" }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "memberPools", + "outputs": [ { "internalType": "address", - "name": "account", + "name": "", "type": "address" } ], - "name": "revokeRole", - "outputs": [], - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { - "inputs": [ + "inputs": [], + "name": "nextNftType", + "outputs": [ { - "components": [ - { - "internalType": "address", - "name": "manager", - "type": "address" - }, - { - "internalType": "contract IMembersValidator", - "name": "membersValidator", - "type": "address" - }, - { - "internalType": "contract IIdentityV2", - "name": "uniquenessValidator", - "type": "address" - }, - { - "internalType": "contract IERC20Upgradeable", - "name": "rewardToken", - "type": "address" - } - ], - "internalType": "struct UBIPool.PoolSettings", - "name": "_settings", - "type": "tuple" + "internalType": "uint32", + "name": "", + "type": "uint32" } ], - "name": "setPoolSettings", - "outputs": [], - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { - "inputs": [ + "inputs": [], + "name": "nft", + "outputs": [ { - "components": [ - { - "internalType": "uint32", - "name": "cycleLengthDays", - "type": "uint32" - }, - { - "internalType": "uint32", - "name": "claimPeriodDays", - "type": "uint32" - }, - { - "internalType": "uint32", - "name": "minActiveUsers", - "type": "uint32" - }, - { - "internalType": "bool", - "name": "claimForEnabled", - "type": "bool" - }, - { - "internalType": "uint256", - "name": "maxClaimAmount", - "type": "uint256" - }, - { - "internalType": "uint32", - "name": "maxClaimers", - "type": "uint32" - }, - { - "internalType": "bool", - "name": "onlyMembers", - "type": "bool" - } - ], - "internalType": "struct UBIPool.UBISettings", - "name": "_ubiSettings", - "type": "tuple" + "internalType": "contract ProvableNFT", + "name": "", + "type": "address" } ], - "name": "setUBISettings", - "outputs": [], - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { - "inputs": [], - "name": "settings", + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "pools", "outputs": [ { "internalType": "address", - "name": "manager", - "type": "address" - }, - { - "internalType": "contract IMembersValidator", - "name": "membersValidator", - "type": "address" - }, - { - "internalType": "contract IIdentityV2", - "name": "uniquenessValidator", - "type": "address" - }, - { - "internalType": "contract IERC20Upgradeable", - "name": "rewardToken", + "name": "", "type": "address" } ], @@ -8476,33 +8219,19 @@ "type": "function" }, { - "inputs": [], - "name": "stats", - "outputs": [ - { - "internalType": "uint256", - "name": "netIncome", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "totalFees", - "type": "uint256" - }, + "inputs": [ { - "internalType": "uint256", - "name": "lastUpdate", - "type": "uint256" - }, + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "projectIdToControlPool", + "outputs": [ { - "internalType": "address", - "name": "lastFeeRecipient", + "internalType": "contract DirectPaymentsPool", + "name": "", "type": "address" - }, - { - "internalType": "int96", - "name": "lastIncomeRate", - "type": "int96" } ], "stateMutability": "view", @@ -8510,91 +8239,92 @@ }, { "inputs": [], - "name": "status", + "name": "proxiableUUID", "outputs": [ { - "internalType": "uint256", - "name": "currentDay", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "dailyUbi", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "dailyCyclePool", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "startOfCycle", - "type": "uint256" - }, + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ { - "internalType": "uint256", - "name": "currentCycleLength", - "type": "uint256" - }, + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "registry", + "outputs": [ { - "internalType": "uint256", - "name": "periodClaimers", - "type": "uint256" + "internalType": "string", + "name": "ipfs", + "type": "string" }, { - "internalType": "uint256", - "name": "periodDistributed", - "type": "uint256" + "internalType": "bool", + "name": "isVerified", + "type": "bool" }, { - "internalType": "uint32", - "name": "claimersCount", - "type": "uint32" + "internalType": "string", + "name": "projectId", + "type": "string" } ], "stateMutability": "view", "type": "function" }, { - "inputs": [], - "name": "superToken", - "outputs": [ + "inputs": [ { - "internalType": "contract ISuperToken", - "name": "", + "internalType": "address", + "name": "member", "type": "address" } ], - "stateMutability": "view", + "name": "removeMember", + "outputs": [], + "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { - "internalType": "address", - "name": "_sender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" + "internalType": "bytes32", + "name": "role", + "type": "bytes32" }, { - "internalType": "bytes", - "name": "_ctx", - "type": "bytes" + "internalType": "address", + "name": "account", + "type": "address" } ], - "name": "support", - "outputs": [ + "name": "renounceRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ { - "internalType": "bytes", - "name": "", - "type": "bytes" + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" } ], + "name": "revokeRole", + "outputs": [], "stateMutability": "nonpayable", "type": "function" }, @@ -8602,85 +8332,36 @@ "inputs": [ { "internalType": "address", - "name": "_sender", + "name": "_feeRecipient", "type": "address" }, { - "components": [ - { - "internalType": "address", - "name": "swapFrom", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "minReturn", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "path", - "type": "bytes" - } - ], - "internalType": "struct HelperLibrary.SwapData", - "name": "_customData", - "type": "tuple" - }, - { - "internalType": "bytes", - "name": "_ctx", - "type": "bytes" - } - ], - "name": "supportWithSwap", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" + "internalType": "uint32", + "name": "_feeBps", + "type": "uint32" } ], + "name": "setFeeInfo", + "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { - "internalType": "address", - "name": "", + "internalType": "contract DirectPaymentsPool", + "name": "_pool", "type": "address" - } - ], - "name": "supporters", - "outputs": [ - { - "internalType": "uint256", - "name": "contribution", - "type": "uint256" - }, - { - "internalType": "int96", - "name": "flowRate", - "type": "int96" }, { - "internalType": "uint128", - "name": "lastUpdated", - "type": "uint128" + "internalType": "bool", + "name": "_isVerified", + "type": "bool" } ], - "stateMutability": "view", + "name": "setVerified", + "outputs": [], + "stateMutability": "nonpayable", "type": "function" }, { @@ -8703,59 +8384,16 @@ "type": "function" }, { - "inputs": [], - "name": "swapRouter", - "outputs": [ + "inputs": [ { - "internalType": "contract IV3SwapRouter", - "name": "", + "internalType": "address", + "name": "_impl", "type": "address" } ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "ubiSettings", - "outputs": [ - { - "internalType": "uint32", - "name": "cycleLengthDays", - "type": "uint32" - }, - { - "internalType": "uint32", - "name": "claimPeriodDays", - "type": "uint32" - }, - { - "internalType": "uint32", - "name": "minActiveUsers", - "type": "uint32" - }, - { - "internalType": "bool", - "name": "claimForEnabled", - "type": "bool" - }, - { - "internalType": "uint256", - "name": "maxClaimAmount", - "type": "uint256" - }, - { - "internalType": "uint32", - "name": "maxClaimers", - "type": "uint32" - }, - { - "internalType": "bool", - "name": "onlyMembers", - "type": "bool" - } - ], - "stateMutability": "view", + "name": "updateImpl", + "outputs": [], + "stateMutability": "nonpayable", "type": "function" }, { @@ -8788,25 +8426,28 @@ "outputs": [], "stateMutability": "payable", "type": "function" - }, + } + ] + }, + "DirectPaymentsFactory_Proxy": { + "address": "0x998abeb3E57409262aE5b751f60747921B33613E", + "abi": [ { "inputs": [ + { + "internalType": "address", + "name": "_logic", + "type": "address" + }, { "internalType": "bytes", - "name": "data", + "name": "_data", "type": "bytes" } ], - "name": "upgradeToLatest", - "outputs": [], "stateMutability": "payable", - "type": "function" - } - ] - }, - "UBIPoolFactory": { - "address": "0x0E801D84Fa97b50751Dbf25036d067dCf18858bF", - "abi": [ + "type": "constructor" + }, { "anonymous": false, "inputs": [ @@ -8859,143 +8500,176 @@ { "stateMutability": "payable", "type": "receive" + } + ] + }, + "DirectPaymentsPool": { + "address": "0x1613beB3B2C4f22Ee086B2b38C1476A3cE7f78E8", + "abi": [ + { + "inputs": [ + { + "internalType": "contract ISuperfluid", + "name": "_host", + "type": "address" + }, + { + "internalType": "contract IV3SwapRouter", + "name": "_swapRouter", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "ALREADY_CLAIMED", + "type": "error" }, { "inputs": [], - "name": "NOT_POOL", + "name": "EMPTY_MANAGER", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "int96", + "name": "curFeeRate", + "type": "int96" + }, + { + "internalType": "int96", + "name": "newFeeRate", + "type": "int96" + } + ], + "name": "FEE_FLOW_FAILED", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "int96", + "name": "flowRate", + "type": "int96" + } + ], + "name": "MIN_FLOWRATE", "type": "error" }, { "inputs": [], - "name": "NOT_PROJECT_OWNER", + "name": "NFTTYPE_CHANGED", "type": "error" }, { - "anonymous": false, "inputs": [ { - "indexed": false, - "internalType": "uint8", - "name": "version", - "type": "uint8" + "internalType": "uint256", + "name": "", + "type": "uint256" } ], - "name": "Initialized", - "type": "event" + "name": "NFT_MISSING", + "type": "error" + }, + { + "inputs": [], + "name": "NOT_MANAGER", + "type": "error" + }, + { + "inputs": [], + "name": "NO_BALANCE", + "type": "error" + }, + { + "inputs": [], + "name": "NotAcceptedSuperToken", + "type": "error" + }, + { + "inputs": [], + "name": "NotImplemented", + "type": "error" }, { - "anonymous": false, "inputs": [ { - "indexed": true, "internalType": "address", - "name": "pool", + "name": "", "type": "address" - }, - { - "indexed": true, - "internalType": "string", - "name": "projectId", - "type": "string" - }, - { - "indexed": false, - "internalType": "string", - "name": "ipfs", - "type": "string" - }, - { - "components": [ - { - "internalType": "address", - "name": "manager", - "type": "address" - }, - { - "internalType": "contract IMembersValidator", - "name": "membersValidator", - "type": "address" - }, - { - "internalType": "contract IIdentityV2", - "name": "uniquenessValidator", - "type": "address" - }, - { - "internalType": "contract IERC20Upgradeable", - "name": "rewardToken", - "type": "address" - } - ], - "indexed": false, - "internalType": "struct UBIPool.PoolSettings", - "name": "poolSettings", - "type": "tuple" - }, + } + ], + "name": "ONLY_HOST_OR_SENDER", + "type": "error" + }, + { + "inputs": [], + "name": "OVER_GLOBAL_LIMITS", + "type": "error" + }, + { + "inputs": [ { - "components": [ - { - "internalType": "uint32", - "name": "cycleLengthDays", - "type": "uint32" - }, - { - "internalType": "uint32", - "name": "claimPeriodDays", - "type": "uint32" - }, - { - "internalType": "uint32", - "name": "minActiveUsers", - "type": "uint32" - }, - { - "internalType": "bool", - "name": "claimForEnabled", - "type": "bool" - }, - { - "internalType": "uint256", - "name": "maxClaimAmount", - "type": "uint256" - }, - { - "internalType": "uint32", - "name": "maxClaimers", - "type": "uint32" - }, - { - "internalType": "bool", - "name": "onlyMembers", - "type": "bool" - } - ], - "indexed": false, - "internalType": "struct UBIPool.UBISettings", - "name": "poolLimits", - "type": "tuple" + "internalType": "address", + "name": "", + "type": "address" } ], - "name": "PoolCreated", - "type": "event" + "name": "OVER_MEMBER_LIMITS", + "type": "error" + }, + { + "inputs": [], + "name": "UNSUPPORTED_NFT", + "type": "error" + }, + { + "inputs": [], + "name": "UNSUPPORTED_TOKEN", + "type": "error" + }, + { + "inputs": [], + "name": "UnauthorizedHost", + "type": "error" + }, + { + "inputs": [], + "name": "ZERO_ADDRESS", + "type": "error" + }, + { + "inputs": [], + "name": "ZERO_AMOUNT", + "type": "error" }, { "anonymous": false, "inputs": [ { - "indexed": true, + "indexed": false, "internalType": "address", - "name": "pool", + "name": "previousAdmin", "type": "address" }, { "indexed": false, - "internalType": "string", - "name": "ipfs", - "type": "string" + "internalType": "address", + "name": "newAdmin", + "type": "address" } ], - "name": "PoolDetailsChanged", + "name": "AdminChanged", "type": "event" }, { @@ -9004,17 +8678,11 @@ { "indexed": true, "internalType": "address", - "name": "pool", + "name": "beacon", "type": "address" - }, - { - "indexed": false, - "internalType": "bool", - "name": "isVerified", - "type": "bool" } ], - "name": "PoolVerifiedChanged", + "name": "BeaconUpgraded", "type": "event" }, { @@ -9022,49 +8690,61 @@ "inputs": [ { "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" }, { - "indexed": true, - "internalType": "bytes32", - "name": "previousAdminRole", - "type": "bytes32" + "indexed": false, + "internalType": "uint16", + "name": "eventType", + "type": "uint16" }, { - "indexed": true, - "internalType": "bytes32", - "name": "newAdminRole", - "type": "bytes32" + "indexed": false, + "internalType": "uint32", + "name": "eventTimestamp", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "eventQuantity", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "eventUri", + "type": "string" + }, + { + "indexed": false, + "internalType": "address[]", + "name": "contributers", + "type": "address[]" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "rewardPerContributer", + "type": "uint256" } ], - "name": "RoleAdminChanged", + "name": "EventRewardClaimed", "type": "event" }, { "anonymous": false, "inputs": [ { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" } ], - "name": "RoleGranted", + "name": "Initialized", "type": "event" }, { @@ -9072,97 +8752,77 @@ "inputs": [ { "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" }, { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" + "indexed": false, + "internalType": "uint256", + "name": "totalRewards", + "type": "uint256" } ], - "name": "RoleRevoked", + "name": "NFTClaimed", "type": "event" }, { "anonymous": false, "inputs": [ { - "indexed": true, + "indexed": false, "internalType": "address", - "name": "impl", + "name": "contributer", "type": "address" } ], - "name": "UpdatedImpl", + "name": "NOT_MEMBER_OR_WHITELISTED", "type": "event" }, { - "inputs": [], - "name": "DEFAULT_ADMIN_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { + "anonymous": false, "inputs": [ { + "indexed": true, "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "addMember", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract UBIPool", - "name": "_pool", + "name": "pool", "type": "address" }, { + "indexed": true, "internalType": "string", - "name": "_ipfs", + "name": "projectId", "type": "string" - } - ], - "name": "changePoolDetails", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ + }, { + "indexed": false, "internalType": "string", - "name": "_projectId", + "name": "ipfs", "type": "string" }, { - "internalType": "string", - "name": "_ipfs", - "type": "string" + "indexed": true, + "internalType": "uint32", + "name": "nftType", + "type": "uint32" }, { "components": [ + { + "internalType": "uint32", + "name": "nftType", + "type": "uint32" + }, + { + "internalType": "uint16[]", + "name": "validEvents", + "type": "uint16[]" + }, + { + "internalType": "uint128[]", + "name": "rewardPerEvent", + "type": "uint128[]" + }, { "internalType": "address", "name": "manager", @@ -9182,80 +8842,95 @@ "internalType": "contract IERC20Upgradeable", "name": "rewardToken", "type": "address" + }, + { + "internalType": "bool", + "name": "allowRewardOverride", + "type": "bool" } ], - "internalType": "struct UBIPool.PoolSettings", - "name": "_settings", + "indexed": false, + "internalType": "struct DirectPaymentsPool.PoolSettings", + "name": "poolSettings", "type": "tuple" }, { "components": [ { - "internalType": "uint32", - "name": "cycleLengthDays", - "type": "uint32" - }, - { - "internalType": "uint32", - "name": "claimPeriodDays", - "type": "uint32" + "internalType": "uint256", + "name": "maxTotalPerMonth", + "type": "uint256" }, { - "internalType": "uint32", - "name": "minActiveUsers", - "type": "uint32" + "internalType": "uint256", + "name": "maxMemberPerMonth", + "type": "uint256" }, { - "internalType": "bool", - "name": "claimForEnabled", - "type": "bool" - }, + "internalType": "uint256", + "name": "maxMemberPerDay", + "type": "uint256" + } + ], + "indexed": false, + "internalType": "struct DirectPaymentsPool.SafetyLimits", + "name": "poolLimits", + "type": "tuple" + } + ], + "name": "PoolCreated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "components": [ { "internalType": "uint256", - "name": "maxClaimAmount", + "name": "maxTotalPerMonth", "type": "uint256" }, { - "internalType": "uint32", - "name": "maxClaimers", - "type": "uint32" + "internalType": "uint256", + "name": "maxMemberPerMonth", + "type": "uint256" }, { - "internalType": "bool", - "name": "onlyMembers", - "type": "bool" + "internalType": "uint256", + "name": "maxMemberPerDay", + "type": "uint256" } ], - "internalType": "struct UBIPool.UBISettings", - "name": "_limits", + "indexed": false, + "internalType": "struct DirectPaymentsPool.SafetyLimits", + "name": "limits", "type": "tuple" } ], - "name": "createManagedPool", - "outputs": [ - { - "internalType": "contract UBIPool", - "name": "pool", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "function" + "name": "PoolLimitsChanged", + "type": "event" }, { + "anonymous": false, "inputs": [ - { - "internalType": "string", - "name": "_projectId", - "type": "string" - }, - { - "internalType": "string", - "name": "_ipfs", - "type": "string" - }, { "components": [ + { + "internalType": "uint32", + "name": "nftType", + "type": "uint32" + }, + { + "internalType": "uint16[]", + "name": "validEvents", + "type": "uint16[]" + }, + { + "internalType": "uint128[]", + "name": "rewardPerEvent", + "type": "uint128[]" + }, { "internalType": "address", "name": "manager", @@ -9275,270 +8950,213 @@ "internalType": "contract IERC20Upgradeable", "name": "rewardToken", "type": "address" - } - ], - "internalType": "struct UBIPool.PoolSettings", - "name": "_settings", - "type": "tuple" - }, - { - "components": [ - { - "internalType": "uint32", - "name": "cycleLengthDays", - "type": "uint32" - }, - { - "internalType": "uint32", - "name": "claimPeriodDays", - "type": "uint32" - }, - { - "internalType": "uint32", - "name": "minActiveUsers", - "type": "uint32" - }, - { - "internalType": "bool", - "name": "claimForEnabled", - "type": "bool" - }, - { - "internalType": "uint256", - "name": "maxClaimAmount", - "type": "uint256" - }, - { - "internalType": "uint32", - "name": "maxClaimers", - "type": "uint32" }, { "internalType": "bool", - "name": "onlyMembers", + "name": "allowRewardOverride", "type": "bool" } ], - "internalType": "struct UBIPool.UBISettings", - "name": "_limits", + "indexed": false, + "internalType": "struct DirectPaymentsPool.PoolSettings", + "name": "settings", "type": "tuple" } ], - "name": "createPool", - "outputs": [ - { - "internalType": "contract UBIPool", - "name": "pool", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "function" + "name": "PoolSettingsChanged", + "type": "event" }, { - "inputs": [], - "name": "feeBps", - "outputs": [ + "anonymous": false, + "inputs": [ { - "internalType": "uint32", - "name": "", - "type": "uint32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "feeRecipient", - "outputs": [ + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, { - "internalType": "address", - "name": "", - "type": "address" + "indexed": true, + "internalType": "bytes32", + "name": "previousAdminRole", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "newAdminRole", + "type": "bytes32" } ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "member", - "type": "address" - } - ], - "name": "getMemberPools", - "outputs": [ - { - "internalType": "address[]", - "name": "", - "type": "address[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleAdmin", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" + "name": "RoleAdminChanged", + "type": "event" }, { + "anonymous": false, "inputs": [ { + "indexed": true, "internalType": "bytes32", "name": "role", "type": "bytes32" }, { + "indexed": true, "internalType": "address", "name": "account", "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" } ], - "name": "grantRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "name": "RoleGranted", + "type": "event" }, { + "anonymous": false, "inputs": [ { + "indexed": true, "internalType": "bytes32", "name": "role", "type": "bytes32" }, { + "indexed": true, "internalType": "address", "name": "account", "type": "address" - } - ], - "name": "hasRole", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "impl", - "outputs": [ + }, { - "internalType": "contract UpgradeableBeacon", - "name": "", + "indexed": true, + "internalType": "address", + "name": "sender", "type": "address" } ], - "stateMutability": "view", - "type": "function" + "name": "RoleRevoked", + "type": "event" }, { + "anonymous": false, "inputs": [ { + "indexed": true, "internalType": "address", - "name": "_owner", + "name": "supporter", "type": "address" }, { - "internalType": "address", - "name": "_impl", - "type": "address" + "indexed": false, + "internalType": "uint256", + "name": "previousContribution", + "type": "uint256" }, { - "internalType": "address", - "name": "_feeRecipient", - "type": "address" + "indexed": false, + "internalType": "uint256", + "name": "contribution", + "type": "uint256" }, { - "internalType": "uint32", - "name": "_feeBps", - "type": "uint32" + "indexed": false, + "internalType": "int96", + "name": "previousFlowRate", + "type": "int96" + }, + { + "indexed": false, + "internalType": "int96", + "name": "flowRate", + "type": "int96" + }, + { + "indexed": false, + "internalType": "bool", + "name": "isFlowUpdate", + "type": "bool" } ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "name": "SupporterUpdated", + "type": "event" }, { + "anonymous": false, "inputs": [ { + "indexed": true, "internalType": "address", - "name": "", + "name": "implementation", "type": "address" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" } ], - "name": "memberPools", + "name": "Upgraded", + "type": "event" + }, + { + "inputs": [], + "name": "CFAV1_TYPE", "outputs": [ { - "internalType": "address", + "internalType": "bytes32", "name": "", - "type": "address" + "type": "bytes32" } ], "stateMutability": "view", "type": "function" }, { - "inputs": [ + "inputs": [], + "name": "DEFAULT_ADMIN_ROLE", + "outputs": [ { - "internalType": "uint256", + "internalType": "bytes32", "name": "", - "type": "uint256" + "type": "bytes32" } ], - "name": "pools", + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MANAGER_ROLE", "outputs": [ { - "internalType": "address", + "internalType": "bytes32", "name": "", - "type": "address" + "type": "bytes32" } ], "stateMutability": "view", "type": "function" }, { - "inputs": [ + "inputs": [], + "name": "MEMBER_ROLE", + "outputs": [ { "internalType": "bytes32", "name": "", "type": "bytes32" } ], - "name": "projectIdToControlPool", + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MINTER_ROLE", "outputs": [ { - "internalType": "contract UBIPool", + "internalType": "bytes32", "name": "", - "type": "address" + "type": "bytes32" } ], "stateMutability": "view", @@ -9546,12 +9164,12 @@ }, { "inputs": [], - "name": "proxiableUUID", + "name": "MIN_FLOW_RATE", "outputs": [ { - "internalType": "bytes32", + "internalType": "int96", "name": "", - "type": "bytes32" + "type": "int96" } ], "stateMutability": "view", @@ -9559,132 +9177,170 @@ }, { "inputs": [ + { + "internalType": "contract ISuperToken", + "name": "superToken", + "type": "address" + }, { "internalType": "address", "name": "", "type": "address" - } - ], - "name": "registry", - "outputs": [ + }, { - "internalType": "string", - "name": "ipfs", - "type": "string" + "internalType": "bytes32", + "name": "", + "type": "bytes32" }, { - "internalType": "bool", - "name": "isVerified", - "type": "bool" + "internalType": "bytes", + "name": "agreementData", + "type": "bytes" }, { - "internalType": "string", - "name": "projectId", - "type": "string" + "internalType": "bytes", + "name": "", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "ctx", + "type": "bytes" } ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ + "name": "afterAgreementCreated", + "outputs": [ { - "internalType": "address", - "name": "member", - "type": "address" + "internalType": "bytes", + "name": "newCtx", + "type": "bytes" } ], - "name": "removeMember", - "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" + "internalType": "contract ISuperToken", + "name": "superToken", + "type": "address" }, { "internalType": "address", - "name": "account", + "name": "agreementClass", "type": "address" - } - ], - "name": "renounceRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ + }, { "internalType": "bytes32", - "name": "role", + "name": "", "type": "bytes32" }, { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "revokeRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ + "internalType": "bytes", + "name": "agreementData", + "type": "bytes" + }, { - "internalType": "address", - "name": "_feeRecipient", - "type": "address" + "internalType": "bytes", + "name": "cbdata", + "type": "bytes" }, { - "internalType": "uint32", - "name": "_feeBps", - "type": "uint32" + "internalType": "bytes", + "name": "ctx", + "type": "bytes" + } + ], + "name": "afterAgreementTerminated", + "outputs": [ + { + "internalType": "bytes", + "name": "newCtx", + "type": "bytes" } ], - "name": "setFeeInfo", - "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { - "internalType": "contract UBIPool", - "name": "_pool", + "internalType": "contract ISuperToken", + "name": "superToken", "type": "address" }, { - "internalType": "bool", - "name": "_isVerified", - "type": "bool" + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "agreementData", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "cbdata", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "ctx", + "type": "bytes" + } + ], + "name": "afterAgreementUpdated", + "outputs": [ + { + "internalType": "bytes", + "name": "newCtx", + "type": "bytes" } ], - "name": "setVerified", - "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { - "internalType": "bytes4", - "name": "interfaceId", - "type": "bytes4" + "internalType": "contract ISuperToken", + "name": "superToken", + "type": "address" + }, + { + "internalType": "address", + "name": "agreementClass", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" } ], - "name": "supportsInterface", + "name": "beforeAgreementCreated", "outputs": [ { - "internalType": "bool", + "internalType": "bytes", "name": "", - "type": "bool" + "type": "bytes" } ], "stateMutability": "view", @@ -9692,367 +9348,311 @@ }, { "inputs": [ + { + "internalType": "contract ISuperToken", + "name": "superToken", + "type": "address" + }, { "internalType": "address", - "name": "_impl", + "name": "agreementClass", "type": "address" + }, + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "agreementData", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" } ], - "name": "updateImpl", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ + "name": "beforeAgreementTerminated", + "outputs": [ { - "internalType": "address", - "name": "newImplementation", - "type": "address" + "internalType": "bytes", + "name": "", + "type": "bytes" } ], - "name": "upgradeTo", - "outputs": [], - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { "inputs": [ + { + "internalType": "contract ISuperToken", + "name": "superToken", + "type": "address" + }, { "internalType": "address", - "name": "newImplementation", + "name": "agreementClass", "type": "address" }, + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + }, { "internalType": "bytes", - "name": "data", + "name": "agreementData", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "", "type": "bytes" } ], - "name": "upgradeToAndCall", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_logic", - "type": "address" - }, + "name": "beforeAgreementUpdated", + "outputs": [ { "internalType": "bytes", - "name": "_data", + "name": "", "type": "bytes" } ], - "stateMutability": "payable", - "type": "constructor" - } - ] - }, - "UBIPoolFactory_Implementation": { - "address": "0x99bbA657f2BbC93c02D617f8bA121cB8Fc104Acf", - "abi": [ - { - "inputs": [], - "name": "NOT_POOL", - "type": "error" + "stateMutability": "view", + "type": "function" }, { "inputs": [], - "name": "NOT_PROJECT_OWNER", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ + "name": "cfaV1", + "outputs": [ { - "indexed": false, - "internalType": "address", - "name": "previousAdmin", + "internalType": "contract ISuperfluid", + "name": "host", "type": "address" }, { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "AdminChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "beacon", + "internalType": "contract IConstantFlowAgreementV1", + "name": "cfa", "type": "address" } ], - "name": "BeaconUpgraded", - "type": "event" + "stateMutability": "view", + "type": "function" }, { - "anonymous": false, "inputs": [ { - "indexed": false, - "internalType": "uint8", - "name": "version", - "type": "uint8" + "internalType": "uint256", + "name": "_nftId", + "type": "uint256" } ], - "name": "Initialized", - "type": "event" + "name": "claim", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - "anonymous": false, "inputs": [ { - "indexed": true, - "internalType": "address", - "name": "pool", - "type": "address" - }, - { - "indexed": true, - "internalType": "string", - "name": "projectId", - "type": "string" - }, - { - "indexed": false, - "internalType": "string", - "name": "ipfs", - "type": "string" - }, - { - "components": [ - { - "internalType": "address", - "name": "manager", - "type": "address" - }, - { - "internalType": "contract IMembersValidator", - "name": "membersValidator", - "type": "address" - }, - { - "internalType": "contract IIdentityV2", - "name": "uniquenessValidator", - "type": "address" - }, - { - "internalType": "contract IERC20Upgradeable", - "name": "rewardToken", - "type": "address" - } - ], - "indexed": false, - "internalType": "struct UBIPool.PoolSettings", - "name": "poolSettings", - "type": "tuple" + "internalType": "uint256", + "name": "_nftId", + "type": "uint256" }, { "components": [ { "internalType": "uint32", - "name": "cycleLengthDays", - "type": "uint32" - }, - { - "internalType": "uint32", - "name": "claimPeriodDays", - "type": "uint32" - }, - { - "internalType": "uint32", - "name": "minActiveUsers", + "name": "nftType", "type": "uint32" }, { - "internalType": "bool", - "name": "claimForEnabled", - "type": "bool" - }, - { - "internalType": "uint256", - "name": "maxClaimAmount", - "type": "uint256" + "internalType": "uint16", + "name": "version", + "type": "uint16" }, { - "internalType": "uint32", - "name": "maxClaimers", - "type": "uint32" + "internalType": "string", + "name": "nftUri", + "type": "string" }, { - "internalType": "bool", - "name": "onlyMembers", - "type": "bool" + "components": [ + { + "internalType": "uint16", + "name": "subtype", + "type": "uint16" + }, + { + "internalType": "uint32", + "name": "timestamp", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "quantity", + "type": "uint256" + }, + { + "internalType": "string", + "name": "eventUri", + "type": "string" + }, + { + "internalType": "address[]", + "name": "contributers", + "type": "address[]" + }, + { + "internalType": "uint128", + "name": "rewardOverride", + "type": "uint128" + } + ], + "internalType": "struct ProvableNFT.EventData[]", + "name": "events", + "type": "tuple[]" } ], - "indexed": false, - "internalType": "struct UBIPool.UBISettings", - "name": "poolLimits", + "internalType": "struct ProvableNFT.NFTData", + "name": "_data", "type": "tuple" } ], - "name": "PoolCreated", - "type": "event" + "name": "claim", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - "anonymous": false, "inputs": [ { - "indexed": true, - "internalType": "address", - "name": "pool", - "type": "address" - }, + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "claimedNfts", + "outputs": [ { - "indexed": false, - "internalType": "string", - "name": "ipfs", - "type": "string" + "internalType": "bool", + "name": "", + "type": "bool" } ], - "name": "PoolDetailsChanged", - "type": "event" + "stateMutability": "view", + "type": "function" }, { - "anonymous": false, "inputs": [ { - "indexed": true, "internalType": "address", - "name": "pool", + "name": "_user", "type": "address" - }, + } + ], + "name": "getRealtimeContribution", + "outputs": [ { - "indexed": false, - "internalType": "bool", - "name": "isVerified", - "type": "bool" + "internalType": "uint256", + "name": "", + "type": "uint256" } ], - "name": "PoolVerifiedChanged", - "type": "event" + "stateMutability": "view", + "type": "function" }, { - "anonymous": false, - "inputs": [ + "inputs": [], + "name": "getRealtimeStats", + "outputs": [ { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" + "internalType": "uint256", + "name": "netIncome", + "type": "uint256" }, { - "indexed": true, - "internalType": "bytes32", - "name": "previousAdminRole", - "type": "bytes32" + "internalType": "uint256", + "name": "totalFees", + "type": "uint256" }, { - "indexed": true, - "internalType": "bytes32", - "name": "newAdminRole", - "type": "bytes32" + "internalType": "int96", + "name": "incomeFlowRate", + "type": "int96" + }, + { + "internalType": "int96", + "name": "feeRate", + "type": "int96" } ], - "name": "RoleAdminChanged", - "type": "event" + "stateMutability": "view", + "type": "function" }, { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, + "inputs": [], + "name": "getRegistry", + "outputs": [ { - "indexed": true, - "internalType": "address", - "name": "sender", + "internalType": "contract IRegistry", + "name": "", "type": "address" } ], - "name": "RoleGranted", - "type": "event" + "stateMutability": "view", + "type": "function" }, { - "anonymous": false, "inputs": [ { - "indexed": true, "internalType": "bytes32", "name": "role", "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" } ], - "name": "RoleRevoked", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ + "name": "getRoleAdmin", + "outputs": [ { - "indexed": true, - "internalType": "address", - "name": "impl", - "type": "address" + "internalType": "bytes32", + "name": "", + "type": "bytes32" } ], - "name": "UpdatedImpl", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "Upgraded", - "type": "event" + "stateMutability": "view", + "type": "function" }, { "inputs": [], - "name": "DEFAULT_ADMIN_ROLE", + "name": "globalLimits", "outputs": [ { - "internalType": "bytes32", - "name": "", - "type": "bytes32" + "internalType": "uint128", + "name": "daily", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "monthly", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "total", + "type": "uint128" + }, + { + "internalType": "uint64", + "name": "lastReward", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "lastMonth", + "type": "uint64" } ], "stateMutability": "view", @@ -10060,123 +9660,73 @@ }, { "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, { "internalType": "address", "name": "account", "type": "address" } ], - "name": "addMember", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract UBIPool", - "name": "_pool", - "type": "address" - }, - { - "internalType": "string", - "name": "_ipfs", - "type": "string" - } - ], - "name": "changePoolDetails", + "name": "grantRole", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ - { - "internalType": "string", - "name": "_projectId", - "type": "string" - }, - { - "internalType": "string", - "name": "_ipfs", - "type": "string" - }, { "components": [ { "internalType": "address", - "name": "manager", - "type": "address" - }, - { - "internalType": "contract IMembersValidator", - "name": "membersValidator", - "type": "address" - }, - { - "internalType": "contract IIdentityV2", - "name": "uniquenessValidator", - "type": "address" - }, - { - "internalType": "contract IERC20Upgradeable", - "name": "rewardToken", + "name": "swapFrom", "type": "address" - } - ], - "internalType": "struct UBIPool.PoolSettings", - "name": "_settings", - "type": "tuple" - }, - { - "components": [ - { - "internalType": "uint32", - "name": "cycleLengthDays", - "type": "uint32" - }, - { - "internalType": "uint32", - "name": "claimPeriodDays", - "type": "uint32" - }, - { - "internalType": "uint32", - "name": "minActiveUsers", - "type": "uint32" }, { - "internalType": "bool", - "name": "claimForEnabled", - "type": "bool" + "internalType": "uint256", + "name": "amount", + "type": "uint256" }, { "internalType": "uint256", - "name": "maxClaimAmount", + "name": "minReturn", "type": "uint256" }, { - "internalType": "uint32", - "name": "maxClaimers", - "type": "uint32" + "internalType": "uint256", + "name": "deadline", + "type": "uint256" }, { - "internalType": "bool", - "name": "onlyMembers", - "type": "bool" + "internalType": "bytes", + "name": "path", + "type": "bytes" } ], - "internalType": "struct UBIPool.UBISettings", - "name": "_limits", + "internalType": "struct HelperLibrary.SwapData", + "name": "_customData", "type": "tuple" + }, + { + "internalType": "address", + "name": "_sender", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_ctx", + "type": "bytes" } ], - "name": "createManagedPool", + "name": "handleSwap", "outputs": [ { - "internalType": "contract UBIPool", - "name": "pool", - "type": "address" + "internalType": "bytes", + "name": "", + "type": "bytes" } ], "stateMutability": "nonpayable", @@ -10185,17 +9735,64 @@ { "inputs": [ { - "internalType": "string", - "name": "_projectId", - "type": "string" + "internalType": "bytes32", + "name": "role", + "type": "bytes32" }, { - "internalType": "string", - "name": "_ipfs", - "type": "string" + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasRole", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "host", + "outputs": [ + { + "internalType": "contract ISuperfluid", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract ProvableNFT", + "name": "_nft", + "type": "address" }, { "components": [ + { + "internalType": "uint32", + "name": "nftType", + "type": "uint32" + }, + { + "internalType": "uint16[]", + "name": "validEvents", + "type": "uint16[]" + }, + { + "internalType": "uint128[]", + "name": "rewardPerEvent", + "type": "uint128[]" + }, { "internalType": "address", "name": "manager", @@ -10215,74 +9812,64 @@ "internalType": "contract IERC20Upgradeable", "name": "rewardToken", "type": "address" + }, + { + "internalType": "bool", + "name": "allowRewardOverride", + "type": "bool" } ], - "internalType": "struct UBIPool.PoolSettings", + "internalType": "struct DirectPaymentsPool.PoolSettings", "name": "_settings", "type": "tuple" }, { "components": [ - { - "internalType": "uint32", - "name": "cycleLengthDays", - "type": "uint32" - }, - { - "internalType": "uint32", - "name": "claimPeriodDays", - "type": "uint32" - }, - { - "internalType": "uint32", - "name": "minActiveUsers", - "type": "uint32" - }, - { - "internalType": "bool", - "name": "claimForEnabled", - "type": "bool" - }, { "internalType": "uint256", - "name": "maxClaimAmount", + "name": "maxTotalPerMonth", "type": "uint256" }, { - "internalType": "uint32", - "name": "maxClaimers", - "type": "uint32" + "internalType": "uint256", + "name": "maxMemberPerMonth", + "type": "uint256" }, { - "internalType": "bool", - "name": "onlyMembers", - "type": "bool" + "internalType": "uint256", + "name": "maxMemberPerDay", + "type": "uint256" } ], - "internalType": "struct UBIPool.UBISettings", + "internalType": "struct DirectPaymentsPool.SafetyLimits", "name": "_limits", "type": "tuple" - } - ], - "name": "createPool", - "outputs": [ + }, { - "internalType": "contract UBIPool", - "name": "pool", + "internalType": "contract DirectPaymentsFactory", + "name": "_registry", "type": "address" } ], + "name": "initialize", + "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { - "inputs": [], - "name": "feeBps", + "inputs": [ + { + "internalType": "contract ISuperToken", + "name": "_superToken", + "type": "address" + } + ], + "name": "isAcceptedSuperToken", "outputs": [ { - "internalType": "uint32", + "internalType": "bool", "name": "", - "type": "uint32" + "type": "bool" } ], "stateMutability": "view", @@ -10290,12 +9877,22 @@ }, { "inputs": [], - "name": "feeRecipient", + "name": "limits", "outputs": [ { - "internalType": "address", - "name": "", - "type": "address" + "internalType": "uint256", + "name": "maxTotalPerMonth", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "maxMemberPerMonth", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "maxMemberPerDay", + "type": "uint256" } ], "stateMutability": "view", @@ -10305,88 +9902,124 @@ "inputs": [ { "internalType": "address", - "name": "member", + "name": "", "type": "address" } ], - "name": "getMemberPools", + "name": "memberLimits", "outputs": [ { - "internalType": "address[]", - "name": "", - "type": "address[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ + "internalType": "uint128", + "name": "daily", + "type": "uint128" + }, { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleAdmin", - "outputs": [ + "internalType": "uint128", + "name": "monthly", + "type": "uint128" + }, { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ + "internalType": "uint128", + "name": "total", + "type": "uint128" + }, { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" + "internalType": "uint64", + "name": "lastReward", + "type": "uint64" }, { - "internalType": "address", - "name": "account", - "type": "address" + "internalType": "uint64", + "name": "lastMonth", + "type": "uint64" } ], - "name": "grantRole", - "outputs": [], - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, { "internalType": "address", - "name": "account", + "name": "_to", "type": "address" - } - ], - "name": "hasRole", - "outputs": [ + }, + { + "components": [ + { + "internalType": "uint32", + "name": "nftType", + "type": "uint32" + }, + { + "internalType": "uint16", + "name": "version", + "type": "uint16" + }, + { + "internalType": "string", + "name": "nftUri", + "type": "string" + }, + { + "components": [ + { + "internalType": "uint16", + "name": "subtype", + "type": "uint16" + }, + { + "internalType": "uint32", + "name": "timestamp", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "quantity", + "type": "uint256" + }, + { + "internalType": "string", + "name": "eventUri", + "type": "string" + }, + { + "internalType": "address[]", + "name": "contributers", + "type": "address[]" + }, + { + "internalType": "uint128", + "name": "rewardOverride", + "type": "uint128" + } + ], + "internalType": "struct ProvableNFT.EventData[]", + "name": "events", + "type": "tuple[]" + } + ], + "internalType": "struct ProvableNFT.NFTData", + "name": "_nftData", + "type": "tuple" + }, { "internalType": "bool", - "name": "", + "name": "withClaim", "type": "bool" } ], - "stateMutability": "view", + "name": "mintNFT", + "outputs": [], + "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], - "name": "impl", + "name": "nft", "outputs": [ { - "internalType": "contract UpgradeableBeacon", + "internalType": "contract ProvableNFT", "name": "", "type": "address" } @@ -10398,27 +10031,33 @@ "inputs": [ { "internalType": "address", - "name": "_owner", + "name": "operator", "type": "address" }, { "internalType": "address", - "name": "_impl", + "name": "from", "type": "address" }, { - "internalType": "address", - "name": "_feeRecipient", - "type": "address" + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" }, { - "internalType": "uint32", - "name": "_feeBps", - "type": "uint32" + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "onERC721Received", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" } ], - "name": "initialize", - "outputs": [], "stateMutability": "nonpayable", "type": "function" }, @@ -10426,38 +10065,50 @@ "inputs": [ { "internalType": "address", - "name": "", + "name": "_sender", "type": "address" }, { "internalType": "uint256", - "name": "", + "name": "_amount", "type": "uint256" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" } ], - "name": "memberPools", + "name": "onTokenTransfer", "outputs": [ { - "internalType": "address", + "internalType": "bool", "name": "", - "type": "address" + "type": "bool" } ], - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { - "inputs": [ + "inputs": [], + "name": "proxiableUUID", + "outputs": [ { - "internalType": "uint256", + "internalType": "bytes32", "name": "", - "type": "uint256" + "type": "bytes32" } ], - "name": "pools", + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "registry", "outputs": [ { - "internalType": "address", + "internalType": "contract DirectPaymentsFactory", "name": "", "type": "address" } @@ -10469,72 +10120,16 @@ "inputs": [ { "internalType": "bytes32", - "name": "", + "name": "role", "type": "bytes32" - } - ], - "name": "projectIdToControlPool", - "outputs": [ + }, { - "internalType": "contract UBIPool", - "name": "", + "internalType": "address", + "name": "account", "type": "address" } ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "proxiableUUID", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "registry", - "outputs": [ - { - "internalType": "string", - "name": "ipfs", - "type": "string" - }, - { - "internalType": "bool", - "name": "isVerified", - "type": "bool" - }, - { - "internalType": "string", - "name": "projectId", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "member", - "type": "address" - } - ], - "name": "removeMember", + "name": "renounceRole", "outputs": [], "stateMutability": "nonpayable", "type": "function" @@ -10552,7 +10147,7 @@ "type": "address" } ], - "name": "renounceRole", + "name": "revokeRole", "outputs": [], "stateMutability": "nonpayable", "type": "function" @@ -10560,17 +10155,29 @@ { "inputs": [ { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" + "components": [ + { + "internalType": "uint256", + "name": "maxTotalPerMonth", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "maxMemberPerMonth", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "maxMemberPerDay", + "type": "uint256" + } + ], + "internalType": "struct DirectPaymentsPool.SafetyLimits", + "name": "_limits", + "type": "tuple" } ], - "name": "revokeRole", + "name": "setPoolLimits", "outputs": [], "stateMutability": "nonpayable", "type": "function" @@ -10578,52 +10185,90 @@ { "inputs": [ { - "internalType": "address", - "name": "_feeRecipient", - "type": "address" - }, - { - "internalType": "uint32", - "name": "_feeBps", - "type": "uint32" + "components": [ + { + "internalType": "uint32", + "name": "nftType", + "type": "uint32" + }, + { + "internalType": "uint16[]", + "name": "validEvents", + "type": "uint16[]" + }, + { + "internalType": "uint128[]", + "name": "rewardPerEvent", + "type": "uint128[]" + }, + { + "internalType": "address", + "name": "manager", + "type": "address" + }, + { + "internalType": "contract IMembersValidator", + "name": "membersValidator", + "type": "address" + }, + { + "internalType": "contract IIdentityV2", + "name": "uniquenessValidator", + "type": "address" + }, + { + "internalType": "contract IERC20Upgradeable", + "name": "rewardToken", + "type": "address" + }, + { + "internalType": "bool", + "name": "allowRewardOverride", + "type": "bool" + } + ], + "internalType": "struct DirectPaymentsPool.PoolSettings", + "name": "_settings", + "type": "tuple" } ], - "name": "setFeeInfo", + "name": "setPoolSettings", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { - "inputs": [ + "inputs": [], + "name": "settings", + "outputs": [ { - "internalType": "contract UBIPool", - "name": "_pool", + "internalType": "uint32", + "name": "nftType", + "type": "uint32" + }, + { + "internalType": "address", + "name": "manager", "type": "address" }, { - "internalType": "bool", - "name": "_isVerified", - "type": "bool" - } - ], - "name": "setVerified", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ + "internalType": "contract IMembersValidator", + "name": "membersValidator", + "type": "address" + }, { - "internalType": "bytes4", - "name": "interfaceId", - "type": "bytes4" - } - ], - "name": "supportsInterface", - "outputs": [ + "internalType": "contract IIdentityV2", + "name": "uniquenessValidator", + "type": "address" + }, + { + "internalType": "contract IERC20Upgradeable", + "name": "rewardToken", + "type": "address" + }, { "internalType": "bool", - "name": "", + "name": "allowRewardOverride", "type": "bool" } ], @@ -10631,673 +10276,472 @@ "type": "function" }, { - "inputs": [ + "inputs": [], + "name": "stats", + "outputs": [ + { + "internalType": "uint256", + "name": "netIncome", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "totalFees", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "lastUpdate", + "type": "uint256" + }, { "internalType": "address", - "name": "_impl", + "name": "lastFeeRecipient", "type": "address" + }, + { + "internalType": "int96", + "name": "lastIncomeRate", + "type": "int96" } ], - "name": "updateImpl", - "outputs": [], - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { - "inputs": [ + "inputs": [], + "name": "superToken", + "outputs": [ { - "internalType": "address", - "name": "newImplementation", + "internalType": "contract ISuperToken", + "name": "", "type": "address" } ], - "name": "upgradeTo", - "outputs": [], - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", - "name": "newImplementation", + "name": "_sender", "type": "address" }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, { "internalType": "bytes", - "name": "data", + "name": "_ctx", "type": "bytes" } ], - "name": "upgradeToAndCall", - "outputs": [], - "stateMutability": "payable", + "name": "support", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "nonpayable", "type": "function" - } - ] - }, - "UBIPoolFactory_Proxy": { - "address": "0x0E801D84Fa97b50751Dbf25036d067dCf18858bF", - "abi": [ + }, { "inputs": [ { "internalType": "address", - "name": "_logic", + "name": "_sender", "type": "address" }, + { + "components": [ + { + "internalType": "address", + "name": "swapFrom", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "minReturn", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "path", + "type": "bytes" + } + ], + "internalType": "struct HelperLibrary.SwapData", + "name": "_customData", + "type": "tuple" + }, { "internalType": "bytes", - "name": "_data", + "name": "_ctx", "type": "bytes" } ], - "stateMutability": "payable", - "type": "constructor" + "name": "supportWithSwap", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "nonpayable", + "type": "function" }, { - "anonymous": false, "inputs": [ { - "indexed": false, "internalType": "address", - "name": "previousAdmin", + "name": "", "type": "address" + } + ], + "name": "supporters", + "outputs": [ + { + "internalType": "uint256", + "name": "contribution", + "type": "uint256" }, { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" + "internalType": "int96", + "name": "flowRate", + "type": "int96" + }, + { + "internalType": "uint128", + "name": "lastUpdated", + "type": "uint128" } ], - "name": "AdminChanged", - "type": "event" + "stateMutability": "view", + "type": "function" }, { - "anonymous": false, "inputs": [ { - "indexed": true, - "internalType": "address", - "name": "beacon", - "type": "address" + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" } ], - "name": "BeaconUpgraded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ + "name": "supportsInterface", + "outputs": [ { - "indexed": true, - "internalType": "address", - "name": "implementation", - "type": "address" + "internalType": "bool", + "name": "", + "type": "bool" } ], - "name": "Upgraded", - "type": "event" - }, - { - "stateMutability": "payable", - "type": "fallback" + "stateMutability": "view", + "type": "function" }, { - "stateMutability": "payable", - "type": "receive" - } - ] - } - } - } - ], - "42220": [ - { - "name": "celo", - "chainId": "42220", - "contracts": { - "DirectPaymentsFactory": { - "address": "0x58b5E37c5aFad520dD93E92A5D11B8721A9115F0", - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "previousAdmin", - "type": "address" - }, + "inputs": [], + "name": "swapRouter", + "outputs": [ { - "indexed": false, - "internalType": "address", - "name": "newAdmin", + "internalType": "contract IV3SwapRouter", + "name": "", "type": "address" } ], - "name": "AdminChanged", - "type": "event" + "stateMutability": "view", + "type": "function" }, { - "anonymous": false, "inputs": [ { - "indexed": true, "internalType": "address", - "name": "beacon", + "name": "newImplementation", "type": "address" } ], - "name": "BeaconUpgraded", - "type": "event" + "name": "upgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - "anonymous": false, "inputs": [ { - "indexed": true, "internalType": "address", - "name": "implementation", + "name": "newImplementation", "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" } ], - "name": "Upgraded", - "type": "event" - }, - { - "stateMutability": "payable", - "type": "fallback" - }, - { + "name": "upgradeToAndCall", + "outputs": [], "stateMutability": "payable", - "type": "receive" - }, - { - "inputs": [], - "name": "NOT_PROJECT_OWNER", - "type": "error" + "type": "function" }, { - "anonymous": false, "inputs": [ { - "indexed": false, - "internalType": "uint8", - "name": "version", - "type": "uint8" + "internalType": "bytes", + "name": "data", + "type": "bytes" } ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "pool", - "type": "address" - }, - { - "indexed": true, - "internalType": "string", - "name": "projectId", - "type": "string" - }, - { - "indexed": false, - "internalType": "string", - "name": "ipfs", - "type": "string" - }, - { - "indexed": true, - "internalType": "uint32", - "name": "nftType", - "type": "uint32" - }, - { - "components": [ - { - "internalType": "uint32", - "name": "nftType", - "type": "uint32" - }, - { - "internalType": "uint16[]", - "name": "validEvents", - "type": "uint16[]" - }, - { - "internalType": "uint128[]", - "name": "rewardPerEvent", - "type": "uint128[]" - }, - { - "internalType": "address", - "name": "manager", - "type": "address" - }, - { - "internalType": "contract IMembersValidator", - "name": "membersValidator", - "type": "address" - }, - { - "internalType": "contract IIdentityV2", - "name": "uniquenessValidator", - "type": "address" - }, - { - "internalType": "contract IERC20Upgradeable", - "name": "rewardToken", - "type": "address" - }, - { - "internalType": "bool", - "name": "allowRewardOverride", - "type": "bool" - } - ], - "indexed": false, - "internalType": "struct DirectPaymentsPool.PoolSettings", - "name": "poolSettings", - "type": "tuple" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "maxTotalPerMonth", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "maxMemberPerMonth", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "maxMemberPerDay", - "type": "uint256" - } - ], - "indexed": false, - "internalType": "struct DirectPaymentsPool.SafetyLimits", - "name": "poolLimits", - "type": "tuple" - } - ], - "name": "PoolCreated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "pool", - "type": "address" - }, - { - "indexed": false, - "internalType": "string", - "name": "ipfs", - "type": "string" - } - ], - "name": "PoolDetailsChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "pool", - "type": "address" - }, - { - "indexed": false, - "internalType": "bool", - "name": "isVerified", - "type": "bool" - } - ], - "name": "PoolVerifiedChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "previousAdminRole", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "newAdminRole", - "type": "bytes32" - } - ], - "name": "RoleAdminChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleGranted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleRevoked", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "impl", - "type": "address" - } - ], - "name": "UpdatedImpl", - "type": "event" - }, - { - "inputs": [], - "name": "DEFAULT_ADMIN_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract DirectPaymentsPool", - "name": "_pool", - "type": "address" - }, - { - "internalType": "string", - "name": "_ipfs", - "type": "string" - } - ], - "name": "changePoolDetails", + "name": "upgradeToLatest", "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "_projectId", - "type": "string" - }, - { - "internalType": "string", - "name": "_ipfs", - "type": "string" - }, - { - "components": [ - { - "internalType": "uint32", - "name": "nftType", - "type": "uint32" - }, - { - "internalType": "uint16[]", - "name": "validEvents", - "type": "uint16[]" - }, - { - "internalType": "uint128[]", - "name": "rewardPerEvent", - "type": "uint128[]" - }, - { - "internalType": "address", - "name": "manager", - "type": "address" - }, - { - "internalType": "contract IMembersValidator", - "name": "membersValidator", - "type": "address" - }, - { - "internalType": "contract IIdentityV2", - "name": "uniquenessValidator", - "type": "address" - }, - { - "internalType": "contract IERC20Upgradeable", - "name": "rewardToken", - "type": "address" - }, - { - "internalType": "bool", - "name": "allowRewardOverride", - "type": "bool" - } - ], - "internalType": "struct DirectPaymentsPool.PoolSettings", - "name": "_settings", - "type": "tuple" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "maxTotalPerMonth", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "maxMemberPerMonth", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "maxMemberPerDay", - "type": "uint256" - } - ], - "internalType": "struct DirectPaymentsPool.SafetyLimits", - "name": "_limits", - "type": "tuple" - } - ], - "name": "createBeaconPool", - "outputs": [ - { - "internalType": "contract DirectPaymentsPool", - "name": "pool", - "type": "address" - } - ], - "stateMutability": "nonpayable", + "stateMutability": "payable", "type": "function" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "_projectId", - "type": "string" - }, - { - "internalType": "string", - "name": "_ipfs", - "type": "string" - }, - { - "components": [ - { - "internalType": "uint32", - "name": "nftType", - "type": "uint32" - }, - { - "internalType": "uint16[]", - "name": "validEvents", - "type": "uint16[]" - }, - { - "internalType": "uint128[]", - "name": "rewardPerEvent", - "type": "uint128[]" - }, - { - "internalType": "address", - "name": "manager", - "type": "address" - }, - { - "internalType": "contract IMembersValidator", - "name": "membersValidator", - "type": "address" - }, - { - "internalType": "contract IIdentityV2", - "name": "uniquenessValidator", - "type": "address" - }, - { - "internalType": "contract IERC20Upgradeable", - "name": "rewardToken", - "type": "address" - }, - { - "internalType": "bool", - "name": "allowRewardOverride", - "type": "bool" - } - ], - "internalType": "struct DirectPaymentsPool.PoolSettings", - "name": "_settings", - "type": "tuple" - }, + } + ] + }, + "GoodDollar": { + "address": "0xc5a5C42992dECbae36851359345FE25997F5C42d", + "abi": [ + "constructor(address _host)", + "error SF_TOKEN_AGREEMENT_ALREADY_EXISTS()", + "error SF_TOKEN_AGREEMENT_DOES_NOT_EXIST()", + "error SF_TOKEN_BURN_INSUFFICIENT_BALANCE()", + "error SF_TOKEN_MOVE_INSUFFICIENT_BALANCE()", + "error SF_TOKEN_ONLY_HOST()", + "error SF_TOKEN_ONLY_LISTED_AGREEMENT()", + "error SUPER_TOKEN_APPROVE_FROM_ZERO_ADDRESS()", + "error SUPER_TOKEN_APPROVE_TO_ZERO_ADDRESS()", + "error SUPER_TOKEN_BURN_FROM_ZERO_ADDRESS()", + "error SUPER_TOKEN_CALLER_IS_NOT_OPERATOR_FOR_HOLDER()", + "error SUPER_TOKEN_INFLATIONARY_DEFLATIONARY_NOT_SUPPORTED()", + "error SUPER_TOKEN_MINT_TO_ZERO_ADDRESS()", + "error SUPER_TOKEN_NFT_PROXY_ALREADY_SET()", + "error SUPER_TOKEN_NOT_ERC777_TOKENS_RECIPIENT()", + "error SUPER_TOKEN_NO_UNDERLYING_TOKEN()", + "error SUPER_TOKEN_ONLY_GOV_OWNER()", + "error SUPER_TOKEN_ONLY_HOST()", + "error SUPER_TOKEN_ONLY_SELF()", + "error SUPER_TOKEN_TRANSFER_FROM_ZERO_ADDRESS()", + "error SUPER_TOKEN_TRANSFER_TO_ZERO_ADDRESS()", + "event AgreementCreated(address indexed agreementClass, bytes32 id, bytes32[] data)", + "event AgreementLiquidated(address indexed agreementClass, bytes32 id, address indexed penaltyAccount, address indexed rewardAccount, uint256 rewardAmount)", + "event AgreementLiquidatedBy(address liquidatorAccount, address indexed agreementClass, bytes32 id, address indexed penaltyAccount, address indexed bondAccount, uint256 rewardAmount, uint256 bailoutAmount)", + "event AgreementLiquidatedV2(address indexed agreementClass, bytes32 id, address indexed liquidatorAccount, address indexed targetAccount, address rewardAmountReceiver, uint256 rewardAmount, int256 targetAccountBalanceDelta, bytes liquidationTypeData)", + "event AgreementStateUpdated(address indexed agreementClass, address indexed account, uint256 slotId)", + "event AgreementTerminated(address indexed agreementClass, bytes32 id)", + "event AgreementUpdated(address indexed agreementClass, bytes32 id, bytes32[] data)", + "event Approval(address indexed owner, address indexed spender, uint256 value)", + "event AuthorizedOperator(address indexed operator, address indexed tokenHolder)", + "event Bailout(address indexed bailoutAccount, uint256 bailoutAmount)", + "event Burned(address indexed operator, address indexed from, uint256 amount, bytes data, bytes operatorData)", + "event CodeUpdated(bytes32 uuid, address codeAddress)", + "event ConstantInflowNFTCreated(address indexed constantInflowNFT)", + "event ConstantOutflowNFTCreated(address indexed constantOutflowNFT)", + "event Initialized(uint8 version)", + "event Minted(address indexed operator, address indexed to, uint256 amount, bytes data, bytes operatorData)", + "event Paused(address account)", + "event RevokedOperator(address indexed operator, address indexed tokenHolder)", + "event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole)", + "event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender)", + "event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender)", + "event Sent(address indexed operator, address indexed from, address indexed to, uint256 amount, bytes data, bytes operatorData)", + "event Transfer(address indexed from, address indexed to, uint256 value, bytes data)", + "event Transfer(address indexed from, address indexed to, uint256 value)", + "event TransferFee(address from, address to, uint256 amount, uint256 fee, bool senderPays)", + "event Unpaused(address account)", + "function CONSTANT_INFLOW_NFT() view returns (address)", + "function CONSTANT_OUTFLOW_NFT() view returns (address)", + "function DEFAULT_ADMIN_ROLE() view returns (bytes32)", + "function DOMAIN_SEPARATOR() view returns (bytes32)", + "function MINTER_ROLE() view returns (bytes32)", + "function PAUSER_ROLE() view returns (bytes32)", + "function addMinter(address _minter)", + "function addPauser(address _pauser)", + "function allowance(address account, address spender) view returns (uint256)", + "function approve(address spender, uint256 amount) returns (bool)", + "function authorizeOperator(address operator)", + "function balanceOf(address account) view returns (uint256 balance)", + "function burn(uint256 amount)", + "function burn(uint256 amount, bytes data)", + "function burnFrom(address account, uint256 amount)", + "function cap() view returns (uint256)", + "function castrate()", + "function createAgreement(bytes32 id, bytes32[] data)", + "function creditGasFees(address from, address feeRecipient, address gatewayFeeRecipient, address baseFeeRecipient, uint256 refund, uint256 tipTxFee, uint256 gatewayFee, uint256 baseTxFee)", + "function debitGasFees(address from, uint256 value)", + "function decimals() pure returns (uint8)", + "function decreaseAllowance(address spender, uint256 subtractedValue) returns (bool)", + "function defaultOperators() view returns (address[])", + "function disableHostOperations() view returns (bool)", + "function enableHostOperations(bool enabled)", + "function feeRecipient() view returns (address)", + "function formula() view returns (address)", + "function getAccountActiveAgreements(address account) view returns (address[])", + "function getAgreementData(address agreementClass, bytes32 id, uint256 dataLength) view returns (bytes32[] data)", + "function getAgreementStateSlot(address agreementClass, address account, uint256 slotId, uint256 dataLength) view returns (bytes32[] slotData)", + "function getCodeAddress() view returns (address codeAddress)", + "function getFees(uint256 amount, address sender, address recipient) view returns (uint256 fee, bool senderPays)", + "function getFees(uint256 amount) view returns (uint256 fee, bool senderPays)", + "function getHost() view returns (address host)", + "function getRoleAdmin(bytes32 role) view returns (bytes32)", + "function getRoleMember(bytes32 role, uint256 index) view returns (address)", + "function getRoleMemberCount(bytes32 role) view returns (uint256)", + "function getUnderlyingToken() view returns (address)", + "function grantRole(bytes32 role, address account)", + "function granularity() pure returns (uint256)", + "function hasRole(bytes32 role, address account) view returns (bool)", + "function identity() view returns (address)", + "function increaseAllowance(address spender, uint256 addedValue) returns (bool)", + "function initialize(address underlyingToken, uint8 underlyingDecimals, string n, string s)", + "function initialize(string n, string s, uint256 _cap, address _formula, address _identity, address _feeRecipient, address _owner, address _outflowNFT, address _inflowNFT)", + "function isAccountCritical(address account, uint256 timestamp) view returns (bool isCritical)", + "function isAccountCriticalNow(address account) view returns (bool isCritical)", + "function isAccountSolvent(address account, uint256 timestamp) view returns (bool isSolvent)", + "function isAccountSolventNow(address account) view returns (bool isSolvent)", + "function isMinter(address _minter) view returns (bool)", + "function isOperatorFor(address operator, address tokenHolder) view returns (bool)", + "function isPauser(address _pauser) view returns (bool)", + "function makeLiquidationPayoutsV2(bytes32 id, bytes liquidationTypeData, address liquidatorAccount, bool useDefaultRewardAccount, address targetAccount, uint256 rewardAmount, int256 targetAccountBalanceDelta)", + "function mint(address to, uint256 amount) returns (bool)", + "function name() view returns (string)", + "function nonces(address owner) view returns (uint256)", + "function operationApprove(address account, address spender, uint256 amount)", + "function operationDecreaseAllowance(address account, address spender, uint256 subtractedValue)", + "function operationIncreaseAllowance(address account, address spender, uint256 addedValue)", + "function operationSend(address spender, address recipient, uint256 amount, bytes userData)", + "function operationTransferFrom(address account, address spender, address recipient, uint256 amount)", + "function operatorBurn(address account, uint256 amount, bytes data, bytes operatorData)", + "function operatorSend(address sender, address recipient, uint256 amount, bytes data, bytes operatorData)", + "function owner() view returns (address)", + "function pause()", + "function paused() view returns (bool)", + "function permit(address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s)", + "function poolAdminNFT() view returns (address)", + "function poolMemberNFT() view returns (address)", + "function proxiableUUID() pure returns (bytes32)", + "function realtimeBalanceOf(address account, uint256 timestamp) view returns (int256 availableBalance, uint256 deposit, uint256 owedDeposit)", + "function realtimeBalanceOfNow(address account) view returns (int256 availableBalance, uint256 deposit, uint256 owedDeposit, uint256 timestamp)", + "function renounceMinter()", + "function renounceRole(bytes32 role, address account)", + "function revokeOperator(address operator)", + "function revokeRole(bytes32 role, address account)", + "function selfApproveFor(address account, address spender, uint256 amount)", + "function send(address recipient, uint256 amount, bytes data)", + "function setFeeRecipient(address _feeRecipient)", + "function setFormula(address _formula)", + "function setIdentity(address _identity)", + "function setNFTProxyContracts(address _constantOutflowNFT, address _constantInflowNFT, address _poolAdminNFT, address _poolMemberNFT)", + "function settleBalance(address account, int256 delta)", + "function supportsInterface(bytes4 interfaceId) view returns (bool)", + "function symbol() view returns (string)", + "function terminateAgreement(bytes32 id, uint256 dataLength)", + "function totalSupply() view returns (uint256)", + "function transfer(address to, uint256 amount) returns (bool)", + "function transferAndCall(address to, uint256 amount, bytes data) returns (bool)", + "function transferFrom(address holder, address recipient, uint256 amount) returns (bool)", + "function transferOwnership(address _owner)", + "function unpause()", + "function updateAgreementData(bytes32 id, bytes32[] data)", + "function updateAgreementStateSlot(address account, uint256 slotId, bytes32[] slotData)", + "function updateCode(address newAddress)" + ] + }, + "HelperLibrary": { + "address": "0xa82fF9aFd8f496c3d6ac40E2a0F282E47488CFc9", + "abi": [ + { + "inputs": [ { "components": [ { "internalType": "uint256", - "name": "maxTotalPerMonth", + "name": "netIncome", "type": "uint256" }, { "internalType": "uint256", - "name": "maxMemberPerMonth", + "name": "totalFees", "type": "uint256" }, { "internalType": "uint256", - "name": "maxMemberPerDay", + "name": "lastUpdate", "type": "uint256" + }, + { + "internalType": "address", + "name": "lastFeeRecipient", + "type": "address" + }, + { + "internalType": "int96", + "name": "lastIncomeRate", + "type": "int96" } ], - "internalType": "struct DirectPaymentsPool.SafetyLimits", - "name": "_limits", + "internalType": "struct IGoodCollectiveSuperApp.Stats", + "name": "stats", "type": "tuple" - } - ], - "name": "createPool", - "outputs": [ + }, { - "internalType": "contract DirectPaymentsPool", - "name": "pool", - "type": "address" + "internalType": "contract ISuperToken", + "name": "superToken", + "type": "ISuperToken" } ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "feeBps", + "name": "getRealtimeStats", "outputs": [ { - "internalType": "uint32", - "name": "", - "type": "uint32" + "internalType": "uint256", + "name": "netIncome", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "totalFees", + "type": "uint256" + }, + { + "internalType": "int96", + "name": "incomeFlowRate", + "type": "int96" + }, + { + "internalType": "int96", + "name": "feeRate", + "type": "int96" } ], "stateMutability": "view", "type": "function" - }, + } + ] + }, + "MultiClaimModule": { + "address": "0xE6Af17143015aAA030c8aCd81811e72AC6046c0e", + "abi": [ { "inputs": [], - "name": "feeRecipient", + "name": "getModuleTypes", "outputs": [ { - "internalType": "address", + "internalType": "uint256", "name": "", - "type": "address" + "type": "uint256" } ], "stateMutability": "view", @@ -11306,17 +10750,17 @@ { "inputs": [ { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" + "internalType": "uint256", + "name": "typeID", + "type": "uint256" } ], - "name": "getRoleAdmin", + "name": "isModuleType", "outputs": [ { - "internalType": "bytes32", + "internalType": "bool", "name": "", - "type": "bytes32" + "type": "bool" } ], "stateMutability": "view", @@ -11325,291 +10769,381 @@ { "inputs": [ { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" + "internalType": "address[]", + "name": "contracts", + "type": "address[]" }, { - "internalType": "address", - "name": "account", + "internalType": "contract IERC20Upgradeable", + "name": "token", "type": "address" - } - ], - "name": "grantRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" }, { "internalType": "address", - "name": "account", + "name": "recipient", "type": "address" } ], - "name": "hasRole", + "name": "multiClaim", "outputs": [ { - "internalType": "bool", - "name": "", - "type": "bool" + "internalType": "bool[]", + "name": "success", + "type": "bool[]" } ], - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { - "inputs": [], - "name": "impl", - "outputs": [ + "inputs": [ { - "internalType": "contract UpgradeableBeacon", - "name": "", - "type": "address" + "internalType": "bytes", + "name": "data", + "type": "bytes" } ], - "stateMutability": "view", + "name": "onInstall", + "outputs": [], + "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "onUninstall", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ] + }, + "ProvableNFT": { + "address": "0xf5059a5D33d5853360D16C683c16e67980206f36", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, "internalType": "address", - "name": "_owner", + "name": "previousAdmin", "type": "address" }, { + "indexed": false, "internalType": "address", - "name": "_dpimpl", + "name": "newAdmin", "type": "address" - }, + } + ], + "name": "AdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ { - "internalType": "contract ProvableNFT", - "name": "_nft", + "indexed": true, + "internalType": "address", + "name": "beacon", "type": "address" - }, + } + ], + "name": "BeaconUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ { + "indexed": true, "internalType": "address", - "name": "_feeRecipient", + "name": "implementation", "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "stateMutability": "payable", + "type": "receive" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "dataHash", + "type": "bytes32" }, { - "internalType": "uint32", - "name": "_feeBps", - "type": "uint32" + "internalType": "bytes32", + "name": "tokenId", + "type": "bytes32" } ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "name": "BAD_DATAHASH", + "type": "error" }, { "inputs": [], - "name": "nextNftType", - "outputs": [ + "name": "BAD_NFTTYPE", + "type": "error" + }, + { + "inputs": [ { "internalType": "uint32", "name": "", "type": "uint32" } ], - "stateMutability": "view", - "type": "function" + "name": "NOT_MANAGER", + "type": "error" }, { "inputs": [], - "name": "nft", - "outputs": [ + "name": "NOT_MINTER", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ { - "internalType": "contract ProvableNFT", - "name": "", + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "approved", "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" } ], - "stateMutability": "view", - "type": "function" + "name": "Approval", + "type": "event" }, { + "anonymous": false, "inputs": [ { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "name": "projectIdToControlPool", - "outputs": [ + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, { - "internalType": "contract DirectPaymentsPool", - "name": "", + "indexed": true, + "internalType": "address", + "name": "operator", "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "approved", + "type": "bool" } ], - "stateMutability": "view", - "type": "function" + "name": "ApprovalForAll", + "type": "event" }, { - "inputs": [], - "name": "proxiableUUID", - "outputs": [ + "anonymous": false, + "inputs": [ { - "internalType": "bytes32", - "name": "", - "type": "bytes32" + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" } ], - "stateMutability": "view", - "type": "function" + "name": "Initialized", + "type": "event" }, { + "anonymous": false, "inputs": [ { + "indexed": false, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "indexed": false, "internalType": "address", - "name": "", + "name": "to", "type": "address" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "nftDataHash", + "type": "bytes32" } ], - "name": "registry", - "outputs": [ + "name": "ProvableNftMinted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ { - "internalType": "string", - "name": "ipfs", - "type": "string" + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" }, { - "internalType": "bool", - "name": "isVerified", - "type": "bool" + "indexed": true, + "internalType": "bytes32", + "name": "previousAdminRole", + "type": "bytes32" }, { - "internalType": "string", - "name": "projectId", - "type": "string" + "indexed": true, + "internalType": "bytes32", + "name": "newAdminRole", + "type": "bytes32" } ], - "stateMutability": "view", - "type": "function" + "name": "RoleAdminChanged", + "type": "event" }, { + "anonymous": false, "inputs": [ { + "indexed": true, "internalType": "bytes32", "name": "role", "type": "bytes32" }, { + "indexed": true, "internalType": "address", "name": "account", "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" } ], - "name": "renounceRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "name": "RoleGranted", + "type": "event" }, { + "anonymous": false, "inputs": [ { + "indexed": true, "internalType": "bytes32", "name": "role", "type": "bytes32" }, { + "indexed": true, "internalType": "address", "name": "account", "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" } ], - "name": "revokeRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "name": "RoleRevoked", + "type": "event" }, { + "anonymous": false, "inputs": [ { + "indexed": true, "internalType": "address", - "name": "_feeRecipient", + "name": "from", "type": "address" }, { - "internalType": "uint32", - "name": "_feeBps", - "type": "uint32" - } - ], - "name": "setFeeInfo", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract DirectPaymentsPool", - "name": "_pool", + "indexed": true, + "internalType": "address", + "name": "to", "type": "address" }, { - "internalType": "bool", - "name": "_isVerified", - "type": "bool" + "indexed": true, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" } ], - "name": "setVerified", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "name": "Transfer", + "type": "event" }, { - "inputs": [ - { - "internalType": "bytes4", - "name": "interfaceId", - "type": "bytes4" - } - ], - "name": "supportsInterface", + "inputs": [], + "name": "DEFAULT_ADMIN_ROLE", "outputs": [ { - "internalType": "bool", + "internalType": "bytes32", "name": "", - "type": "bool" + "type": "bytes32" } ], "stateMutability": "view", "type": "function" }, { - "inputs": [ + "inputs": [], + "name": "MINTER_ROLE", + "outputs": [ { - "internalType": "address", - "name": "_impl", - "type": "address" + "internalType": "bytes32", + "name": "", + "type": "bytes32" } ], - "name": "updateImpl", - "outputs": [], - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", - "name": "newImplementation", + "name": "_manager", "type": "address" + }, + { + "internalType": "uint32", + "name": "_nftType", + "type": "uint32" } ], - "name": "upgradeTo", + "name": "addManager", "outputs": [], "stateMutability": "nonpayable", "type": "function" @@ -11618,118 +11152,87 @@ "inputs": [ { "internalType": "address", - "name": "newImplementation", + "name": "to", "type": "address" }, { - "internalType": "bytes", - "name": "data", - "type": "bytes" + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" } ], - "name": "upgradeToAndCall", + "name": "approve", "outputs": [], - "stateMutability": "payable", + "stateMutability": "nonpayable", "type": "function" }, - { - "inputs": [ - { - "internalType": "address", - "name": "_logic", - "type": "address" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "stateMutability": "payable", - "type": "constructor" - } - ] - }, - "DirectPaymentsFactory_Implementation": { - "address": "0xBc1d6cDB7Bc2BFF1091A3db1CCCc4506EBb6d466", - "abi": [ - { - "inputs": [], - "name": "NOT_PROJECT_OWNER", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "previousAdmin", - "type": "address" - }, + { + "inputs": [ { - "indexed": false, "internalType": "address", - "name": "newAdmin", + "name": "owner", "type": "address" } ], - "name": "AdminChanged", - "type": "event" + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" }, { - "anonymous": false, "inputs": [ { - "indexed": true, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "getApproved", + "outputs": [ + { "internalType": "address", - "name": "beacon", + "name": "", "type": "address" } ], - "name": "BeaconUpgraded", - "type": "event" + "stateMutability": "view", + "type": "function" }, { - "anonymous": false, "inputs": [ { - "indexed": false, - "internalType": "uint8", - "name": "version", - "type": "uint8" + "internalType": "uint32", + "name": "_nftType", + "type": "uint32" } ], - "name": "Initialized", - "type": "event" + "name": "getManagerRole", + "outputs": [ + { + "internalType": "bytes32", + "name": "roleHash", + "type": "bytes32" + } + ], + "stateMutability": "pure", + "type": "function" }, { - "anonymous": false, "inputs": [ { - "indexed": true, - "internalType": "address", - "name": "pool", - "type": "address" - }, - { - "indexed": true, - "internalType": "string", - "name": "projectId", - "type": "string" - }, - { - "indexed": false, - "internalType": "string", - "name": "ipfs", - "type": "string" - }, - { - "indexed": true, - "internalType": "uint32", - "name": "nftType", - "type": "uint32" - }, + "internalType": "uint256", + "name": "_tokenId", + "type": "uint256" + } + ], + "name": "getNFTData", + "outputs": [ { "components": [ { @@ -11738,220 +11241,266 @@ "type": "uint32" }, { - "internalType": "uint16[]", - "name": "validEvents", - "type": "uint16[]" - }, - { - "internalType": "uint128[]", - "name": "rewardPerEvent", - "type": "uint128[]" - }, - { - "internalType": "address", - "name": "manager", - "type": "address" - }, - { - "internalType": "contract IMembersValidator", - "name": "membersValidator", - "type": "address" - }, - { - "internalType": "contract IIdentityV2", - "name": "uniquenessValidator", - "type": "address" + "internalType": "uint16", + "name": "version", + "type": "uint16" }, { - "internalType": "contract IERC20Upgradeable", - "name": "rewardToken", - "type": "address" + "internalType": "string", + "name": "nftUri", + "type": "string" }, { - "internalType": "bool", - "name": "allowRewardOverride", - "type": "bool" + "components": [ + { + "internalType": "uint16", + "name": "subtype", + "type": "uint16" + }, + { + "internalType": "uint32", + "name": "timestamp", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "quantity", + "type": "uint256" + }, + { + "internalType": "string", + "name": "eventUri", + "type": "string" + }, + { + "internalType": "address[]", + "name": "contributers", + "type": "address[]" + }, + { + "internalType": "uint128", + "name": "rewardOverride", + "type": "uint128" + } + ], + "internalType": "struct ProvableNFT.EventData[]", + "name": "events", + "type": "tuple[]" } ], - "indexed": false, - "internalType": "struct DirectPaymentsPool.PoolSettings", - "name": "poolSettings", + "internalType": "struct ProvableNFT.NFTData", + "name": "", "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_tokenId", + "type": "uint256" }, + { + "internalType": "uint256", + "name": "_index", + "type": "uint256" + } + ], + "name": "getNFTEvent", + "outputs": [ { "components": [ { - "internalType": "uint256", - "name": "maxTotalPerMonth", - "type": "uint256" + "internalType": "uint16", + "name": "subtype", + "type": "uint16" }, { - "internalType": "uint256", - "name": "maxMemberPerMonth", - "type": "uint256" + "internalType": "uint32", + "name": "timestamp", + "type": "uint32" }, { "internalType": "uint256", - "name": "maxMemberPerDay", + "name": "quantity", "type": "uint256" + }, + { + "internalType": "string", + "name": "eventUri", + "type": "string" + }, + { + "internalType": "address[]", + "name": "contributers", + "type": "address[]" + }, + { + "internalType": "uint128", + "name": "rewardOverride", + "type": "uint128" } ], - "indexed": false, - "internalType": "struct DirectPaymentsPool.SafetyLimits", - "name": "poolLimits", + "internalType": "struct ProvableNFT.EventData", + "name": "", "type": "tuple" } ], - "name": "PoolCreated", - "type": "event" + "stateMutability": "view", + "type": "function" }, { - "anonymous": false, "inputs": [ { - "indexed": true, - "internalType": "address", - "name": "pool", - "type": "address" - }, - { - "indexed": false, - "internalType": "string", - "name": "ipfs", - "type": "string" + "internalType": "uint256", + "name": "_tokenId", + "type": "uint256" } ], - "name": "PoolDetailsChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "pool", - "type": "address" - }, + "name": "getNFTEvents", + "outputs": [ { - "indexed": false, - "internalType": "bool", - "name": "isVerified", - "type": "bool" + "components": [ + { + "internalType": "uint16", + "name": "subtype", + "type": "uint16" + }, + { + "internalType": "uint32", + "name": "timestamp", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "quantity", + "type": "uint256" + }, + { + "internalType": "string", + "name": "eventUri", + "type": "string" + }, + { + "internalType": "address[]", + "name": "contributers", + "type": "address[]" + }, + { + "internalType": "uint128", + "name": "rewardOverride", + "type": "uint128" + } + ], + "internalType": "struct ProvableNFT.EventData[]", + "name": "", + "type": "tuple[]" } ], - "name": "PoolVerifiedChanged", - "type": "event" + "stateMutability": "view", + "type": "function" }, { - "anonymous": false, "inputs": [ { - "indexed": true, "internalType": "bytes32", "name": "role", "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "previousAdminRole", - "type": "bytes32" - }, + } + ], + "name": "getRoleAdmin", + "outputs": [ { - "indexed": true, "internalType": "bytes32", - "name": "newAdminRole", + "name": "", "type": "bytes32" } ], - "name": "RoleAdminChanged", - "type": "event" + "stateMutability": "view", + "type": "function" }, { - "anonymous": false, "inputs": [ { - "indexed": true, "internalType": "bytes32", "name": "role", "type": "bytes32" }, { - "indexed": true, "internalType": "address", "name": "account", "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" } ], - "name": "RoleGranted", - "type": "event" + "name": "grantRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - "anonymous": false, "inputs": [ { - "indexed": true, "internalType": "bytes32", "name": "role", "type": "bytes32" }, { - "indexed": true, "internalType": "address", "name": "account", "type": "address" - }, + } + ], + "name": "hasRole", + "outputs": [ { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" + "internalType": "bool", + "name": "", + "type": "bool" } ], - "name": "RoleRevoked", - "type": "event" + "stateMutability": "view", + "type": "function" }, { - "anonymous": false, "inputs": [ { - "indexed": true, - "internalType": "address", - "name": "impl", - "type": "address" + "internalType": "string", + "name": "_name", + "type": "string" + }, + { + "internalType": "string", + "name": "_symbol", + "type": "string" } ], - "name": "UpdatedImpl", - "type": "event" + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - "anonymous": false, "inputs": [ { - "indexed": true, "internalType": "address", - "name": "implementation", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "operator", "type": "address" } ], - "name": "Upgraded", - "type": "event" - }, - { - "inputs": [], - "name": "DEFAULT_ADMIN_ROLE", + "name": "isApprovedForAll", "outputs": [ { - "internalType": "bytes32", + "internalType": "bool", "name": "", - "type": "bytes32" + "type": "bool" } ], "stateMutability": "view", @@ -11960,32 +11509,38 @@ { "inputs": [ { - "internalType": "contract DirectPaymentsPool", - "name": "_pool", + "internalType": "address", + "name": "_to", "type": "address" }, { "internalType": "string", - "name": "_ipfs", + "name": "_uri", "type": "string" + }, + { + "internalType": "bytes32", + "name": "_nftDataHash", + "type": "bytes32" + } + ], + "name": "mint", + "outputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" } ], - "name": "changePoolDetails", - "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { - "internalType": "string", - "name": "_projectId", - "type": "string" - }, - { - "internalType": "string", - "name": "_ipfs", - "type": "string" + "internalType": "address", + "name": "_to", + "type": "address" }, { "components": [ @@ -11995,90 +11550,117 @@ "type": "uint32" }, { - "internalType": "uint16[]", - "name": "validEvents", - "type": "uint16[]" - }, - { - "internalType": "uint128[]", - "name": "rewardPerEvent", - "type": "uint128[]" - }, - { - "internalType": "address", - "name": "manager", - "type": "address" - }, - { - "internalType": "contract IMembersValidator", - "name": "membersValidator", - "type": "address" - }, - { - "internalType": "contract IIdentityV2", - "name": "uniquenessValidator", - "type": "address" + "internalType": "uint16", + "name": "version", + "type": "uint16" }, { - "internalType": "contract IERC20Upgradeable", - "name": "rewardToken", - "type": "address" + "internalType": "string", + "name": "nftUri", + "type": "string" }, { - "internalType": "bool", - "name": "allowRewardOverride", - "type": "bool" + "components": [ + { + "internalType": "uint16", + "name": "subtype", + "type": "uint16" + }, + { + "internalType": "uint32", + "name": "timestamp", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "quantity", + "type": "uint256" + }, + { + "internalType": "string", + "name": "eventUri", + "type": "string" + }, + { + "internalType": "address[]", + "name": "contributers", + "type": "address[]" + }, + { + "internalType": "uint128", + "name": "rewardOverride", + "type": "uint128" + } + ], + "internalType": "struct ProvableNFT.EventData[]", + "name": "events", + "type": "tuple[]" } ], - "internalType": "struct DirectPaymentsPool.PoolSettings", - "name": "_settings", + "internalType": "struct ProvableNFT.NFTData", + "name": "_nftData", "type": "tuple" }, { - "components": [ - { - "internalType": "uint256", - "name": "maxTotalPerMonth", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "maxMemberPerMonth", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "maxMemberPerDay", - "type": "uint256" - } - ], - "internalType": "struct DirectPaymentsPool.SafetyLimits", - "name": "_limits", - "type": "tuple" + "internalType": "bool", + "name": "_withStore", + "type": "bool" + }, + { + "internalType": "bytes", + "name": "_callData", + "type": "bytes" } ], - "name": "createBeaconPool", + "name": "mintPermissioned", "outputs": [ { - "internalType": "contract DirectPaymentsPool", - "name": "pool", - "type": "address" + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" } ], "stateMutability": "nonpayable", "type": "function" }, { - "inputs": [ + "inputs": [], + "name": "name", + "outputs": [ { "internalType": "string", - "name": "_projectId", + "name": "", "type": "string" - }, + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ { - "internalType": "string", - "name": "_ipfs", - "type": "string" + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "ownerOf", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_tokenId", + "type": "uint256" }, { "components": [ @@ -12088,114 +11670,126 @@ "type": "uint32" }, { - "internalType": "uint16[]", - "name": "validEvents", - "type": "uint16[]" - }, - { - "internalType": "uint128[]", - "name": "rewardPerEvent", - "type": "uint128[]" - }, - { - "internalType": "address", - "name": "manager", - "type": "address" - }, - { - "internalType": "contract IMembersValidator", - "name": "membersValidator", - "type": "address" - }, - { - "internalType": "contract IIdentityV2", - "name": "uniquenessValidator", - "type": "address" + "internalType": "uint16", + "name": "version", + "type": "uint16" }, { - "internalType": "contract IERC20Upgradeable", - "name": "rewardToken", - "type": "address" + "internalType": "string", + "name": "nftUri", + "type": "string" }, { - "internalType": "bool", - "name": "allowRewardOverride", - "type": "bool" + "components": [ + { + "internalType": "uint16", + "name": "subtype", + "type": "uint16" + }, + { + "internalType": "uint32", + "name": "timestamp", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "quantity", + "type": "uint256" + }, + { + "internalType": "string", + "name": "eventUri", + "type": "string" + }, + { + "internalType": "address[]", + "name": "contributers", + "type": "address[]" + }, + { + "internalType": "uint128", + "name": "rewardOverride", + "type": "uint128" + } + ], + "internalType": "struct ProvableNFT.EventData[]", + "name": "events", + "type": "tuple[]" } ], - "internalType": "struct DirectPaymentsPool.PoolSettings", - "name": "_settings", + "internalType": "struct ProvableNFT.NFTData", + "name": "_nftData", "type": "tuple" - }, + } + ], + "name": "proveNFTData", + "outputs": [ { "components": [ { - "internalType": "uint256", - "name": "maxTotalPerMonth", - "type": "uint256" + "internalType": "uint32", + "name": "nftType", + "type": "uint32" }, { - "internalType": "uint256", - "name": "maxMemberPerMonth", - "type": "uint256" + "internalType": "uint16", + "name": "version", + "type": "uint16" }, { - "internalType": "uint256", - "name": "maxMemberPerDay", - "type": "uint256" + "internalType": "string", + "name": "nftUri", + "type": "string" + }, + { + "components": [ + { + "internalType": "uint16", + "name": "subtype", + "type": "uint16" + }, + { + "internalType": "uint32", + "name": "timestamp", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "quantity", + "type": "uint256" + }, + { + "internalType": "string", + "name": "eventUri", + "type": "string" + }, + { + "internalType": "address[]", + "name": "contributers", + "type": "address[]" + }, + { + "internalType": "uint128", + "name": "rewardOverride", + "type": "uint128" + } + ], + "internalType": "struct ProvableNFT.EventData[]", + "name": "events", + "type": "tuple[]" } ], - "internalType": "struct DirectPaymentsPool.SafetyLimits", - "name": "_limits", + "internalType": "struct ProvableNFT.NFTData", + "name": "data", "type": "tuple" } ], - "name": "createPool", - "outputs": [ - { - "internalType": "contract DirectPaymentsPool", - "name": "pool", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "feeBps", - "outputs": [ - { - "internalType": "uint32", - "name": "", - "type": "uint32" - } - ], "stateMutability": "view", "type": "function" }, { "inputs": [], - "name": "feeRecipient", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleAdmin", + "name": "proxiableUUID", "outputs": [ { "internalType": "bytes32", @@ -12219,7 +11813,7 @@ "type": "address" } ], - "name": "grantRole", + "name": "renounceRole", "outputs": [], "stateMutability": "nonpayable", "type": "function" @@ -12237,71 +11831,94 @@ "type": "address" } ], - "name": "hasRole", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", + "name": "revokeRole", + "outputs": [], + "stateMutability": "nonpayable", "type": "function" }, { - "inputs": [], - "name": "impl", - "outputs": [ + "inputs": [ { - "internalType": "contract UpgradeableBeacon", - "name": "", + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" } ], - "stateMutability": "view", + "name": "safeTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", - "name": "_owner", + "name": "from", "type": "address" }, { "internalType": "address", - "name": "_dpimpl", + "name": "to", "type": "address" }, { - "internalType": "contract ProvableNFT", - "name": "_nft", - "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": "_feeRecipient", + "name": "operator", "type": "address" }, { - "internalType": "uint32", - "name": "_feeBps", - "type": "uint32" + "internalType": "bool", + "name": "approved", + "type": "bool" } ], - "name": "initialize", + "name": "setApprovalForAll", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { - "inputs": [], - "name": "nextNftType", + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", "outputs": [ { - "internalType": "uint32", + "internalType": "bool", "name": "", - "type": "uint32" + "type": "bool" } ], "stateMutability": "view", @@ -12309,12 +11926,12 @@ }, { "inputs": [], - "name": "nft", + "name": "symbol", "outputs": [ { - "internalType": "contract ProvableNFT", + "internalType": "string", "name": "", - "type": "address" + "type": "string" } ], "stateMutability": "view", @@ -12323,30 +11940,17 @@ { "inputs": [ { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "name": "projectIdToControlPool", - "outputs": [ - { - "internalType": "contract DirectPaymentsPool", - "name": "", - "type": "address" + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" } ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "proxiableUUID", + "name": "tokenURI", "outputs": [ { - "internalType": "bytes32", + "internalType": "string", "name": "", - "type": "bytes32" + "type": "string" } ], "stateMutability": "view", @@ -12356,217 +11960,307 @@ "inputs": [ { "internalType": "address", - "name": "", + "name": "from", "type": "address" - } - ], - "name": "registry", - "outputs": [ - { - "internalType": "string", - "name": "ipfs", - "type": "string" }, { - "internalType": "bool", - "name": "isVerified", - "type": "bool" + "internalType": "address", + "name": "to", + "type": "address" }, { - "internalType": "string", - "name": "projectId", - "type": "string" + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" } ], - "stateMutability": "view", + "name": "transferFrom", + "outputs": [], + "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, { "internalType": "address", - "name": "account", + "name": "newImplementation", "type": "address" } ], - "name": "renounceRole", + "name": "upgradeTo", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, { "internalType": "address", - "name": "account", + "name": "newImplementation", "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" } ], - "name": "revokeRole", + "name": "upgradeToAndCall", "outputs": [], - "stateMutability": "nonpayable", + "stateMutability": "payable", "type": "function" }, { "inputs": [ { "internalType": "address", - "name": "_feeRecipient", + "name": "_logic", "type": "address" }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "stateMutability": "payable", + "type": "constructor" + } + ] + }, + "ProvableNFT_Implementation": { + "address": "0x851356ae760d987E095750cCeb3bC6014560891C", + "abi": [ + { + "inputs": [ + { + "internalType": "bytes32", + "name": "dataHash", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "tokenId", + "type": "bytes32" + } + ], + "name": "BAD_DATAHASH", + "type": "error" + }, + { + "inputs": [], + "name": "BAD_NFTTYPE", + "type": "error" + }, + { + "inputs": [ { "internalType": "uint32", - "name": "_feeBps", + "name": "", "type": "uint32" } ], - "name": "setFeeInfo", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "name": "NOT_MANAGER", + "type": "error" + }, + { + "inputs": [], + "name": "NOT_MINTER", + "type": "error" }, { + "anonymous": false, "inputs": [ { - "internalType": "contract DirectPaymentsPool", - "name": "_pool", + "indexed": false, + "internalType": "address", + "name": "previousAdmin", "type": "address" }, { - "internalType": "bool", - "name": "_isVerified", - "type": "bool" + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" } ], - "name": "setVerified", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "name": "AdminChanged", + "type": "event" }, { + "anonymous": false, "inputs": [ { - "internalType": "bytes4", - "name": "interfaceId", - "type": "bytes4" + "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": "supportsInterface", - "outputs": [ + "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": "", + "name": "approved", "type": "bool" } ], - "stateMutability": "view", - "type": "function" + "name": "ApprovalForAll", + "type": "event" }, { + "anonymous": false, "inputs": [ { + "indexed": true, "internalType": "address", - "name": "_impl", + "name": "beacon", "type": "address" } ], - "name": "updateImpl", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "name": "BeaconUpgraded", + "type": "event" }, { + "anonymous": false, "inputs": [ { - "internalType": "address", - "name": "newImplementation", - "type": "address" + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" } ], - "name": "upgradeTo", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "name": "Initialized", + "type": "event" }, { + "anonymous": false, "inputs": [ { + "indexed": false, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "indexed": false, "internalType": "address", - "name": "newImplementation", + "name": "to", "type": "address" }, { - "internalType": "bytes", - "name": "data", - "type": "bytes" + "indexed": false, + "internalType": "bytes32", + "name": "nftDataHash", + "type": "bytes32" } ], - "name": "upgradeToAndCall", - "outputs": [], - "stateMutability": "payable", - "type": "function" - } - ] - }, - "DirectPaymentsFactory_Proxy": { - "address": "0x58b5E37c5aFad520dD93E92A5D11B8721A9115F0", - "abi": [ + "name": "ProvableNftMinted", + "type": "event" + }, { + "anonymous": false, "inputs": [ { - "internalType": "address", - "name": "_logic", - "type": "address" + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" }, { - "internalType": "bytes", - "name": "_data", - "type": "bytes" + "indexed": true, + "internalType": "bytes32", + "name": "previousAdminRole", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "newAdminRole", + "type": "bytes32" } ], - "stateMutability": "payable", - "type": "constructor" + "name": "RoleAdminChanged", + "type": "event" }, { "anonymous": false, "inputs": [ { - "indexed": false, + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, "internalType": "address", - "name": "previousAdmin", + "name": "account", "type": "address" }, { - "indexed": false, + "indexed": true, "internalType": "address", - "name": "newAdmin", + "name": "sender", "type": "address" } ], - "name": "AdminChanged", + "name": "RoleGranted", "type": "event" }, { "anonymous": false, "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, { "indexed": true, "internalType": "address", - "name": "beacon", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", "type": "address" } ], - "name": "BeaconUpgraded", + "name": "RoleRevoked", "type": "event" }, { @@ -12575,325 +12269,475 @@ { "indexed": true, "internalType": "address", - "name": "implementation", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" } ], - "name": "Upgraded", + "name": "Transfer", "type": "event" }, { - "stateMutability": "payable", - "type": "fallback" - }, - { - "stateMutability": "payable", - "type": "receive" - } - ] - }, - "DirectPaymentsPool": { - "address": "0xB8cc664aC448dBd6a16247849a454F1D0a7448Bc", - "abi": [ - { + "anonymous": false, "inputs": [ { - "internalType": "contract ISuperfluid", - "name": "_host", - "type": "address" - }, - { - "internalType": "contract IV3SwapRouter", - "name": "_swapRouter", + "indexed": true, + "internalType": "address", + "name": "implementation", "type": "address" } ], - "stateMutability": "nonpayable", - "type": "constructor" + "name": "Upgraded", + "type": "event" }, { - "inputs": [ + "inputs": [], + "name": "DEFAULT_ADMIN_ROLE", + "outputs": [ { - "internalType": "uint256", + "internalType": "bytes32", "name": "", - "type": "uint256" + "type": "bytes32" } ], - "name": "ALREADY_CLAIMED", - "type": "error" + "stateMutability": "view", + "type": "function" }, { "inputs": [], - "name": "EMPTY_MANAGER", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "int96", - "name": "curFeeRate", - "type": "int96" - }, + "name": "MINTER_ROLE", + "outputs": [ { - "internalType": "int96", - "name": "newFeeRate", - "type": "int96" + "internalType": "bytes32", + "name": "", + "type": "bytes32" } ], - "name": "FEE_FLOW_FAILED", - "type": "error" + "stateMutability": "view", + "type": "function" }, { "inputs": [ { - "internalType": "int96", - "name": "flowRate", - "type": "int96" + "internalType": "address", + "name": "_manager", + "type": "address" + }, + { + "internalType": "uint32", + "name": "_nftType", + "type": "uint32" } ], - "name": "MIN_FLOWRATE", - "type": "error" - }, - { - "inputs": [], - "name": "NFTTYPE_CHANGED", - "type": "error" + "name": "addManager", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, { "internalType": "uint256", - "name": "", + "name": "tokenId", "type": "uint256" } ], - "name": "NFT_MISSING", - "type": "error" - }, - { - "inputs": [], - "name": "NOT_MANAGER", - "type": "error" - }, - { - "inputs": [], - "name": "NO_BALANCE", - "type": "error" - }, - { - "inputs": [], - "name": "NotAcceptedSuperToken", - "type": "error" - }, - { - "inputs": [], - "name": "NotImplemented", - "type": "error" + "name": "approve", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { "inputs": [ { "internalType": "address", - "name": "", + "name": "owner", "type": "address" } ], - "name": "ONLY_HOST_OR_SENDER", - "type": "error" - }, - { - "inputs": [], - "name": "OVER_GLOBAL_LIMITS", - "type": "error" + "name": "balanceOf", + "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" } ], - "name": "OVER_MEMBER_LIMITS", - "type": "error" - }, - { - "inputs": [], - "name": "UNSUPPORTED_NFT", - "type": "error" - }, - { - "inputs": [], - "name": "UNSUPPORTED_TOKEN", - "type": "error" - }, - { - "inputs": [], - "name": "UnauthorizedHost", - "type": "error" - }, - { - "inputs": [], - "name": "ZERO_ADDRESS", - "type": "error" - }, - { - "inputs": [], - "name": "ZERO_AMOUNT", - "type": "error" + "stateMutability": "view", + "type": "function" }, { - "anonymous": false, "inputs": [ { - "indexed": false, - "internalType": "address", - "name": "previousAdmin", - "type": "address" - }, + "internalType": "uint32", + "name": "_nftType", + "type": "uint32" + } + ], + "name": "getManagerRole", + "outputs": [ { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" + "internalType": "bytes32", + "name": "roleHash", + "type": "bytes32" } ], - "name": "AdminChanged", - "type": "event" + "stateMutability": "pure", + "type": "function" }, { - "anonymous": false, "inputs": [ { - "indexed": true, - "internalType": "address", - "name": "beacon", - "type": "address" + "internalType": "uint256", + "name": "_tokenId", + "type": "uint256" } ], - "name": "BeaconUpgraded", - "type": "event" + "name": "getNFTData", + "outputs": [ + { + "components": [ + { + "internalType": "uint32", + "name": "nftType", + "type": "uint32" + }, + { + "internalType": "uint16", + "name": "version", + "type": "uint16" + }, + { + "internalType": "string", + "name": "nftUri", + "type": "string" + }, + { + "components": [ + { + "internalType": "uint16", + "name": "subtype", + "type": "uint16" + }, + { + "internalType": "uint32", + "name": "timestamp", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "quantity", + "type": "uint256" + }, + { + "internalType": "string", + "name": "eventUri", + "type": "string" + }, + { + "internalType": "address[]", + "name": "contributers", + "type": "address[]" + }, + { + "internalType": "uint128", + "name": "rewardOverride", + "type": "uint128" + } + ], + "internalType": "struct ProvableNFT.EventData[]", + "name": "events", + "type": "tuple[]" + } + ], + "internalType": "struct ProvableNFT.NFTData", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" }, { - "anonymous": false, "inputs": [ { - "indexed": true, "internalType": "uint256", - "name": "tokenId", + "name": "_tokenId", "type": "uint256" }, { - "indexed": false, - "internalType": "uint16", - "name": "eventType", - "type": "uint16" - }, + "internalType": "uint256", + "name": "_index", + "type": "uint256" + } + ], + "name": "getNFTEvent", + "outputs": [ { - "indexed": false, - "internalType": "uint32", - "name": "eventTimestamp", - "type": "uint32" - }, + "components": [ + { + "internalType": "uint16", + "name": "subtype", + "type": "uint16" + }, + { + "internalType": "uint32", + "name": "timestamp", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "quantity", + "type": "uint256" + }, + { + "internalType": "string", + "name": "eventUri", + "type": "string" + }, + { + "internalType": "address[]", + "name": "contributers", + "type": "address[]" + }, + { + "internalType": "uint128", + "name": "rewardOverride", + "type": "uint128" + } + ], + "internalType": "struct ProvableNFT.EventData", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ { - "indexed": false, "internalType": "uint256", - "name": "eventQuantity", + "name": "_tokenId", "type": "uint256" - }, + } + ], + "name": "getNFTEvents", + "outputs": [ + { + "components": [ + { + "internalType": "uint16", + "name": "subtype", + "type": "uint16" + }, + { + "internalType": "uint32", + "name": "timestamp", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "quantity", + "type": "uint256" + }, + { + "internalType": "string", + "name": "eventUri", + "type": "string" + }, + { + "internalType": "address[]", + "name": "contributers", + "type": "address[]" + }, + { + "internalType": "uint128", + "name": "rewardOverride", + "type": "uint128" + } + ], + "internalType": "struct ProvableNFT.EventData[]", + "name": "", + "type": "tuple[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ { - "indexed": false, - "internalType": "string", - "name": "eventUri", - "type": "string" - }, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + } + ], + "name": "getRoleAdmin", + "outputs": [ { - "indexed": false, - "internalType": "address[]", - "name": "contributers", - "type": "address[]" + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" }, { - "indexed": false, - "internalType": "uint256", - "name": "rewardPerContributer", - "type": "uint256" + "internalType": "address", + "name": "account", + "type": "address" } ], - "name": "EventRewardClaimed", - "type": "event" + "name": "grantRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - "anonymous": false, "inputs": [ { - "indexed": false, - "internalType": "uint8", - "name": "version", - "type": "uint8" + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" } ], - "name": "Initialized", - "type": "event" + "name": "hasRole", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" }, { - "anonymous": false, "inputs": [ { - "indexed": true, - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" + "internalType": "string", + "name": "_name", + "type": "string" }, { - "indexed": false, - "internalType": "uint256", - "name": "totalRewards", - "type": "uint256" + "internalType": "string", + "name": "_symbol", + "type": "string" } ], - "name": "NFTClaimed", - "type": "event" + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - "anonymous": false, "inputs": [ { - "indexed": false, "internalType": "address", - "name": "contributer", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "operator", "type": "address" } ], - "name": "NOT_MEMBER_OR_WHITELISTED", - "type": "event" + "name": "isApprovedForAll", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" }, { - "anonymous": false, "inputs": [ { - "indexed": true, "internalType": "address", - "name": "pool", + "name": "_to", "type": "address" }, { - "indexed": true, "internalType": "string", - "name": "projectId", + "name": "_uri", "type": "string" }, { - "indexed": false, - "internalType": "string", - "name": "ipfs", - "type": "string" - }, + "internalType": "bytes32", + "name": "_nftDataHash", + "type": "bytes32" + } + ], + "name": "mint", + "outputs": [ { - "indexed": true, - "internalType": "uint32", - "name": "nftType", - "type": "uint32" + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_to", + "type": "address" }, { "components": [ @@ -12903,106 +12747,118 @@ "type": "uint32" }, { - "internalType": "uint16[]", - "name": "validEvents", - "type": "uint16[]" - }, - { - "internalType": "uint128[]", - "name": "rewardPerEvent", - "type": "uint128[]" - }, - { - "internalType": "address", - "name": "manager", - "type": "address" - }, - { - "internalType": "contract IMembersValidator", - "name": "membersValidator", - "type": "address" - }, - { - "internalType": "contract IIdentityV2", - "name": "uniquenessValidator", - "type": "address" + "internalType": "uint16", + "name": "version", + "type": "uint16" }, { - "internalType": "contract IERC20Upgradeable", - "name": "rewardToken", - "type": "address" + "internalType": "string", + "name": "nftUri", + "type": "string" }, { - "internalType": "bool", - "name": "allowRewardOverride", - "type": "bool" + "components": [ + { + "internalType": "uint16", + "name": "subtype", + "type": "uint16" + }, + { + "internalType": "uint32", + "name": "timestamp", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "quantity", + "type": "uint256" + }, + { + "internalType": "string", + "name": "eventUri", + "type": "string" + }, + { + "internalType": "address[]", + "name": "contributers", + "type": "address[]" + }, + { + "internalType": "uint128", + "name": "rewardOverride", + "type": "uint128" + } + ], + "internalType": "struct ProvableNFT.EventData[]", + "name": "events", + "type": "tuple[]" } ], - "indexed": false, - "internalType": "struct DirectPaymentsPool.PoolSettings", - "name": "poolSettings", + "internalType": "struct ProvableNFT.NFTData", + "name": "_nftData", "type": "tuple" }, { - "components": [ - { - "internalType": "uint256", - "name": "maxTotalPerMonth", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "maxMemberPerMonth", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "maxMemberPerDay", - "type": "uint256" - } - ], - "indexed": false, - "internalType": "struct DirectPaymentsPool.SafetyLimits", - "name": "poolLimits", - "type": "tuple" + "internalType": "bool", + "name": "_withStore", + "type": "bool" + }, + { + "internalType": "bytes", + "name": "_callData", + "type": "bytes" + } + ], + "name": "mintPermissioned", + "outputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" } ], - "name": "PoolCreated", - "type": "event" + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" }, { - "anonymous": false, "inputs": [ { - "components": [ - { - "internalType": "uint256", - "name": "maxTotalPerMonth", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "maxMemberPerMonth", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "maxMemberPerDay", - "type": "uint256" - } - ], - "indexed": false, - "internalType": "struct DirectPaymentsPool.SafetyLimits", - "name": "limits", - "type": "tuple" + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" } ], - "name": "PoolLimitsChanged", - "type": "event" + "name": "ownerOf", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" }, { - "anonymous": false, "inputs": [ + { + "internalType": "uint256", + "name": "_tokenId", + "type": "uint256" + }, { "components": [ { @@ -13011,189 +12867,255 @@ "type": "uint32" }, { - "internalType": "uint16[]", - "name": "validEvents", - "type": "uint16[]" + "internalType": "uint16", + "name": "version", + "type": "uint16" }, { - "internalType": "uint128[]", - "name": "rewardPerEvent", - "type": "uint128[]" + "internalType": "string", + "name": "nftUri", + "type": "string" }, { - "internalType": "address", - "name": "manager", - "type": "address" - }, + "components": [ + { + "internalType": "uint16", + "name": "subtype", + "type": "uint16" + }, + { + "internalType": "uint32", + "name": "timestamp", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "quantity", + "type": "uint256" + }, + { + "internalType": "string", + "name": "eventUri", + "type": "string" + }, + { + "internalType": "address[]", + "name": "contributers", + "type": "address[]" + }, + { + "internalType": "uint128", + "name": "rewardOverride", + "type": "uint128" + } + ], + "internalType": "struct ProvableNFT.EventData[]", + "name": "events", + "type": "tuple[]" + } + ], + "internalType": "struct ProvableNFT.NFTData", + "name": "_nftData", + "type": "tuple" + } + ], + "name": "proveNFTData", + "outputs": [ + { + "components": [ { - "internalType": "contract IMembersValidator", - "name": "membersValidator", - "type": "address" + "internalType": "uint32", + "name": "nftType", + "type": "uint32" }, { - "internalType": "contract IIdentityV2", - "name": "uniquenessValidator", - "type": "address" + "internalType": "uint16", + "name": "version", + "type": "uint16" }, { - "internalType": "contract IERC20Upgradeable", - "name": "rewardToken", - "type": "address" + "internalType": "string", + "name": "nftUri", + "type": "string" }, { - "internalType": "bool", - "name": "allowRewardOverride", - "type": "bool" + "components": [ + { + "internalType": "uint16", + "name": "subtype", + "type": "uint16" + }, + { + "internalType": "uint32", + "name": "timestamp", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "quantity", + "type": "uint256" + }, + { + "internalType": "string", + "name": "eventUri", + "type": "string" + }, + { + "internalType": "address[]", + "name": "contributers", + "type": "address[]" + }, + { + "internalType": "uint128", + "name": "rewardOverride", + "type": "uint128" + } + ], + "internalType": "struct ProvableNFT.EventData[]", + "name": "events", + "type": "tuple[]" } ], - "indexed": false, - "internalType": "struct DirectPaymentsPool.PoolSettings", - "name": "settings", + "internalType": "struct ProvableNFT.NFTData", + "name": "data", "type": "tuple" } ], - "name": "PoolSettingsChanged", - "type": "event" + "stateMutability": "view", + "type": "function" }, { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "previousAdminRole", - "type": "bytes32" - }, + "inputs": [], + "name": "proxiableUUID", + "outputs": [ { - "indexed": true, "internalType": "bytes32", - "name": "newAdminRole", + "name": "", "type": "bytes32" } ], - "name": "RoleAdminChanged", - "type": "event" + "stateMutability": "view", + "type": "function" }, { - "anonymous": false, "inputs": [ { - "indexed": true, "internalType": "bytes32", "name": "role", "type": "bytes32" }, { - "indexed": true, "internalType": "address", "name": "account", "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" } ], - "name": "RoleGranted", - "type": "event" + "name": "renounceRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - "anonymous": false, "inputs": [ { - "indexed": true, "internalType": "bytes32", "name": "role", "type": "bytes32" }, { - "indexed": true, "internalType": "address", "name": "account", "type": "address" + } + ], + "name": "revokeRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" }, { - "indexed": true, "internalType": "address", - "name": "sender", + "name": "to", "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" } - ], - "name": "RoleRevoked", - "type": "event" + ], + "name": "safeTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - "anonymous": false, "inputs": [ { - "indexed": true, "internalType": "address", - "name": "supporter", + "name": "from", "type": "address" }, { - "indexed": false, - "internalType": "uint256", - "name": "previousContribution", - "type": "uint256" + "internalType": "address", + "name": "to", + "type": "address" }, { - "indexed": false, "internalType": "uint256", - "name": "contribution", + "name": "tokenId", "type": "uint256" }, { - "indexed": false, - "internalType": "int96", - "name": "previousFlowRate", - "type": "int96" - }, + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "safeTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ { - "indexed": false, - "internalType": "int96", - "name": "flowRate", - "type": "int96" + "internalType": "address", + "name": "operator", + "type": "address" }, { - "indexed": false, "internalType": "bool", - "name": "isFlowUpdate", + "name": "approved", "type": "bool" } ], - "name": "SupporterUpdated", - "type": "event" + "name": "setApprovalForAll", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - "anonymous": false, "inputs": [ { - "indexed": true, - "internalType": "address", - "name": "implementation", - "type": "address" + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" } ], - "name": "Upgraded", - "type": "event" - }, - { - "inputs": [], - "name": "CFAV1_TYPE", + "name": "supportsInterface", "outputs": [ { - "internalType": "bytes32", + "internalType": "bool", "name": "", - "type": "bytes32" + "type": "bool" } ], "stateMutability": "view", @@ -13201,764 +13123,785 @@ }, { "inputs": [], - "name": "DEFAULT_ADMIN_ROLE", + "name": "symbol", "outputs": [ { - "internalType": "bytes32", + "internalType": "string", "name": "", - "type": "bytes32" + "type": "string" } ], "stateMutability": "view", "type": "function" }, { - "inputs": [], - "name": "MANAGER_ROLE", - "outputs": [ + "inputs": [ { - "internalType": "bytes32", - "name": "", - "type": "bytes32" + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" } ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "MEMBER_ROLE", + "name": "tokenURI", "outputs": [ { - "internalType": "bytes32", + "internalType": "string", "name": "", - "type": "bytes32" + "type": "string" } ], "stateMutability": "view", "type": "function" }, { - "inputs": [], - "name": "MINTER_ROLE", - "outputs": [ + "inputs": [ { - "internalType": "bytes32", - "name": "", - "type": "bytes32" + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" } ], - "stateMutability": "view", + "name": "transferFrom", + "outputs": [], + "stateMutability": "nonpayable", "type": "function" }, { - "inputs": [], - "name": "MIN_FLOW_RATE", - "outputs": [ + "inputs": [ { - "internalType": "int96", - "name": "", - "type": "int96" + "internalType": "address", + "name": "newImplementation", + "type": "address" } ], - "stateMutability": "view", + "name": "upgradeTo", + "outputs": [], + "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ - { - "internalType": "contract ISuperToken", - "name": "superToken", - "type": "address" - }, { "internalType": "address", - "name": "", + "name": "newImplementation", "type": "address" }, - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - }, { "internalType": "bytes", - "name": "agreementData", + "name": "data", "type": "bytes" + } + ], + "name": "upgradeToAndCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + } + ] + }, + "ProvableNFT_Proxy": { + "address": "0xf5059a5D33d5853360D16C683c16e67980206f36", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_logic", + "type": "address" }, { "internalType": "bytes", - "name": "", + "name": "_data", "type": "bytes" + } + ], + "stateMutability": "payable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "previousAdmin", + "type": "address" }, { - "internalType": "bytes", - "name": "ctx", - "type": "bytes" + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "AdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "beacon", + "type": "address" + } + ], + "name": "BeaconUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ] + }, + "SuperFluidResolver": { + "address": "0x02330b5Be8EBD0D4d354813a7BB535140A77C881", + "abi": [] + }, + "SwapRouterMock": { + "address": "0xc3e53F4d16Ae77Db1c982e75a937B9f60FE63690", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "bytes", + "name": "path", + "type": "bytes" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amountIn", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountOutMinimum", + "type": "uint256" + } + ], + "internalType": "struct IV3SwapRouter.ExactInputParams", + "name": "params", + "type": "tuple" } ], - "name": "afterAgreementCreated", + "name": "exactInput", "outputs": [ { - "internalType": "bytes", - "name": "newCtx", - "type": "bytes" + "internalType": "uint256", + "name": "amountOut", + "type": "uint256" } ], - "stateMutability": "nonpayable", + "stateMutability": "payable", "type": "function" }, { "inputs": [ { - "internalType": "contract ISuperToken", - "name": "superToken", - "type": "address" - }, - { - "internalType": "address", - "name": "agreementClass", - "type": "address" - }, - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - }, - { - "internalType": "bytes", - "name": "agreementData", - "type": "bytes" - }, - { - "internalType": "bytes", - "name": "cbdata", - "type": "bytes" - }, - { - "internalType": "bytes", - "name": "ctx", - "type": "bytes" + "components": [ + { + "internalType": "address", + "name": "tokenIn", + "type": "address" + }, + { + "internalType": "address", + "name": "tokenOut", + "type": "address" + }, + { + "internalType": "uint24", + "name": "fee", + "type": "uint24" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amountIn", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountOutMinimum", + "type": "uint256" + }, + { + "internalType": "uint160", + "name": "sqrtPriceLimitX96", + "type": "uint160" + } + ], + "internalType": "struct IV3SwapRouter.ExactInputSingleParams", + "name": "params", + "type": "tuple" } ], - "name": "afterAgreementTerminated", + "name": "exactInputSingle", "outputs": [ { - "internalType": "bytes", - "name": "newCtx", - "type": "bytes" + "internalType": "uint256", + "name": "amountOut", + "type": "uint256" } ], - "stateMutability": "nonpayable", + "stateMutability": "payable", "type": "function" - }, + } + ] + }, + "UBIPool": { + "address": "0x4826533B4897376654Bb4d4AD88B7faFD0C98528", + "abi": [ { "inputs": [ { - "internalType": "contract ISuperToken", - "name": "superToken", + "internalType": "contract ISuperfluid", + "name": "_host", "type": "address" }, { - "internalType": "address", - "name": "", + "internalType": "contract IV3SwapRouter", + "name": "_swapRouter", "type": "address" - }, - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - }, - { - "internalType": "bytes", - "name": "agreementData", - "type": "bytes" - }, - { - "internalType": "bytes", - "name": "cbdata", - "type": "bytes" - }, - { - "internalType": "bytes", - "name": "ctx", - "type": "bytes" - } - ], - "name": "afterAgreementUpdated", - "outputs": [ - { - "internalType": "bytes", - "name": "newCtx", - "type": "bytes" } ], "stateMutability": "nonpayable", - "type": "function" + "type": "constructor" }, { "inputs": [ - { - "internalType": "contract ISuperToken", - "name": "superToken", - "type": "address" - }, { "internalType": "address", - "name": "agreementClass", + "name": "whitelistedRoot", "type": "address" - }, - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - }, + } + ], + "name": "ALREADY_CLAIMED", + "type": "error" + }, + { + "inputs": [], + "name": "CLAIMFOR_DISABLED", + "type": "error" + }, + { + "inputs": [], + "name": "EMPTY_MANAGER", + "type": "error" + }, + { + "inputs": [ { - "internalType": "bytes", - "name": "", - "type": "bytes" + "internalType": "int96", + "name": "curFeeRate", + "type": "int96" }, { - "internalType": "bytes", - "name": "", - "type": "bytes" + "internalType": "int96", + "name": "newFeeRate", + "type": "int96" } ], - "name": "beforeAgreementCreated", - "outputs": [ + "name": "FEE_FLOW_FAILED", + "type": "error" + }, + { + "inputs": [], + "name": "INVALID_0_VALUE", + "type": "error" + }, + { + "inputs": [], + "name": "MAX_CLAIMERS_REACHED", + "type": "error" + }, + { + "inputs": [ { - "internalType": "bytes", - "name": "", - "type": "bytes" + "internalType": "int96", + "name": "flowRate", + "type": "int96" } ], - "stateMutability": "view", - "type": "function" + "name": "MIN_FLOWRATE", + "type": "error" }, { "inputs": [ - { - "internalType": "contract ISuperToken", - "name": "superToken", - "type": "address" - }, { "internalType": "address", - "name": "agreementClass", + "name": "claimer", "type": "address" - }, - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - }, - { - "internalType": "bytes", - "name": "agreementData", - "type": "bytes" - }, - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "name": "beforeAgreementTerminated", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" } ], - "stateMutability": "view", - "type": "function" + "name": "NOT_MEMBER", + "type": "error" }, { "inputs": [ - { - "internalType": "contract ISuperToken", - "name": "superToken", - "type": "address" - }, { "internalType": "address", - "name": "agreementClass", + "name": "whitelistedRoot", "type": "address" - }, - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - }, - { - "internalType": "bytes", - "name": "agreementData", - "type": "bytes" - }, - { - "internalType": "bytes", - "name": "", - "type": "bytes" } ], - "name": "beforeAgreementUpdated", - "outputs": [ + "name": "NOT_WHITELISTED", + "type": "error" + }, + { + "inputs": [], + "name": "NotAcceptedSuperToken", + "type": "error" + }, + { + "inputs": [], + "name": "NotImplemented", + "type": "error" + }, + { + "inputs": [ { - "internalType": "bytes", + "internalType": "address", "name": "", - "type": "bytes" + "type": "address" } ], - "stateMutability": "view", - "type": "function" + "name": "ONLY_HOST_OR_SENDER", + "type": "error" }, { "inputs": [], - "name": "cfaV1", - "outputs": [ + "name": "UNSUPPORTED_TOKEN", + "type": "error" + }, + { + "inputs": [], + "name": "UnauthorizedHost", + "type": "error" + }, + { + "inputs": [], + "name": "ZERO_ADDRESS", + "type": "error" + }, + { + "inputs": [], + "name": "ZERO_AMOUNT", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ { - "internalType": "contract ISuperfluid", - "name": "host", + "indexed": false, + "internalType": "address", + "name": "previousAdmin", "type": "address" }, { - "internalType": "contract IConstantFlowAgreementV1", - "name": "cfa", + "indexed": false, + "internalType": "address", + "name": "newAdmin", "type": "address" } ], - "stateMutability": "view", - "type": "function" + "name": "AdminChanged", + "type": "event" }, { + "anonymous": false, "inputs": [ { - "internalType": "uint256", - "name": "_nftId", - "type": "uint256" + "indexed": true, + "internalType": "address", + "name": "beacon", + "type": "address" } ], - "name": "claim", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "name": "BeaconUpgraded", + "type": "event" }, { + "anonymous": false, "inputs": [ { - "internalType": "uint256", - "name": "_nftId", - "type": "uint256" - }, + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ { "components": [ { - "internalType": "uint32", - "name": "nftType", - "type": "uint32" + "internalType": "address", + "name": "manager", + "type": "address" }, { - "internalType": "uint16", - "name": "version", - "type": "uint16" + "internalType": "contract IMembersValidator", + "name": "membersValidator", + "type": "address" }, { - "internalType": "string", - "name": "nftUri", - "type": "string" + "internalType": "contract IIdentityV2", + "name": "uniquenessValidator", + "type": "address" }, { - "components": [ - { - "internalType": "uint16", - "name": "subtype", - "type": "uint16" - }, - { - "internalType": "uint32", - "name": "timestamp", - "type": "uint32" - }, - { - "internalType": "uint256", - "name": "quantity", - "type": "uint256" - }, - { - "internalType": "string", - "name": "eventUri", - "type": "string" - }, - { - "internalType": "address[]", - "name": "contributers", - "type": "address[]" - }, - { - "internalType": "uint128", - "name": "rewardOverride", - "type": "uint128" - } - ], - "internalType": "struct ProvableNFT.EventData[]", - "name": "events", - "type": "tuple[]" + "internalType": "contract IERC20Upgradeable", + "name": "rewardToken", + "type": "address" } ], - "internalType": "struct ProvableNFT.NFTData", - "name": "_data", + "indexed": false, + "internalType": "struct UBIPool.PoolSettings", + "name": "settings", "type": "tuple" } ], - "name": "claim", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "name": "PoolSettingsChanged", + "type": "event" }, { + "anonymous": false, "inputs": [ { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "claimedNfts", - "outputs": [ + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, { - "internalType": "bool", - "name": "", - "type": "bool" + "indexed": true, + "internalType": "bytes32", + "name": "previousAdminRole", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "newAdminRole", + "type": "bytes32" } ], - "stateMutability": "view", - "type": "function" + "name": "RoleAdminChanged", + "type": "event" }, { + "anonymous": false, "inputs": [ { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, "internalType": "address", - "name": "_user", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", "type": "address" } ], - "name": "getRealtimeContribution", - "outputs": [ + "name": "RoleGranted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ { - "internalType": "uint256", - "name": "", - "type": "uint256" + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" } ], - "stateMutability": "view", - "type": "function" + "name": "RoleRevoked", + "type": "event" }, { - "inputs": [], - "name": "getRealtimeStats", - "outputs": [ + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "supporter", + "type": "address" + }, { + "indexed": false, "internalType": "uint256", - "name": "netIncome", + "name": "previousContribution", "type": "uint256" }, { + "indexed": false, "internalType": "uint256", - "name": "totalFees", + "name": "contribution", "type": "uint256" }, { + "indexed": false, "internalType": "int96", - "name": "incomeFlowRate", + "name": "previousFlowRate", "type": "int96" }, { + "indexed": false, "internalType": "int96", - "name": "feeRate", + "name": "flowRate", "type": "int96" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getRegistry", - "outputs": [ + }, { - "internalType": "contract DirectPaymentsFactory", - "name": "", - "type": "address" + "indexed": false, + "internalType": "bool", + "name": "isFlowUpdate", + "type": "bool" } ], - "stateMutability": "view", - "type": "function" + "name": "SupporterUpdated", + "type": "event" }, { + "anonymous": false, "inputs": [ { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleAdmin", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "globalLimits", - "outputs": [ - { - "internalType": "uint128", - "name": "daily", - "type": "uint128" + "indexed": false, + "internalType": "uint256", + "name": "day", + "type": "uint256" }, { - "internalType": "uint128", - "name": "monthly", - "type": "uint128" + "indexed": false, + "internalType": "uint256", + "name": "dailyUbi", + "type": "uint256" }, { - "internalType": "uint128", - "name": "total", - "type": "uint128" + "indexed": false, + "internalType": "uint256", + "name": "blockNumber", + "type": "uint256" }, { - "internalType": "uint64", - "name": "lastReward", - "type": "uint64" + "indexed": false, + "internalType": "uint256", + "name": "periodClaimers", + "type": "uint256" }, { - "internalType": "uint64", - "name": "lastMonth", - "type": "uint64" + "indexed": false, + "internalType": "uint256", + "name": "periodDistributed", + "type": "uint256" } ], - "stateMutability": "view", - "type": "function" + "name": "UBICalculated", + "type": "event" }, { + "anonymous": false, "inputs": [ { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { + "indexed": true, "internalType": "address", - "name": "account", + "name": "whitelistedRoot", "type": "address" - } - ], - "name": "grantRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "address", - "name": "swapFrom", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "minReturn", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "path", - "type": "bytes" - } - ], - "internalType": "struct HelperLibrary.SwapData", - "name": "_customData", - "type": "tuple" }, { + "indexed": true, "internalType": "address", - "name": "_sender", + "name": "claimer", "type": "address" }, { - "internalType": "bytes", - "name": "_ctx", - "type": "bytes" - } - ], - "name": "handleSwap", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" } ], - "stateMutability": "nonpayable", - "type": "function" + "name": "UBIClaimed", + "type": "event" }, { + "anonymous": false, "inputs": [ { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" + "indexed": false, + "internalType": "uint256", + "name": "day", + "type": "uint256" }, { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "hasRole", - "outputs": [ + "indexed": false, + "internalType": "uint256", + "name": "pool", + "type": "uint256" + }, { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "host", - "outputs": [ + "indexed": false, + "internalType": "uint256", + "name": "cycleLength", + "type": "uint256" + }, { - "internalType": "contract ISuperfluid", - "name": "", - "type": "address" + "indexed": false, + "internalType": "uint256", + "name": "dailyUBIPool", + "type": "uint256" } ], - "stateMutability": "view", - "type": "function" + "name": "UBICycleCalculated", + "type": "event" }, { + "anonymous": false, "inputs": [ - { - "internalType": "contract ProvableNFT", - "name": "_nft", - "type": "address" - }, { "components": [ { "internalType": "uint32", - "name": "nftType", - "type": "uint32" - }, - { - "internalType": "uint16[]", - "name": "validEvents", - "type": "uint16[]" - }, - { - "internalType": "uint128[]", - "name": "rewardPerEvent", - "type": "uint128[]" - }, - { - "internalType": "address", - "name": "manager", - "type": "address" - }, - { - "internalType": "contract IMembersValidator", - "name": "membersValidator", - "type": "address" + "name": "cycleLengthDays", + "type": "uint32" }, { - "internalType": "contract IIdentityV2", - "name": "uniquenessValidator", - "type": "address" + "internalType": "uint32", + "name": "claimPeriodDays", + "type": "uint32" }, { - "internalType": "contract IERC20Upgradeable", - "name": "rewardToken", - "type": "address" + "internalType": "uint32", + "name": "minActiveUsers", + "type": "uint32" }, { "internalType": "bool", - "name": "allowRewardOverride", + "name": "claimForEnabled", "type": "bool" - } - ], - "internalType": "struct DirectPaymentsPool.PoolSettings", - "name": "_settings", - "type": "tuple" - }, - { - "components": [ + }, { "internalType": "uint256", - "name": "maxTotalPerMonth", + "name": "maxClaimAmount", "type": "uint256" }, { - "internalType": "uint256", - "name": "maxMemberPerMonth", - "type": "uint256" + "internalType": "uint32", + "name": "maxClaimers", + "type": "uint32" }, { - "internalType": "uint256", - "name": "maxMemberPerDay", - "type": "uint256" + "internalType": "bool", + "name": "onlyMembers", + "type": "bool" } ], - "internalType": "struct DirectPaymentsPool.SafetyLimits", - "name": "_limits", + "indexed": false, + "internalType": "struct UBIPool.UBISettings", + "name": "settings", "type": "tuple" - }, - { - "internalType": "contract DirectPaymentsFactory", - "name": "_registry", - "type": "address" } ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "name": "UBISettingsChanged", + "type": "event" }, { + "anonymous": false, "inputs": [ { - "internalType": "contract ISuperToken", - "name": "_superToken", + "indexed": true, + "internalType": "address", + "name": "implementation", "type": "address" } ], - "name": "isAcceptedSuperToken", + "name": "Upgraded", + "type": "event" + }, + { + "inputs": [], + "name": "CFAV1_TYPE", "outputs": [ { - "internalType": "bool", + "internalType": "bytes32", "name": "", - "type": "bool" + "type": "bytes32" } ], "stateMutability": "view", @@ -13966,151 +13909,51 @@ }, { "inputs": [], - "name": "limits", + "name": "DEFAULT_ADMIN_ROLE", "outputs": [ { - "internalType": "uint256", - "name": "maxTotalPerMonth", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "maxMemberPerMonth", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "maxMemberPerDay", - "type": "uint256" + "internalType": "bytes32", + "name": "", + "type": "bytes32" } ], "stateMutability": "view", "type": "function" }, { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "memberLimits", + "inputs": [], + "name": "MANAGER_ROLE", "outputs": [ { - "internalType": "uint128", - "name": "daily", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "monthly", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "total", - "type": "uint128" - }, - { - "internalType": "uint64", - "name": "lastReward", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "lastMonth", - "type": "uint64" + "internalType": "bytes32", + "name": "", + "type": "bytes32" } ], "stateMutability": "view", "type": "function" }, { - "inputs": [ - { - "internalType": "address", - "name": "_to", - "type": "address" - }, - { - "components": [ - { - "internalType": "uint32", - "name": "nftType", - "type": "uint32" - }, - { - "internalType": "uint16", - "name": "version", - "type": "uint16" - }, - { - "internalType": "string", - "name": "nftUri", - "type": "string" - }, - { - "components": [ - { - "internalType": "uint16", - "name": "subtype", - "type": "uint16" - }, - { - "internalType": "uint32", - "name": "timestamp", - "type": "uint32" - }, - { - "internalType": "uint256", - "name": "quantity", - "type": "uint256" - }, - { - "internalType": "string", - "name": "eventUri", - "type": "string" - }, - { - "internalType": "address[]", - "name": "contributers", - "type": "address[]" - }, - { - "internalType": "uint128", - "name": "rewardOverride", - "type": "uint128" - } - ], - "internalType": "struct ProvableNFT.EventData[]", - "name": "events", - "type": "tuple[]" - } - ], - "internalType": "struct ProvableNFT.NFTData", - "name": "_nftData", - "type": "tuple" - }, + "inputs": [], + "name": "MEMBER_ROLE", + "outputs": [ { - "internalType": "bool", - "name": "withClaim", - "type": "bool" + "internalType": "bytes32", + "name": "", + "type": "bytes32" } ], - "name": "mintNFT", - "outputs": [], - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { "inputs": [], - "name": "nft", + "name": "MIN_FLOW_RATE", "outputs": [ { - "internalType": "contract ProvableNFT", + "internalType": "int96", "name": "", - "type": "address" + "type": "int96" } ], "stateMutability": "view", @@ -14120,31 +13963,21 @@ "inputs": [ { "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "internalType": "address", - "name": "from", + "name": "member", "type": "address" }, - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - }, { "internalType": "bytes", - "name": "data", + "name": "extraData", "type": "bytes" } ], - "name": "onERC721Received", + "name": "addMember", "outputs": [ { - "internalType": "bytes4", - "name": "", - "type": "bytes4" + "internalType": "bool", + "name": "isMember", + "type": "bool" } ], "stateMutability": "nonpayable", @@ -14152,259 +13985,209 @@ }, { "inputs": [ + { + "internalType": "contract ISuperToken", + "name": "superToken", + "type": "address" + }, { "internalType": "address", - "name": "_sender", + "name": "", "type": "address" }, { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" + "internalType": "bytes32", + "name": "", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "agreementData", + "type": "bytes" }, { "internalType": "bytes", "name": "", "type": "bytes" + }, + { + "internalType": "bytes", + "name": "ctx", + "type": "bytes" } ], - "name": "onTokenTransfer", + "name": "afterAgreementCreated", "outputs": [ { - "internalType": "bool", - "name": "", - "type": "bool" + "internalType": "bytes", + "name": "newCtx", + "type": "bytes" } ], "stateMutability": "nonpayable", "type": "function" }, { - "inputs": [], - "name": "proxiableUUID", - "outputs": [ + "inputs": [ + { + "internalType": "contract ISuperToken", + "name": "superToken", + "type": "address" + }, + { + "internalType": "address", + "name": "agreementClass", + "type": "address" + }, { "internalType": "bytes32", "name": "", "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "agreementData", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "cbdata", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "ctx", + "type": "bytes" } ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "registry", + "name": "afterAgreementTerminated", "outputs": [ { - "internalType": "contract DirectPaymentsFactory", - "name": "", - "type": "address" + "internalType": "bytes", + "name": "newCtx", + "type": "bytes" } ], - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" + "internalType": "contract ISuperToken", + "name": "superToken", + "type": "address" }, { "internalType": "address", - "name": "account", + "name": "", "type": "address" - } - ], - "name": "renounceRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ + }, { "internalType": "bytes32", - "name": "role", + "name": "", "type": "bytes32" }, { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "revokeRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ + "internalType": "bytes", + "name": "agreementData", + "type": "bytes" + }, { - "components": [ - { - "internalType": "uint256", - "name": "maxTotalPerMonth", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "maxMemberPerMonth", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "maxMemberPerDay", - "type": "uint256" - } - ], - "internalType": "struct DirectPaymentsPool.SafetyLimits", - "name": "_limits", - "type": "tuple" + "internalType": "bytes", + "name": "cbdata", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "ctx", + "type": "bytes" } ], - "name": "setPoolLimits", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ + "name": "afterAgreementUpdated", + "outputs": [ { - "components": [ - { - "internalType": "uint32", - "name": "nftType", - "type": "uint32" - }, - { - "internalType": "uint16[]", - "name": "validEvents", - "type": "uint16[]" - }, - { - "internalType": "uint128[]", - "name": "rewardPerEvent", - "type": "uint128[]" - }, - { - "internalType": "address", - "name": "manager", - "type": "address" - }, - { - "internalType": "contract IMembersValidator", - "name": "membersValidator", - "type": "address" - }, - { - "internalType": "contract IIdentityV2", - "name": "uniquenessValidator", - "type": "address" - }, - { - "internalType": "contract IERC20Upgradeable", - "name": "rewardToken", - "type": "address" - }, - { - "internalType": "bool", - "name": "allowRewardOverride", - "type": "bool" - } - ], - "internalType": "struct DirectPaymentsPool.PoolSettings", - "name": "_settings", - "type": "tuple" + "internalType": "bytes", + "name": "newCtx", + "type": "bytes" } ], - "name": "setPoolSettings", - "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { - "inputs": [], - "name": "settings", - "outputs": [ + "inputs": [ { - "internalType": "uint32", - "name": "nftType", - "type": "uint32" + "internalType": "contract ISuperToken", + "name": "superToken", + "type": "address" }, { "internalType": "address", - "name": "manager", + "name": "agreementClass", "type": "address" }, { - "internalType": "contract IMembersValidator", - "name": "membersValidator", - "type": "address" + "internalType": "bytes32", + "name": "", + "type": "bytes32" }, { - "internalType": "contract IIdentityV2", - "name": "uniquenessValidator", - "type": "address" + "internalType": "bytes", + "name": "", + "type": "bytes" }, { - "internalType": "contract IERC20Upgradeable", - "name": "rewardToken", - "type": "address" - }, + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "beforeAgreementCreated", + "outputs": [ { - "internalType": "bool", - "name": "allowRewardOverride", - "type": "bool" + "internalType": "bytes", + "name": "", + "type": "bytes" } ], "stateMutability": "view", "type": "function" }, { - "inputs": [], - "name": "stats", - "outputs": [ + "inputs": [ { - "internalType": "uint256", - "name": "netIncome", - "type": "uint256" + "internalType": "contract ISuperToken", + "name": "superToken", + "type": "address" }, { - "internalType": "uint256", - "name": "totalFees", - "type": "uint256" + "internalType": "address", + "name": "agreementClass", + "type": "address" }, { - "internalType": "uint256", - "name": "lastUpdate", - "type": "uint256" + "internalType": "bytes32", + "name": "", + "type": "bytes32" }, { - "internalType": "address", - "name": "lastFeeRecipient", - "type": "address" + "internalType": "bytes", + "name": "agreementData", + "type": "bytes" }, { - "internalType": "int96", - "name": "lastIncomeRate", - "type": "int96" + "internalType": "bytes", + "name": "", + "type": "bytes" } ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "superToken", + "name": "beforeAgreementTerminated", "outputs": [ { - "internalType": "contract ISuperToken", + "internalType": "bytes", "name": "", - "type": "address" + "type": "bytes" } ], "stateMutability": "view", @@ -14412,23 +14195,33 @@ }, { "inputs": [ + { + "internalType": "contract ISuperToken", + "name": "superToken", + "type": "address" + }, { "internalType": "address", - "name": "_sender", + "name": "agreementClass", "type": "address" }, { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" + "internalType": "bytes32", + "name": "", + "type": "bytes32" }, { "internalType": "bytes", - "name": "_ctx", + "name": "agreementData", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "", "type": "bytes" } ], - "name": "support", + "name": "beforeAgreementUpdated", "outputs": [ { "internalType": "bytes", @@ -14436,33 +14229,22 @@ "type": "bytes" } ], - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "supporters", + "inputs": [], + "name": "cfaV1", "outputs": [ { - "internalType": "uint256", - "name": "contribution", - "type": "uint256" - }, - { - "internalType": "int96", - "name": "flowRate", - "type": "int96" + "internalType": "contract ISuperfluid", + "name": "host", + "type": "address" }, { - "internalType": "uint128", - "name": "lastUpdated", - "type": "uint128" + "internalType": "contract IConstantFlowAgreementV1", + "name": "cfa", + "type": "address" } ], "stateMutability": "view", @@ -14471,17 +14253,17 @@ { "inputs": [ { - "internalType": "bytes4", - "name": "interfaceId", - "type": "bytes4" + "internalType": "address", + "name": "_member", + "type": "address" } ], - "name": "supportsInterface", + "name": "checkEntitlement", "outputs": [ { - "internalType": "bool", + "internalType": "uint256", "name": "", - "type": "bool" + "type": "uint256" } ], "stateMutability": "view", @@ -14489,26 +14271,20 @@ }, { "inputs": [], - "name": "swapRouter", + "name": "checkEntitlement", "outputs": [ { - "internalType": "contract IV3SwapRouter", + "internalType": "uint256", "name": "", - "type": "address" + "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "upgradeTo", + "inputs": [], + "name": "claim", "outputs": [], "stateMutability": "nonpayable", "type": "function" @@ -14517,112 +14293,49 @@ "inputs": [ { "internalType": "address", - "name": "newImplementation", + "name": "claimer", "type": "address" }, { - "internalType": "bytes", - "name": "data", - "type": "bytes" + "internalType": "bool", + "name": "sendToWhitelistedRoot", + "type": "bool" } ], - "name": "upgradeToAndCall", + "name": "claimFor", "outputs": [], - "stateMutability": "payable", + "stateMutability": "nonpayable", "type": "function" }, { - "inputs": [ + "inputs": [], + "name": "currentDayInCycle", + "outputs": [ { - "internalType": "bytes", - "name": "data", - "type": "bytes" + "internalType": "uint256", + "name": "", + "type": "uint256" } ], - "name": "upgradeToLatest", - "outputs": [], - "stateMutability": "payable", + "stateMutability": "view", "type": "function" - } - ] - }, - "HelperLibrary": { - "address": "0xE5a388DF47839BbC6227f52FB622DeB523079Aa8", - "abi": [ + }, { - "inputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "netIncome", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "totalFees", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "lastUpdate", - "type": "uint256" - }, - { - "internalType": "address", - "name": "lastFeeRecipient", - "type": "address" - }, - { - "internalType": "int96", - "name": "lastIncomeRate", - "type": "int96" - } - ], - "internalType": "struct IGoodCollectiveSuperApp.Stats", - "name": "stats", - "type": "tuple" - }, - { - "internalType": "contract ISuperToken", - "name": "superToken", - "type": "ISuperToken" - } - ], - "name": "getRealtimeStats", + "inputs": [], + "name": "estimateNextDailyUBI", "outputs": [ { "internalType": "uint256", - "name": "netIncome", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "totalFees", + "name": "", "type": "uint256" - }, - { - "internalType": "int96", - "name": "incomeFlowRate", - "type": "int96" - }, - { - "internalType": "int96", - "name": "feeRate", - "type": "int96" } ], "stateMutability": "view", "type": "function" - } - ] - }, - "MultiClaimModule": { - "address": "0xE6Af17143015aAA030c8aCd81811e72AC6046c0e", - "abi": [ + }, { "inputs": [], - "name": "getModuleTypes", + "name": "getCurrentDay", "outputs": [ { "internalType": "uint256", @@ -14636,547 +14349,619 @@ { "inputs": [ { - "internalType": "uint256", - "name": "typeID", - "type": "uint256" + "internalType": "address", + "name": "_user", + "type": "address" } ], - "name": "isModuleType", + "name": "getRealtimeContribution", "outputs": [ { - "internalType": "bool", + "internalType": "uint256", "name": "", - "type": "bool" + "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { - "inputs": [ + "inputs": [], + "name": "getRealtimeStats", + "outputs": [ { - "internalType": "address[]", - "name": "contracts", - "type": "address[]" + "internalType": "uint256", + "name": "netIncome", + "type": "uint256" }, { - "internalType": "contract IERC20Upgradeable", - "name": "token", - "type": "address" + "internalType": "uint256", + "name": "totalFees", + "type": "uint256" }, { - "internalType": "address", - "name": "recipient", - "type": "address" + "internalType": "int96", + "name": "incomeFlowRate", + "type": "int96" + }, + { + "internalType": "int96", + "name": "feeRate", + "type": "int96" } ], - "name": "multiClaim", + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getRegistry", "outputs": [ { - "internalType": "bool[]", - "name": "success", - "type": "bool[]" + "internalType": "contract IRegistry", + "name": "", + "type": "address" } ], - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { "inputs": [ { - "internalType": "bytes", - "name": "data", - "type": "bytes" + "internalType": "bytes32", + "name": "role", + "type": "bytes32" } ], - "name": "onInstall", - "outputs": [], - "stateMutability": "nonpayable", + "name": "getRoleAdmin", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", "type": "function" }, { "inputs": [ { - "internalType": "bytes", - "name": "data", - "type": "bytes" + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" } ], - "name": "onUninstall", + "name": "grantRole", "outputs": [], "stateMutability": "nonpayable", "type": "function" - } - ] - }, - "ProvableNFT": { - "address": "0x2AF5DB8249229ba696E0bac1a382aDb1fee040A6", - "abi": [ + }, { - "anonymous": false, "inputs": [ { - "indexed": false, - "internalType": "address", - "name": "previousAdmin", - "type": "address" + "components": [ + { + "internalType": "address", + "name": "swapFrom", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "minReturn", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "path", + "type": "bytes" + } + ], + "internalType": "struct HelperLibrary.SwapData", + "name": "_customData", + "type": "tuple" }, { - "indexed": false, "internalType": "address", - "name": "newAdmin", + "name": "_sender", "type": "address" + }, + { + "internalType": "bytes", + "name": "_ctx", + "type": "bytes" } ], - "name": "AdminChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ + "name": "handleSwap", + "outputs": [ { - "indexed": true, - "internalType": "address", - "name": "beacon", - "type": "address" + "internalType": "bytes", + "name": "", + "type": "bytes" } ], - "name": "BeaconUpgraded", - "type": "event" + "stateMutability": "nonpayable", + "type": "function" }, { - "anonymous": false, "inputs": [ { - "indexed": true, "internalType": "address", - "name": "implementation", + "name": "_member", "type": "address" } ], - "name": "Upgraded", - "type": "event" - }, - { - "stateMutability": "payable", - "type": "fallback" - }, - { - "stateMutability": "payable", - "type": "receive" + "name": "hasClaimed", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" }, { "inputs": [ { "internalType": "bytes32", - "name": "dataHash", + "name": "role", "type": "bytes32" }, { - "internalType": "bytes32", - "name": "tokenId", - "type": "bytes32" + "internalType": "address", + "name": "account", + "type": "address" } ], - "name": "BAD_DATAHASH", - "type": "error" - }, - { - "inputs": [], - "name": "BAD_NFTTYPE", - "type": "error" - }, - { - "inputs": [ + "name": "hasRole", + "outputs": [ { - "internalType": "uint32", + "internalType": "bool", "name": "", - "type": "uint32" + "type": "bool" } ], - "name": "NOT_MANAGER", - "type": "error" + "stateMutability": "view", + "type": "function" }, { "inputs": [], - "name": "NOT_MINTER", - "type": "error" + "name": "host", + "outputs": [ + { + "internalType": "contract ISuperfluid", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" }, { - "anonymous": false, "inputs": [ { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" + "components": [ + { + "internalType": "address", + "name": "manager", + "type": "address" + }, + { + "internalType": "contract IMembersValidator", + "name": "membersValidator", + "type": "address" + }, + { + "internalType": "contract IIdentityV2", + "name": "uniquenessValidator", + "type": "address" + }, + { + "internalType": "contract IERC20Upgradeable", + "name": "rewardToken", + "type": "address" + } + ], + "internalType": "struct UBIPool.PoolSettings", + "name": "_settings", + "type": "tuple" }, { - "indexed": true, - "internalType": "address", - "name": "approved", - "type": "address" + "components": [ + { + "internalType": "uint32", + "name": "cycleLengthDays", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "claimPeriodDays", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "minActiveUsers", + "type": "uint32" + }, + { + "internalType": "bool", + "name": "claimForEnabled", + "type": "bool" + }, + { + "internalType": "uint256", + "name": "maxClaimAmount", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "maxClaimers", + "type": "uint32" + }, + { + "internalType": "bool", + "name": "onlyMembers", + "type": "bool" + } + ], + "internalType": "struct UBIPool.UBISettings", + "name": "_ubiSettings", + "type": "tuple" }, { - "indexed": true, - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" + "internalType": "contract UBIPoolFactory", + "name": "_registry", + "type": "address" } ], - "name": "Approval", - "type": "event" + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - "anonymous": false, "inputs": [ { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "operator", + "internalType": "contract ISuperToken", + "name": "_superToken", "type": "address" - }, + } + ], + "name": "isAcceptedSuperToken", + "outputs": [ { - "indexed": false, "internalType": "bool", - "name": "approved", + "name": "", "type": "bool" } - ], - "name": "ApprovalForAll", - "type": "event" + ], + "stateMutability": "view", + "type": "function" }, { - "anonymous": false, - "inputs": [ + "inputs": [], + "name": "nextClaimTime", + "outputs": [ { - "indexed": false, - "internalType": "uint8", - "name": "version", - "type": "uint8" + "internalType": "uint256", + "name": "", + "type": "uint256" } ], - "name": "Initialized", - "type": "event" + "stateMutability": "view", + "type": "function" }, { - "anonymous": false, "inputs": [ { - "indexed": false, + "internalType": "address", + "name": "_sender", + "type": "address" + }, + { "internalType": "uint256", - "name": "tokenId", + "name": "_amount", "type": "uint256" }, { - "indexed": false, - "internalType": "address", - "name": "to", - "type": "address" - }, + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onTokenTransfer", + "outputs": [ { - "indexed": false, - "internalType": "bytes32", - "name": "nftDataHash", - "type": "bytes32" + "internalType": "bool", + "name": "", + "type": "bool" } ], - "name": "ProvableNftMinted", - "type": "event" + "stateMutability": "nonpayable", + "type": "function" }, { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, + "inputs": [], + "name": "proxiableUUID", + "outputs": [ { - "indexed": true, "internalType": "bytes32", - "name": "previousAdminRole", + "name": "", "type": "bytes32" - }, + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "registry", + "outputs": [ { - "indexed": true, - "internalType": "bytes32", - "name": "newAdminRole", - "type": "bytes32" + "internalType": "contract UBIPoolFactory", + "name": "", + "type": "address" } ], - "name": "RoleAdminChanged", - "type": "event" + "stateMutability": "view", + "type": "function" }, { - "anonymous": false, "inputs": [ { - "indexed": true, "internalType": "bytes32", "name": "role", "type": "bytes32" }, { - "indexed": true, "internalType": "address", "name": "account", "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" } ], - "name": "RoleGranted", - "type": "event" + "name": "renounceRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - "anonymous": false, "inputs": [ { - "indexed": true, "internalType": "bytes32", "name": "role", "type": "bytes32" }, { - "indexed": true, "internalType": "address", "name": "account", "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" } ], - "name": "RoleRevoked", - "type": "event" + "name": "revokeRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - "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" + "components": [ + { + "internalType": "address", + "name": "manager", + "type": "address" + }, + { + "internalType": "contract IMembersValidator", + "name": "membersValidator", + "type": "address" + }, + { + "internalType": "contract IIdentityV2", + "name": "uniquenessValidator", + "type": "address" + }, + { + "internalType": "contract IERC20Upgradeable", + "name": "rewardToken", + "type": "address" + } + ], + "internalType": "struct UBIPool.PoolSettings", + "name": "_settings", + "type": "tuple" } ], - "name": "Transfer", - "type": "event" + "name": "setPoolSettings", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - "inputs": [], - "name": "DEFAULT_ADMIN_ROLE", - "outputs": [ + "inputs": [ { - "internalType": "bytes32", - "name": "", - "type": "bytes32" + "components": [ + { + "internalType": "uint32", + "name": "cycleLengthDays", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "claimPeriodDays", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "minActiveUsers", + "type": "uint32" + }, + { + "internalType": "bool", + "name": "claimForEnabled", + "type": "bool" + }, + { + "internalType": "uint256", + "name": "maxClaimAmount", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "maxClaimers", + "type": "uint32" + }, + { + "internalType": "bool", + "name": "onlyMembers", + "type": "bool" + } + ], + "internalType": "struct UBIPool.UBISettings", + "name": "_ubiSettings", + "type": "tuple" } ], - "stateMutability": "view", + "name": "setUBISettings", + "outputs": [], + "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], - "name": "MINTER_ROLE", + "name": "settings", "outputs": [ { - "internalType": "bytes32", - "name": "", - "type": "bytes32" + "internalType": "address", + "name": "manager", + "type": "address" + }, + { + "internalType": "contract IMembersValidator", + "name": "membersValidator", + "type": "address" + }, + { + "internalType": "contract IIdentityV2", + "name": "uniquenessValidator", + "type": "address" + }, + { + "internalType": "contract IERC20Upgradeable", + "name": "rewardToken", + "type": "address" } ], "stateMutability": "view", "type": "function" }, { - "inputs": [ + "inputs": [], + "name": "stats", + "outputs": [ + { + "internalType": "uint256", + "name": "netIncome", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "totalFees", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "lastUpdate", + "type": "uint256" + }, { "internalType": "address", - "name": "_manager", + "name": "lastFeeRecipient", "type": "address" }, { - "internalType": "uint32", - "name": "_nftType", - "type": "uint32" + "internalType": "int96", + "name": "lastIncomeRate", + "type": "int96" } ], - "name": "addManager", - "outputs": [], - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { - "inputs": [ + "inputs": [], + "name": "status", + "outputs": [ { - "internalType": "address", - "name": "to", - "type": "address" + "internalType": "uint256", + "name": "currentDay", + "type": "uint256" }, { "internalType": "uint256", - "name": "tokenId", + "name": "dailyUbi", "type": "uint256" - } - ], - "name": "approve", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ + }, { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ + "internalType": "uint256", + "name": "dailyCyclePool", + "type": "uint256" + }, { "internalType": "uint256", - "name": "", + "name": "startOfCycle", "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ + }, { "internalType": "uint256", - "name": "tokenId", + "name": "currentCycleLength", "type": "uint256" - } - ], - "name": "getApproved", - "outputs": [ + }, { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ + "internalType": "uint256", + "name": "periodClaimers", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "periodDistributed", + "type": "uint256" + }, { "internalType": "uint32", - "name": "_nftType", + "name": "claimersCount", "type": "uint32" } ], - "name": "getManagerRole", - "outputs": [ - { - "internalType": "bytes32", - "name": "roleHash", - "type": "bytes32" - } - ], - "stateMutability": "pure", + "stateMutability": "view", "type": "function" }, { - "inputs": [ - { - "internalType": "uint256", - "name": "_tokenId", - "type": "uint256" - } - ], - "name": "getNFTData", + "inputs": [], + "name": "superToken", "outputs": [ { - "components": [ - { - "internalType": "uint32", - "name": "nftType", - "type": "uint32" - }, - { - "internalType": "uint16", - "name": "version", - "type": "uint16" - }, - { - "internalType": "string", - "name": "nftUri", - "type": "string" - }, - { - "components": [ - { - "internalType": "uint16", - "name": "subtype", - "type": "uint16" - }, - { - "internalType": "uint32", - "name": "timestamp", - "type": "uint32" - }, - { - "internalType": "uint256", - "name": "quantity", - "type": "uint256" - }, - { - "internalType": "string", - "name": "eventUri", - "type": "string" - }, - { - "internalType": "address[]", - "name": "contributers", - "type": "address[]" - }, - { - "internalType": "uint128", - "name": "rewardOverride", - "type": "uint128" - } - ], - "internalType": "struct ProvableNFT.EventData[]", - "name": "events", - "type": "tuple[]" - } - ], - "internalType": "struct ProvableNFT.NFTData", + "internalType": "contract ISuperToken", "name": "", - "type": "tuple" + "type": "address" } ], "stateMutability": "view", @@ -15185,161 +14970,126 @@ { "inputs": [ { - "internalType": "uint256", - "name": "_tokenId", - "type": "uint256" + "internalType": "address", + "name": "_sender", + "type": "address" }, { "internalType": "uint256", - "name": "_index", + "name": "_amount", "type": "uint256" + }, + { + "internalType": "bytes", + "name": "_ctx", + "type": "bytes" } ], - "name": "getNFTEvent", + "name": "support", "outputs": [ { - "components": [ - { - "internalType": "uint16", - "name": "subtype", - "type": "uint16" - }, - { - "internalType": "uint32", - "name": "timestamp", - "type": "uint32" - }, - { - "internalType": "uint256", - "name": "quantity", - "type": "uint256" - }, - { - "internalType": "string", - "name": "eventUri", - "type": "string" - }, - { - "internalType": "address[]", - "name": "contributers", - "type": "address[]" - }, - { - "internalType": "uint128", - "name": "rewardOverride", - "type": "uint128" - } - ], - "internalType": "struct ProvableNFT.EventData", + "internalType": "bytes", "name": "", - "type": "tuple" + "type": "bytes" } ], - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { - "internalType": "uint256", - "name": "_tokenId", - "type": "uint256" - } - ], - "name": "getNFTEvents", - "outputs": [ + "internalType": "address", + "name": "_sender", + "type": "address" + }, { "components": [ { - "internalType": "uint16", - "name": "subtype", - "type": "uint16" - }, - { - "internalType": "uint32", - "name": "timestamp", - "type": "uint32" + "internalType": "address", + "name": "swapFrom", + "type": "address" }, { "internalType": "uint256", - "name": "quantity", + "name": "amount", "type": "uint256" }, { - "internalType": "string", - "name": "eventUri", - "type": "string" - }, - { - "internalType": "address[]", - "name": "contributers", - "type": "address[]" + "internalType": "uint256", + "name": "minReturn", + "type": "uint256" }, { - "internalType": "uint128", - "name": "rewardOverride", - "type": "uint128" + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "path", + "type": "bytes" } ], - "internalType": "struct ProvableNFT.EventData[]", - "name": "", - "type": "tuple[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ + "internalType": "struct HelperLibrary.SwapData", + "name": "_customData", + "type": "tuple" + }, { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" + "internalType": "bytes", + "name": "_ctx", + "type": "bytes" } ], - "name": "getRoleAdmin", + "name": "supportWithSwap", "outputs": [ { - "internalType": "bytes32", + "internalType": "bytes", "name": "", - "type": "bytes32" + "type": "bytes" } ], - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, { "internalType": "address", - "name": "account", + "name": "", "type": "address" } ], - "name": "grantRole", - "outputs": [], - "stateMutability": "nonpayable", + "name": "supporters", + "outputs": [ + { + "internalType": "uint256", + "name": "contribution", + "type": "uint256" + }, + { + "internalType": "int96", + "name": "flowRate", + "type": "int96" + }, + { + "internalType": "uint128", + "name": "lastUpdated", + "type": "uint128" + } + ], + "stateMutability": "view", "type": "function" }, { "inputs": [ { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" } ], - "name": "hasRole", + "name": "supportsInterface", "outputs": [ { "internalType": "bool", @@ -15351,41 +15101,55 @@ "type": "function" }, { - "inputs": [ - { - "internalType": "string", - "name": "_name", - "type": "string" - }, + "inputs": [], + "name": "swapRouter", + "outputs": [ { - "internalType": "string", - "name": "_symbol", - "type": "string" + "internalType": "contract IV3SwapRouter", + "name": "", + "type": "address" } ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { - "inputs": [ + "inputs": [], + "name": "ubiSettings", + "outputs": [ { - "internalType": "address", - "name": "owner", - "type": "address" + "internalType": "uint32", + "name": "cycleLengthDays", + "type": "uint32" }, { - "internalType": "address", - "name": "operator", - "type": "address" - } - ], - "name": "isApprovedForAll", - "outputs": [ + "internalType": "uint32", + "name": "claimPeriodDays", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "minActiveUsers", + "type": "uint32" + }, { "internalType": "bool", - "name": "", + "name": "claimForEnabled", + "type": "bool" + }, + { + "internalType": "uint256", + "name": "maxClaimAmount", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "maxClaimers", + "type": "uint32" + }, + { + "internalType": "bool", + "name": "onlyMembers", "type": "bool" } ], @@ -15396,28 +15160,12 @@ "inputs": [ { "internalType": "address", - "name": "_to", + "name": "newImplementation", "type": "address" - }, - { - "internalType": "string", - "name": "_uri", - "type": "string" - }, - { - "internalType": "bytes32", - "name": "_nftDataHash", - "type": "bytes32" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" } ], + "name": "upgradeTo", + "outputs": [], "stateMutability": "nonpayable", "type": "function" }, @@ -15425,322 +15173,376 @@ "inputs": [ { "internalType": "address", - "name": "_to", + "name": "newImplementation", "type": "address" }, { - "components": [ - { - "internalType": "uint32", - "name": "nftType", - "type": "uint32" - }, - { - "internalType": "uint16", - "name": "version", - "type": "uint16" - }, - { - "internalType": "string", - "name": "nftUri", - "type": "string" - }, - { - "components": [ - { - "internalType": "uint16", - "name": "subtype", - "type": "uint16" - }, - { - "internalType": "uint32", - "name": "timestamp", - "type": "uint32" - }, - { - "internalType": "uint256", - "name": "quantity", - "type": "uint256" - }, - { - "internalType": "string", - "name": "eventUri", - "type": "string" - }, - { - "internalType": "address[]", - "name": "contributers", - "type": "address[]" - }, - { - "internalType": "uint128", - "name": "rewardOverride", - "type": "uint128" - } - ], - "internalType": "struct ProvableNFT.EventData[]", - "name": "events", - "type": "tuple[]" - } - ], - "internalType": "struct ProvableNFT.NFTData", - "name": "_nftData", - "type": "tuple" - }, - { - "internalType": "bool", - "name": "_withStore", - "type": "bool" - }, + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "upgradeToAndCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ { "internalType": "bytes", - "name": "_callData", + "name": "data", "type": "bytes" } ], - "name": "mintPermissioned", - "outputs": [ + "name": "upgradeToLatest", + "outputs": [], + "stateMutability": "payable", + "type": "function" + } + ] + }, + "UBIPoolFactory": { + "address": "0x0E801D84Fa97b50751Dbf25036d067dCf18858bF", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "previousAdmin", + "type": "address" + }, { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" } ], - "stateMutability": "nonpayable", - "type": "function" + "name": "AdminChanged", + "type": "event" }, { - "inputs": [], - "name": "name", - "outputs": [ + "anonymous": false, + "inputs": [ { - "internalType": "string", - "name": "", - "type": "string" + "indexed": true, + "internalType": "address", + "name": "beacon", + "type": "address" } ], - "stateMutability": "view", - "type": "function" + "name": "BeaconUpgraded", + "type": "event" }, { + "anonymous": false, "inputs": [ { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" } ], - "name": "ownerOf", - "outputs": [ + "name": "Upgraded", + "type": "event" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "stateMutability": "payable", + "type": "receive" + }, + { + "inputs": [], + "name": "NOT_POOL", + "type": "error" + }, + { + "inputs": [], + "name": "NOT_PROJECT_OWNER", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ { - "internalType": "address", - "name": "", - "type": "address" + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" } ], - "stateMutability": "view", - "type": "function" + "name": "Initialized", + "type": "event" }, { + "anonymous": false, "inputs": [ { - "internalType": "uint256", - "name": "_tokenId", - "type": "uint256" + "indexed": true, + "internalType": "address", + "name": "pool", + "type": "address" + }, + { + "indexed": true, + "internalType": "string", + "name": "projectId", + "type": "string" + }, + { + "indexed": false, + "internalType": "string", + "name": "ipfs", + "type": "string" }, { "components": [ { - "internalType": "uint32", - "name": "nftType", - "type": "uint32" + "internalType": "address", + "name": "manager", + "type": "address" }, { - "internalType": "uint16", - "name": "version", - "type": "uint16" + "internalType": "contract IMembersValidator", + "name": "membersValidator", + "type": "address" }, { - "internalType": "string", - "name": "nftUri", - "type": "string" + "internalType": "contract IIdentityV2", + "name": "uniquenessValidator", + "type": "address" }, { - "components": [ - { - "internalType": "uint16", - "name": "subtype", - "type": "uint16" - }, - { - "internalType": "uint32", - "name": "timestamp", - "type": "uint32" - }, - { - "internalType": "uint256", - "name": "quantity", - "type": "uint256" - }, - { - "internalType": "string", - "name": "eventUri", - "type": "string" - }, - { - "internalType": "address[]", - "name": "contributers", - "type": "address[]" - }, - { - "internalType": "uint128", - "name": "rewardOverride", - "type": "uint128" - } - ], - "internalType": "struct ProvableNFT.EventData[]", - "name": "events", - "type": "tuple[]" + "internalType": "contract IERC20Upgradeable", + "name": "rewardToken", + "type": "address" } ], - "internalType": "struct ProvableNFT.NFTData", - "name": "_nftData", + "indexed": false, + "internalType": "struct UBIPool.PoolSettings", + "name": "poolSettings", "type": "tuple" - } - ], - "name": "proveNFTData", - "outputs": [ + }, { "components": [ { "internalType": "uint32", - "name": "nftType", + "name": "cycleLengthDays", "type": "uint32" }, { - "internalType": "uint16", - "name": "version", - "type": "uint16" + "internalType": "uint32", + "name": "claimPeriodDays", + "type": "uint32" }, { - "internalType": "string", - "name": "nftUri", - "type": "string" + "internalType": "uint32", + "name": "minActiveUsers", + "type": "uint32" }, { - "components": [ - { - "internalType": "uint16", - "name": "subtype", - "type": "uint16" - }, - { - "internalType": "uint32", - "name": "timestamp", - "type": "uint32" - }, - { - "internalType": "uint256", - "name": "quantity", - "type": "uint256" - }, - { - "internalType": "string", - "name": "eventUri", - "type": "string" - }, - { - "internalType": "address[]", - "name": "contributers", - "type": "address[]" - }, - { - "internalType": "uint128", - "name": "rewardOverride", - "type": "uint128" - } - ], - "internalType": "struct ProvableNFT.EventData[]", - "name": "events", - "type": "tuple[]" + "internalType": "bool", + "name": "claimForEnabled", + "type": "bool" + }, + { + "internalType": "uint256", + "name": "maxClaimAmount", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "maxClaimers", + "type": "uint32" + }, + { + "internalType": "bool", + "name": "onlyMembers", + "type": "bool" } ], - "internalType": "struct ProvableNFT.NFTData", - "name": "data", + "indexed": false, + "internalType": "struct UBIPool.UBISettings", + "name": "poolLimits", "type": "tuple" } ], - "stateMutability": "view", - "type": "function" + "name": "PoolCreated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "pool", + "type": "address" + }, + { + "indexed": false, + "internalType": "string", + "name": "ipfs", + "type": "string" + } + ], + "name": "PoolDetailsChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "pool", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "isVerified", + "type": "bool" + } + ], + "name": "PoolVerifiedChanged", + "type": "event" }, { - "inputs": [], - "name": "proxiableUUID", - "outputs": [ + "anonymous": false, + "inputs": [ { + "indexed": true, "internalType": "bytes32", - "name": "", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "previousAdminRole", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "newAdminRole", "type": "bytes32" } ], - "stateMutability": "view", - "type": "function" + "name": "RoleAdminChanged", + "type": "event" }, { + "anonymous": false, "inputs": [ { + "indexed": true, "internalType": "bytes32", "name": "role", "type": "bytes32" }, { + "indexed": true, "internalType": "address", "name": "account", "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" } ], - "name": "renounceRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "name": "RoleGranted", + "type": "event" }, { + "anonymous": false, "inputs": [ { + "indexed": true, "internalType": "bytes32", "name": "role", "type": "bytes32" }, { + "indexed": true, "internalType": "address", "name": "account", "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" } ], - "name": "revokeRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "name": "RoleRevoked", + "type": "event" }, { + "anonymous": false, "inputs": [ { + "indexed": true, "internalType": "address", - "name": "from", + "name": "impl", "type": "address" - }, + } + ], + "name": "UpdatedImpl", + "type": "event" + }, + { + "inputs": [], + "name": "DEFAULT_ADMIN_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ { "internalType": "address", - "name": "to", + "name": "account", + "type": "address" + } + ], + "name": "addMember", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract UBIPool", + "name": "_pool", "type": "address" }, { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" + "internalType": "string", + "name": "_ipfs", + "type": "string" } ], - "name": "safeTransferFrom", + "name": "changePoolDetails", "outputs": [], "stateMutability": "nonpayable", "type": "function" @@ -15748,63 +15550,197 @@ { "inputs": [ { - "internalType": "address", - "name": "from", - "type": "address" + "internalType": "string", + "name": "_projectId", + "type": "string" }, { - "internalType": "address", - "name": "to", + "internalType": "string", + "name": "_ipfs", + "type": "string" + }, + { + "components": [ + { + "internalType": "address", + "name": "manager", + "type": "address" + }, + { + "internalType": "contract IMembersValidator", + "name": "membersValidator", + "type": "address" + }, + { + "internalType": "contract IIdentityV2", + "name": "uniquenessValidator", + "type": "address" + }, + { + "internalType": "contract IERC20Upgradeable", + "name": "rewardToken", + "type": "address" + } + ], + "internalType": "struct UBIPool.PoolSettings", + "name": "_settings", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "uint32", + "name": "cycleLengthDays", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "claimPeriodDays", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "minActiveUsers", + "type": "uint32" + }, + { + "internalType": "bool", + "name": "claimForEnabled", + "type": "bool" + }, + { + "internalType": "uint256", + "name": "maxClaimAmount", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "maxClaimers", + "type": "uint32" + }, + { + "internalType": "bool", + "name": "onlyMembers", + "type": "bool" + } + ], + "internalType": "struct UBIPool.UBISettings", + "name": "_limits", + "type": "tuple" + } + ], + "name": "createManagedPool", + "outputs": [ + { + "internalType": "contract UBIPool", + "name": "pool", "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "_projectId", + "type": "string" }, { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" + "internalType": "string", + "name": "_ipfs", + "type": "string" }, { - "internalType": "bytes", - "name": "data", - "type": "bytes" + "components": [ + { + "internalType": "address", + "name": "manager", + "type": "address" + }, + { + "internalType": "contract IMembersValidator", + "name": "membersValidator", + "type": "address" + }, + { + "internalType": "contract IIdentityV2", + "name": "uniquenessValidator", + "type": "address" + }, + { + "internalType": "contract IERC20Upgradeable", + "name": "rewardToken", + "type": "address" + } + ], + "internalType": "struct UBIPool.PoolSettings", + "name": "_settings", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "uint32", + "name": "cycleLengthDays", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "claimPeriodDays", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "minActiveUsers", + "type": "uint32" + }, + { + "internalType": "bool", + "name": "claimForEnabled", + "type": "bool" + }, + { + "internalType": "uint256", + "name": "maxClaimAmount", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "maxClaimers", + "type": "uint32" + }, + { + "internalType": "bool", + "name": "onlyMembers", + "type": "bool" + } + ], + "internalType": "struct UBIPool.UBISettings", + "name": "_limits", + "type": "tuple" } ], - "name": "safeTransferFrom", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ + "name": "createPool", + "outputs": [ { - "internalType": "address", - "name": "operator", + "internalType": "contract UBIPool", + "name": "pool", "type": "address" - }, - { - "internalType": "bool", - "name": "approved", - "type": "bool" } ], - "name": "setApprovalForAll", - "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { - "inputs": [ - { - "internalType": "bytes4", - "name": "interfaceId", - "type": "bytes4" - } - ], - "name": "supportsInterface", + "inputs": [], + "name": "feeBps", "outputs": [ { - "internalType": "bool", + "internalType": "uint32", "name": "", - "type": "bool" + "type": "uint32" } ], "stateMutability": "view", @@ -15812,12 +15748,12 @@ }, { "inputs": [], - "name": "symbol", + "name": "feeRecipient", "outputs": [ { - "internalType": "string", + "internalType": "address", "name": "", - "type": "string" + "type": "address" } ], "stateMutability": "view", @@ -15826,17 +15762,17 @@ { "inputs": [ { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" + "internalType": "address", + "name": "member", + "type": "address" } ], - "name": "tokenURI", + "name": "getMemberPools", "outputs": [ { - "internalType": "string", + "internalType": "address[]", "name": "", - "type": "string" + "type": "address[]" } ], "stateMutability": "view", @@ -15845,35 +15781,36 @@ { "inputs": [ { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + } + ], + "name": "getRoleAdmin", + "outputs": [ { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" + "internalType": "bytes32", + "name": "", + "type": "bytes32" } ], - "name": "transferFrom", - "outputs": [], - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, { "internalType": "address", - "name": "newImplementation", + "name": "account", "type": "address" } ], - "name": "upgradeTo", + "name": "grantRole", "outputs": [], "stateMutability": "nonpayable", "type": "function" @@ -15881,667 +15818,639 @@ { "inputs": [ { - "internalType": "address", - "name": "newImplementation", - "type": "address" + "internalType": "bytes32", + "name": "role", + "type": "bytes32" }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "upgradeToAndCall", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ { "internalType": "address", - "name": "_logic", + "name": "account", "type": "address" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" } ], - "stateMutability": "payable", - "type": "constructor" - } - ] - }, - "ProvableNFT_Implementation": { - "address": "0x4D76c54D6a9F381018fEA7BaC515ae590A1D476a", - "abi": [ - { - "inputs": [ - { - "internalType": "bytes32", - "name": "dataHash", - "type": "bytes32" - }, + "name": "hasRole", + "outputs": [ { - "internalType": "bytes32", - "name": "tokenId", - "type": "bytes32" + "internalType": "bool", + "name": "", + "type": "bool" } ], - "name": "BAD_DATAHASH", - "type": "error" + "stateMutability": "view", + "type": "function" }, { "inputs": [], - "name": "BAD_NFTTYPE", - "type": "error" - }, - { - "inputs": [ + "name": "impl", + "outputs": [ { - "internalType": "uint32", + "internalType": "contract UpgradeableBeacon", "name": "", - "type": "uint32" + "type": "address" } ], - "name": "NOT_MANAGER", - "type": "error" - }, - { - "inputs": [], - "name": "NOT_MINTER", - "type": "error" + "stateMutability": "view", + "type": "function" }, { - "anonymous": false, "inputs": [ { - "indexed": false, "internalType": "address", - "name": "previousAdmin", + "name": "_owner", "type": "address" }, { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "AdminChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, "internalType": "address", - "name": "owner", + "name": "_impl", "type": "address" }, { - "indexed": true, "internalType": "address", - "name": "approved", + "name": "_feeRecipient", "type": "address" }, { - "indexed": true, - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" + "internalType": "uint32", + "name": "_feeBps", + "type": "uint32" } ], - "name": "Approval", - "type": "event" + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - "anonymous": false, "inputs": [ { - "indexed": true, "internalType": "address", - "name": "owner", + "name": "", "type": "address" }, { - "indexed": true, + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "memberPools", + "outputs": [ + { "internalType": "address", - "name": "operator", + "name": "", "type": "address" - }, - { - "indexed": false, - "internalType": "bool", - "name": "approved", - "type": "bool" } ], - "name": "ApprovalForAll", - "type": "event" + "stateMutability": "view", + "type": "function" }, { - "anonymous": false, "inputs": [ { - "indexed": true, + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "pools", + "outputs": [ + { "internalType": "address", - "name": "beacon", + "name": "", "type": "address" } ], - "name": "BeaconUpgraded", - "type": "event" + "stateMutability": "view", + "type": "function" }, { - "anonymous": false, "inputs": [ { - "indexed": false, - "internalType": "uint8", - "name": "version", - "type": "uint8" + "internalType": "bytes32", + "name": "", + "type": "bytes32" } ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - }, + "name": "projectIdToControlPool", + "outputs": [ { - "indexed": false, - "internalType": "address", - "name": "to", + "internalType": "contract UBIPool", + "name": "", "type": "address" - }, + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "proxiableUUID", + "outputs": [ { - "indexed": false, "internalType": "bytes32", - "name": "nftDataHash", + "name": "", "type": "bytes32" } ], - "name": "ProvableNftMinted", - "type": "event" + "stateMutability": "view", + "type": "function" }, { - "anonymous": false, "inputs": [ { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "registry", + "outputs": [ + { + "internalType": "string", + "name": "ipfs", + "type": "string" }, { - "indexed": true, - "internalType": "bytes32", - "name": "previousAdminRole", - "type": "bytes32" + "internalType": "bool", + "name": "isVerified", + "type": "bool" }, { - "indexed": true, - "internalType": "bytes32", - "name": "newAdminRole", - "type": "bytes32" + "internalType": "string", + "name": "projectId", + "type": "string" } ], - "name": "RoleAdminChanged", - "type": "event" + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "member", + "type": "address" + } + ], + "name": "removeMember", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - "anonymous": false, "inputs": [ { - "indexed": true, "internalType": "bytes32", "name": "role", "type": "bytes32" }, { - "indexed": true, "internalType": "address", "name": "account", "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" } ], - "name": "RoleGranted", - "type": "event" + "name": "renounceRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - "anonymous": false, "inputs": [ { - "indexed": true, "internalType": "bytes32", "name": "role", "type": "bytes32" }, { - "indexed": true, "internalType": "address", "name": "account", "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" } ], - "name": "RoleRevoked", - "type": "event" + "name": "revokeRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - "anonymous": false, "inputs": [ { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, "internalType": "address", - "name": "to", + "name": "_feeRecipient", "type": "address" }, { - "indexed": true, - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" + "internalType": "uint32", + "name": "_feeBps", + "type": "uint32" } ], - "name": "Transfer", - "type": "event" + "name": "setFeeInfo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - "anonymous": false, "inputs": [ { - "indexed": true, - "internalType": "address", - "name": "implementation", + "internalType": "contract UBIPool", + "name": "_pool", "type": "address" + }, + { + "internalType": "bool", + "name": "_isVerified", + "type": "bool" } ], - "name": "Upgraded", - "type": "event" + "name": "setVerified", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - "inputs": [], - "name": "DEFAULT_ADMIN_ROLE", + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", "outputs": [ { - "internalType": "bytes32", + "internalType": "bool", "name": "", - "type": "bytes32" + "type": "bool" } ], "stateMutability": "view", "type": "function" }, { - "inputs": [], - "name": "MINTER_ROLE", - "outputs": [ + "inputs": [ { - "internalType": "bytes32", - "name": "", - "type": "bytes32" + "internalType": "address", + "name": "_impl", + "type": "address" } ], - "stateMutability": "view", + "name": "updateImpl", + "outputs": [], + "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", - "name": "_manager", + "name": "newImplementation", + "type": "address" + } + ], + "name": "upgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", "type": "address" }, { - "internalType": "uint32", - "name": "_nftType", - "type": "uint32" + "internalType": "bytes", + "name": "data", + "type": "bytes" } ], - "name": "addManager", + "name": "upgradeToAndCall", "outputs": [], - "stateMutability": "nonpayable", + "stateMutability": "payable", "type": "function" }, { "inputs": [ { "internalType": "address", - "name": "to", + "name": "_logic", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "stateMutability": "payable", + "type": "constructor" + } + ] + }, + "UBIPoolFactory_Implementation": { + "address": "0x99bbA657f2BbC93c02D617f8bA121cB8Fc104Acf", + "abi": [ + { + "inputs": [], + "name": "NOT_POOL", + "type": "error" + }, + { + "inputs": [], + "name": "NOT_PROJECT_OWNER", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "previousAdmin", "type": "address" }, { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { + "indexed": false, "internalType": "address", - "name": "owner", + "name": "newAdmin", "type": "address" } ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" + "name": "AdminChanged", + "type": "event" }, { + "anonymous": false, "inputs": [ { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "getApproved", - "outputs": [ - { + "indexed": true, "internalType": "address", - "name": "", + "name": "beacon", "type": "address" } ], - "stateMutability": "view", - "type": "function" + "name": "BeaconUpgraded", + "type": "event" }, { + "anonymous": false, "inputs": [ { - "internalType": "uint32", - "name": "_nftType", - "type": "uint32" - } - ], - "name": "getManagerRole", - "outputs": [ - { - "internalType": "bytes32", - "name": "roleHash", - "type": "bytes32" + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" } ], - "stateMutability": "pure", - "type": "function" + "name": "Initialized", + "type": "event" }, { + "anonymous": false, "inputs": [ { - "internalType": "uint256", - "name": "_tokenId", - "type": "uint256" - } - ], - "name": "getNFTData", - "outputs": [ + "indexed": true, + "internalType": "address", + "name": "pool", + "type": "address" + }, + { + "indexed": true, + "internalType": "string", + "name": "projectId", + "type": "string" + }, + { + "indexed": false, + "internalType": "string", + "name": "ipfs", + "type": "string" + }, { "components": [ { - "internalType": "uint32", - "name": "nftType", - "type": "uint32" + "internalType": "address", + "name": "manager", + "type": "address" }, { - "internalType": "uint16", - "name": "version", - "type": "uint16" + "internalType": "contract IMembersValidator", + "name": "membersValidator", + "type": "address" }, { - "internalType": "string", - "name": "nftUri", - "type": "string" + "internalType": "contract IIdentityV2", + "name": "uniquenessValidator", + "type": "address" }, { - "components": [ - { - "internalType": "uint16", - "name": "subtype", - "type": "uint16" - }, - { - "internalType": "uint32", - "name": "timestamp", - "type": "uint32" - }, - { - "internalType": "uint256", - "name": "quantity", - "type": "uint256" - }, - { - "internalType": "string", - "name": "eventUri", - "type": "string" - }, - { - "internalType": "address[]", - "name": "contributers", - "type": "address[]" - }, - { - "internalType": "uint128", - "name": "rewardOverride", - "type": "uint128" - } - ], - "internalType": "struct ProvableNFT.EventData[]", - "name": "events", - "type": "tuple[]" + "internalType": "contract IERC20Upgradeable", + "name": "rewardToken", + "type": "address" } ], - "internalType": "struct ProvableNFT.NFTData", - "name": "", + "indexed": false, + "internalType": "struct UBIPool.PoolSettings", + "name": "poolSettings", "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_tokenId", - "type": "uint256" }, - { - "internalType": "uint256", - "name": "_index", - "type": "uint256" - } - ], - "name": "getNFTEvent", - "outputs": [ { "components": [ { - "internalType": "uint16", - "name": "subtype", - "type": "uint16" + "internalType": "uint32", + "name": "cycleLengthDays", + "type": "uint32" }, { "internalType": "uint32", - "name": "timestamp", + "name": "claimPeriodDays", "type": "uint32" }, { - "internalType": "uint256", - "name": "quantity", - "type": "uint256" + "internalType": "uint32", + "name": "minActiveUsers", + "type": "uint32" }, { - "internalType": "string", - "name": "eventUri", - "type": "string" + "internalType": "bool", + "name": "claimForEnabled", + "type": "bool" }, { - "internalType": "address[]", - "name": "contributers", - "type": "address[]" + "internalType": "uint256", + "name": "maxClaimAmount", + "type": "uint256" }, { - "internalType": "uint128", - "name": "rewardOverride", - "type": "uint128" + "internalType": "uint32", + "name": "maxClaimers", + "type": "uint32" + }, + { + "internalType": "bool", + "name": "onlyMembers", + "type": "bool" } ], - "internalType": "struct ProvableNFT.EventData", - "name": "", + "indexed": false, + "internalType": "struct UBIPool.UBISettings", + "name": "poolLimits", "type": "tuple" } ], - "stateMutability": "view", - "type": "function" + "name": "PoolCreated", + "type": "event" }, { + "anonymous": false, "inputs": [ { - "internalType": "uint256", - "name": "_tokenId", - "type": "uint256" + "indexed": true, + "internalType": "address", + "name": "pool", + "type": "address" + }, + { + "indexed": false, + "internalType": "string", + "name": "ipfs", + "type": "string" } ], - "name": "getNFTEvents", - "outputs": [ + "name": "PoolDetailsChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "pool", + "type": "address" + }, { - "components": [ - { - "internalType": "uint16", - "name": "subtype", - "type": "uint16" - }, - { - "internalType": "uint32", - "name": "timestamp", - "type": "uint32" - }, - { - "internalType": "uint256", - "name": "quantity", - "type": "uint256" - }, - { - "internalType": "string", - "name": "eventUri", - "type": "string" - }, - { - "internalType": "address[]", - "name": "contributers", - "type": "address[]" - }, - { - "internalType": "uint128", - "name": "rewardOverride", - "type": "uint128" - } - ], - "internalType": "struct ProvableNFT.EventData[]", - "name": "", - "type": "tuple[]" + "indexed": false, + "internalType": "bool", + "name": "isVerified", + "type": "bool" } ], - "stateMutability": "view", - "type": "function" + "name": "PoolVerifiedChanged", + "type": "event" }, { + "anonymous": false, "inputs": [ { + "indexed": true, "internalType": "bytes32", "name": "role", "type": "bytes32" - } - ], - "name": "getRoleAdmin", - "outputs": [ + }, { + "indexed": true, "internalType": "bytes32", - "name": "", + "name": "previousAdminRole", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "newAdminRole", "type": "bytes32" } ], - "stateMutability": "view", - "type": "function" + "name": "RoleAdminChanged", + "type": "event" }, { + "anonymous": false, "inputs": [ { + "indexed": true, "internalType": "bytes32", "name": "role", "type": "bytes32" }, { + "indexed": true, "internalType": "address", "name": "account", "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" } ], - "name": "grantRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "name": "RoleGranted", + "type": "event" }, { + "anonymous": false, "inputs": [ { + "indexed": true, "internalType": "bytes32", "name": "role", "type": "bytes32" }, { + "indexed": true, "internalType": "address", "name": "account", "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" } ], - "name": "hasRole", + "name": "RoleRevoked", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "impl", + "type": "address" + } + ], + "name": "UpdatedImpl", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "inputs": [], + "name": "DEFAULT_ADMIN_ROLE", "outputs": [ { - "internalType": "bool", + "internalType": "bytes32", "name": "", - "type": "bool" + "type": "bytes32" } ], "stateMutability": "view", @@ -16550,17 +16459,12 @@ { "inputs": [ { - "internalType": "string", - "name": "_name", - "type": "string" - }, - { - "internalType": "string", - "name": "_symbol", - "type": "string" + "internalType": "address", + "name": "account", + "type": "address" } ], - "name": "initialize", + "name": "addMember", "outputs": [], "stateMutability": "nonpayable", "type": "function" @@ -16568,51 +16472,109 @@ { "inputs": [ { - "internalType": "address", - "name": "owner", + "internalType": "contract UBIPool", + "name": "_pool", "type": "address" }, { - "internalType": "address", - "name": "operator", - "type": "address" - } - ], - "name": "isApprovedForAll", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" + "internalType": "string", + "name": "_ipfs", + "type": "string" } ], - "stateMutability": "view", + "name": "changePoolDetails", + "outputs": [], + "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { - "internalType": "address", - "name": "_to", - "type": "address" + "internalType": "string", + "name": "_projectId", + "type": "string" }, { "internalType": "string", - "name": "_uri", + "name": "_ipfs", "type": "string" }, { - "internalType": "bytes32", - "name": "_nftDataHash", - "type": "bytes32" + "components": [ + { + "internalType": "address", + "name": "manager", + "type": "address" + }, + { + "internalType": "contract IMembersValidator", + "name": "membersValidator", + "type": "address" + }, + { + "internalType": "contract IIdentityV2", + "name": "uniquenessValidator", + "type": "address" + }, + { + "internalType": "contract IERC20Upgradeable", + "name": "rewardToken", + "type": "address" + } + ], + "internalType": "struct UBIPool.PoolSettings", + "name": "_settings", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "uint32", + "name": "cycleLengthDays", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "claimPeriodDays", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "minActiveUsers", + "type": "uint32" + }, + { + "internalType": "bool", + "name": "claimForEnabled", + "type": "bool" + }, + { + "internalType": "uint256", + "name": "maxClaimAmount", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "maxClaimers", + "type": "uint32" + }, + { + "internalType": "bool", + "name": "onlyMembers", + "type": "bool" + } + ], + "internalType": "struct UBIPool.UBISettings", + "name": "_limits", + "type": "tuple" } ], - "name": "mint", + "name": "createManagedPool", "outputs": [ { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" + "internalType": "contract UBIPool", + "name": "pool", + "type": "address" } ], "stateMutability": "nonpayable", @@ -16621,86 +16583,91 @@ { "inputs": [ { - "internalType": "address", - "name": "_to", - "type": "address" + "internalType": "string", + "name": "_projectId", + "type": "string" + }, + { + "internalType": "string", + "name": "_ipfs", + "type": "string" }, { "components": [ { - "internalType": "uint32", - "name": "nftType", - "type": "uint32" + "internalType": "address", + "name": "manager", + "type": "address" }, { - "internalType": "uint16", - "name": "version", - "type": "uint16" + "internalType": "contract IMembersValidator", + "name": "membersValidator", + "type": "address" }, { - "internalType": "string", - "name": "nftUri", - "type": "string" + "internalType": "contract IIdentityV2", + "name": "uniquenessValidator", + "type": "address" }, { - "components": [ - { - "internalType": "uint16", - "name": "subtype", - "type": "uint16" - }, - { - "internalType": "uint32", - "name": "timestamp", - "type": "uint32" - }, - { - "internalType": "uint256", - "name": "quantity", - "type": "uint256" - }, - { - "internalType": "string", - "name": "eventUri", - "type": "string" - }, - { - "internalType": "address[]", - "name": "contributers", - "type": "address[]" - }, - { - "internalType": "uint128", - "name": "rewardOverride", - "type": "uint128" - } - ], - "internalType": "struct ProvableNFT.EventData[]", - "name": "events", - "type": "tuple[]" + "internalType": "contract IERC20Upgradeable", + "name": "rewardToken", + "type": "address" } ], - "internalType": "struct ProvableNFT.NFTData", - "name": "_nftData", + "internalType": "struct UBIPool.PoolSettings", + "name": "_settings", "type": "tuple" }, { - "internalType": "bool", - "name": "_withStore", - "type": "bool" - }, - { - "internalType": "bytes", - "name": "_callData", - "type": "bytes" + "components": [ + { + "internalType": "uint32", + "name": "cycleLengthDays", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "claimPeriodDays", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "minActiveUsers", + "type": "uint32" + }, + { + "internalType": "bool", + "name": "claimForEnabled", + "type": "bool" + }, + { + "internalType": "uint256", + "name": "maxClaimAmount", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "maxClaimers", + "type": "uint32" + }, + { + "internalType": "bool", + "name": "onlyMembers", + "type": "bool" + } + ], + "internalType": "struct UBIPool.UBISettings", + "name": "_limits", + "type": "tuple" } ], - "name": "mintPermissioned", + "name": "createPool", "outputs": [ { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" + "internalType": "contract UBIPool", + "name": "pool", + "type": "address" } ], "stateMutability": "nonpayable", @@ -16708,26 +16675,20 @@ }, { "inputs": [], - "name": "name", + "name": "feeBps", "outputs": [ { - "internalType": "string", + "internalType": "uint32", "name": "", - "type": "string" + "type": "uint32" } ], "stateMutability": "view", "type": "function" }, { - "inputs": [ - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "ownerOf", + "inputs": [], + "name": "feeRecipient", "outputs": [ { "internalType": "address", @@ -16741,138 +16702,31 @@ { "inputs": [ { - "internalType": "uint256", - "name": "_tokenId", - "type": "uint256" - }, - { - "components": [ - { - "internalType": "uint32", - "name": "nftType", - "type": "uint32" - }, - { - "internalType": "uint16", - "name": "version", - "type": "uint16" - }, - { - "internalType": "string", - "name": "nftUri", - "type": "string" - }, - { - "components": [ - { - "internalType": "uint16", - "name": "subtype", - "type": "uint16" - }, - { - "internalType": "uint32", - "name": "timestamp", - "type": "uint32" - }, - { - "internalType": "uint256", - "name": "quantity", - "type": "uint256" - }, - { - "internalType": "string", - "name": "eventUri", - "type": "string" - }, - { - "internalType": "address[]", - "name": "contributers", - "type": "address[]" - }, - { - "internalType": "uint128", - "name": "rewardOverride", - "type": "uint128" - } - ], - "internalType": "struct ProvableNFT.EventData[]", - "name": "events", - "type": "tuple[]" - } - ], - "internalType": "struct ProvableNFT.NFTData", - "name": "_nftData", - "type": "tuple" - } - ], - "name": "proveNFTData", - "outputs": [ - { - "components": [ - { - "internalType": "uint32", - "name": "nftType", - "type": "uint32" - }, - { - "internalType": "uint16", - "name": "version", - "type": "uint16" - }, - { - "internalType": "string", - "name": "nftUri", - "type": "string" - }, - { - "components": [ - { - "internalType": "uint16", - "name": "subtype", - "type": "uint16" - }, - { - "internalType": "uint32", - "name": "timestamp", - "type": "uint32" - }, - { - "internalType": "uint256", - "name": "quantity", - "type": "uint256" - }, - { - "internalType": "string", - "name": "eventUri", - "type": "string" - }, - { - "internalType": "address[]", - "name": "contributers", - "type": "address[]" - }, - { - "internalType": "uint128", - "name": "rewardOverride", - "type": "uint128" - } - ], - "internalType": "struct ProvableNFT.EventData[]", - "name": "events", - "type": "tuple[]" - } - ], - "internalType": "struct ProvableNFT.NFTData", - "name": "data", - "type": "tuple" + "internalType": "address", + "name": "member", + "type": "address" + } + ], + "name": "getMemberPools", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" } ], "stateMutability": "view", "type": "function" }, { - "inputs": [], - "name": "proxiableUUID", + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + } + ], + "name": "getRoleAdmin", "outputs": [ { "internalType": "bytes32", @@ -16896,7 +16750,7 @@ "type": "address" } ], - "name": "renounceRole", + "name": "grantRole", "outputs": [], "stateMutability": "nonpayable", "type": "function" @@ -16914,30 +16768,54 @@ "type": "address" } ], - "name": "revokeRole", - "outputs": [], - "stateMutability": "nonpayable", + "name": "hasRole", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "impl", + "outputs": [ + { + "internalType": "contract UpgradeableBeacon", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", - "name": "from", + "name": "_owner", "type": "address" }, { "internalType": "address", - "name": "to", + "name": "_impl", "type": "address" }, { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" + "internalType": "address", + "name": "_feeRecipient", + "type": "address" + }, + { + "internalType": "uint32", + "name": "_feeBps", + "type": "uint32" } ], - "name": "safeTransferFrom", + "name": "initialize", "outputs": [], "stateMutability": "nonpayable", "type": "function" @@ -16946,62 +16824,59 @@ "inputs": [ { "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", + "name": "", "type": "address" }, { "internalType": "uint256", - "name": "tokenId", + "name": "", "type": "uint256" - }, + } + ], + "name": "memberPools", + "outputs": [ { - "internalType": "bytes", - "name": "data", - "type": "bytes" + "internalType": "address", + "name": "", + "type": "address" } ], - "name": "safeTransferFrom", - "outputs": [], - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "pools", + "outputs": [ { "internalType": "address", - "name": "operator", + "name": "", "type": "address" - }, - { - "internalType": "bool", - "name": "approved", - "type": "bool" } ], - "name": "setApprovalForAll", - "outputs": [], - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { "inputs": [ { - "internalType": "bytes4", - "name": "interfaceId", - "type": "bytes4" + "internalType": "bytes32", + "name": "", + "type": "bytes32" } ], - "name": "supportsInterface", + "name": "projectIdToControlPool", "outputs": [ { - "internalType": "bool", + "internalType": "contract UBIPool", "name": "", - "type": "bool" + "type": "address" } ], "stateMutability": "view", @@ -17009,12 +16884,12 @@ }, { "inputs": [], - "name": "symbol", + "name": "proxiableUUID", "outputs": [ { - "internalType": "string", + "internalType": "bytes32", "name": "", - "type": "string" + "type": "bytes32" } ], "stateMutability": "view", @@ -17023,16 +16898,26 @@ { "inputs": [ { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" + "internalType": "address", + "name": "", + "type": "address" } ], - "name": "tokenURI", + "name": "registry", "outputs": [ { "internalType": "string", - "name": "", + "name": "ipfs", + "type": "string" + }, + { + "internalType": "bool", + "name": "isVerified", + "type": "bool" + }, + { + "internalType": "string", + "name": "projectId", "type": "string" } ], @@ -17043,21 +16928,115 @@ "inputs": [ { "internalType": "address", - "name": "from", + "name": "member", "type": "address" + } + ], + "name": "removeMember", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" }, { "internalType": "address", - "name": "to", + "name": "account", "type": "address" + } + ], + "name": "renounceRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" }, { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" + "internalType": "address", + "name": "account", + "type": "address" } ], - "name": "transferFrom", + "name": "revokeRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_feeRecipient", + "type": "address" + }, + { + "internalType": "uint32", + "name": "_feeBps", + "type": "uint32" + } + ], + "name": "setFeeInfo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract UBIPool", + "name": "_pool", + "type": "address" + }, + { + "internalType": "bool", + "name": "_isVerified", + "type": "bool" + } + ], + "name": "setVerified", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_impl", + "type": "address" + } + ], + "name": "updateImpl", "outputs": [], "stateMutability": "nonpayable", "type": "function" @@ -17095,8 +17074,8 @@ } ] }, - "ProvableNFT_Proxy": { - "address": "0x2AF5DB8249229ba696E0bac1a382aDb1fee040A6", + "UBIPoolFactory_Proxy": { + "address": "0x0E801D84Fa97b50751Dbf25036d067dCf18858bF", "abi": [ { "inputs": [ @@ -23791,7 +23770,7 @@ ] }, "UBIPool": { - "address": "0x9b7813A64bbD05a0cb4cb9c2BC4C7A5f466e50f8", + "address": "0xeEDC10E7e417FB9B79dA655F9D00384520E2c545", "abi": [ { "inputs": [ @@ -26541,7 +26520,7 @@ ] }, "UBIPoolFactory_Implementation": { - "address": "0xFB202B314d95F3d5E10111EdE40232bd282aC581", + "address": "0x396A429Fe95F21475860593C86CC9c17D39F7f69", "abi": [ { "inputs": [], diff --git a/packages/subgraph/config/celo-dev.json b/packages/subgraph/config/celo-dev.json index 80a935d6..3dca8f68 100644 --- a/packages/subgraph/config/celo-dev.json +++ b/packages/subgraph/config/celo-dev.json @@ -3,5 +3,6 @@ "UBIPoolFactoryAddress": "0x4602C5F43A9961E430247D3Fb2d5450285080754", "DirectPaymentsFactoryAddress": "0xb1C7F09156d04BFf6F412447A73a0F72929b6ea4", "ProvableNFTAddress": "0x251EEBd7d9469bbcc02Ef23c95D902Cbb7fD73B3", - "startBlock": "26482890" + "startBlock": 26191405, + "startBlockUbi": 26191405 } diff --git a/packages/subgraph/config/celo.json b/packages/subgraph/config/celo.json index 6416efd8..4dd54700 100644 --- a/packages/subgraph/config/celo.json +++ b/packages/subgraph/config/celo.json @@ -2,5 +2,6 @@ "network": "celo", "DirectPaymentsFactoryAddress": "0x58b5E37c5aFad520dD93E92A5D11B8721A9115F0", "ProvableNFTAddress": "0x2AF5DB8249229ba696E0bac1a382aDb1fee040A6", - "startBlock": 20920303 + "startBlock": 20920303, + "startBlockUbi": 26191405 } diff --git a/packages/subgraph/package.json b/packages/subgraph/package.json index 7692957a..57b4d039 100644 --- a/packages/subgraph/package.json +++ b/packages/subgraph/package.json @@ -1,14 +1,14 @@ { "name": "@gooddollar/goodcollective-subgraph", "license": "MIT", - "version": "1.0.4", + "version": "1.0.9", "scripts": { "prepare": "mustache config/${0}.json subgraph.template.yaml > subgraph.yaml", "codegen": "graph codegen", "build": "yarn build:copyabi && yarn codegen && graph build", "build:copyabi": "find ../contracts/artifacts/contracts/ -type f -not -name '*.dbg.json' -exec cp '{}' ./abis/ \\;", - "deploy": "yarn prepare celo; yarn version patch; yarn prepare celo; graph auth --studio $STUDIO_PROD_KEY; graph deploy --studio goodcollective --version-label=v$npm_package_version", - "deploy-dev": "yarn prepare celo-dev; graph auth --studio $STUDIO_PROD_KEY; graph deploy --studio goodcollective --version-label= --version-label=dev-v$npm_package_version", + "deploy": "yarn prepare celo; yarn prepare celo; graph auth --studio $STUDIO_PROD_KEY; graph deploy --studio goodcollective --version-label=v$npm_package_version", + "deploy-dev": "yarn prepare celo-dev;graph auth --studio $STUDIO_PROD_KEY; graph deploy --studio goodcollective --version-label= --version-label=dev-v$npm_package_version", "create-local": "graph create --node http://localhost:8020/ scaffold-eth/your-contract", "remove-local": "graph remove --node http://localhost:8020/ scaffold-eth/your-contract", "deploy-local": "graph deploy --node http://localhost:8020/ --ipfs http://localhost:5001 scaffold-eth/your-contract", diff --git a/packages/subgraph/schema.graphql b/packages/subgraph/schema.graphql index 59f45a22..f1c6fe77 100644 --- a/packages/subgraph/schema.graphql +++ b/packages/subgraph/schema.graphql @@ -42,6 +42,9 @@ type Steward @entity { """ actions: Int! totalEarned: BigInt! + + totalUBIEarned: BigInt! + """ NFT's minted to steward """ @@ -63,11 +66,18 @@ type StewardCollective @entity { totalEarned: BigInt! } +enum PoolType { + DirectPayments + UBI +} + type Collective @entity { id: String! # pool address + pooltype: PoolType! ipfs: IpfsCollective settings: PoolSettings! - limits: SafetyLimits! + ubiLimits: UBILimits + limits: SafetyLimits donors: [DonorCollective!] @derivedFrom(field: "collective") stewards: [StewardCollective!] @derivedFrom(field: "collective") projectId: String! @@ -84,6 +94,7 @@ type IpfsCollective @entity { id: String! # ipfs hash name: String! description: String! + rewardDescription: String email: String website: String twitter: String @@ -104,6 +115,21 @@ type PoolSettings @entity { rewardToken: Bytes! } +type UBILimits @entity { + id: String! # collective address + # number of days of each UBI pool cycle + cycleLengthDays: BigInt! + # how often can someone claim their UBI + claimPeriodDays: BigInt! + # minimum amount of users to divide the pool for, renamed from defaultDailyUbi + minActiveUsers: BigInt! + # can you trigger claim for someone else + claimForEnabled: Boolean! + maxClaimAmount: BigInt! + maxClaimers: BigInt! + onlyMembers: Boolean! +} + type SafetyLimits @entity { id: String! # collective address maxTotalPerMonth: BigInt! diff --git a/packages/subgraph/src/mappings/ipfsCollective.ts b/packages/subgraph/src/mappings/ipfsCollective.ts index 0c1408d8..6fc82a7e 100644 --- a/packages/subgraph/src/mappings/ipfsCollective.ts +++ b/packages/subgraph/src/mappings/ipfsCollective.ts @@ -22,6 +22,9 @@ export function handleCreateIpfsCollective(data: Bytes): void { ipfsCollective.name = jsonObject.isSet('name') ? jsonObject.get('name')!!.toString() : ''; ipfsCollective.description = jsonObject.isSet('description') ? jsonObject.get('description')!!.toString() : ''; + ipfsCollective.rewardDescription = jsonObject.isSet('rewardDescription') + ? jsonObject.get('rewardDescription')!!.toString() + : ''; ipfsCollective.email = jsonObject.isSet('email') ? jsonObject.get('email')!!.toString() : null; ipfsCollective.website = jsonObject.isSet('website') ? jsonObject.get('website')!!.toString() : null; ipfsCollective.twitter = jsonObject.isSet('twitter') ? jsonObject.get('twitter')!!.toString() : null; @@ -32,9 +35,9 @@ export function handleCreateIpfsCollective(data: Bytes): void { ipfsCollective.logo = jsonObject.isSet('logo') ? jsonObject.get('logo')!!.toString() : ''; ipfsCollective.images = jsonObject.isSet('images') ? jsonObject - .get('images')!! - .toArray() - .map((value) => value.toString()) + .get('images')!! + .toArray() + .map((value) => value.toString()) : null; ipfsCollective.save(); diff --git a/packages/subgraph/src/mappings/pool.ts b/packages/subgraph/src/mappings/pool.ts index 8819e12a..c2ad8605 100644 --- a/packages/subgraph/src/mappings/pool.ts +++ b/packages/subgraph/src/mappings/pool.ts @@ -16,7 +16,7 @@ import { StewardCollective, } from '../../generated/schema'; -export * from './superApp' +export * from './superApp'; export function handlePoolSettingsChange(event: PoolSettingsChanged): void { const poolSettings = event.params.settings; @@ -138,6 +138,7 @@ export function handleRewardClaim(event: EventRewardClaimed): void { steward = new Steward(stewardAddress); steward.actions = 0; steward.totalEarned = BigInt.fromI32(0); + steward.totalUBIEarned = BigInt.fromI32(0); steward.nfts = new Array(); } const stewardNfts = steward.nfts; diff --git a/packages/subgraph/src/mappings/poolFactory.ts b/packages/subgraph/src/mappings/poolFactory.ts index 15ee7453..36c59434 100644 --- a/packages/subgraph/src/mappings/poolFactory.ts +++ b/packages/subgraph/src/mappings/poolFactory.ts @@ -4,8 +4,11 @@ import { PoolDetailsChanged, PoolVerifiedChanged, } from '../../generated/DirectPaymentsFactory/DirectPaymentsFactory'; -import { Collective, PoolSettings, SafetyLimits } from '../../generated/schema'; -import { DirectPaymentsPool, IpfsMetaData } from '../../generated/templates'; + +import { PoolCreated as UBIPoolCreated } from '../../generated/UBIPoolFactory/UBIPoolFactory'; + +import { Collective, PoolSettings, SafetyLimits, UBILimits } from '../../generated/schema'; +import { DirectPaymentsPool, IpfsMetaData, UBIPool } from '../../generated/templates'; export function handlePoolDetailsChanged(event: PoolDetailsChanged): void { const poolAddress = event.params.pool; @@ -49,6 +52,7 @@ export function handlePoolCreated(event: PoolCreated): void { const directPaymentPoolLimits = new SafetyLimits(poolAddress); // Pool + directPaymentPool.pooltype = 'DirectPayments'; directPaymentPool.ipfs = ipfsHash; directPaymentPool.projectId = projectID; directPaymentPool.isVerified = false; @@ -81,3 +85,55 @@ export function handlePoolCreated(event: PoolCreated): void { IpfsMetaData.create(ipfsHash); } } + +export function handleUBIPoolCreated(event: UBIPoolCreated): void { + const poolAddress = event.params.pool.toHexString(); + const projectID = event.params.projectId.toHexString(); + const ipfsHash = event.params.ipfs; + + const poolSettings = event.params.poolSettings; + const poolLimits = event.params.poolLimits; + + let ubiPool = Collective.load(poolAddress); + if (ubiPool === null) { + ubiPool = new Collective(poolAddress); + const ubiPoolSettings = new PoolSettings(poolAddress); + const ubiPoolLimits = new UBILimits(poolAddress); + + // Pool + ubiPool.pooltype = 'UBI'; + ubiPool.ipfs = ipfsHash; + ubiPool.projectId = projectID; + ubiPool.isVerified = false; + ubiPool.poolFactory = event.address.toHexString(); + ubiPool.timestamp = event.block.timestamp.toI32(); + ubiPool.paymentsMade = 0; + ubiPool.totalDonations = new BigInt(0); + ubiPool.totalRewards = new BigInt(0); + + // Pool Settings + ubiPoolSettings.nftType = BigInt.zero(); + ubiPoolSettings.manager = poolSettings.manager; + ubiPoolSettings.membersValidator = poolSettings.membersValidator; + ubiPoolSettings.uniquenessValidator = poolSettings.uniquenessValidator; + ubiPoolSettings.rewardToken = poolSettings.rewardToken; + + ubiPoolLimits.claimForEnabled = poolLimits.claimForEnabled; + ubiPoolLimits.claimPeriodDays = poolLimits.claimPeriodDays; + ubiPoolLimits.cycleLengthDays = poolLimits.cycleLengthDays; + ubiPoolLimits.maxClaimAmount = poolLimits.maxClaimAmount; + ubiPoolLimits.maxClaimers = poolLimits.maxClaimers; + ubiPoolLimits.minActiveUsers = poolLimits.minActiveUsers; + ubiPoolLimits.onlyMembers = poolLimits.onlyMembers; + + // update and save pool + ubiPool.settings = ubiPoolSettings.id; + ubiPool.ubiLimits = ubiPoolLimits.id; + + ubiPoolSettings.save(); + ubiPoolLimits.save(); + ubiPool.save(); + UBIPool.create(event.params.pool); + IpfsMetaData.create(ipfsHash); + } +} diff --git a/packages/subgraph/src/mappings/ubipool.ts b/packages/subgraph/src/mappings/ubipool.ts new file mode 100644 index 00000000..0d81832f --- /dev/null +++ b/packages/subgraph/src/mappings/ubipool.ts @@ -0,0 +1,109 @@ +import { BigInt, log } from '@graphprotocol/graph-ts'; +import { UBIClaimed, UBISettingsChanged, PoolSettingsChanged } from '../../generated/templates/UBIPool/UBIPool'; +import { + Claim, + Collective, + ClaimEvent, + PoolSettings, + Steward, + StewardCollective, + UBILimits, +} from '../../generated/schema'; + +export * from './superApp'; + +export function handlePoolSettingsChange(event: PoolSettingsChanged): void { + const poolSettings = event.params.settings; + let ubiPoolSettings = PoolSettings.load(event.address.toHexString()); + if (ubiPoolSettings === null) { + log.error('Missing Payment Pool {}', [event.address.toHex()]); + return; + } + + ubiPoolSettings.manager = poolSettings.manager; + ubiPoolSettings.membersValidator = poolSettings.membersValidator; + ubiPoolSettings.uniquenessValidator = poolSettings.uniquenessValidator; + ubiPoolSettings.rewardToken = poolSettings.rewardToken; + ubiPoolSettings.save(); +} + +export function handleUBISettingsChange(event: UBISettingsChanged): void { + const poolLimits = event.params.settings; + let ubiPoolLimits = UBILimits.load(event.address.toHexString()); + + if (ubiPoolLimits === null) { + log.error('Missing Payment Pool {}', [event.address.toHex()]); + return; + } + + ubiPoolLimits.claimForEnabled = poolLimits.claimForEnabled; + ubiPoolLimits.claimPeriodDays = poolLimits.claimPeriodDays; + ubiPoolLimits.cycleLengthDays = poolLimits.cycleLengthDays; + ubiPoolLimits.maxClaimAmount = poolLimits.maxClaimAmount; + ubiPoolLimits.maxClaimers = poolLimits.maxClaimers; + ubiPoolLimits.minActiveUsers = poolLimits.minActiveUsers; + ubiPoolLimits.onlyMembers = poolLimits.onlyMembers; + ubiPoolLimits.save(); +} + +export function handleUBIClaim(event: UBIClaimed): void { + const contributors = [event.params.whitelistedRoot]; + const rewardPerContributor = event.params.amount; + + const poolAddress = event.address.toHexString(); + + let pool = Collective.load(poolAddress); + if (pool === null) { + log.error('Missing Payment Pool {}', [event.address.toHex()]); + return; + } + + // handle claim + let claimId = poolAddress + '_' + event.params.whitelistedRoot.toHexString() + '_' + event.block.timestamp.toString(); + let claim = new Claim(claimId); + // for ubi there's only 1 recipient + claim.totalRewards = rewardPerContributor; + claim.collective = pool.id; + claim.txHash = event.transaction.hash.toHexString(); + claim.timestamp = event.block.timestamp.toI32(); + claim.networkFee = event.transaction.gasLimit.times(event.transaction.gasPrice); + + for (let i = 0; i < contributors.length; i++) { + const stewardAddress = contributors[i].toHexString(); + const stewardCollectiveId = `${stewardAddress}_${poolAddress}`; + + // update Steward + let steward = Steward.load(stewardAddress); + if (steward === null) { + steward = new Steward(stewardAddress); + steward.actions = 0; + steward.totalEarned = BigInt.fromI32(0); + steward.totalUBIEarned = BigInt.fromI32(0); + steward.nfts = new Array(); + } + steward.totalUBIEarned = steward.totalUBIEarned.plus(rewardPerContributor); + + // update StewardCollective + let stewardCollective = StewardCollective.load(stewardCollectiveId); + if (stewardCollective === null) { + stewardCollective = new StewardCollective(stewardCollectiveId); + stewardCollective.actions = 0; + stewardCollective.totalEarned = BigInt.fromI32(0); + } + stewardCollective.actions = stewardCollective.actions + 1; + + stewardCollective.totalEarned = stewardCollective.totalEarned.plus(rewardPerContributor); + stewardCollective.steward = steward.id; + stewardCollective.collective = pool.id; + + steward.save(); + stewardCollective.save(); + } + + // update pool + pool.totalRewards = pool.totalRewards.plus(rewardPerContributor); + pool.paymentsMade = pool.paymentsMade + contributors.length; + + claim.save(); + pool.save(); +} diff --git a/packages/subgraph/subgraph.template.yaml b/packages/subgraph/subgraph.template.yaml index 7a80faec..e1fc317e 100644 --- a/packages/subgraph/subgraph.template.yaml +++ b/packages/subgraph/subgraph.template.yaml @@ -29,6 +29,32 @@ dataSources: - event: PoolVerifiedChanged(indexed address,bool) handler: handlePoolVerifiedChange file: ./src/mappings/poolFactory.ts + - kind: ethereum/contract + name: UBIPoolFactory + # prettier-ignore + network: {{network}} + source: + address: '{{UBIPoolFactoryAddress}}' + abi: UBIPoolFactory + startBlock: {{startBlockUbi}} + mapping: + kind: ethereum/events + apiVersion: 0.0.7 + language: wasm/assemblyscript + entities: + - Collective + - UBIPool + abis: + - name: UBIPoolFactory + file: ./abis/UBIPoolFactory.json + eventHandlers: + - event: PoolCreated(indexed address,indexed string,string,(address,address,address,address),(uint32,uint32,uint32,bool,uint256,uint32,bool)) + handler: handleUBIPoolCreated + - event: PoolDetailsChanged(indexed address,string) + handler: handlePoolDetailsChanged + - event: PoolVerifiedChanged(indexed address,bool) + handler: handlePoolVerifiedChange + file: ./src/mappings/poolFactory.ts - kind: ethereum name: ProvableNFT @@ -84,6 +110,36 @@ templates: - event: SupporterUpdated(indexed address,uint256,uint256,int96,int96,bool) handler: handleSupport file: ./src/mappings/pool.ts + - kind: ethereum/contract + name: UBIPool + # prettier-ignore + network: {{network}} + source: + abi: UBIPool + mapping: + kind: ethereum/events + apiVersion: 0.0.7 + language: wasm/assemblyscript + entities: + - UBIPool + - UBILimits + - PoolSettings + - Claim + - Donor + abis: + - name: UBIPool + file: ./abis/UBIPool.json + eventHandlers: + - event: PoolSettingsChanged((address,address,address,address)) + handler: handlePoolSettingsChange + - event: UBISettingsChanged((uint32,uint32,uint32,bool,uint256,uint32,bool)) + handler: handleUBISettingsChange + - event: UBIClaimed(indexed address,indexed address,uint256) + handler: handleUBIClaim + - event: SupporterUpdated(indexed address,uint256,uint256,int96,int96,bool) + handler: handleSupport + file: ./src/mappings/ubipool.ts + - kind: file/ipfs name: IpfsMetaData mapping: diff --git a/packages/subgraph/subgraph.yaml b/packages/subgraph/subgraph.yaml index 3a29bd89..ebcf3635 100644 --- a/packages/subgraph/subgraph.yaml +++ b/packages/subgraph/subgraph.yaml @@ -11,7 +11,7 @@ dataSources: source: address: '0xb1C7F09156d04BFf6F412447A73a0F72929b6ea4' abi: DirectPaymentsFactory - startBlock: 26482890 + startBlock: 26191405 mapping: kind: ethereum/events apiVersion: 0.0.7 @@ -29,6 +29,32 @@ dataSources: - event: PoolVerifiedChanged(indexed address,bool) handler: handlePoolVerifiedChange file: ./src/mappings/poolFactory.ts + - kind: ethereum/contract + name: UBIPoolFactory + # prettier-ignore + network: celo + source: + address: '0x4602C5F43A9961E430247D3Fb2d5450285080754' + abi: UBIPoolFactory + startBlock: 26191405 + mapping: + kind: ethereum/events + apiVersion: 0.0.7 + language: wasm/assemblyscript + entities: + - Collective + - UBIPool + abis: + - name: UBIPoolFactory + file: ./abis/UBIPoolFactory.json + eventHandlers: + - event: PoolCreated(indexed address,indexed string,string,(address,address,address,address),(uint32,uint32,uint32,bool,uint256,uint32,bool)) + handler: handleUBIPoolCreated + - event: PoolDetailsChanged(indexed address,string) + handler: handlePoolDetailsChanged + - event: PoolVerifiedChanged(indexed address,bool) + handler: handlePoolVerifiedChange + file: ./src/mappings/poolFactory.ts - kind: ethereum name: ProvableNFT @@ -37,7 +63,7 @@ dataSources: source: address: '0x251EEBd7d9469bbcc02Ef23c95D902Cbb7fD73B3' abi: ProvableNFT - startBlock: 26482890 + startBlock: 26191405 mapping: kind: ethereum/events apiVersion: 0.0.7 @@ -84,6 +110,36 @@ templates: - event: SupporterUpdated(indexed address,uint256,uint256,int96,int96,bool) handler: handleSupport file: ./src/mappings/pool.ts + - kind: ethereum/contract + name: UBIPool + # prettier-ignore + network: celo + source: + abi: UBIPool + mapping: + kind: ethereum/events + apiVersion: 0.0.7 + language: wasm/assemblyscript + entities: + - UBIPool + - UBILimits + - PoolSettings + - Claim + - Donor + abis: + - name: UBIPool + file: ./abis/UBIPool.json + eventHandlers: + - event: PoolSettingsChanged((address,address,address,address)) + handler: handlePoolSettingsChange + - event: UBISettingsChanged((uint32,uint32,uint32,bool,uint256,uint32,bool)) + handler: handleUBISettingsChange + - event: UBIClaimed(indexed address,indexed address,uint256) + handler: handleUBIClaim + - event: SupporterUpdated(indexed address,uint256,uint256,int96,int96,bool) + handler: handleSupport + file: ./src/mappings/ubipool.ts + - kind: file/ipfs name: IpfsMetaData mapping: