From c5516d2fa98e2eb300d24bade89f5d0df05eed6f Mon Sep 17 00:00:00 2001 From: sirpy Date: Mon, 18 Sep 2023 17:25:26 +0300 Subject: [PATCH 1/4] fix: hardhat lint --- packages/contracts/hardhat.config.ts | 183 ++++++++++++++------------- 1 file changed, 95 insertions(+), 88 deletions(-) diff --git a/packages/contracts/hardhat.config.ts b/packages/contracts/hardhat.config.ts index 5e622e6e..542e3e40 100644 --- a/packages/contracts/hardhat.config.ts +++ b/packages/contracts/hardhat.config.ts @@ -1,102 +1,109 @@ -import "@nomicfoundation/hardhat-toolbox"; -import * as dotenv from "dotenv"; -import "hardhat-abi-exporter"; -import "hardhat-contract-sizer"; -import "@openzeppelin/hardhat-upgrades"; -import "hardhat-deploy"; -import { HardhatUserConfig } from "hardhat/config"; +import '@nomicfoundation/hardhat-toolbox'; +import * as dotenv from 'dotenv'; +import 'hardhat-abi-exporter'; +import 'hardhat-contract-sizer'; +import '@openzeppelin/hardhat-upgrades'; +import 'hardhat-deploy'; +import 'hardhat-celo'; +import { HardhatUserConfig } from 'hardhat/config'; dotenv.config(); -const mnemonic = process.env.MNEMONIC || ""; +const mnemonic = process.env.MNEMONIC || ''; const config: HardhatUserConfig = { - contractSizer: { - alphaSort: true, - disambiguatePaths: false, - runOnCompile: true, - strict: true + contractSizer: { + alphaSort: true, + disambiguatePaths: false, + runOnCompile: true, + strict: true, + }, + gasReporter: { + enabled: true, + coinmarketcap: process.env.COINMARKETCAP_API_KEY, + currency: 'USD', + }, + abiExporter: { + path: './abi', + runOnCompile: false, + clear: true, + spacing: 2, + only: [ + /** + * List of specific contract names for exporting ABI + */ + // ":ERC20", + ], + format: 'minimal', + }, + namedAccounts: { + deployer: { + default: 0, // here this will by default take the first account as deployer }, - gasReporter: { - enabled: true, - coinmarketcap: process.env.COINMARKETCAP_API_KEY, - currency: "USD" + }, + networks: { + localhost: { + chainId: 31337, }, - abiExporter: { - path: "./abi", - runOnCompile: false, - clear: true, - spacing: 2, - only: [ - /** - * List of specific contract names for exporting ABI - */ - // ":ERC20", - ], - format: "minimal" + mainnet: { + chainId: 1, + url: 'https://cloudflare-eth.com', }, - namedAccounts: { - deployer: { - default: 0 // here this will by default take the first account as deployer - } - }, - networks: { - localhost: { - chainId: 31337 - }, - mainnet: { - chainId: 1, - url: "https://cloudflare-eth.com" - }, - alfajores: { - chainId: 44787, - url: `https://alfajores-forno.celo-testnet.org`, - gasPrice: 5000000000, - accounts: { - mnemonic: "kale" - }, - verify: { - etherscan: { - apiKey: process.env.CELOSCAN_KEY, - apiUrl: "https://api-alfajores.celoscan.io/" - } - } + alfajores: { + chainId: 44787, + url: `https://alfajores-forno.celo-testnet.org`, + gasPrice: 5000000000, + accounts: { + mnemonic: mnemonic, + }, + verify: { + etherscan: { + apiKey: process.env.CELOSCAN_KEY, + apiUrl: 'https://api-alfajores.celoscan.io/', }, - celo: { - chainId: 42220, - url: `https://forno.celo.org`, - gasPrice: 5000000000, - accounts: { - mnemonic: "kale" - } - } + }, }, - etherscan: { - apiKey: { - mainnet: process.env.ETHERSCAN_KEY || "", - celo: process.env.CELOSCAN_KEY || "", - alfajores: process.env.CELOSCAN_KEY || "" + celo: { + chainId: 42220, + url: `https://forno.celo.org`, + gasPrice: 5000000000, + accounts: { + mnemonic: mnemonic, + }, + verify: { + etherscan: { + apiKey: process.env.CELOSCAN_KEY, + apiUrl: 'https://api.celoscan.io/', }, - customChains: [ - { - network: "alfajores", - chainId: 44787, - urls: { browserURL: "https://alfajores.celoscan.io/", apiURL: "https://api-alfajores.celoscan.io/" } - } - ] + }, }, - solidity: { - compilers: [ - { - version: "0.8.19", - settings: { - optimizer: { - enabled: true, - runs: 0 - } - } - } - ] - } + }, + etherscan: { + apiKey: { + mainnet: process.env.ETHERSCAN_KEY || '', + celo: process.env.CELOSCAN_KEY || '', + alfajores: process.env.CELOSCAN_KEY || '', + }, + customChains: [ + { + network: 'alfajores', + chainId: 44787, + urls: { browserURL: 'https://alfajores.celoscan.io/', apiURL: 'https://api-alfajores.celoscan.io/' }, + }, + ], + }, + solidity: { + compilers: [ + { + version: '0.8.19', + settings: { + optimizer: { + enabled: true, + runs: 0, + }, + }, + }, + ], + }, }; export default config; From dd98428f19f57cb0902c314f1a748c1ee438eb51 Mon Sep 17 00:00:00 2001 From: sirpy Date: Mon, 9 Oct 2023 16:26:51 +0300 Subject: [PATCH 2/4] add: override reward --- .../DirectPayments/DirectPaymentsPool.sol | 12 +++++++--- .../contracts/DirectPayments/ProvableNFT.sol | 1 + .../GoodCollective/GoodCollectiveSuperApp.sol | 24 ++++--------------- .../IGoodCollectiveSuperApp.sol | 12 ++++++++++ .../{SwapLibrary.sol => HelperLibrary.sol} | 23 ++++++++++++++++-- packages/contracts/hardhat.config.ts | 4 ++-- packages/sdk-js/scripts/createPool.ts | 15 ++++++++---- .../src/goodcollective/goodcollective.ts | 7 ++++-- 8 files changed, 65 insertions(+), 33 deletions(-) create mode 100644 packages/contracts/contracts/GoodCollective/IGoodCollectiveSuperApp.sol rename packages/contracts/contracts/utils/{SwapLibrary.sol => HelperLibrary.sol} (70%) diff --git a/packages/contracts/contracts/DirectPayments/DirectPaymentsPool.sol b/packages/contracts/contracts/DirectPayments/DirectPaymentsPool.sol index 9f245a76..426134ef 100644 --- a/packages/contracts/contracts/DirectPayments/DirectPaymentsPool.sol +++ b/packages/contracts/contracts/DirectPayments/DirectPaymentsPool.sol @@ -84,6 +84,7 @@ contract DirectPaymentsPool is IMembersValidator membersValidator; IIdentityV2 uniquenessValidator; IERC20Upgradeable rewardToken; + bool allowRewardOverride; } struct SafetyLimits { @@ -186,13 +187,18 @@ contract DirectPaymentsPool is uint totalRewards; uint rewardsBalance = settings.rewardToken.balanceOf(address(this)); + bool allowRewardOverride = settings.allowRewardOverride; for (uint256 i = 0; i < _data.events.length; i++) { - uint128 reward = _eventReward(_data.events[i].subtype); + uint reward = ( + allowRewardOverride && _data.events[i].rewardOverride > 0 + ? _data.events[i].rewardOverride + : _eventReward(_data.events[i].subtype) + ) * _data.events[i].quantity; if (reward > 0) { - totalRewards += reward * _data.events[i].quantity; + totalRewards += reward; if (totalRewards > rewardsBalance) revert NO_BALANCE(); rewardsBalance -= totalRewards; - _sendReward(_data.events[i].contributers, uint128(reward * _data.events[i].quantity)); + _sendReward(_data.events[i].contributers, uint128(reward)); emit EventRewardClaimed( _nftId, _data.events[i].subtype, diff --git a/packages/contracts/contracts/DirectPayments/ProvableNFT.sol b/packages/contracts/contracts/DirectPayments/ProvableNFT.sol index 2bb8d568..f58b4a3f 100644 --- a/packages/contracts/contracts/DirectPayments/ProvableNFT.sol +++ b/packages/contracts/contracts/DirectPayments/ProvableNFT.sol @@ -27,6 +27,7 @@ contract ProvableNFT is ERC721Upgradeable, AccessControlUpgradeable, UUPSUpgrade uint256 quantity; string eventUri; //extra data related to event address[] contributers; + uint128 rewardOverride; //override reward defined per 1 quantity of event, pool will use this instead of its own reward if allowRewardOverride is true } struct NFTData { diff --git a/packages/contracts/contracts/GoodCollective/GoodCollectiveSuperApp.sol b/packages/contracts/contracts/GoodCollective/GoodCollectiveSuperApp.sol index 397e3372..22d20d9b 100644 --- a/packages/contracts/contracts/GoodCollective/GoodCollectiveSuperApp.sol +++ b/packages/contracts/contracts/GoodCollective/GoodCollectiveSuperApp.sol @@ -12,7 +12,7 @@ import "@uniswap/v3-periphery/contracts/libraries/TransferHelper.sol"; import "@uniswap/v3-periphery/contracts/interfaces/ISwapRouter.sol"; import "../DirectPayments/DirectPaymentsFactory.sol"; -import "../utils/SwapLibrary.sol"; +import "../utils/HelperLibrary.sol"; // import "hardhat/console.sol"; @@ -59,14 +59,6 @@ abstract contract GoodCollectiveSuperApp is SuperAppBaseFlow { uint128 lastUpdated; } - struct Stats { - uint256 netIncome; //without fees - uint256 totalFees; - uint256 lastUpdate; - address lastFeeRecipient; - int96 lastIncomeRate; - } - ISuperToken public superToken; mapping(address => SupporterData) public supporters; @@ -74,7 +66,7 @@ abstract contract GoodCollectiveSuperApp is SuperAppBaseFlow { //initialize cfaV1 variable CFAv1Library.InitData public cfaV1; - Stats public stats; + IGoodCollectiveSuperApp.Stats public stats; uint256[48] private _reserved; @@ -126,13 +118,7 @@ abstract contract GoodCollectiveSuperApp is SuperAppBaseFlow { view returns (uint256 netIncome, uint256 totalFees, int96 incomeFlowRate, int96 feeRate) { - incomeFlowRate = stats.lastIncomeRate; - netIncome = stats.netIncome + uint96(stats.lastIncomeRate) * (block.timestamp - stats.lastUpdate); - feeRate = superToken.getFlowRate(address(this), stats.lastFeeRecipient); - totalFees = - stats.totalFees + - uint96(superToken.getFlowRate(address(this), stats.lastFeeRecipient)) * - (block.timestamp - stats.lastUpdate); + return HelperLibrary.getRealtimeStats(stats, superToken); } /** @@ -182,11 +168,11 @@ abstract contract GoodCollectiveSuperApp is SuperAppBaseFlow { * @return Returns the context of the transaction */ function handleSwap( - SwapLibrary.SwapData memory _customData, + HelperLibrary.SwapData memory _customData, address _sender, bytes memory _ctx ) external onlyHostOrSender(_sender) returns (bytes memory) { - SwapLibrary.handleSwap(swapRouter, _customData, address(superToken), _sender); + HelperLibrary.handleSwap(swapRouter, _customData, address(superToken), _sender); // Return the context of the transaction return _ctx; diff --git a/packages/contracts/contracts/GoodCollective/IGoodCollectiveSuperApp.sol b/packages/contracts/contracts/GoodCollective/IGoodCollectiveSuperApp.sol new file mode 100644 index 00000000..ac0997da --- /dev/null +++ b/packages/contracts/contracts/GoodCollective/IGoodCollectiveSuperApp.sol @@ -0,0 +1,12 @@ +// SPDX-License-Identifier: MIT +pragma solidity >=0.8.0; + +interface IGoodCollectiveSuperApp { + struct Stats { + uint256 netIncome; //without fees + uint256 totalFees; + uint256 lastUpdate; + address lastFeeRecipient; + int96 lastIncomeRate; + } +} diff --git a/packages/contracts/contracts/utils/SwapLibrary.sol b/packages/contracts/contracts/utils/HelperLibrary.sol similarity index 70% rename from packages/contracts/contracts/utils/SwapLibrary.sol rename to packages/contracts/contracts/utils/HelperLibrary.sol index a978dfbd..3e4e6d57 100644 --- a/packages/contracts/contracts/utils/SwapLibrary.sol +++ b/packages/contracts/contracts/utils/HelperLibrary.sol @@ -4,8 +4,14 @@ pragma solidity >=0.8.0; import "@uniswap/v3-periphery/contracts/libraries/TransferHelper.sol"; import "@uniswap/v3-periphery/contracts/interfaces/ISwapRouter.sol"; +import { ISuperToken } from "@superfluid-finance/ethereum-contracts/contracts/interfaces/superfluid/ISuperfluid.sol"; +import { SuperTokenV1Library } from "@superfluid-finance/ethereum-contracts/contracts/apps/SuperTokenV1Library.sol"; + +import "../GoodCollective/IGoodCollectiveSuperApp.sol"; + +library HelperLibrary { + using SuperTokenV1Library for ISuperToken; -library SwapLibrary { /** * @dev A struct containing information about a token swap * @param swapFrom The address of the token being swapped @@ -27,7 +33,7 @@ library SwapLibrary { SwapData memory _customData, address outTokenIfNoPath, address _sender - ) internal { + ) external { // Transfer the tokens from the sender to this contract TransferHelper.safeTransferFrom(_customData.swapFrom, _sender, address(this), _customData.amount); @@ -61,4 +67,17 @@ library SwapLibrary { swapRouter.exactInputSingle(params); } } + + function getRealtimeStats( + IGoodCollectiveSuperApp.Stats memory stats, + ISuperToken superToken + ) external view returns (uint256 netIncome, uint256 totalFees, int96 incomeFlowRate, int96 feeRate) { + incomeFlowRate = stats.lastIncomeRate; + netIncome = stats.netIncome + uint96(stats.lastIncomeRate) * (block.timestamp - stats.lastUpdate); + feeRate = superToken.getFlowRate(address(this), stats.lastFeeRecipient); + totalFees = + stats.totalFees + + uint96(superToken.getFlowRate(address(this), stats.lastFeeRecipient)) * + (block.timestamp - stats.lastUpdate); + } } diff --git a/packages/contracts/hardhat.config.ts b/packages/contracts/hardhat.config.ts index 542e3e40..db2478f7 100644 --- a/packages/contracts/hardhat.config.ts +++ b/packages/contracts/hardhat.config.ts @@ -53,7 +53,7 @@ const config: HardhatUserConfig = { url: `https://alfajores-forno.celo-testnet.org`, gasPrice: 5000000000, accounts: { - mnemonic: mnemonic, + mnemonic, }, verify: { etherscan: { @@ -67,7 +67,7 @@ const config: HardhatUserConfig = { url: `https://forno.celo.org`, gasPrice: 5000000000, accounts: { - mnemonic: mnemonic, + mnemonic, }, verify: { etherscan: { diff --git a/packages/sdk-js/scripts/createPool.ts b/packages/sdk-js/scripts/createPool.ts index 049e67ac..fd60c366 100644 --- a/packages/sdk-js/scripts/createPool.ts +++ b/packages/sdk-js/scripts/createPool.ts @@ -11,12 +11,16 @@ const wallet = new ethers.Wallet(process.env.PRIVATE_KEY || '').connect(provider const sdk = new GoodCollectiveSDK('42220', provider, { nftStorageKey: process.env.VITE_NFTSTORAGE_KEY }); const main = async () => { - const projectId = 'your project id'; + const projectId = 'silvi'; const poolAttributes = { - name: 'pool name', - description: 'pool description', - email: 'contact@email.com', - twitter: '@handle', + name: 'Silvi - Kakamega Farmer Tree Nurseries', + description: + 'This Collective directly supports smallholder farmers around Kenya’s Kakamega forest. These farmers are acting as nurseries, growing and nurturing native trees to maturity for subsequent reforestation. In partnership with Silvi.', + email: '', + website: 'https://www.silvi.earth', + twitter: 'https://twitter.com/SilviProtocol', + instagram: '', + threads: '', }; const poolSettings = { validEvents: [1, 2], @@ -25,6 +29,7 @@ const main = async () => { membersValidator: ethers.constants.AddressZero, uniquenessValidator: ethers.constants.AddressZero, rewardToken: '0xFa51eFDc0910CCdA91732e6806912Fa12e2FD475', //celo dev token + allowRewardOverride: false, }; const poolLimits = { diff --git a/packages/sdk-js/src/goodcollective/goodcollective.ts b/packages/sdk-js/src/goodcollective/goodcollective.ts index 770053b3..974e7dd5 100644 --- a/packages/sdk-js/src/goodcollective/goodcollective.ts +++ b/packages/sdk-js/src/goodcollective/goodcollective.ts @@ -17,8 +17,11 @@ export type SwapData = SwapLibrary.SwapDataStruct; export type PoolAttributes = { name: string; description: string; - twitter: string; - email: string; + twitter?: string; + email?: string; + instagram?: string; + threads?: string; + website?: string; }; export type SDKOptions = { network?: string; From 8a860d98b4977f3e4d6e6557de835e5592bbc1bf Mon Sep 17 00:00:00 2001 From: sirpy Date: Mon, 9 Oct 2023 17:19:38 +0300 Subject: [PATCH 3/4] add: deployed upgraded pool with override --- .../deploy/00.DirectPayments.deploy.ts | 9 + packages/contracts/releases/deployment.json | 6880 +++++++++-------- packages/sdk-js/scripts/createPool.ts | 12 +- .../src/goodcollective/goodcollective.ts | 4 +- 4 files changed, 3559 insertions(+), 3346 deletions(-) diff --git a/packages/contracts/deploy/00.DirectPayments.deploy.ts b/packages/contracts/deploy/00.DirectPayments.deploy.ts index 2bcb4659..b3f035fe 100644 --- a/packages/contracts/deploy/00.DirectPayments.deploy.ts +++ b/packages/contracts/deploy/00.DirectPayments.deploy.ts @@ -45,12 +45,21 @@ const func: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { }); sfHost = sfFramework.host.contract.address; } + + const helplib = await deploy('HelperLibrary', { + from: deployer, + log: true, + }); + console.log('deploying pool impl', [sfHost, swapMock?.address || '0x5615CDAb10dc425a742d643d949a7F474C01abc4']); const pool = await deploy('DirectPaymentsPool', { // Learn more about args here: https://www.npmjs.com/package/hardhat-deploy#deploymentsdeploy from: deployer, args: [sfHost, swapMock?.address || '0x5615CDAb10dc425a742d643d949a7F474C01abc4'], //uniswap on celo log: true, + libraries: { + HelperLibrary: helplib.address, + }, }); const nft = await deploy('ProvableNFT', { diff --git a/packages/contracts/releases/deployment.json b/packages/contracts/releases/deployment.json index f6b75db1..e43f58ec 100644 --- a/packages/contracts/releases/deployment.json +++ b/packages/contracts/releases/deployment.json @@ -6406,156 +6406,9 @@ "name": "celo", "chainId": "42220", "contracts": { - "DirectPaymentsPool": { - "address": "0x4BEde11080fCA6CfBc28F04C7375Ca0e60a6b1d1", + "DirectPaymentsFactory": { + "address": "0x58b5E37c5aFad520dD93E92A5D11B8721A9115F0", "abi": [ - { - "inputs": [ - { - "internalType": "contract ISuperfluid", - "name": "_host", - "type": "address" - }, - { - "internalType": "contract ISwapRouter", - "name": "_swapRouter", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "ALREADY_CLAIMED", - "type": "error" - }, - { - "inputs": [], - "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": "NFTTYPE_CHANGED", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "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" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "ONLY_HOST_OR_SENDER", - "type": "error" - }, - { - "inputs": [], - "name": "OVER_GLOBAL_LIMITS", - "type": "error" - }, - { - "inputs": [ - { - "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" - }, { "anonymous": false, "inputs": [ @@ -6593,93 +6446,38 @@ "inputs": [ { "indexed": true, - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint16", - "name": "eventType", - "type": "uint16" - }, - { - "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" + "internalType": "address", + "name": "implementation", + "type": "address" } ], - "name": "EventRewardClaimed", + "name": "Upgraded", "type": "event" }, { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint8", - "name": "version", - "type": "uint8" - } - ], - "name": "Initialized", - "type": "event" + "stateMutability": "payable", + "type": "fallback" }, { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalRewards", - "type": "uint256" - } - ], - "name": "NFTClaimed", - "type": "event" + "stateMutability": "payable", + "type": "receive" + }, + { + "inputs": [], + "name": "NOT_PROJECT_OWNER", + "type": "error" }, { "anonymous": false, "inputs": [ { "indexed": false, - "internalType": "address", - "name": "contributer", - "type": "address" + "internalType": "uint8", + "name": "version", + "type": "uint8" } ], - "name": "NOT_MEMBER_OR_WHITELISTED", + "name": "Initialized", "type": "event" }, { @@ -6745,6 +6543,11 @@ "internalType": "contract IERC20Upgradeable", "name": "rewardToken", "type": "address" + }, + { + "internalType": "bool", + "name": "allowRewardOverride", + "type": "bool" } ], "indexed": false, @@ -6783,80 +6586,38 @@ "anonymous": false, "inputs": [ { - "components": [ - { - "internalType": "uint256", - "name": "maxTotalPerMonth", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "maxMemberPerMonth", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "maxMemberPerDay", - "type": "uint256" - } - ], + "indexed": true, + "internalType": "address", + "name": "pool", + "type": "address" + }, + { "indexed": false, - "internalType": "struct DirectPaymentsPool.SafetyLimits", - "name": "limits", - "type": "tuple" + "internalType": "string", + "name": "ipfs", + "type": "string" } ], - "name": "PoolLimitsChanged", + "name": "PoolDetailsChanged", "type": "event" }, { "anonymous": false, "inputs": [ { - "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" - } - ], + "indexed": true, + "internalType": "address", + "name": "pool", + "type": "address" + }, + { "indexed": false, - "internalType": "struct DirectPaymentsPool.PoolSettings", - "name": "settings", - "type": "tuple" + "internalType": "bool", + "name": "isVerified", + "type": "bool" } ], - "name": "PoolSettingsChanged", + "name": "PoolVerifiedChanged", "type": "event" }, { @@ -6940,69 +6701,13 @@ { "indexed": true, "internalType": "address", - "name": "supporter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "previousContribution", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "contribution", - "type": "uint256" - }, - { - "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": "SupporterUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "implementation", + "name": "impl", "type": "address" } ], - "name": "Upgraded", + "name": "UpdatedImpl", "type": "event" }, - { - "inputs": [], - "name": "CFAV1_TYPE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, { "inputs": [], "name": "DEFAULT_ADMIN_ROLE", @@ -7017,223 +6722,304 @@ "type": "function" }, { - "inputs": [], - "name": "MANAGER_ROLE", - "outputs": [ + "inputs": [ { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "MEMBER_ROLE", - "outputs": [ + "internalType": "contract DirectPaymentsPool", + "name": "_pool", + "type": "address" + }, { - "internalType": "bytes32", - "name": "", - "type": "bytes32" + "internalType": "string", + "name": "_ipfs", + "type": "string" } ], - "stateMutability": "view", + "name": "changePoolDetails", + "outputs": [], + "stateMutability": "nonpayable", "type": "function" }, { - "inputs": [], - "name": "MINTER_ROLE", - "outputs": [ + "inputs": [ { - "internalType": "bytes32", - "name": "", - "type": "bytes32" + "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" } ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "MIN_FLOW_RATE", + "name": "createBeaconPool", "outputs": [ { - "internalType": "int96", - "name": "", - "type": "int96" + "internalType": "contract DirectPaymentsPool", + "name": "pool", + "type": "address" } ], - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { - "internalType": "contract ISuperToken", - "name": "superToken", - "type": "address" - }, - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" + "internalType": "string", + "name": "_projectId", + "type": "string" }, { - "internalType": "bytes", - "name": "agreementData", - "type": "bytes" + "internalType": "string", + "name": "_ipfs", + "type": "string" }, { - "internalType": "bytes", - "name": "", - "type": "bytes" + "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": "ctx", - "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" } ], - "name": "afterAgreementCreated", + "name": "createPool", "outputs": [ { - "internalType": "bytes", - "name": "newCtx", - "type": "bytes" + "internalType": "contract DirectPaymentsPool", + "name": "pool", + "type": "address" } ], "stateMutability": "nonpayable", "type": "function" }, { - "inputs": [ - { - "internalType": "contract ISuperToken", - "name": "superToken", - "type": "address" - }, - { - "internalType": "address", - "name": "agreementClass", - "type": "address" - }, + "inputs": [], + "name": "feeBps", + "outputs": [ { - "internalType": "bytes32", + "internalType": "uint32", "name": "", - "type": "bytes32" - }, - { - "internalType": "bytes", - "name": "agreementData", - "type": "bytes" - }, - { - "internalType": "bytes", - "name": "cbdata", - "type": "bytes" - }, - { - "internalType": "bytes", - "name": "ctx", - "type": "bytes" + "type": "uint32" } ], - "name": "afterAgreementTerminated", + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "feeRecipient", "outputs": [ { - "internalType": "bytes", - "name": "newCtx", - "type": "bytes" + "internalType": "address", + "name": "", + "type": "address" } ], - "stateMutability": "nonpayable", + "stateMutability": "view", "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": "cbdata", - "type": "bytes" - }, - { - "internalType": "bytes", - "name": "ctx", - "type": "bytes" } ], - "name": "afterAgreementUpdated", + "name": "getRoleAdmin", "outputs": [ { - "internalType": "bytes", - "name": "newCtx", - "type": "bytes" + "internalType": "bytes32", + "name": "", + "type": "bytes32" } ], - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { "inputs": [ { - "internalType": "contract ISuperToken", - "name": "superToken", - "type": "address" + "internalType": "bytes32", + "name": "role", + "type": "bytes32" }, { "internalType": "address", - "name": "agreementClass", + "name": "account", "type": "address" - }, + } + ], + "name": "grantRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ { "internalType": "bytes32", - "name": "", + "name": "role", "type": "bytes32" }, { - "internalType": "bytes", - "name": "", - "type": "bytes" - }, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasRole", + "outputs": [ { - "internalType": "bytes", + "internalType": "bool", "name": "", - "type": "bytes" + "type": "bool" } ], - "name": "beforeAgreementCreated", + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "impl", "outputs": [ { - "internalType": "bytes", + "internalType": "contract UpgradeableBeacon", "name": "", - "type": "bytes" + "type": "address" } ], "stateMutability": "view", @@ -7242,76 +7028,76 @@ { "inputs": [ { - "internalType": "contract ISuperToken", - "name": "superToken", + "internalType": "address", + "name": "_owner", "type": "address" }, { "internalType": "address", - "name": "agreementClass", + "name": "_dpimpl", "type": "address" }, { - "internalType": "bytes32", - "name": "", - "type": "bytes32" + "internalType": "contract ProvableNFT", + "name": "_nft", + "type": "address" }, { - "internalType": "bytes", - "name": "agreementData", - "type": "bytes" + "internalType": "address", + "name": "_feeRecipient", + "type": "address" }, { - "internalType": "bytes", - "name": "", - "type": "bytes" + "internalType": "uint32", + "name": "_feeBps", + "type": "uint32" } ], - "name": "beforeAgreementTerminated", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "nextNftType", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" } ], "stateMutability": "view", "type": "function" }, { - "inputs": [ - { - "internalType": "contract ISuperToken", - "name": "superToken", - "type": "address" - }, + "inputs": [], + "name": "nft", + "outputs": [ { - "internalType": "address", - "name": "agreementClass", + "internalType": "contract ProvableNFT", + "name": "", "type": "address" - }, + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ { "internalType": "bytes32", "name": "", "type": "bytes32" - }, - { - "internalType": "bytes", - "name": "agreementData", - "type": "bytes" - }, - { - "internalType": "bytes", - "name": "", - "type": "bytes" } ], - "name": "beforeAgreementUpdated", + "name": "projectIdToControlPool", "outputs": [ { - "internalType": "bytes", + "internalType": "contract DirectPaymentsPool", "name": "", - "type": "bytes" + "type": "address" } ], "stateMutability": "view", @@ -7319,17 +7105,41 @@ }, { "inputs": [], - "name": "cfaV1", + "name": "proxiableUUID", "outputs": [ { - "internalType": "contract ISuperfluid", - "name": "host", + "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": "contract IConstantFlowAgreementV1", - "name": "cfa", - "type": "address" + "internalType": "bool", + "name": "isVerified", + "type": "bool" + }, + { + "internalType": "string", + "name": "projectId", + "type": "string" } ], "stateMutability": "view", @@ -7338,12 +7148,17 @@ { "inputs": [ { - "internalType": "uint256", - "name": "_nftId", - "type": "uint256" + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" } ], - "name": "claim", + "name": "renounceRole", "outputs": [], "stateMutability": "nonpayable", "type": "function" @@ -7351,66 +7166,17 @@ { "inputs": [ { - "internalType": "uint256", - "name": "_nftId", - "type": "uint256" + "internalType": "bytes32", + "name": "role", + "type": "bytes32" }, { - "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": "struct ProvableNFT.EventData[]", - "name": "events", - "type": "tuple[]" - } - ], - "internalType": "struct ProvableNFT.NFTData", - "name": "_data", - "type": "tuple" + "internalType": "address", + "name": "account", + "type": "address" } ], - "name": "claim", + "name": "revokeRole", "outputs": [], "stateMutability": "nonpayable", "type": "function" @@ -7418,252 +7184,200 @@ { "inputs": [ { - "internalType": "uint256", - "name": "", - "type": "uint256" + "internalType": "address", + "name": "_feeRecipient", + "type": "address" + }, + { + "internalType": "uint32", + "name": "_feeBps", + "type": "uint32" } ], - "name": "claimedNfts", - "outputs": [ + "name": "setFeeInfo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract DirectPaymentsPool", + "name": "_pool", + "type": "address" + }, { "internalType": "bool", - "name": "", + "name": "_isVerified", "type": "bool" } ], - "stateMutability": "view", + "name": "setVerified", + "outputs": [], + "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { - "internalType": "address", - "name": "_user", - "type": "address" + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" } ], - "name": "getRealtimeContribution", + "name": "supportsInterface", "outputs": [ { - "internalType": "uint256", + "internalType": "bool", "name": "", - "type": "uint256" + "type": "bool" } ], "stateMutability": "view", "type": "function" }, { - "inputs": [], - "name": "getRealtimeStats", - "outputs": [ - { - "internalType": "uint256", - "name": "netIncome", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "totalFees", - "type": "uint256" - }, - { - "internalType": "int96", - "name": "incomeFlowRate", - "type": "int96" - }, + "inputs": [ { - "internalType": "int96", - "name": "feeRate", - "type": "int96" + "internalType": "address", + "name": "_impl", + "type": "address" } ], - "stateMutability": "view", + "name": "updateImpl", + "outputs": [], + "stateMutability": "nonpayable", "type": "function" }, { - "inputs": [], - "name": "getRegistry", - "outputs": [ + "inputs": [ { - "internalType": "contract DirectPaymentsFactory", - "name": "", + "internalType": "address", + "name": "newImplementation", "type": "address" } ], - "stateMutability": "view", + "name": "upgradeTo", + "outputs": [], + "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleAdmin", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "globalLimits", - "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" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, { "internalType": "address", - "name": "account", + "name": "newImplementation", "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" } ], - "name": "grantRole", + "name": "upgradeToAndCall", "outputs": [], - "stateMutability": "nonpayable", + "stateMutability": "payable", "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 SwapLibrary.SwapData", - "name": "_customData", - "type": "tuple" - }, { "internalType": "address", - "name": "_sender", + "name": "_logic", "type": "address" }, { "internalType": "bytes", - "name": "_ctx", - "type": "bytes" - } - ], - "name": "handleSwap", - "outputs": [ - { - "internalType": "bytes", - "name": "", + "name": "_data", "type": "bytes" } ], - "stateMutability": "nonpayable", - "type": "function" + "stateMutability": "payable", + "type": "constructor" + } + ] + }, + "DirectPaymentsFactory_Implementation": { + "address": "0xfF6F1C470e19FA3486f825DBFDc72af529b31A2c", + "abi": [ + { + "inputs": [], + "name": "NOT_PROJECT_OWNER", + "type": "error" }, { + "anonymous": false, "inputs": [ { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" + "indexed": false, + "internalType": "address", + "name": "previousAdmin", + "type": "address" }, { + "indexed": false, "internalType": "address", - "name": "account", + "name": "newAdmin", "type": "address" } ], - "name": "hasRole", - "outputs": [ + "name": "AdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ { - "internalType": "bool", - "name": "", - "type": "bool" + "indexed": true, + "internalType": "address", + "name": "beacon", + "type": "address" } ], - "stateMutability": "view", - "type": "function" + "name": "BeaconUpgraded", + "type": "event" }, { - "inputs": [], - "name": "host", - "outputs": [ + "anonymous": false, + "inputs": [ { - "internalType": "contract ISuperfluid", - "name": "", - "type": "address" + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" } ], - "stateMutability": "view", - "type": "function" + "name": "Initialized", + "type": "event" }, { + "anonymous": false, "inputs": [ { - "internalType": "contract ProvableNFT", - "name": "_nft", + "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": [ { @@ -7700,10 +7414,16 @@ "internalType": "contract IERC20Upgradeable", "name": "rewardToken", "type": "address" + }, + { + "internalType": "bool", + "name": "allowRewardOverride", + "type": "bool" } ], + "indexed": false, "internalType": "struct DirectPaymentsPool.PoolSettings", - "name": "_settings", + "name": "poolSettings", "type": "tuple" }, { @@ -7724,271 +7444,162 @@ "type": "uint256" } ], + "indexed": false, "internalType": "struct DirectPaymentsPool.SafetyLimits", - "name": "_limits", + "name": "poolLimits", "type": "tuple" - }, - { - "internalType": "contract DirectPaymentsFactory", - "name": "_registry", - "type": "address" } ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "name": "PoolCreated", + "type": "event" }, { + "anonymous": false, "inputs": [ { - "internalType": "contract ISuperToken", - "name": "_superToken", + "indexed": true, + "internalType": "address", + "name": "pool", "type": "address" - } - ], - "name": "isAcceptedSuperToken", - "outputs": [ + }, { - "internalType": "bool", - "name": "", - "type": "bool" + "indexed": false, + "internalType": "string", + "name": "ipfs", + "type": "string" } ], - "stateMutability": "view", - "type": "function" + "name": "PoolDetailsChanged", + "type": "event" }, { - "inputs": [], - "name": "limits", - "outputs": [ - { - "internalType": "uint256", - "name": "maxTotalPerMonth", - "type": "uint256" - }, + "anonymous": false, + "inputs": [ { - "internalType": "uint256", - "name": "maxMemberPerMonth", - "type": "uint256" + "indexed": true, + "internalType": "address", + "name": "pool", + "type": "address" }, { - "internalType": "uint256", - "name": "maxMemberPerDay", - "type": "uint256" + "indexed": false, + "internalType": "bool", + "name": "isVerified", + "type": "bool" } ], - "stateMutability": "view", - "type": "function" + "name": "PoolVerifiedChanged", + "type": "event" }, { + "anonymous": false, "inputs": [ { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "memberLimits", - "outputs": [ - { - "internalType": "uint128", - "name": "daily", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "monthly", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "total", - "type": "uint128" + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" }, { - "internalType": "uint64", - "name": "lastReward", - "type": "uint64" + "indexed": true, + "internalType": "bytes32", + "name": "previousAdminRole", + "type": "bytes32" }, { - "internalType": "uint64", - "name": "lastMonth", - "type": "uint64" + "indexed": true, + "internalType": "bytes32", + "name": "newAdminRole", + "type": "bytes32" } ], - "stateMutability": "view", - "type": "function" + "name": "RoleAdminChanged", + "type": "event" }, { + "anonymous": false, "inputs": [ { - "internalType": "address", - "name": "_to", - "type": "address" + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" }, { - "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": "struct ProvableNFT.EventData[]", - "name": "events", - "type": "tuple[]" - } - ], - "internalType": "struct ProvableNFT.NFTData", - "name": "_nftData", - "type": "tuple" + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" }, { - "internalType": "bool", - "name": "withClaim", - "type": "bool" - } - ], - "name": "mintNFT", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "nft", - "outputs": [ - { - "internalType": "contract ProvableNFT", - "name": "", + "indexed": true, + "internalType": "address", + "name": "sender", "type": "address" } ], - "stateMutability": "view", - "type": "function" + "name": "RoleGranted", + "type": "event" }, { + "anonymous": false, "inputs": [ { - "internalType": "address", - "name": "operator", - "type": "address" + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" }, { + "indexed": true, "internalType": "address", - "name": "from", + "name": "account", "type": "address" }, { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "onERC721Received", - "outputs": [ - { - "internalType": "bytes4", - "name": "", - "type": "bytes4" + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" } ], - "stateMutability": "nonpayable", - "type": "function" + "name": "RoleRevoked", + "type": "event" }, { + "anonymous": false, "inputs": [ { + "indexed": true, "internalType": "address", - "name": "_sender", + "name": "impl", "type": "address" - }, - { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "name": "onTokenTransfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" } ], - "stateMutability": "nonpayable", - "type": "function" + "name": "UpdatedImpl", + "type": "event" }, { - "inputs": [], - "name": "proxiableUUID", - "outputs": [ + "anonymous": false, + "inputs": [ { - "internalType": "bytes32", - "name": "", - "type": "bytes32" + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" } ], - "stateMutability": "view", - "type": "function" + "name": "Upgraded", + "type": "event" }, { "inputs": [], - "name": "registry", + "name": "DEFAULT_ADMIN_ROLE", "outputs": [ { - "internalType": "contract DirectPaymentsFactory", + "internalType": "bytes32", "name": "", - "type": "address" + "type": "bytes32" } ], "stateMutability": "view", @@ -7997,17 +7608,17 @@ { "inputs": [ { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" + "internalType": "contract DirectPaymentsPool", + "name": "_pool", + "type": "address" }, { - "internalType": "address", - "name": "account", - "type": "address" + "internalType": "string", + "name": "_ipfs", + "type": "string" } ], - "name": "renounceRole", + "name": "changePoolDetails", "outputs": [], "stateMutability": "nonpayable", "type": "function" @@ -8015,32 +7626,71 @@ { "inputs": [ { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" + "internalType": "string", + "name": "_projectId", + "type": "string" }, { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "revokeRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ + "internalType": "string", + "name": "_ipfs", + "type": "string" + }, { "components": [ { - "internalType": "uint256", - "name": "maxTotalPerMonth", - "type": "uint256" + "internalType": "uint32", + "name": "nftType", + "type": "uint32" }, { - "internalType": "uint256", + "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" }, @@ -8055,13 +7705,29 @@ "type": "tuple" } ], - "name": "setPoolLimits", - "outputs": [], + "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": [ { @@ -8098,79 +7764,59 @@ "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": "setPoolSettings", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "settings", + "name": "createPool", "outputs": [ { - "internalType": "uint32", - "name": "nftType", - "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", + "internalType": "contract DirectPaymentsPool", + "name": "pool", "type": "address" } ], - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], - "name": "stats", + "name": "feeBps", "outputs": [ { - "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": "uint32", + "name": "", + "type": "uint32" } ], "stateMutability": "view", @@ -8178,10 +7824,10 @@ }, { "inputs": [], - "name": "superToken", + "name": "feeRecipient", "outputs": [ { - "internalType": "contract ISuperToken", + "internalType": "address", "name": "", "type": "address" } @@ -8192,70 +7838,54 @@ { "inputs": [ { - "internalType": "address", - "name": "_sender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "_ctx", - "type": "bytes" + "internalType": "bytes32", + "name": "role", + "type": "bytes32" } ], - "name": "support", + "name": "getRoleAdmin", "outputs": [ { - "internalType": "bytes", + "internalType": "bytes32", "name": "", - "type": "bytes" + "type": "bytes32" } ], - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { "inputs": [ { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "supporters", - "outputs": [ - { - "internalType": "uint256", - "name": "contribution", - "type": "uint256" - }, - { - "internalType": "int96", - "name": "flowRate", - "type": "int96" + "internalType": "bytes32", + "name": "role", + "type": "bytes32" }, { - "internalType": "uint128", - "name": "lastUpdated", - "type": "uint128" + "internalType": "address", + "name": "account", + "type": "address" } ], - "stateMutability": "view", + "name": "grantRole", + "outputs": [], + "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { - "internalType": "bytes4", - "name": "interfaceId", - "type": "bytes4" + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" } ], - "name": "supportsInterface", + "name": "hasRole", "outputs": [ { "internalType": "bool", @@ -8268,10 +7898,10 @@ }, { "inputs": [], - "name": "swapRouter", + "name": "impl", "outputs": [ { - "internalType": "contract ISwapRouter", + "internalType": "contract UpgradeableBeacon", "name": "", "type": "address" } @@ -8283,306 +7913,295 @@ "inputs": [ { "internalType": "address", - "name": "newImplementation", + "name": "_owner", + "type": "address" + }, + { + "internalType": "address", + "name": "_dpimpl", + "type": "address" + }, + { + "internalType": "contract ProvableNFT", + "name": "_nft", + "type": "address" + }, + { + "internalType": "address", + "name": "_feeRecipient", "type": "address" + }, + { + "internalType": "uint32", + "name": "_feeBps", + "type": "uint32" } ], - "name": "upgradeTo", + "name": "initialize", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { - "inputs": [ + "inputs": [], + "name": "nextNftType", + "outputs": [ { - "internalType": "address", - "name": "newImplementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" + "internalType": "uint32", + "name": "", + "type": "uint32" } ], - "name": "upgradeToAndCall", - "outputs": [], - "stateMutability": "payable", + "stateMutability": "view", "type": "function" }, { - "inputs": [ + "inputs": [], + "name": "nft", + "outputs": [ { - "internalType": "bytes", - "name": "data", - "type": "bytes" + "internalType": "contract ProvableNFT", + "name": "", + "type": "address" } ], - "name": "upgradeToLatest", - "outputs": [], - "stateMutability": "payable", + "stateMutability": "view", "type": "function" - } - ] - }, - "ProvableNFT_Implementation": { - "address": "0xF7b9212c53B677f02c475077b48E3a6EB6dCA8D6", - "abi": [ + }, { "inputs": [ { "internalType": "bytes32", - "name": "dataHash", + "name": "", "type": "bytes32" - }, + } + ], + "name": "projectIdToControlPool", + "outputs": [ { - "internalType": "bytes32", - "name": "tokenId", - "type": "bytes32" + "internalType": "contract DirectPaymentsPool", + "name": "", + "type": "address" } ], - "name": "BAD_DATAHASH", - "type": "error" + "stateMutability": "view", + "type": "function" }, { "inputs": [], - "name": "BAD_NFTTYPE", - "type": "error" + "name": "proxiableUUID", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" }, { "inputs": [ { - "internalType": "uint32", + "internalType": "address", "name": "", - "type": "uint32" + "type": "address" } ], - "name": "NOT_MANAGER", - "type": "error" - }, - { - "inputs": [], - "name": "NOT_MINTER", - "type": "error" + "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" }, { - "anonymous": false, "inputs": [ { - "indexed": false, - "internalType": "address", - "name": "previousAdmin", - "type": "address" + "internalType": "bytes32", + "name": "role", + "type": "bytes32" }, { - "indexed": false, "internalType": "address", - "name": "newAdmin", + "name": "account", "type": "address" } ], - "name": "AdminChanged", - "type": "event" + "name": "renounceRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - "anonymous": false, "inputs": [ { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" + "internalType": "bytes32", + "name": "role", + "type": "bytes32" }, { - "indexed": true, "internalType": "address", - "name": "approved", + "name": "account", "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" } ], - "name": "Approval", - "type": "event" + "name": "revokeRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - "anonymous": false, "inputs": [ { - "indexed": true, "internalType": "address", - "name": "owner", + "name": "_feeRecipient", "type": "address" }, { - "indexed": true, - "internalType": "address", - "name": "operator", + "internalType": "uint32", + "name": "_feeBps", + "type": "uint32" + } + ], + "name": "setFeeInfo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract DirectPaymentsPool", + "name": "_pool", "type": "address" }, { - "indexed": false, "internalType": "bool", - "name": "approved", + "name": "_isVerified", "type": "bool" } ], - "name": "ApprovalForAll", - "type": "event" + "name": "setVerified", + "outputs": [], + "stateMutability": "nonpayable", + "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": false, - "internalType": "uint8", - "name": "version", - "type": "uint8" + "internalType": "bool", + "name": "", + "type": "bool" } ], - "name": "Initialized", - "type": "event" + "stateMutability": "view", + "type": "function" }, { - "anonymous": false, "inputs": [ { - "indexed": false, - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - }, - { - "indexed": false, "internalType": "address", - "name": "to", + "name": "_impl", "type": "address" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "nftDataHash", - "type": "bytes32" } ], - "name": "ProvableNftMinted", - "type": "event" + "name": "updateImpl", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - "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" + "internalType": "address", + "name": "newImplementation", + "type": "address" } ], - "name": "RoleAdminChanged", - "type": "event" + "name": "upgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - "anonymous": false, "inputs": [ { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, "internalType": "address", - "name": "account", + "name": "newImplementation", "type": "address" }, { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" + "internalType": "bytes", + "name": "data", + "type": "bytes" } ], - "name": "RoleGranted", - "type": "event" - }, + "name": "upgradeToAndCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + } + ] + }, + "DirectPaymentsFactory_Proxy": { + "address": "0x58b5E37c5aFad520dD93E92A5D11B8721A9115F0", + "abi": [ { - "anonymous": false, "inputs": [ { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, "internalType": "address", - "name": "account", + "name": "_logic", "type": "address" }, { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" + "internalType": "bytes", + "name": "_data", + "type": "bytes" } ], - "name": "RoleRevoked", - "type": "event" + "stateMutability": "payable", + "type": "constructor" }, { "anonymous": false, "inputs": [ { - "indexed": true, + "indexed": false, "internalType": "address", - "name": "from", + "name": "previousAdmin", "type": "address" }, { - "indexed": true, + "indexed": false, "internalType": "address", - "name": "to", + "name": "newAdmin", "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" } ], - "name": "Transfer", + "name": "AdminChanged", "type": "event" }, { @@ -8591,435 +8210,338 @@ { "indexed": true, "internalType": "address", - "name": "implementation", + "name": "beacon", "type": "address" } ], - "name": "Upgraded", + "name": "BeaconUpgraded", "type": "event" }, { - "inputs": [], - "name": "DEFAULT_ADMIN_ROLE", - "outputs": [ + "anonymous": false, + "inputs": [ { - "internalType": "bytes32", - "name": "", - "type": "bytes32" + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" } ], - "stateMutability": "view", - "type": "function" + "name": "Upgraded", + "type": "event" }, { - "inputs": [], - "name": "MINTER_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" + "stateMutability": "payable", + "type": "fallback" }, + { + "stateMutability": "payable", + "type": "receive" + } + ] + }, + "DirectPaymentsPool": { + "address": "0xc70B7dc0C960e9303E57daA9fee23727e9C0A176", + "abi": [ { "inputs": [ { - "internalType": "address", - "name": "_manager", + "internalType": "contract ISuperfluid", + "name": "_host", "type": "address" }, { - "internalType": "uint32", - "name": "_nftType", - "type": "uint32" + "internalType": "contract ISwapRouter", + "name": "_swapRouter", + "type": "address" } ], - "name": "addManager", - "outputs": [], "stateMutability": "nonpayable", - "type": "function" + "type": "constructor" }, { "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, { "internalType": "uint256", - "name": "tokenId", + "name": "", "type": "uint256" } ], - "name": "approve", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "name": "ALREADY_CLAIMED", + "type": "error" + }, + { + "inputs": [], + "name": "EMPTY_MANAGER", + "type": "error" }, { "inputs": [ { - "internalType": "address", - "name": "owner", - "type": "address" + "internalType": "int96", + "name": "curFeeRate", + "type": "int96" + }, + { + "internalType": "int96", + "name": "newFeeRate", + "type": "int96" } ], - "name": "balanceOf", - "outputs": [ + "name": "FEE_FLOW_FAILED", + "type": "error" + }, + { + "inputs": [ { - "internalType": "uint256", - "name": "", - "type": "uint256" + "internalType": "int96", + "name": "flowRate", + "type": "int96" } ], - "stateMutability": "view", - "type": "function" + "name": "MIN_FLOWRATE", + "type": "error" + }, + { + "inputs": [], + "name": "NFTTYPE_CHANGED", + "type": "error" }, { "inputs": [ { "internalType": "uint256", - "name": "tokenId", + "name": "", "type": "uint256" } ], - "name": "getApproved", - "outputs": [ + "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" + }, + { + "inputs": [ { "internalType": "address", "name": "", "type": "address" } ], - "stateMutability": "view", - "type": "function" + "name": "ONLY_HOST_OR_SENDER", + "type": "error" + }, + { + "inputs": [], + "name": "OVER_GLOBAL_LIMITS", + "type": "error" }, { "inputs": [ { - "internalType": "uint32", - "name": "_nftType", - "type": "uint32" + "internalType": "address", + "name": "", + "type": "address" } ], - "name": "getManagerRole", - "outputs": [ + "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": [ { - "internalType": "bytes32", - "name": "roleHash", - "type": "bytes32" + "indexed": false, + "internalType": "address", + "name": "previousAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" } ], - "stateMutability": "pure", - "type": "function" + "name": "AdminChanged", + "type": "event" }, { + "anonymous": false, "inputs": [ { - "internalType": "uint256", - "name": "_tokenId", - "type": "uint256" - } - ], - "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": "struct ProvableNFT.EventData[]", - "name": "events", - "type": "tuple[]" - } - ], - "internalType": "struct ProvableNFT.NFTData", - "name": "", - "type": "tuple" + "indexed": true, + "internalType": "address", + "name": "beacon", + "type": "address" } ], - "stateMutability": "view", - "type": "function" + "name": "BeaconUpgraded", + "type": "event" }, { + "anonymous": false, "inputs": [ { + "indexed": true, "internalType": "uint256", - "name": "_tokenId", + "name": "tokenId", "type": "uint256" }, { - "internalType": "uint256", - "name": "_index", - "type": "uint256" - } - ], - "name": "getNFTEvent", - "outputs": [ + "indexed": false, + "internalType": "uint16", + "name": "eventType", + "type": "uint16" + }, { - "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": "struct ProvableNFT.EventData", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ + "indexed": false, + "internalType": "uint32", + "name": "eventTimestamp", + "type": "uint32" + }, { + "indexed": false, "internalType": "uint256", - "name": "_tokenId", + "name": "eventQuantity", "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": "struct ProvableNFT.EventData[]", - "name": "", - "type": "tuple[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleAdmin", - "outputs": [ + }, { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ + "indexed": false, + "internalType": "string", + "name": "eventUri", + "type": "string" + }, { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" + "indexed": false, + "internalType": "address[]", + "name": "contributers", + "type": "address[]" }, { - "internalType": "address", - "name": "account", - "type": "address" + "indexed": false, + "internalType": "uint256", + "name": "rewardPerContributer", + "type": "uint256" } ], - "name": "grantRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "name": "EventRewardClaimed", + "type": "event" }, { + "anonymous": false, "inputs": [ { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "hasRole", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" } ], - "stateMutability": "view", - "type": "function" + "name": "Initialized", + "type": "event" }, { + "anonymous": false, "inputs": [ { - "internalType": "string", - "name": "_name", - "type": "string" + "indexed": true, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" }, { - "internalType": "string", - "name": "_symbol", - "type": "string" + "indexed": false, + "internalType": "uint256", + "name": "totalRewards", + "type": "uint256" } ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "name": "NFTClaimed", + "type": "event" }, { + "anonymous": false, "inputs": [ { + "indexed": false, "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "operator", + "name": "contributer", "type": "address" } ], - "name": "isApprovedForAll", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" + "name": "NOT_MEMBER_OR_WHITELISTED", + "type": "event" }, { + "anonymous": false, "inputs": [ { + "indexed": true, "internalType": "address", - "name": "_to", + "name": "pool", "type": "address" }, { + "indexed": true, "internalType": "string", - "name": "_uri", + "name": "projectId", "type": "string" }, { - "internalType": "bytes32", - "name": "_nftDataHash", - "type": "bytes32" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ + "indexed": false, + "internalType": "string", + "name": "ipfs", + "type": "string" + }, { - "internalType": "address", - "name": "_to", - "type": "address" + "indexed": true, + "internalType": "uint32", + "name": "nftType", + "type": "uint32" }, { "components": [ @@ -9029,113 +8551,106 @@ "type": "uint32" }, { - "internalType": "uint16", - "name": "version", - "type": "uint16" + "internalType": "uint16[]", + "name": "validEvents", + "type": "uint16[]" }, { - "internalType": "string", - "name": "nftUri", - "type": "string" + "internalType": "uint128[]", + "name": "rewardPerEvent", + "type": "uint128[]" }, { - "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": "struct ProvableNFT.EventData[]", - "name": "events", - "type": "tuple[]" + "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" } ], - "internalType": "struct ProvableNFT.NFTData", - "name": "_nftData", + "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" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" } ], - "stateMutability": "view", - "type": "function" + "name": "PoolCreated", + "type": "event" }, { + "anonymous": false, "inputs": [ { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "ownerOf", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" + "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" } ], - "stateMutability": "view", - "type": "function" + "name": "PoolLimitsChanged", + "type": "event" }, { + "anonymous": false, "inputs": [ - { - "internalType": "uint256", - "name": "_tokenId", - "type": "uint256" - }, { "components": [ { @@ -9144,245 +8659,215 @@ "type": "uint32" }, { - "internalType": "uint16", - "name": "version", - "type": "uint16" + "internalType": "uint16[]", + "name": "validEvents", + "type": "uint16[]" }, { - "internalType": "string", - "name": "nftUri", - "type": "string" + "internalType": "uint128[]", + "name": "rewardPerEvent", + "type": "uint128[]" }, { - "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": "struct ProvableNFT.EventData[]", - "name": "events", - "type": "tuple[]" - } - ], - "internalType": "struct ProvableNFT.NFTData", - "name": "_nftData", - "type": "tuple" - } - ], - "name": "proveNFTData", - "outputs": [ - { - "components": [ + "internalType": "address", + "name": "manager", + "type": "address" + }, { - "internalType": "uint32", - "name": "nftType", - "type": "uint32" + "internalType": "contract IMembersValidator", + "name": "membersValidator", + "type": "address" }, { - "internalType": "uint16", - "name": "version", - "type": "uint16" + "internalType": "contract IIdentityV2", + "name": "uniquenessValidator", + "type": "address" }, { - "internalType": "string", - "name": "nftUri", - "type": "string" + "internalType": "contract IERC20Upgradeable", + "name": "rewardToken", + "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": "struct ProvableNFT.EventData[]", - "name": "events", - "type": "tuple[]" + "internalType": "bool", + "name": "allowRewardOverride", + "type": "bool" } ], - "internalType": "struct ProvableNFT.NFTData", - "name": "data", + "indexed": false, + "internalType": "struct DirectPaymentsPool.PoolSettings", + "name": "settings", "type": "tuple" } ], - "stateMutability": "view", - "type": "function" + "name": "PoolSettingsChanged", + "type": "event" }, { - "inputs": [], - "name": "proxiableUUID", - "outputs": [ + "anonymous": false, + "inputs": [ { + "indexed": true, "internalType": "bytes32", - "name": "", + "name": "role", "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ + }, { + "indexed": true, "internalType": "bytes32", - "name": "role", + "name": "previousAdminRole", "type": "bytes32" }, { - "internalType": "address", - "name": "account", - "type": "address" + "indexed": true, + "internalType": "bytes32", + "name": "newAdminRole", + "type": "bytes32" } ], - "name": "renounceRole", - "outputs": [], - "stateMutability": "nonpayable", - "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": "revokeRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "name": "RoleGranted", + "type": "event" }, { + "anonymous": false, "inputs": [ { - "internalType": "address", - "name": "from", - "type": "address" + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" }, { + "indexed": true, "internalType": "address", - "name": "to", + "name": "account", "type": "address" }, { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" } ], - "name": "safeTransferFrom", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "name": "RoleRevoked", + "type": "event" }, { + "anonymous": false, "inputs": [ { + "indexed": true, "internalType": "address", - "name": "from", + "name": "supporter", "type": "address" }, { - "internalType": "address", - "name": "to", - "type": "address" + "indexed": false, + "internalType": "uint256", + "name": "previousContribution", + "type": "uint256" }, { + "indexed": false, "internalType": "uint256", - "name": "tokenId", + "name": "contribution", "type": "uint256" }, { - "internalType": "bytes", - "name": "data", - "type": "bytes" + "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": "safeTransferFrom", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "name": "SupporterUpdated", + "type": "event" }, { + "anonymous": false, "inputs": [ { + "indexed": true, "internalType": "address", - "name": "operator", + "name": "implementation", "type": "address" - }, + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "inputs": [], + "name": "CFAV1_TYPE", + "outputs": [ { - "internalType": "bool", - "name": "approved", - "type": "bool" + "internalType": "bytes32", + "name": "", + "type": "bytes32" } ], - "name": "setApprovalForAll", - "outputs": [], - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { - "inputs": [ + "inputs": [], + "name": "DEFAULT_ADMIN_ROLE", + "outputs": [ { - "internalType": "bytes4", - "name": "interfaceId", - "type": "bytes4" + "internalType": "bytes32", + "name": "", + "type": "bytes32" } ], - "name": "supportsInterface", + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MANAGER_ROLE", "outputs": [ { - "internalType": "bool", + "internalType": "bytes32", "name": "", - "type": "bool" + "type": "bytes32" } ], "stateMutability": "view", @@ -9390,31 +8875,38 @@ }, { "inputs": [], - "name": "symbol", + "name": "MEMBER_ROLE", "outputs": [ { - "internalType": "string", + "internalType": "bytes32", "name": "", - "type": "string" + "type": "bytes32" } ], "stateMutability": "view", "type": "function" }, { - "inputs": [ + "inputs": [], + "name": "MINTER_ROLE", + "outputs": [ { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" + "internalType": "bytes32", + "name": "", + "type": "bytes32" } ], - "name": "tokenURI", + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MIN_FLOW_RATE", "outputs": [ { - "internalType": "string", + "internalType": "int96", "name": "", - "type": "string" + "type": "int96" } ], "stateMutability": "view", @@ -9423,417 +8915,443 @@ { "inputs": [ { - "internalType": "address", - "name": "from", + "internalType": "contract ISuperToken", + "name": "superToken", "type": "address" }, { "internalType": "address", - "name": "to", + "name": "", "type": "address" }, { - "internalType": "uint256", - "name": "tokenId", - "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": "afterAgreementCreated", + "outputs": [ + { + "internalType": "bytes", + "name": "newCtx", + "type": "bytes" } ], - "name": "transferFrom", - "outputs": [], "stateMutability": "nonpayable", "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": "agreementData", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "cbdata", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "ctx", + "type": "bytes" + } + ], + "name": "afterAgreementTerminated", + "outputs": [ + { + "internalType": "bytes", + "name": "newCtx", + "type": "bytes" } ], - "name": "upgradeTo", - "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ + { + "internalType": "contract ISuperToken", + "name": "superToken", + "type": "address" + }, { "internalType": "address", - "name": "newImplementation", + "name": "", "type": "address" }, + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + }, { "internalType": "bytes", - "name": "data", + "name": "agreementData", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "cbdata", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "ctx", "type": "bytes" } ], - "name": "upgradeToAndCall", - "outputs": [], - "stateMutability": "payable", + "name": "afterAgreementUpdated", + "outputs": [ + { + "internalType": "bytes", + "name": "newCtx", + "type": "bytes" + } + ], + "stateMutability": "nonpayable", "type": "function" - } - ] - }, - "ProvableNFT_Proxy": { - "address": "0x2AF5DB8249229ba696E0bac1a382aDb1fee040A6", - "abi": [ + }, { "inputs": [ + { + "internalType": "contract ISuperToken", + "name": "superToken", + "type": "address" + }, { "internalType": "address", - "name": "_logic", + "name": "agreementClass", "type": "address" }, + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + }, { "internalType": "bytes", - "name": "_data", + "name": "", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "", "type": "bytes" } ], - "stateMutability": "payable", - "type": "constructor" + "name": "beforeAgreementCreated", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" }, { - "anonymous": false, "inputs": [ { - "indexed": false, - "internalType": "address", - "name": "previousAdmin", + "internalType": "contract ISuperToken", + "name": "superToken", "type": "address" }, { - "indexed": false, "internalType": "address", - "name": "newAdmin", + "name": "agreementClass", "type": "address" - } - ], - "name": "AdminChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ + }, { - "indexed": true, - "internalType": "address", - "name": "beacon", - "type": "address" + "internalType": "bytes32", + "name": "", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "agreementData", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" } ], - "name": "BeaconUpgraded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ + "name": "beforeAgreementTerminated", + "outputs": [ { - "indexed": true, - "internalType": "address", - "name": "implementation", - "type": "address" + "internalType": "bytes", + "name": "", + "type": "bytes" } ], - "name": "Upgraded", - "type": "event" - }, - { - "stateMutability": "payable", - "type": "fallback" + "stateMutability": "view", + "type": "function" }, { - "stateMutability": "payable", - "type": "receive" - } - ] - }, - "ProvableNFT": { - "address": "0x2AF5DB8249229ba696E0bac1a382aDb1fee040A6", - "abi": [ - { - "anonymous": false, "inputs": [ { - "indexed": false, - "internalType": "address", - "name": "previousAdmin", + "internalType": "contract ISuperToken", + "name": "superToken", "type": "address" }, { - "indexed": false, "internalType": "address", - "name": "newAdmin", + "name": "agreementClass", "type": "address" - } - ], - "name": "AdminChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ + }, { - "indexed": true, - "internalType": "address", - "name": "beacon", - "type": "address" + "internalType": "bytes32", + "name": "", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "agreementData", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" } ], - "name": "BeaconUpgraded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ + "name": "beforeAgreementUpdated", + "outputs": [ { - "indexed": true, - "internalType": "address", - "name": "implementation", - "type": "address" + "internalType": "bytes", + "name": "", + "type": "bytes" } ], - "name": "Upgraded", - "type": "event" - }, - { - "stateMutability": "payable", - "type": "fallback" - }, - { - "stateMutability": "payable", - "type": "receive" + "stateMutability": "view", + "type": "function" }, { - "inputs": [ + "inputs": [], + "name": "cfaV1", + "outputs": [ { - "internalType": "bytes32", - "name": "dataHash", - "type": "bytes32" + "internalType": "contract ISuperfluid", + "name": "host", + "type": "address" }, { - "internalType": "bytes32", - "name": "tokenId", - "type": "bytes32" + "internalType": "contract IConstantFlowAgreementV1", + "name": "cfa", + "type": "address" } ], - "name": "BAD_DATAHASH", - "type": "error" - }, - { - "inputs": [], - "name": "BAD_NFTTYPE", - "type": "error" + "stateMutability": "view", + "type": "function" }, { "inputs": [ { - "internalType": "uint32", - "name": "", - "type": "uint32" + "internalType": "uint256", + "name": "_nftId", + "type": "uint256" } ], - "name": "NOT_MANAGER", - "type": "error" + "name": "claim", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - "inputs": [], - "name": "NOT_MINTER", - "type": "error" + "inputs": [ + { + "internalType": "uint256", + "name": "_nftId", + "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": "_data", + "type": "tuple" + } + ], + "name": "claim", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - "anonymous": false, "inputs": [ { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "approved", - "type": "address" - }, - { - "indexed": true, "internalType": "uint256", - "name": "tokenId", + "name": "", "type": "uint256" } ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "operator", - "type": "address" - }, + "name": "claimedNfts", + "outputs": [ { - "indexed": false, "internalType": "bool", - "name": "approved", + "name": "", "type": "bool" } ], - "name": "ApprovalForAll", - "type": "event" + "stateMutability": "view", + "type": "function" }, { - "anonymous": false, "inputs": [ { - "indexed": false, - "internalType": "uint8", - "name": "version", - "type": "uint8" + "internalType": "address", + "name": "_user", + "type": "address" } ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ + "name": "getRealtimeContribution", + "outputs": [ { - "indexed": false, "internalType": "uint256", - "name": "tokenId", + "name": "", "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "nftDataHash", - "type": "bytes32" } ], - "name": "ProvableNftMinted", - "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 DirectPaymentsFactory", + "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": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" } ], - "name": "Transfer", - "type": "event" - }, - { - "inputs": [], - "name": "DEFAULT_ADMIN_ROLE", + "name": "getRoleAdmin", "outputs": [ { "internalType": "bytes32", @@ -9846,12 +9364,32 @@ }, { "inputs": [], - "name": "MINTER_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", @@ -9860,70 +9398,107 @@ { "inputs": [ { - "internalType": "address", - "name": "_manager", - "type": "address" + "internalType": "bytes32", + "name": "role", + "type": "bytes32" }, { - "internalType": "uint32", - "name": "_nftType", - "type": "uint32" + "internalType": "address", + "name": "account", + "type": "address" } ], - "name": "addManager", + "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" + }, { "internalType": "address", - "name": "to", + "name": "_sender", "type": "address" }, { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" + "internalType": "bytes", + "name": "_ctx", + "type": "bytes" + } + ], + "name": "handleSwap", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" } ], - "name": "approve", - "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, { "internalType": "address", - "name": "owner", + "name": "account", "type": "address" } ], - "name": "balanceOf", + "name": "hasRole", "outputs": [ { - "internalType": "uint256", + "internalType": "bool", "name": "", - "type": "uint256" + "type": "bool" } ], "stateMutability": "view", "type": "function" }, { - "inputs": [ - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "getApproved", + "inputs": [], + "name": "host", "outputs": [ { - "internalType": "address", + "internalType": "contract ISuperfluid", "name": "", "type": "address" } @@ -9934,32 +9509,10 @@ { "inputs": [ { - "internalType": "uint32", - "name": "_nftType", - "type": "uint32" - } - ], - "name": "getManagerRole", - "outputs": [ - { - "internalType": "bytes32", - "name": "roleHash", - "type": "bytes32" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_tokenId", - "type": "uint256" - } - ], - "name": "getNFTData", - "outputs": [ + "internalType": "contract ProvableNFT", + "name": "_nft", + "type": "address" + }, { "components": [ { @@ -9968,186 +9521,74 @@ "type": "uint32" }, { - "internalType": "uint16", - "name": "version", - "type": "uint16" + "internalType": "uint16[]", + "name": "validEvents", + "type": "uint16[]" }, { - "internalType": "string", - "name": "nftUri", - "type": "string" + "internalType": "uint128[]", + "name": "rewardPerEvent", + "type": "uint128[]" }, { - "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": "struct ProvableNFT.EventData[]", - "name": "events", - "type": "tuple[]" - } - ], - "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": "uint16", - "name": "subtype", - "type": "uint16" + "internalType": "address", + "name": "manager", + "type": "address" }, { - "internalType": "uint32", - "name": "timestamp", - "type": "uint32" + "internalType": "contract IMembersValidator", + "name": "membersValidator", + "type": "address" }, { - "internalType": "uint256", - "name": "quantity", - "type": "uint256" + "internalType": "contract IIdentityV2", + "name": "uniquenessValidator", + "type": "address" }, { - "internalType": "string", - "name": "eventUri", - "type": "string" + "internalType": "contract IERC20Upgradeable", + "name": "rewardToken", + "type": "address" }, { - "internalType": "address[]", - "name": "contributers", - "type": "address[]" + "internalType": "bool", + "name": "allowRewardOverride", + "type": "bool" } ], - "internalType": "struct ProvableNFT.EventData", - "name": "", + "internalType": "struct DirectPaymentsPool.PoolSettings", + "name": "_settings", "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_tokenId", - "type": "uint256" - } - ], - "name": "getNFTEvents", - "outputs": [ + }, { "components": [ - { - "internalType": "uint16", - "name": "subtype", - "type": "uint16" - }, - { - "internalType": "uint32", - "name": "timestamp", - "type": "uint32" - }, { "internalType": "uint256", - "name": "quantity", + "name": "maxTotalPerMonth", "type": "uint256" }, { - "internalType": "string", - "name": "eventUri", - "type": "string" + "internalType": "uint256", + "name": "maxMemberPerMonth", + "type": "uint256" }, { - "internalType": "address[]", - "name": "contributers", - "type": "address[]" + "internalType": "uint256", + "name": "maxMemberPerDay", + "type": "uint256" } - ], - "internalType": "struct ProvableNFT.EventData[]", - "name": "", - "type": "tuple[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleAdmin", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" + ], + "internalType": "struct DirectPaymentsPool.SafetyLimits", + "name": "_limits", + "type": "tuple" }, { - "internalType": "address", - "name": "account", + "internalType": "contract DirectPaymentsFactory", + "name": "_registry", "type": "address" } ], - "name": "grantRole", + "name": "initialize", "outputs": [], "stateMutability": "nonpayable", "type": "function" @@ -10155,17 +9596,12 @@ { "inputs": [ { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", + "internalType": "contract ISuperToken", + "name": "_superToken", "type": "address" } ], - "name": "hasRole", + "name": "isAcceptedSuperToken", "outputs": [ { "internalType": "bool", @@ -10177,74 +9613,65 @@ "type": "function" }, { - "inputs": [ + "inputs": [], + "name": "limits", + "outputs": [ { - "internalType": "string", - "name": "_name", - "type": "string" + "internalType": "uint256", + "name": "maxTotalPerMonth", + "type": "uint256" }, { - "internalType": "string", - "name": "_symbol", - "type": "string" + "internalType": "uint256", + "name": "maxMemberPerMonth", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "maxMemberPerDay", + "type": "uint256" } ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "operator", + "name": "", "type": "address" } ], - "name": "isApprovedForAll", + "name": "memberLimits", "outputs": [ { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ + "internalType": "uint128", + "name": "daily", + "type": "uint128" + }, { - "internalType": "address", - "name": "_to", - "type": "address" + "internalType": "uint128", + "name": "monthly", + "type": "uint128" }, { - "internalType": "string", - "name": "_uri", - "type": "string" + "internalType": "uint128", + "name": "total", + "type": "uint128" }, { - "internalType": "bytes32", - "name": "_nftDataHash", - "type": "bytes32" - } - ], - "name": "mint", - "outputs": [ + "internalType": "uint64", + "name": "lastReward", + "type": "uint64" + }, { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" + "internalType": "uint64", + "name": "lastMonth", + "type": "uint64" } ], - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { @@ -10297,6 +9724,11 @@ "internalType": "address[]", "name": "contributers", "type": "address[]" + }, + { + "internalType": "uint128", + "name": "rewardOverride", + "type": "uint128" } ], "internalType": "struct ProvableNFT.EventData[]", @@ -10310,34 +9742,23 @@ }, { "internalType": "bool", - "name": "_withStore", + "name": "withClaim", "type": "bool" - }, - { - "internalType": "bytes", - "name": "_callData", - "type": "bytes" - } - ], - "name": "mintPermissioned", - "outputs": [ - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" } ], + "name": "mintNFT", + "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], - "name": "name", + "name": "nft", "outputs": [ { - "internalType": "string", + "internalType": "contract ProvableNFT", "name": "", - "type": "string" + "type": "address" } ], "stateMutability": "view", @@ -10346,142 +9767,64 @@ { "inputs": [ { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "ownerOf", - "outputs": [ + "internalType": "address", + "name": "operator", + "type": "address" + }, { "internalType": "address", - "name": "", + "name": "from", "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ + }, { "internalType": "uint256", - "name": "_tokenId", + "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": "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": "struct ProvableNFT.EventData[]", - "name": "events", - "type": "tuple[]" - } - ], - "internalType": "struct ProvableNFT.NFTData", + { + "internalType": "bytes", "name": "data", - "type": "tuple" + "type": "bytes" } ], - "stateMutability": "view", + "name": "onERC721Received", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_sender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onTokenTransfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", "type": "function" }, { @@ -10497,6 +9840,19 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [], + "name": "registry", + "outputs": [ + { + "internalType": "contract DirectPaymentsFactory", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { @@ -10535,52 +9891,199 @@ }, { "inputs": [ + { + "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": "setPoolLimits", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "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": "setPoolSettings", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "settings", + "outputs": [ + { + "internalType": "uint32", + "name": "nftType", + "type": "uint32" + }, { "internalType": "address", - "name": "from", + "name": "manager", "type": "address" }, { - "internalType": "address", - "name": "to", + "internalType": "contract IMembersValidator", + "name": "membersValidator", "type": "address" }, { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" + "internalType": "contract IIdentityV2", + "name": "uniquenessValidator", + "type": "address" + }, + { + "internalType": "contract IERC20Upgradeable", + "name": "rewardToken", + "type": "address" + }, + { + "internalType": "bool", + "name": "allowRewardOverride", + "type": "bool" } ], - "name": "safeTransferFrom", - "outputs": [], - "stateMutability": "nonpayable", + "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": "from", + "name": "lastFeeRecipient", "type": "address" }, + { + "internalType": "int96", + "name": "lastIncomeRate", + "type": "int96" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "superToken", + "outputs": [ + { + "internalType": "contract ISuperToken", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ { "internalType": "address", - "name": "to", + "name": "_sender", "type": "address" }, { "internalType": "uint256", - "name": "tokenId", + "name": "_amount", "type": "uint256" }, { "internalType": "bytes", - "name": "data", + "name": "_ctx", + "type": "bytes" + } + ], + "name": "support", + "outputs": [ + { + "internalType": "bytes", + "name": "", "type": "bytes" } ], - "name": "safeTransferFrom", - "outputs": [], "stateMutability": "nonpayable", "type": "function" }, @@ -10588,18 +10091,29 @@ "inputs": [ { "internalType": "address", - "name": "operator", + "name": "", "type": "address" + } + ], + "name": "supporters", + "outputs": [ + { + "internalType": "uint256", + "name": "contribution", + "type": "uint256" }, { - "internalType": "bool", - "name": "approved", - "type": "bool" + "internalType": "int96", + "name": "flowRate", + "type": "int96" + }, + { + "internalType": "uint128", + "name": "lastUpdated", + "type": "uint128" } - ], - "name": "setApprovalForAll", - "outputs": [], - "stateMutability": "nonpayable", + ], + "stateMutability": "view", "type": "function" }, { @@ -10623,57 +10137,15 @@ }, { "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "tokenURI", + "name": "swapRouter", "outputs": [ { - "internalType": "string", + "internalType": "contract ISwapRouter", "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", "type": "address" - }, - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" } ], - "name": "transferFrom", - "outputs": [], - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { @@ -10709,30 +10181,93 @@ }, { "inputs": [ - { - "internalType": "address", - "name": "_logic", - "type": "address" - }, { "internalType": "bytes", - "name": "_data", + "name": "data", "type": "bytes" } ], + "name": "upgradeToLatest", + "outputs": [], "stateMutability": "payable", - "type": "constructor" + "type": "function" } ] }, - "DirectPaymentsFactory_Implementation": { - "address": "0x4982A0A0E51c1eB25553724A149E108893bE0D4A", + "HelperLibrary": { + "address": "0x15a3a0Fb7d3C91806a5379A463AdaE0427Fce2BB", "abi": [ { - "inputs": [], - "name": "NOT_PROJECT_OWNER", - "type": "error" - }, + "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", + "outputs": [ + { + "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" + } + ] + }, + "ProvableNFT": { + "address": "0x2AF5DB8249229ba696E0bac1a382aDb1fee040A6", + "abi": [ { "anonymous": false, "inputs": [ @@ -10769,110 +10304,83 @@ "anonymous": false, "inputs": [ { - "indexed": false, - "internalType": "uint8", - "name": "version", - "type": "uint8" + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" } ], - "name": "Initialized", + "name": "Upgraded", "type": "event" }, { - "anonymous": false, + "stateMutability": "payable", + "type": "fallback" + }, + { + "stateMutability": "payable", + "type": "receive" + }, + { "inputs": [ { - "indexed": true, - "internalType": "address", - "name": "pool", - "type": "address" - }, - { - "indexed": true, - "internalType": "string", - "name": "projectId", - "type": "string" + "internalType": "bytes32", + "name": "dataHash", + "type": "bytes32" }, { - "indexed": false, - "internalType": "string", - "name": "ipfs", - "type": "string" - }, + "internalType": "bytes32", + "name": "tokenId", + "type": "bytes32" + } + ], + "name": "BAD_DATAHASH", + "type": "error" + }, + { + "inputs": [], + "name": "BAD_NFTTYPE", + "type": "error" + }, + { + "inputs": [ { - "indexed": true, "internalType": "uint32", - "name": "nftType", + "name": "", "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" - } - ], - "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", + "name": "NOT_MANAGER", + "type": "error" + }, + { + "inputs": [], + "name": "NOT_MINTER", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "approved", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "Approval", "type": "event" }, { @@ -10881,36 +10389,61 @@ { "indexed": true, "internalType": "address", - "name": "pool", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "operator", "type": "address" }, { "indexed": false, - "internalType": "string", - "name": "ipfs", - "type": "string" + "internalType": "bool", + "name": "approved", + "type": "bool" } ], - "name": "PoolDetailsChanged", + "name": "ApprovalForAll", "type": "event" }, { "anonymous": false, "inputs": [ { - "indexed": true, + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "indexed": false, "internalType": "address", - "name": "pool", + "name": "to", "type": "address" }, { "indexed": false, - "internalType": "bool", - "name": "isVerified", - "type": "bool" + "internalType": "bytes32", + "name": "nftDataHash", + "type": "bytes32" } ], - "name": "PoolVerifiedChanged", + "name": "ProvableNftMinted", "type": "event" }, { @@ -10994,34 +10527,212 @@ { "indexed": true, "internalType": "address", - "name": "impl", + "name": "from", "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" } ], - "name": "UpdatedImpl", + "name": "Transfer", "type": "event" }, { - "anonymous": false, + "inputs": [], + "name": "DEFAULT_ADMIN_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MINTER_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { "inputs": [ { - "indexed": true, "internalType": "address", - "name": "implementation", + "name": "_manager", "type": "address" + }, + { + "internalType": "uint32", + "name": "_nftType", + "type": "uint32" } ], - "name": "Upgraded", - "type": "event" + "name": "addManager", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - "inputs": [], - "name": "DEFAULT_ADMIN_ROLE", + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "getApproved", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "_nftType", + "type": "uint32" + } + ], + "name": "getManagerRole", "outputs": [ { "internalType": "bytes32", + "name": "roleHash", + "type": "bytes32" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_tokenId", + "type": "uint256" + } + ], + "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": "bytes32" + "type": "tuple" } ], "stateMutability": "view", @@ -11030,221 +10741,145 @@ { "inputs": [ { - "internalType": "contract DirectPaymentsPool", - "name": "_pool", - "type": "address" + "internalType": "uint256", + "name": "_tokenId", + "type": "uint256" }, { - "internalType": "string", - "name": "_ipfs", - "type": "string" + "internalType": "uint256", + "name": "_index", + "type": "uint256" } ], - "name": "changePoolDetails", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "_projectId", - "type": "string" - }, - { - "internalType": "string", - "name": "_ipfs", - "type": "string" - }, + "name": "getNFTEvent", + "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": "uint16", + "name": "subtype", + "type": "uint16" }, { - "internalType": "contract IIdentityV2", - "name": "uniquenessValidator", - "type": "address" + "internalType": "uint32", + "name": "timestamp", + "type": "uint32" }, - { - "internalType": "contract IERC20Upgradeable", - "name": "rewardToken", - "type": "address" - } - ], - "internalType": "struct DirectPaymentsPool.PoolSettings", - "name": "_settings", - "type": "tuple" - }, - { - "components": [ { "internalType": "uint256", - "name": "maxTotalPerMonth", + "name": "quantity", "type": "uint256" }, { - "internalType": "uint256", - "name": "maxMemberPerMonth", - "type": "uint256" + "internalType": "string", + "name": "eventUri", + "type": "string" }, { - "internalType": "uint256", - "name": "maxMemberPerDay", - "type": "uint256" + "internalType": "address[]", + "name": "contributers", + "type": "address[]" + }, + { + "internalType": "uint128", + "name": "rewardOverride", + "type": "uint128" } ], - "internalType": "struct DirectPaymentsPool.SafetyLimits", - "name": "_limits", + "internalType": "struct ProvableNFT.EventData", + "name": "", "type": "tuple" } ], - "name": "createBeaconPool", - "outputs": [ - { - "internalType": "contract DirectPaymentsPool", - "name": "pool", - "type": "address" - } - ], - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { "inputs": [ { - "internalType": "string", - "name": "_projectId", - "type": "string" - }, - { - "internalType": "string", - "name": "_ipfs", - "type": "string" - }, + "internalType": "uint256", + "name": "_tokenId", + "type": "uint256" + } + ], + "name": "getNFTEvents", + "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": "uint16", + "name": "subtype", + "type": "uint16" }, { - "internalType": "contract IIdentityV2", - "name": "uniquenessValidator", - "type": "address" + "internalType": "uint32", + "name": "timestamp", + "type": "uint32" }, - { - "internalType": "contract IERC20Upgradeable", - "name": "rewardToken", - "type": "address" - } - ], - "internalType": "struct DirectPaymentsPool.PoolSettings", - "name": "_settings", - "type": "tuple" - }, - { - "components": [ { "internalType": "uint256", - "name": "maxTotalPerMonth", + "name": "quantity", "type": "uint256" }, { - "internalType": "uint256", - "name": "maxMemberPerMonth", - "type": "uint256" + "internalType": "string", + "name": "eventUri", + "type": "string" }, { - "internalType": "uint256", - "name": "maxMemberPerDay", - "type": "uint256" + "internalType": "address[]", + "name": "contributers", + "type": "address[]" + }, + { + "internalType": "uint128", + "name": "rewardOverride", + "type": "uint128" } ], - "internalType": "struct DirectPaymentsPool.SafetyLimits", - "name": "_limits", - "type": "tuple" - } - ], - "name": "createPool", - "outputs": [ - { - "internalType": "contract DirectPaymentsPool", - "name": "pool", - "type": "address" + "internalType": "struct ProvableNFT.EventData[]", + "name": "", + "type": "tuple[]" } ], - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { - "inputs": [], - "name": "feeBps", + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + } + ], + "name": "getRoleAdmin", "outputs": [ { - "internalType": "uint32", + "internalType": "bytes32", "name": "", - "type": "uint32" + "type": "bytes32" } ], "stateMutability": "view", "type": "function" }, { - "inputs": [], - "name": "feeRecipient", - "outputs": [ + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, { "internalType": "address", - "name": "", + "name": "account", "type": "address" } ], - "stateMutability": "view", + "name": "grantRole", + "outputs": [], + "stateMutability": "nonpayable", "type": "function" }, { @@ -11253,14 +10888,19 @@ "internalType": "bytes32", "name": "role", "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" } ], - "name": "getRoleAdmin", + "name": "hasRole", "outputs": [ { - "internalType": "bytes32", + "internalType": "bool", "name": "", - "type": "bytes32" + "type": "bool" } ], "stateMutability": "view", @@ -11269,17 +10909,17 @@ { "inputs": [ { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" + "internalType": "string", + "name": "_name", + "type": "string" }, - { - "internalType": "address", - "name": "account", - "type": "address" + { + "internalType": "string", + "name": "_symbol", + "type": "string" } ], - "name": "grantRole", + "name": "initialize", "outputs": [], "stateMutability": "nonpayable", "type": "function" @@ -11287,17 +10927,17 @@ { "inputs": [ { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" + "internalType": "address", + "name": "owner", + "type": "address" }, { "internalType": "address", - "name": "account", + "name": "operator", "type": "address" } ], - "name": "hasRole", + "name": "isApprovedForAll", "outputs": [ { "internalType": "bool", @@ -11309,70 +10949,147 @@ "type": "function" }, { - "inputs": [], - "name": "impl", - "outputs": [ + "inputs": [ { - "internalType": "contract UpgradeableBeacon", - "name": "", + "internalType": "address", + "name": "_to", "type": "address" + }, + { + "internalType": "string", + "name": "_uri", + "type": "string" + }, + { + "internalType": "bytes32", + "name": "_nftDataHash", + "type": "bytes32" } ], - "stateMutability": "view", + "name": "mint", + "outputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", - "name": "_owner", + "name": "_to", "type": "address" }, { - "internalType": "address", - "name": "_dpimpl", - "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": "contract ProvableNFT", - "name": "_nft", - "type": "address" + "internalType": "bool", + "name": "_withStore", + "type": "bool" }, { - "internalType": "address", - "name": "_feeRecipient", - "type": "address" - }, + "internalType": "bytes", + "name": "_callData", + "type": "bytes" + } + ], + "name": "mintPermissioned", + "outputs": [ { - "internalType": "uint32", - "name": "_feeBps", - "type": "uint32" + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" } ], - "name": "initialize", - "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], - "name": "nextNftType", + "name": "name", "outputs": [ { - "internalType": "uint32", + "internalType": "string", "name": "", - "type": "uint32" + "type": "string" } ], "stateMutability": "view", "type": "function" }, { - "inputs": [], - "name": "nft", + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "ownerOf", "outputs": [ { - "internalType": "contract ProvableNFT", + "internalType": "address", "name": "", "type": "address" } @@ -11383,17 +11100,130 @@ { "inputs": [ { - "internalType": "bytes32", - "name": "", - "type": "bytes32" + "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": "projectIdToControlPool", + "name": "proveNFTData", "outputs": [ { - "internalType": "contract DirectPaymentsPool", - "name": "", - "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": "data", + "type": "tuple" } ], "stateMutability": "view", @@ -11415,30 +11245,19 @@ { "inputs": [ { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "registry", - "outputs": [ - { - "internalType": "string", - "name": "ipfs", - "type": "string" - }, - { - "internalType": "bool", - "name": "isVerified", - "type": "bool" + "internalType": "bytes32", + "name": "role", + "type": "bytes32" }, { - "internalType": "string", - "name": "projectId", - "type": "string" + "internalType": "address", + "name": "account", + "type": "address" } ], - "stateMutability": "view", + "name": "renounceRole", + "outputs": [], + "stateMutability": "nonpayable", "type": "function" }, { @@ -11454,7 +11273,7 @@ "type": "address" } ], - "name": "renounceRole", + "name": "revokeRole", "outputs": [], "stateMutability": "nonpayable", "type": "function" @@ -11462,17 +11281,22 @@ { "inputs": [ { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" + "internalType": "address", + "name": "from", + "type": "address" }, { "internalType": "address", - "name": "account", + "name": "to", "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" } ], - "name": "revokeRole", + "name": "safeTransferFrom", "outputs": [], "stateMutability": "nonpayable", "type": "function" @@ -11481,16 +11305,26 @@ "inputs": [ { "internalType": "address", - "name": "_feeRecipient", + "name": "from", "type": "address" }, { - "internalType": "uint32", - "name": "_feeBps", - "type": "uint32" + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" } ], - "name": "setFeeInfo", + "name": "safeTransferFrom", "outputs": [], "stateMutability": "nonpayable", "type": "function" @@ -11498,17 +11332,17 @@ { "inputs": [ { - "internalType": "contract DirectPaymentsPool", - "name": "_pool", + "internalType": "address", + "name": "operator", "type": "address" }, { "internalType": "bool", - "name": "_isVerified", + "name": "approved", "type": "bool" } ], - "name": "setVerified", + "name": "setApprovalForAll", "outputs": [], "stateMutability": "nonpayable", "type": "function" @@ -11532,15 +11366,57 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "tokenURI", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { "internalType": "address", - "name": "_impl", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" } ], - "name": "updateImpl", + "name": "transferFrom", "outputs": [], "stateMutability": "nonpayable", "type": "function" @@ -11575,12 +11451,7 @@ "outputs": [], "stateMutability": "payable", "type": "function" - } - ] - }, - "DirectPaymentsFactory_Proxy": { - "address": "0x58b5E37c5aFad520dD93E92A5D11B8721A9115F0", - "abi": [ + }, { "inputs": [ { @@ -11596,65 +11467,49 @@ ], "stateMutability": "payable", "type": "constructor" - }, + } + ] + }, + "ProvableNFT_Implementation": { + "address": "0x4D76c54D6a9F381018fEA7BaC515ae590A1D476a", + "abi": [ { - "anonymous": false, "inputs": [ { - "indexed": false, - "internalType": "address", - "name": "previousAdmin", - "type": "address" + "internalType": "bytes32", + "name": "dataHash", + "type": "bytes32" }, { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" + "internalType": "bytes32", + "name": "tokenId", + "type": "bytes32" } ], - "name": "AdminChanged", - "type": "event" + "name": "BAD_DATAHASH", + "type": "error" }, { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "beacon", - "type": "address" - } - ], - "name": "BeaconUpgraded", - "type": "event" + "inputs": [], + "name": "BAD_NFTTYPE", + "type": "error" }, { - "anonymous": false, "inputs": [ { - "indexed": true, - "internalType": "address", - "name": "implementation", - "type": "address" + "internalType": "uint32", + "name": "", + "type": "uint32" } ], - "name": "Upgraded", - "type": "event" + "name": "NOT_MANAGER", + "type": "error" }, { - "stateMutability": "payable", - "type": "fallback" + "inputs": [], + "name": "NOT_MINTER", + "type": "error" }, - { - "stateMutability": "payable", - "type": "receive" - } - ] - }, - "DirectPaymentsFactory": { - "address": "0x58b5E37c5aFad520dD93E92A5D11B8721A9115F0", - "abi": [ { "anonymous": false, "inputs": [ @@ -11671,59 +11526,7 @@ "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" - }, - { - "inputs": [], - "name": "NOT_PROJECT_OWNER", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint8", - "name": "version", - "type": "uint8" - } - ], - "name": "Initialized", + "name": "AdminChanged", "type": "event" }, { @@ -11732,95 +11535,48 @@ { "indexed": true, "internalType": "address", - "name": "pool", + "name": "owner", "type": "address" }, { "indexed": true, - "internalType": "string", - "name": "projectId", - "type": "string" + "internalType": "address", + "name": "approved", + "type": "address" }, { - "indexed": false, - "internalType": "string", - "name": "ipfs", - "type": "string" - }, + "indexed": true, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ { "indexed": true, - "internalType": "uint32", - "name": "nftType", - "type": "uint32" + "internalType": "address", + "name": "owner", + "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" - }, - { - "internalType": "contract IIdentityV2", - "name": "uniquenessValidator", - "type": "address" - }, - { - "internalType": "contract IERC20Upgradeable", - "name": "rewardToken", - "type": "address" - } - ], - "indexed": false, - "internalType": "struct DirectPaymentsPool.PoolSettings", - "name": "poolSettings", - "type": "tuple" + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" }, { - "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": "approved", + "type": "bool" } ], - "name": "PoolCreated", + "name": "ApprovalForAll", "type": "event" }, { @@ -11829,36 +11585,49 @@ { "indexed": true, "internalType": "address", - "name": "pool", + "name": "beacon", "type": "address" - }, + } + ], + "name": "BeaconUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ { "indexed": false, - "internalType": "string", - "name": "ipfs", - "type": "string" + "internalType": "uint8", + "name": "version", + "type": "uint8" } ], - "name": "PoolDetailsChanged", + "name": "Initialized", "type": "event" }, { "anonymous": false, "inputs": [ { - "indexed": true, + "indexed": false, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "indexed": false, "internalType": "address", - "name": "pool", + "name": "to", "type": "address" }, { "indexed": false, - "internalType": "bool", - "name": "isVerified", - "type": "bool" + "internalType": "bytes32", + "name": "nftDataHash", + "type": "bytes32" } ], - "name": "PoolVerifiedChanged", + "name": "ProvableNftMinted", "type": "event" }, { @@ -11937,26 +11706,138 @@ "type": "event" }, { - "anonymous": false, + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "inputs": [], + "name": "DEFAULT_ADMIN_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MINTER_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_manager", + "type": "address" + }, + { + "internalType": "uint32", + "name": "_nftType", + "type": "uint32" + } + ], + "name": "addManager", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { "inputs": [ { - "indexed": true, - "internalType": "address", - "name": "impl", - "type": "address" + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" } ], - "name": "UpdatedImpl", - "type": "event" - }, - { - "inputs": [], - "name": "DEFAULT_ADMIN_ROLE", + "name": "getApproved", "outputs": [ { - "internalType": "bytes32", + "internalType": "address", "name": "", - "type": "bytes32" + "type": "address" } ], "stateMutability": "view", @@ -11965,33 +11846,32 @@ { "inputs": [ { - "internalType": "contract DirectPaymentsPool", - "name": "_pool", - "type": "address" - }, + "internalType": "uint32", + "name": "_nftType", + "type": "uint32" + } + ], + "name": "getManagerRole", + "outputs": [ { - "internalType": "string", - "name": "_ipfs", - "type": "string" + "internalType": "bytes32", + "name": "roleHash", + "type": "bytes32" } ], - "name": "changePoolDetails", - "outputs": [], - "stateMutability": "nonpayable", + "stateMutability": "pure", "type": "function" }, { "inputs": [ { - "internalType": "string", - "name": "_projectId", - "type": "string" - }, - { - "internalType": "string", - "name": "_ipfs", - "type": "string" - }, + "internalType": "uint256", + "name": "_tokenId", + "type": "uint256" + } + ], + "name": "getNFTData", + "outputs": [ { "components": [ { @@ -12000,183 +11880,163 @@ "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": "struct DirectPaymentsPool.PoolSettings", - "name": "_settings", - "type": "tuple" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "maxTotalPerMonth", - "type": "uint256" + "internalType": "uint16", + "name": "version", + "type": "uint16" }, { - "internalType": "uint256", - "name": "maxMemberPerMonth", - "type": "uint256" + "internalType": "string", + "name": "nftUri", + "type": "string" }, { - "internalType": "uint256", - "name": "maxMemberPerDay", - "type": "uint256" + "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": "", "type": "tuple" } ], - "name": "createBeaconPool", - "outputs": [ - { - "internalType": "contract DirectPaymentsPool", - "name": "pool", - "type": "address" - } - ], - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { "inputs": [ { - "internalType": "string", - "name": "_projectId", - "type": "string" + "internalType": "uint256", + "name": "_tokenId", + "type": "uint256" }, { - "internalType": "string", - "name": "_ipfs", - "type": "string" - }, + "internalType": "uint256", + "name": "_index", + "type": "uint256" + } + ], + "name": "getNFTEvent", + "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": "uint16", + "name": "subtype", + "type": "uint16" }, { - "internalType": "contract IIdentityV2", - "name": "uniquenessValidator", - "type": "address" + "internalType": "uint32", + "name": "timestamp", + "type": "uint32" }, - { - "internalType": "contract IERC20Upgradeable", - "name": "rewardToken", - "type": "address" - } - ], - "internalType": "struct DirectPaymentsPool.PoolSettings", - "name": "_settings", - "type": "tuple" - }, - { - "components": [ { "internalType": "uint256", - "name": "maxTotalPerMonth", + "name": "quantity", "type": "uint256" }, { - "internalType": "uint256", - "name": "maxMemberPerMonth", - "type": "uint256" + "internalType": "string", + "name": "eventUri", + "type": "string" }, { - "internalType": "uint256", - "name": "maxMemberPerDay", - "type": "uint256" - } - ], - "internalType": "struct DirectPaymentsPool.SafetyLimits", - "name": "_limits", - "type": "tuple" - } - ], - "name": "createPool", - "outputs": [ - { - "internalType": "contract DirectPaymentsPool", - "name": "pool", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "feeBps", - "outputs": [ - { - "internalType": "uint32", + "internalType": "address[]", + "name": "contributers", + "type": "address[]" + }, + { + "internalType": "uint128", + "name": "rewardOverride", + "type": "uint128" + } + ], + "internalType": "struct ProvableNFT.EventData", "name": "", - "type": "uint32" + "type": "tuple" } ], "stateMutability": "view", "type": "function" }, { - "inputs": [], - "name": "feeRecipient", + "inputs": [ + { + "internalType": "uint256", + "name": "_tokenId", + "type": "uint256" + } + ], + "name": "getNFTEvents", "outputs": [ { - "internalType": "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": "address" + "type": "tuple[]" } ], "stateMutability": "view", @@ -12244,13 +12104,42 @@ "type": "function" }, { - "inputs": [], - "name": "impl", + "inputs": [ + { + "internalType": "string", + "name": "_name", + "type": "string" + }, + { + "internalType": "string", + "name": "_symbol", + "type": "string" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "isApprovedForAll", "outputs": [ { - "internalType": "contract UpgradeableBeacon", + "internalType": "bool", "name": "", - "type": "address" + "type": "bool" } ], "stateMutability": "view", @@ -12260,54 +12149,144 @@ "inputs": [ { "internalType": "address", - "name": "_owner", + "name": "_to", "type": "address" }, + { + "internalType": "string", + "name": "_uri", + "type": "string" + }, + { + "internalType": "bytes32", + "name": "_nftDataHash", + "type": "bytes32" + } + ], + "name": "mint", + "outputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ { "internalType": "address", - "name": "_dpimpl", + "name": "_to", "type": "address" }, { - "internalType": "contract ProvableNFT", - "name": "_nft", - "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": "address", - "name": "_feeRecipient", - "type": "address" + "internalType": "bool", + "name": "_withStore", + "type": "bool" }, { - "internalType": "uint32", - "name": "_feeBps", - "type": "uint32" + "internalType": "bytes", + "name": "_callData", + "type": "bytes" + } + ], + "name": "mintPermissioned", + "outputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" } ], - "name": "initialize", - "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], - "name": "nextNftType", + "name": "name", "outputs": [ { - "internalType": "uint32", + "internalType": "string", "name": "", - "type": "uint32" + "type": "string" } ], "stateMutability": "view", "type": "function" }, { - "inputs": [], - "name": "nft", + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "ownerOf", "outputs": [ { - "internalType": "contract ProvableNFT", + "internalType": "address", "name": "", "type": "address" } @@ -12318,17 +12297,130 @@ { "inputs": [ { - "internalType": "bytes32", - "name": "", - "type": "bytes32" + "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": "projectIdToControlPool", + "name": "proveNFTData", "outputs": [ { - "internalType": "contract DirectPaymentsPool", - "name": "", - "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": "data", + "type": "tuple" } ], "stateMutability": "view", @@ -12350,30 +12442,19 @@ { "inputs": [ { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "registry", - "outputs": [ - { - "internalType": "string", - "name": "ipfs", - "type": "string" - }, - { - "internalType": "bool", - "name": "isVerified", - "type": "bool" + "internalType": "bytes32", + "name": "role", + "type": "bytes32" }, { - "internalType": "string", - "name": "projectId", - "type": "string" + "internalType": "address", + "name": "account", + "type": "address" } ], - "stateMutability": "view", + "name": "renounceRole", + "outputs": [], + "stateMutability": "nonpayable", "type": "function" }, { @@ -12389,7 +12470,7 @@ "type": "address" } ], - "name": "renounceRole", + "name": "revokeRole", "outputs": [], "stateMutability": "nonpayable", "type": "function" @@ -12397,17 +12478,22 @@ { "inputs": [ { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" + "internalType": "address", + "name": "from", + "type": "address" }, { "internalType": "address", - "name": "account", + "name": "to", "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" } ], - "name": "revokeRole", + "name": "safeTransferFrom", "outputs": [], "stateMutability": "nonpayable", "type": "function" @@ -12416,16 +12502,26 @@ "inputs": [ { "internalType": "address", - "name": "_feeRecipient", + "name": "from", "type": "address" }, { - "internalType": "uint32", - "name": "_feeBps", - "type": "uint32" + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" } ], - "name": "setFeeInfo", + "name": "safeTransferFrom", "outputs": [], "stateMutability": "nonpayable", "type": "function" @@ -12433,17 +12529,17 @@ { "inputs": [ { - "internalType": "contract DirectPaymentsPool", - "name": "_pool", + "internalType": "address", + "name": "operator", "type": "address" }, { "internalType": "bool", - "name": "_isVerified", + "name": "approved", "type": "bool" } ], - "name": "setVerified", + "name": "setApprovalForAll", "outputs": [], "stateMutability": "nonpayable", "type": "function" @@ -12467,15 +12563,57 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "tokenURI", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { "internalType": "address", - "name": "_impl", + "name": "from", "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" } ], - "name": "updateImpl", + "name": "transferFrom", "outputs": [], "stateMutability": "nonpayable", "type": "function" @@ -12510,7 +12648,12 @@ "outputs": [], "stateMutability": "payable", "type": "function" - }, + } + ] + }, + "ProvableNFT_Proxy": { + "address": "0x2AF5DB8249229ba696E0bac1a382aDb1fee040A6", + "abi": [ { "inputs": [ { @@ -12526,6 +12669,59 @@ ], "stateMutability": "payable", "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "previousAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "AdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "beacon", + "type": "address" + } + ], + "name": "BeaconUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "stateMutability": "payable", + "type": "receive" } ] } diff --git a/packages/sdk-js/scripts/createPool.ts b/packages/sdk-js/scripts/createPool.ts index fd60c366..950a60fc 100644 --- a/packages/sdk-js/scripts/createPool.ts +++ b/packages/sdk-js/scripts/createPool.ts @@ -4,7 +4,6 @@ import { GoodCollectiveSDK } from '../src/goodcollective/goodcollective'; import { config } from 'dotenv'; config(); -console.log(process.env); // const provider = new ethers.providers.JsonRpcProvider('https://alfajores-forno.celo-testnet.org'); const provider = new ethers.providers.JsonRpcProvider('https://forno.celo.org'); const wallet = new ethers.Wallet(process.env.PRIVATE_KEY || '').connect(provider); @@ -13,7 +12,7 @@ const sdk = new GoodCollectiveSDK('42220', provider, { nftStorageKey: process.en const main = async () => { const projectId = 'silvi'; const poolAttributes = { - name: 'Silvi - Kakamega Farmer Tree Nurseries', + name: 'Silvi - Kakamega Farmer Tree Nurseries (Real G$)', description: 'This Collective directly supports smallholder farmers around Kenya’s Kakamega forest. These farmers are acting as nurseries, growing and nurturing native trees to maturity for subsequent reforestation. In partnership with Silvi.', email: '', @@ -21,7 +20,15 @@ const main = async () => { twitter: 'https://twitter.com/SilviProtocol', instagram: '', threads: '', + headerImage: + 'https://uploads-ssl.webflow.com/639e611ba0716a170111fe96/65032c75ac7830faf70f9469_FooterBackground.jpg', + logo: 'https://uploads-ssl.webflow.com/639e611ba0716a170111fe96/65032c4586b18e3e276db342_SilviLogo.png', + images: [ + 'https://uploads-ssl.webflow.com/639e611ba0716a170111fe96/6507cb24ffa8a438ccf13d70_Screen%20Shot%202023-09-17%20at%208.59.00%20PM-p-500.png', + 'https://uploads-ssl.webflow.com/639e611ba0716a170111fe96/650352d39dde89c0fd676908_RuralPlanting.jpg', + ], }; + const poolSettings = { validEvents: [1, 2], rewardPerEvent: [ethers.constants.WeiPerEther, ethers.constants.WeiPerEther.mul(2)], @@ -37,6 +44,7 @@ const main = async () => { maxMemberPerMonth: ethers.constants.WeiPerEther.mul(10), maxMemberPerDay: ethers.constants.WeiPerEther.mul(5), }; + const pool = await sdk.createPoolWithAttributes(wallet, projectId, poolAttributes, poolSettings, poolLimits); console.log(pool.address); }; diff --git a/packages/sdk-js/src/goodcollective/goodcollective.ts b/packages/sdk-js/src/goodcollective/goodcollective.ts index 974e7dd5..6be8b862 100644 --- a/packages/sdk-js/src/goodcollective/goodcollective.ts +++ b/packages/sdk-js/src/goodcollective/goodcollective.ts @@ -6,14 +6,14 @@ import { DirectPaymentsPool, } from '@gooddollar/goodcollective-contracts/typechain-types'; import { Framework } from '@superfluid-finance/sdk-core'; -import { SwapLibrary } from '@gooddollar/goodcollective-contracts/typechain-types/contracts/GoodCollective/GoodCollectiveSuperApp'; +import { HelperLibrary } from '@gooddollar/goodcollective-contracts/typechain-types/contracts/GoodCollective/GoodCollectiveSuperApp'; import { NFTStorage, File, CIDString } from 'nft.storage'; export type NFTData = ProvableNFT.NFTDataStruct; export type EventData = ProvableNFT.EventDataStruct; export type PoolSettings = Omit & { nftType?: BigNumberish }; export type PoolLimits = DirectPaymentsPool.SafetyLimitsStruct; -export type SwapData = SwapLibrary.SwapDataStruct; +export type SwapData = HelperLibrary.SwapDataStruct; export type PoolAttributes = { name: string; description: string; From d52f554aa6e9eb513db8c972211074b880911752 Mon Sep 17 00:00:00 2001 From: sirpy Date: Thu, 12 Oct 2023 14:29:03 +0300 Subject: [PATCH 4/4] fix: contracts types build --- packages/app/package.json | 1 + yarn.lock | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/app/package.json b/packages/app/package.json index f3d5c44a..76d023ee 100644 --- a/packages/app/package.json +++ b/packages/app/package.json @@ -61,6 +61,7 @@ "babel-jest": "^29.2.1", "eslint": "^8.19.0", "eslint-plugin-react-refresh": "^0.4.1", + "ethers": "5.7.2", "jest": "^29.2.1", "metro-react-native-babel-preset": "0.73.9", "prettier": "^2.4.1", diff --git a/yarn.lock b/yarn.lock index 59e39385..acec5488 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4297,6 +4297,7 @@ __metadata: crypto-browserify: ^3.12.0 eslint: ^8.19.0 eslint-plugin-react-refresh: ^0.4.1 + ethers: 5.7.2 fast-text-encoding: ^1.0.6 jest: ^29.2.1 metro-react-native-babel-preset: 0.73.9 @@ -21049,7 +21050,7 @@ __metadata: languageName: node linkType: hard -"ethers@npm:5, ethers@npm:^5.*, ethers@npm:^5.0.0, ethers@npm:^5.0.1, ethers@npm:^5.0.13, ethers@npm:^5.0.2, ethers@npm:^5.5.2, ethers@npm:^5.5.3": +"ethers@npm:5, ethers@npm:5.7.2, ethers@npm:^5.*, ethers@npm:^5.0.0, ethers@npm:^5.0.1, ethers@npm:^5.0.13, ethers@npm:^5.0.2, ethers@npm:^5.5.2, ethers@npm:^5.5.3": version: 5.7.2 resolution: "ethers@npm:5.7.2" dependencies: