diff --git a/.idea/misc.xml b/.idea/misc.xml index 639900d13..6e8667213 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -1,4 +1,3 @@ - diff --git a/pkg/contracts/test/AlloTest.t.sol b/pkg/contracts/test/AlloTest.t.sol index 895c0cbe2..77d4946f5 100644 --- a/pkg/contracts/test/AlloTest.t.sol +++ b/pkg/contracts/test/AlloTest.t.sol @@ -2,6 +2,7 @@ pragma solidity ^0.8.19; import "forge-std/Test.sol"; +import "forge-std/console.sol"; import {IAllo} from "allo-v2-contracts/core/interfaces/IAllo.sol"; import {IStrategy} from "allo-v2-contracts/core/interfaces/IStrategy.sol"; @@ -64,6 +65,21 @@ contract TestAllo is Test, AlloSetup, RegistrySetupFull, Native, Errors, GasHelp Metadata metadata ); + enum ProposalType { + Signaling, + Funding, + Streaming + } + struct Proposal { + uint256 id; + uint256 poolId; + address beneficiary; + address creator; + ProposalType proposalType; + uint256 amountRequested; + address token; +// bytes data; + } function test_createPool() public { startMeasuringGas("createPool"); allo().addToCloneableStrategies(strategy); @@ -74,12 +90,17 @@ contract TestAllo is Test, AlloSetup, RegistrySetupFull, Native, Errors, GasHelp vm.prank(pool_admin()); uint256 poolId = allo().createPool(poolProfile_id(), strategy, "0x", NATIVE, 0, metadata, pool_managers()); - // + IAllo.Pool memory pool = allo().getPool(poolId); stopMeasuringGas(); - // + assertEq(pool.profileId, poolProfile_id()); assertNotEq(address(pool.strategy), address(strategy)); - // + + Proposal memory proposal = Proposal(1, poolId, pool_admin(), pool_admin(), ProposalType.Signaling, 0, NATIVE); + + bytes memory data = abi.encode(proposal); + allo().registerRecipient(poolId, data); + } } diff --git a/pkg/subgraph/src/mapping.ts b/pkg/subgraph/src/mapping.ts index b651f0528..cff1b2ec7 100644 --- a/pkg/subgraph/src/mapping.ts +++ b/pkg/subgraph/src/mapping.ts @@ -1,5 +1,3 @@ -// import { BigInt } from "@graphprotocol/graph-ts"; -// import { SetNumber } from "../generated/Counter/Counter"; import { CVStrategy } from "../generated/schema"; export function handleTest(event: CVStrategy): void {