Nuclear Powered Macros

    @pooltogether/pooltogether-proxy-factory

    1.0.0-beta.3 • Public • Published

    PoolTogether Generic Minimal Proxy Factory

    Coverage Status

    CircleCI

    PoolTogether uses the EIP-1167 Minimal Proxy Factory throughout its contracts. This repo provides this contract pattern as an npm package for use in other repo's deployment scripts.

    Usage

    Add package to repo using: yarn add @pooltogether/pooltogether-proxy-factory

    Using hardhat and ethers.js, add the GenericProxyFactory singleton for the network of choice under the namedAccounts in your hardhat.config.js.

    Deploy a new Proxy Contract:

        let { genericProxyFactoryAddress } = await getNamedAccounts()
        genericProxyFactoryContract = await ethers.getContractAt("GenericProxyFactory", genericProxyFactoryAddress)
    
        // deploy using create
        const implementationAddress = "<address>"
        const dataToCallOnNewProxy = "0x"
    
        const newProxyContractResult = await genericProxyFactory.create(implementationAddress, dataToCallOnNewProxy)

    Installation

    Install the repo and dependencies by running: yarn

    Deployment

    These contracts can be deployed to a network by running: yarn deploy <networkName>

    Testing

    Run the unit tests locally with: yarn test

    Coverage

    Generate the test coverage report with: yarn coverage

    Keywords

    none

    Install

    npm i @pooltogether/pooltogether-proxy-factory

    DownloadsWeekly Downloads

    1

    Version

    1.0.0-beta.3

    License

    GPL-3.0

    Unpacked Size

    1.64 MB

    Total Files

    85

    Last publish

    Collaborators

    • sudokames
    • asselstine
    • chuckbergeron
    • dylandesrosier
    • pierrick
    • kamesdev