Git Product home page Git Product logo

allo-contracts's People

Contributors

0xchijioke avatar 0xkurt avatar bhargavaparoksham avatar boudra avatar carlbarrdahl avatar chibie avatar codenamejason avatar gravityblast avatar hmrtn avatar lmcorbalan avatar lukedowell avatar omahs avatar owocki avatar qedk avatar shavinac avatar t-proctor avatar thelostone-mc avatar vacekj avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

allo-contracts's Issues

No way to get payout address onchain (i.e. from a payout strategy)

Is your feature request related to a problem? Please describe.
There's currently no way to get the address for a project in the round. This is relevant for writing payout strategies.

Describe the solution you'd like
We have two ways of representing grantees: projectID and an array of Applications - neither currently holds an address that tokens can be transferred to.

What I would like to be able to do, is something like this (pseudocode):

  function payout() external roundHasEnded {
    RoundImplementation round = RoundImplementation(roundAddress);
    address _votingStrategy = address(round.votingStrategy());
    SweepstakesVoting voting = SweepstakesVoting(_votingStrategy);

    uint256 totalVotes = voting.totalVotes();
    for (uint i = 0; i < voting.projectIds.length; i++) {
      bytes32 projectId = voting.projectIds[i];

      // calculate payout
      uint256 votes = voting.votes[projectId];
      uint256 percentage = votes / totalVotes;
      uint256 prize = round.prizePool * percentage;

      // get grantee address from round contract
      Application application = round.getApplication(projectId);
      address payoutAddress = application.payoutAddress;

      // transfer prize amount to payoutAddress
      round.token().transfer(payoutAddress, prize);
    }
  }

Currently:

  • we're not tracking the payout address at all on the round contract (or the project registry)
  • there's isn't a way to get the approved application from the project ID. Meaning, best case scenario is you get the array of applications and loop through them to find the one that's approved (ignoring if that array is long or if there are multiple that are approved)

Describe alternatives you've considered
We can add a payoutAddress to the Application but this should really be associated to the projectID and should really live on the project registry

Open Zeppelin dependency not found

Overview
I'm trying to develop a voting strategy and a payout strategy for Allo for a partner we're working with as part of the launch. I've created a new project using refcell/femplate, a GitHub template for Forge / Foundry smart contract projects. I then used Forge to install Allo.

When I try to run the project (i.e. forge test) I get a series of errors that Allo can't find any of the linked Open Zeppelin contracts (see screenshot below).

Note, I can fix this with a remapping, but this is an error caused by how we're importing/mapping to the Open Zeppelin contracts that will require anyone building on top of Allo to figure this out and create a remapping for themselves - which will be really annoying for them.

I also this this might be because we're using both OpenZeppelin/openzeppelin-contracts AND OpenZeppelin/openzeppelin-contracts-upgradeable? Could we consolidate down to just one of those?

Steps To Reproduce

  1. Clone down the zakkman/privy-sweepstakes-contracts repository
  2. Run forge install to get all the dependencies
  3. Run forge test or `forge build to see the error

Observed behavior
I've shared screenshots of the error below and the entire error log for further context on my observation.

Expected behavior
Internal dependency issues should be causing an issue for people building on top of Allo!

Screenshots
If applicable, add screenshots to help explain your problem.
Screen Shot 2023-04-19 at 1 17 42 PM

Additional context

Here's the exact output:

[⠊] Compiling...
[⠒] Unable to resolve imports:
      "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol" in "/Users/0xzakk/projects/gitcoin/privy/contracts/lib/contracts/contracts/round/RoundImplementation.sol"
      "@openzeppelin/contracts/utils/Address.sol" in "/Users/0xzakk/projects/gitcoin/privy/contracts/lib/contracts/contracts/round/RoundImplementation.sol"
      "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol" in "/Users/0xzakk/projects/gitcoin/privy/contracts/lib/contracts/contracts/round/RoundImplementation.sol"
      "@openzeppelin/contracts/access/AccessControlEnumerable.sol" in "/Users/0xzakk/projects/gitcoin/privy/contracts/lib/contracts/contracts/round/RoundImplementation.sol"
      "@openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol" in "/Users/0xzakk/projects/gitcoin/privy/contracts/lib/contracts/contracts/payoutStrategy/IPayoutStrategy.sol"
      "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol" in "/Users/0xzakk/projects/gitcoin/privy/contracts/lib/contracts/contracts/settings/AlloSettings.sol"
with remappings:
      allo/=/Users/0xzakk/projects/gitcoin/privy/contracts/lib/contracts/contracts/
      ds-test/=/Users/0xzakk/projects/gitcoin/privy/contracts/lib/forge-std/lib/ds-test/src/
      forge-std/=/Users/0xzakk/projects/gitcoin/privy/contracts/lib/forge-std/src/
      solmate/=/Users/0xzakk/projects/gitcoin/privy/contracts/lib/solmate/src/
[⠢] Compiling 30 files with 0.8.17
[⠆] Solc 0.8.17 finished in 51.99ms
Error:
Compiler run failed
error[6275]: ParserError: Source "@openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol" not found: File not found. Searched the following locations: "/Users/0xzakk/projects/gitcoin/privy/contracts".
 --> lib/contracts/contracts/payoutStrategy/IPayoutStrategy.sol:4:1:
  |
4 | import "@openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol";
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^



error[6275]: ParserError: Source "@openzeppelin/contracts/access/AccessControlEnumerable.sol" not found: File not found. Searched the following locations: "/Users/0xzakk/projects/gitcoin/privy/contracts".
 --> lib/contracts/contracts/round/RoundImplementation.sol:6:1:
  |
6 | import "@openzeppelin/contracts/access/AccessControlEnumerable.sol";
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^



error[6275]: ParserError: Source "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol" not found: File not found. Searched the following locations: "/Users/0xzakk/projects/gitcoin/privy/contracts".
 --> lib/contracts/contracts/round/RoundImplementation.sol:7:1:
  |
7 | import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^



error[6275]: ParserError: Source "@openzeppelin/contracts/utils/Address.sol" not found: File not found. Searched the following locations: "/Users/0xzakk/projects/gitcoin/privy/contracts".
 --> lib/contracts/contracts/round/RoundImplementation.sol:8:1:
  |
8 | import "@openzeppelin/contracts/utils/Address.sol";
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^



error[6275]: ParserError: Source "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol" not found: File not found. Searched the following locations: "/Users/0xzakk/projects/gitcoin/privy/contracts".
 --> lib/contracts/contracts/round/RoundImplementation.sol:9:1:
  |
9 | import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^



error[6275]: ParserError: Source "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol" not found: File not found. Searched the following locations: "/Users/0xzakk/projects/gitcoin/privy/contracts".
 --> lib/contracts/contracts/settings/AlloSettings.sol:4:1:
  |
4 | import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Rename repository from `contracts` to `allo-contracts` or `allo`

Overview
When someone adds Allo to their project built with Forge, the protocol is installed into the project in a directory that matches the repository name (i.e. contracts). This presents two issues:

  1. It's a very generic name and so could end up clashing with other projects/libraries that someone might install to build their integration with Allo
  2. It's a little confusing (see image below)

I've remapped lib/contracts to allo, something Forge allows (see second image below). But this is a small touch we can implement to make developers lives a bit easier and doesn't affect us meaningfully.

Details

Screen Shot 2023-04-19 at 1 10 27 PM

Screen Shot 2023-04-19 at 1 14 15 PM

msg.sender Context + appId for ProjectRegistry

Is your feature request related to a problem? Please describe.
I'm working on a project that allows Zuzalu Passport citizens to create projects on Allo and we want to use as much infrastructure as possible from Allo.

The architecture current architecture is as following:

  • Fork of Grants Builder frontend with Zuzalu's Zupass Login added before calling create project.
  • ZuzaluProjectRegistry contract that verifies the Semaphore proof generated by Zupass and then calls Allo's ProjectRegistry.createProject(metadata)

Describe the solution you'd like

  • Pass an appId to createProject that is emitted in ProjectCreated. This would make it possible to query projects for just this specific app.
  • Return projectId in createProject so a wrapping contract can emit its own CreateProject event with projectId. That way the projects can be queried via this event.
  • msgSender() instead of msg.sender to properly handle the initiator of the transaction (for example: msg.sender is the address of ZuzaluProjectRegistry, should be the user or AA calling the contract).

Describe alternatives you've considered

  • Creating a fork of Allo's ProjectRegistry that adds the Semaphore verifier. This would require us to deploy our own subgraph and we would miss out on a lot of functionality in Allo and Grants protocol.

Additional context
ZuzaluRegistry contract:

//SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

import "@openzeppelin/contracts/access/Ownable.sol";
import "@semaphore-protocol/contracts/interfaces/ISemaphore.sol";
import "@semaphore-protocol/contracts/base/SemaphoreVerifier.sol";

import "./utils/MetaPtr.sol";

interface IProjectRegistry {
    function createProject(MetaPtr calldata metadata) external;
}

contract ZuzaluRegistry is Ownable {
    uint256 public root;
    uint256 public depth;

    address public immutable VERIFIER;
    address public immutable REGISTRY;

    event ProjectCreated(uint256 indexed projectID, address indexed owner);

    constructor(
        address verifierAddress,
        address registryAddress,
        uint256 _root,
        uint256 _depth
    ) {
        VERIFIER = verifierAddress;
        REGISTRY = registryAddress;
        root = _root;
        depth = _depth;
    }

    function update(uint256 _root, uint256 _depth) external onlyOwner {
        root = _root;
        depth = _depth;
    }

    function createProject(bytes calldata proofParams, MetaPtr calldata metadata) external {
        (uint256 nullifierHash, uint256 signal, uint256 externalNullifier, uint256[8] memory proof) = abi.decode(
            proofParams,
            (uint256, uint256, uint256, uint256[8])
        );

        SemaphoreVerifier(VERIFIER).verifyProof({
            merkleTreeRoot: root,
            nullifierHash: nullifierHash,
            signal: signal,
            externalNullifier: externalNullifier,
            proof: proof,
            merkleTreeDepth: depth
        });

        IProjectRegistry(REGISTRY).createProject(metadata);
    }
}

Deploy Allo v1 contracts + subgraph to Base

Problem

Grants Stack is looking to support future rounds on Base, and would need Allo v1 contracts + subgraph deployed on Base as a prerequisite! We're aiming for this to be one of the last, if not the last, Allo v1 deployments to new networks, before Grants Stack migrates to Allo v2.

Appetite

Select one of the following and delete the other. Add any nuance below. How much time are we willing to spend on this and how does that constrain the solution?

Small batch (1-2 weeks)

Solution

The core elements you came up with, presented in a form that’s easy for people to understand. Drawings and doodles are very encouraged.

Similar to allo-protocol/allo-v2#155

References

Provide a list or overview of references helpful in understanding the problem or solution

Rabbit Holes

What additional details about the solution are worth calling out? What things are we specifically trying to avoid?

Planning Docs

List or provide any other, related planning docs that will help someone grok the problem or solution

Add ability to batch create projects and apply to rounds

Is your feature request related to a problem? Please describe.
We are working on a tool to enable an organizer to create projects for several people at the same time. Currently it's importing a CSV file and then for each project:

  1. upload metadata
  2. create project
  3. add owner
  4. remove owner
  5. apply to round

This requires 4 transactions per project.
It would be useful to be able to multicall these methods to save on gas.

Describe the solution you'd like
I see Multicall is used in RoundImplementation so should be trivial to implement in ProjectRegistry and Round apply.

Describe alternatives you've considered
Creating a smart contract that does all these contract calls but since ProjectID is not returned from the registry this is not possible.

The issue with ProjectID not being returned is also mentioned here:
#25

Additional context

https://github.com/supermodularxyz/grants-stack-bulk-uploader

zkEra redeploy Allo v1

  • Investigate error
  • Write up new factory strategies
  • POC solution + test it out
  • deploy on testnet + subgraph
  • test pool and program creation
  • review changes
  • deploy on mainnet + subgraph

pnpm install fails

Overview
Details, details, details

Steps To Reproduce

  1. clone repo
  2. run pnpm install

Observed behavior

owocki@local /Users/owocki/Sites/contracts~ % pnpm install                                         (git)-[main] :1f4id
Lockfile is up to date, resolution step is skipped
Packages: +1484
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Packages are hard linked from the content-addressable store to the virtual store.
  Content-addressable store is at: /Users/owocki/Library/pnpm/store/v3
  Virtual store is at:             node_modules/.pnpm
Downloading registry.npmjs.org/@ledgerhq/cryptoassets/9.1.0: 16.1 MB/16.1 MB, done
Downloading registry.npmjs.org/solc/0.7.3: 6.86 MB/6.86 MB, done
Downloading registry.npmjs.org/typescript/4.9.5: 11.6 MB/11.6 MB, done
Downloading registry.npmjs.org/solc/0.6.12: 6.63 MB/6.63 MB, done
Progress: resolved 1484, reused 0, downloaded 1483, added 1484, done
node_modules/.pnpm/[email protected]/node_modules/core-js-pure: Running postinstall script, done in 58ms
node_modules/.pnpm/[email protected]/node_modules/es5-ext: Running postinstall script, done in 105ms
node_modules/.pnpm/[email protected]/node_modules/core-js: Running postinstall script, done in 53ms
node_modules/.pnpm/[email protected]/node_modules/bufferutil: Running install script, done in 3.5s
node_modules/.pnpm/[email protected]/node_modules/classic-level: Running install script, done in 4.1s
node_modules/.pnpm/[email protected]/node_modules/keccak: Running install script...
node_modules/.pnpm/[email protected]/node_modules/node-hid: Running install script...
node_modules/.pnpm/[email protected]/node_modules/node-hid: Running install script, failed in 15.9s (skipped as optional)
node_modules/.pnpm/[email protected]/node_modules/node-hid: Running install script, done in 3.9s
node_modules/.pnpm/[email protected]/node_modules/node-hid: Running install script, done in 3.2sg postinstall script, done in 43ms
node_modules/.pnpm/[email protected]/node_modules/secp256k1: Running install script...
node_modules/.pnpm/[email protected]/node_modules/usb: Running install script, failed in 11.9s
.../.pnpm/[email protected]/node_modules/usb install$ node-gyp-build
│ gyp info it worked if it ends with ok
│ gyp info using [email protected]
│ gyp info using [email protected] | darwin | arm64
│ gyp info find Python using Python version 3.10.9 found at "/opt/homebrew/opt/[email protected]/bin/python3.10"
│ gyp http GET https://nodejs.org/download/release/v19.3.0/node-v19.3.0-headers.tar.gz
│ gyp http 200 https://nodejs.org/download/release/v19.3.0/node-v19.3.0-headers.tar.gz
│ gyp http GET https://nodejs.org/download/release/v19.3.0/SHASUMS256.txt
│ gyp http 200 https://nodejs.org/download/release/v19.3.0/SHASUMS256.txt
│ gyp info spawn /opt/homebrew/opt/[email protected]/bin/python3.10
│ gyp info spawn args [
│ gyp info spawn args   '/opt/homebrew/Cellar/pnpm/8.2.0/libexec/dist/node_modules/node-gyp/gyp/gyp_main.py',
│ gyp info spawn args   'binding.gyp',
│ gyp info spawn args   '-f',
│ gyp info spawn args   'make',
│ gyp info spawn args   '-I',
│ gyp info spawn args   '/Users/owocki/Sites/contracts/node_modules/.pnpm/[email protected]/node_modules/usb/build/config.gyp
│ gyp info spawn args   '-I',
│ gyp info spawn args   '/opt/homebrew/Cellar/pnpm/8.2.0/libexec/dist/node_modules/node-gyp/addon.gypi',
│ gyp info spawn args   '-I',
│ gyp info spawn args   '/Users/owocki/Library/Caches/node-gyp/19.3.0/include/node/common.gypi',
│ gyp info spawn args   '-Dlibrary=shared_library',
│ gyp info spawn args   '-Dvisibility=default',
│ gyp info spawn args   '-Dnode_root_dir=/Users/owocki/Library/Caches/node-gyp/19.3.0',
│ gyp info spawn args   '-Dnode_gyp_dir=/opt/homebrew/Cellar/pnpm/8.2.0/libexec/dist/node_modules/node-gyp',
│ gyp info spawn args   '-Dnode_lib_file=/Users/owocki/Library/Caches/node-gyp/19.3.0/<(target_arch)/node.lib',
│ gyp info spawn args   '-Dmodule_root_dir=/Users/owocki/Sites/contracts/node_modules/.pnpm/[email protected]/node_modules/us
│ gyp info spawn args   '-Dnode_engine=v8',
│ gyp info spawn args   '--depth=.',
│ gyp info spawn args   '--no-parallel',
│ gyp info spawn args   '--generator-output',
│ gyp info spawn args   'build',
│ gyp info spawn args   '-Goutput_dir=.'
│ gyp info spawn args ]
│ gyp info spawn make
│ gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
│   CC(target) Release/obj.target/libusb/libusb/libusb/core.o
│   CC(target) Release/obj.target/libusb/libusb/libusb/descriptor.o
│   CC(target) Release/obj.target/libusb/libusb/libusb/hotplug.o
│   CC(target) Release/obj.target/libusb/libusb/libusb/io.o
│ ../libusb/libusb/io.c:2300:30: warning: comparison of integers of different signs: 'int' and 'nfds_t' (aka 'unsigne
│                 for (i = internal_nfds ; i < nfds ; ++i) {
│                                          ~ ^ ~~~~
│ 1 warning generated.
│   CC(target) Release/obj.target/libusb/libusb/libusb/strerror.o
│   CC(target) Release/obj.target/libusb/libusb/libusb/sync.o
│   CC(target) Release/obj.target/libusb/libusb/libusb/os/poll_posix.o
│   CC(target) Release/obj.target/libusb/libusb/libusb/os/threads_posix.o
│   CC(target) Release/obj.target/libusb/libusb/libusb/os/darwin_usb.o
│   LIBTOOL-STATIC Release/usb.a
│   CXX(target) Release/obj.target/usb_bindings/src/node_usb.o
│ In file included from ../src/node_usb.cc:1:
│ In file included from ../src/node_usb.h:14:
│ In file included from /Users/owocki/Library/Caches/node-gyp/19.3.0/include/node/node_buffer.h:25:
│ In file included from /Users/owocki/Library/Caches/node-gyp/19.3.0/include/node/node.h:73:
│ In file included from /Users/owocki/Library/Caches/node-gyp/19.3.0/include/node/v8.h:24:
│ In file included from /Users/owocki/Library/Caches/node-gyp/19.3.0/include/node/v8-array-buffer.h:12:
│ In file included from /Users/owocki/Library/Caches/node-gyp/19.3.0/include/node/v8-local-handle.h:12:
│ /Users/owocki/Library/Caches/node-gyp/19.3.0/include/node/v8-internal.h:476:30: warning: 'static_assert' with no me
│ SHARED_EXTERNAL_POINTER_TAGS(CHECK_SHARED_EXTERNAL_POINTER_TAGS)
│                              ^
│ /Users/owocki/Library/Caches/node-gyp/19.3.0/include/node/v8-internal.h:476:30: warning: 'static_assert' with no me
│ /Users/owocki/Library/Caches/node-gyp/19.3.0/include/node/v8-internal.h:476:30: warning: 'static_assert' with no me
│ /Users/owocki/Library/Caches/node-gyp/19.3.0/include/node/v8-internal.h:476:30: warning: 'static_assert' with no me
│ /Users/owocki/Library/Caches/node-gyp/19.3.0/include/node/v8-internal.h:476:30: warning: 'static_assert' with no me
│ /Users/owocki/Library/Caches/node-gyp/19.3.0/include/node/v8-internal.h:477:35: warning: 'static_assert' with no me
│ PER_ISOLATE_EXTERNAL_POINTER_TAGS(CHECK_NON_SHARED_EXTERNAL_POINTER_TAGS)
│                                   ^
│ /Users/owocki/Library/Caches/node-gyp/19.3.0/include/node/v8-internal.h:477:35: warning: 'static_assert' with no me
│ /Users/owocki/Library/Caches/node-gyp/19.3.0/include/node/v8-internal.h:477:35: warning: 'static_assert' with no me
│ /Users/owocki/Library/Caches/node-gyp/19.3.0/include/node/v8-internal.h:477:35: warning: 'static_assert' with no me
│ /Users/owocki/Library/Caches/node-gyp/19.3.0/include/node/v8-internal.h:477:35: warning: 'static_assert' with no me
│ /Users/owocki/Library/Caches/node-gyp/19.3.0/include/node/v8-internal.h:477:35: warning: 'static_assert' with no me
│ /Users/owocki/Library/Caches/node-gyp/19.3.0/include/node/v8-internal.h:477:35: warning: 'static_assert' with no me
│ /Users/owocki/Library/Caches/node-gyp/19.3.0/include/node/v8-internal.h:477:35: warning: 'static_assert' with no me
│ /Users/owocki/Library/Caches/node-gyp/19.3.0/include/node/v8-internal.h:477:35: warning: 'static_assert' with no me
│ /Users/owocki/Library/Caches/node-gyp/19.3.0/include/node/v8-internal.h:477:35: warning: 'static_assert' with no me
│ /Users/owocki/Library/Caches/node-gyp/19.3.0/include/node/v8-internal.h:477:35: warning: 'static_assert' with no me
│ /Users/owocki/Library/Caches/node-gyp/19.3.0/include/node/v8-internal.h:658:61: warning: 'static_assert' with no me
│     static_assert(kJSObjectType + 1 == kFirstJSApiObjectType);
│                                                             ^
│                                                             , ""
│ /Users/owocki/Library/Caches/node-gyp/19.3.0/include/node/v8-internal.h:659:55: warning: 'static_assert' with no me
│     static_assert(kJSObjectType < kLastJSApiObjectType);
│                                                       ^
│                                                       , ""
│ /Users/owocki/Library/Caches/node-gyp/19.3.0/include/node/v8-internal.h:660:63: warning: 'static_assert' with no me
│     static_assert(kFirstJSApiObjectType < kLastJSApiObjectType);
│                                                               ^
│                                                               , ""
│ In file included from ../src/node_usb.cc:1:
│ In file included from ../src/node_usb.h:14:
│ In file included from /Users/owocki/Library/Caches/node-gyp/19.3.0/include/node/node_buffer.h:25:
│ In file included from /Users/owocki/Library/Caches/node-gyp/19.3.0/include/node/node.h:73:
│ In file included from /Users/owocki/Library/Caches/node-gyp/19.3.0/include/node/v8.h:24:
│ In file included from /Users/owocki/Library/Caches/node-gyp/19.3.0/include/node/v8-array-buffer.h:13:
│ In file included from /Users/owocki/Library/Caches/node-gyp/19.3.0/include/node/v8-object.h:9:
│ /Users/owocki/Library/Caches/node-gyp/19.3.0/include/node/v8-maybe.h:106:45: error: no template named 'is_lvalue_re
│   template <class U, std::enable_if_t<!std::is_lvalue_reference_v<U>>*>
│                                        ~~~~~^~~~~~~~~~~~~~~~~~~~~
│                                             is_lvalue_reference
│ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk/usr/include/c++/
│ struct _LIBCPP_TEMPLATE_VIS is_lvalue_reference : _BoolConstant<__is_lvalue_reference(_Tp)> { };
│                             ^
│ In file included from ../src/node_usb.cc:1:
│ In file included from ../src/node_usb.h:14:
│ In file included from /Users/owocki/Library/Caches/node-gyp/19.3.0/include/node/node_buffer.h:25:
│ In file included from /Users/owocki/Library/Caches/node-gyp/19.3.0/include/node/node.h:73:
│ In file included from /Users/owocki/Library/Caches/node-gyp/19.3.0/include/node/v8.h:24:
│ In file included from /Users/owocki/Library/Caches/node-gyp/19.3.0/include/node/v8-array-buffer.h:13:
│ In file included from /Users/owocki/Library/Caches/node-gyp/19.3.0/include/node/v8-object.h:9:
│ /Users/owocki/Library/Caches/node-gyp/19.3.0/include/node/v8-maybe.h:106:69: error: expected '(' for function-style
│   template <class U, std::enable_if_t<!std::is_lvalue_reference_v<U>>*>
│                                        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
│ /Users/owocki/Library/Caches/node-gyp/19.3.0/include/node/v8-maybe.h:123:43: error: no template named 'is_lvalue_re
│ template <class T, std::enable_if_t<!std::is_lvalue_reference_v<T>>* = nullptr>
│                                      ~~~~~^~~~~~~~~~~~~~~~~~~~~
│                                           is_lvalue_reference
│ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk/usr/include/c++/
│ struct _LIBCPP_TEMPLATE_VIS is_lvalue_reference : _BoolConstant<__is_lvalue_reference(_Tp)> { };
│                             ^
│ In file included from ../src/node_usb.cc:1:
│ In file included from ../src/node_usb.h:14:
│ In file included from /Users/owocki/Library/Caches/node-gyp/19.3.0/include/node/node_buffer.h:25:
│ In file included from /Users/owocki/Library/Caches/node-gyp/19.3.0/include/node/node.h:73:
│ In file included from /Users/owocki/Library/Caches/node-gyp/19.3.0/include/node/v8.h:24:
│ In file included from /Users/owocki/Library/Caches/node-gyp/19.3.0/include/node/v8-array-buffer.h:13:
│ In file included from /Users/owocki/Library/Caches/node-gyp/19.3.0/include/node/v8-object.h:9:
│ /Users/owocki/Library/Caches/node-gyp/19.3.0/include/node/v8-maybe.h:123:67: error: expected '(' for function-style
│ template <class T, std::enable_if_t<!std::is_lvalue_reference_v<T>>* = nullptr>
│                                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
│ ../src/node_usb.cc:118:2: warning: 'libusb_set_debug' is deprecated [-Wdeprecated-declarations]
│         libusb_set_debug(usb_context, info[0].As<Napi::Number>().Int32Value());
│         ^
│ ../libusb/libusb/libusb.h:1324:1: note: 'libusb_set_debug' has been explicitly marked deprecated here
│ LIBUSB_DEPRECATED_FOR(libusb_set_option)
│ ^
│ ../libusb/libusb/libusb.h:89:49: note: expanded from macro 'LIBUSB_DEPRECATED_FOR'
│ #define LIBUSB_DEPRECATED_FOR(f) __attribute__((deprecated))
│                                                 ^
│ 20 warnings and 4 errors generated.
│ make: *** [Release/obj.target/usb_bindings/src/node_usb.o] Error 1
│ gyp ERR! build error
│ gyp ERR! stack Error: `make` failed with exit code: 2
│ gyp ERR! stack     at ChildProcess.onExit (/opt/homebrew/Cellar/pnpm/8.2.0/libexec/dist/node_modules/node-gyp/lib/b
│ gyp ERR! stack     at ChildProcess.emit (node:events:513:28)
│ gyp ERR! stack     at ChildProcess._handle.onexit (node:internal/child_process:293:12)
│ gyp ERR! System Darwin 21.6.0
│ gyp ERR! command "/opt/homebrew/Cellar/node/19.3.0/bin/node" "/opt/homebrew/Cellar/pnpm/8.2.0/libexec/dist/node_mod
│ gyp ERR! cwd /Users/owocki/Sites/contracts/node_modules/.pnpm/[email protected]/node_modules/usb
│ gyp ERR! node -v v19.3.0
│ gyp ERR! node-gyp -v v9.3.1
│ gyp ERR! not ok
└─ Failed in 11.9s at /Users/owocki/Sites/contracts/node_modules/.pnpm/[email protected]/node_modules/usb
node_modules/.pnpm/[email protected]/node_modules/utf-8-validate: Running install script, done in 1.1s
node_modules/.pnpm/[email protected]/node_modules/web3-bzz: Running postinstall script, done in 8ms
node_modules/.pnpm/[email protected]/node_modules/web3-bzz: Running postinstall script, done in 7ms
node_modules/.pnpm/[email protected]/node_modules/web3-shh: Running postinstall script, done in 5ms
node_modules/.pnpm/[email protected]/node_modules/web3-shh: Running postinstall script, done in 7ms
node_modules/.pnpm/[email protected]/node_modules/web3: Running postinstall script, done in 34ms
 ELIFECYCLE  Command failed with exit code 1.

Expected behavior

pnpm install 

succeeds

Additional context
Running Mac OS X 12.6 with pnpm --version 8.2.0

`roundAddress` on IVotingStrategy is type `address`, not type `RoundImplementation`

https://github.com/allo-protocol/contracts/blob/60db4f9c37c273cdd470e445be28211cf858a3d7/contracts/votingStrategy/IVotingStrategy.sol#L16

I'm writing a voting strategy and as part of my vote() I want to do things like:

  • check that the grantee application was approved
  • check that the project id is valid

For these, I need to reference back to the Round. It feels like having the roundAddress variable be of type RoundImplementation and not of type address would be better for doing these kinds of things. Especially as people build voting strategies that rely on more onchain data.

GS v2 migration scoping

User Story:
As a
I want to
So that

Acceptance Criteria
GIVEN
WHEN
THEN

Product & Design Links:

Tech Details:

Open Questions:

Notes/Assumptions:

  • This includes writing test coverage for the functionality added in the ticket, if necessary

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.