From 81cbab29e4b4959a0490171db89d9c4ed332b183 Mon Sep 17 00:00:00 2001 From: Pranav Bhardwaj <84149824+pblivin0x@users.noreply.github.com> Date: Sat, 26 Mar 2022 20:32:13 -0400 Subject: [PATCH] Delegated manager system abi and deploy updates [SIM-163] (#9) * add updated abi generation for DelegatedManagerSystem contracts * add WIP deployment script for DelegatedManagerSystem test environment * Refactor contract ABI deployment in support set-protocol-v2 v0.4.0 and set-v2-strategies v0.0.7 * update calls to initializeModuleAndExtension with module parameters * update imports * add DelegatedManager migration to EOAmanager test case * Clean up Hardhat Docker build script * Remove extraneous code Co-authored-by: Colin McRae --- Taskfile.yml | 9 +- docker/.env | 10 + docker/docker-compose.abi.yml | 15 ++ docker/scripts/deploy-set-protocol-v2.sh | 11 +- scripts/update-abis.sh | 77 +++---- test/deploy-state-delegated-manager.ts | 269 ++++++++++++++++++----- test/deploy-state-multi-token.ts | 10 +- test/deploy-state.ts | 10 +- 8 files changed, 299 insertions(+), 112 deletions(-) create mode 100644 docker/docker-compose.abi.yml diff --git a/Taskfile.yml b/Taskfile.yml index 0572d58..cf0b657 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -31,7 +31,7 @@ tasks: desc: "Deploy a local Hardhat node and test script. Must specify full path to file as task input argument." dir: docker/ cmds: - - docker-compose -f docker-compose.hardhat.yml run --name {{.HARDHAT_IP}} --rm -w /app -v {{.CLI_ARGS}}:/tmp/{{.DEPLOY_SCRIPT}} hardhat-build bash /app/scripts/deploy-hardhat.sh + - docker-compose -f docker-compose.hardhat.yml run --name {{.HARDHAT_IP}} --rm -v {{.CLI_ARGS}}:/tmp/{{.DEPLOY_SCRIPT}} hardhat-build bash /app/scripts/deploy-hardhat.sh vars: DEPLOY_SCRIPT: sh: basename "{{.CLI_ARGS}}" @@ -85,7 +85,12 @@ tasks: desc: "Pull latest Set Protocol ABIs into the build environment." cmds: # Note the following command requires node ver 16 or below (only 12 and 16 tested working) - - docker run --rm -v $(pwd)/abis:/subgraph/abis -v $(pwd)/scripts:/subgraph/scripts -w /subgraph {{.SET_IMAGE_NAME}}:node-{{.NODE_VER}} bash scripts/update-abis.sh + - docker-compose -f docker/docker-compose.abi.yml run --rm gen-abi bash scripts/update-abis.sh + env: + PROTOCOL_REPO_URL: "{{.PROTOCOL_REPO_URL}}" + PROTOCOL_REPO_BRANCH_OR_TAG: "{{.PROTOCOL_REPO_BRANCH_OR_TAG}}" + STRATEGIES_REPO_URL: "{{.STRATEGIES_REPO_URL}}" + STRATEGIES_REPO_BRANCH_OR_TAG: "{{.STRATEGIES_REPO_BRANCH_OR_TAG}}" gen-schema: desc: "Generate schema intermediate artifacts for development without a full deploy." diff --git a/docker/.env b/docker/.env index 3cd3938..b09626f 100644 --- a/docker/.env +++ b/docker/.env @@ -14,6 +14,11 @@ # USER CONFIGURABLE SETTINGS #---------------------------- +# set-protocol-v2 Repo Target Tag or Branch +PROTOCOL_REPO_BRANCH_OR_TAG="v0.4.0" +# set-v2-strategies Repo Target Tag or Branch +STRATEGIES_REPO_BRANCH_OR_TAG="v0.0.7" + # Subgraph Version Label for Deployment # See: https://thegraph.com/docs/en/studio/deploy-subgraph-studio#deploying-a-subgraph-to-subgraph-studio # SUBGRAPH_VERSION="0.0.1" @@ -46,6 +51,11 @@ # Node Version for Docker Images NODE_VER=16 +# set-protocol-v2 Repo URL +PROTOCOL_REPO_URL="https://github.com/SetProtocol/set-protocol-v2" +# set-v2-strategies Repo URL +STRATEGIES_REPO_URL="https://github.com/SetProtocol/set-v2-strategies" + # SetProtocol Base Docker Image Name SET_IMAGE_NAME=setprotocol/base # SetProtocol Hardhat Node Docker Image Name diff --git a/docker/docker-compose.abi.yml b/docker/docker-compose.abi.yml new file mode 100644 index 0000000..6cb39d7 --- /dev/null +++ b/docker/docker-compose.abi.yml @@ -0,0 +1,15 @@ +version: '3' + +services: + + gen-abi: + image: ${SET_IMAGE_NAME}:node-${NODE_VER} + environment: + PROTOCOL_REPO_URL: ${PROTOCOL_REPO_URL} + PROTOCOL_REPO_BRANCH_OR_TAG: ${PROTOCOL_REPO_BRANCH_OR_TAG} + STRATEGIES_REPO_URL: ${STRATEGIES_REPO_URL} + STRATEGIES_REPO_BRANCH_OR_TAG: ${STRATEGIES_REPO_BRANCH_OR_TAG} + working_dir: /subgraph + volumes: + - ../abis:/subgraph/abis + - ../scripts:/subgraph/scripts diff --git a/docker/scripts/deploy-set-protocol-v2.sh b/docker/scripts/deploy-set-protocol-v2.sh index ea0db0e..6ea5b47 100755 --- a/docker/scripts/deploy-set-protocol-v2.sh +++ b/docker/scripts/deploy-set-protocol-v2.sh @@ -4,10 +4,9 @@ set -e ROOT_DIR=$(pwd) -if [ ! -d "set-protocol-v2" ]; then - # git clone -q https://github.com/SetProtocol/set-protocol-v2.git - git clone -q https://github.com/SetProtocol/set-v2-strategies.git -fi +# if [ ! -d "set-protocol-v2" ]; then +# git clone -q https://github.com/SetProtocol/set-protocol-v2.git +# fi # cd "${ROOT_DIR}/set-protocol-v2" @@ -19,6 +18,10 @@ fi # # Install the dependencies # yarn install +if [ ! -d "set-v2-strategies" ]; then + git clone -q https://github.com/SetProtocol/set-v2-strategies.git +fi + cd "${ROOT_DIR}/set-v2-strategies" # Set up default env vars as required diff --git a/scripts/update-abis.sh b/scripts/update-abis.sh index f01688a..abe3537 100755 --- a/scripts/update-abis.sh +++ b/scripts/update-abis.sh @@ -2,8 +2,15 @@ set -e -PROTOCOL_REPO_URL="https://github.com/SetProtocol/set-protocol-v2" -STRATEGIES_REPO_URL="https://github.com/SetProtocol/set-v2-strategies" +# Function to copy contract ABI code into subgraph project +function copy_contracts() { + local contracts=("$@") + for cpath in "${contracts[@]}"; do + local cname=$(echo "${cpath}" | rev | cut -d"/" -f1 | rev) + echo "Copying contract $cpath.sol/$cname.json" + cp "$cpath.sol/$cname.json" "/subgraph/abis" + done +} # Remove existing ABIs if [ ! -z "$(ls -A /subgraph/abis)" ]; then @@ -11,56 +18,52 @@ if [ ! -z "$(ls -A /subgraph/abis)" ]; then rm -rf /subgraph/abis/* fi +## REPO set-protocol-v2 CONTRACTS +## ------------------------------ + +# Define the path to each contract of interest for the subgraph development +# Note: Path is relative to repo root dir +PROTOCOL_CONTRACTS=( + "contracts/protocol/Controller" + "contracts/protocol/SetToken" + "contracts/protocol/SetTokenCreator" + "contracts/protocol/modules/v1/StreamingFeeModule" + "contracts/protocol/modules/v1/TradeModule" +) + # Clone and compile the Set Protocol V2 contracts repo cd /tmp -git clone -q --depth=1 "${PROTOCOL_REPO_URL}" +ls -al +git clone -q --depth=1 --branch "${PROTOCOL_REPO_BRANCH_OR_TAG}" "${PROTOCOL_REPO_URL}" +ls -al cd $(echo "${PROTOCOL_REPO_URL}" | rev | cut -d"/" -f1 | rev) cp .env.default .env yarn && yarn compile cd artifacts -# Define the Set contracts of interest for the subgraph development -PROTOCOL_CONTRACTS=( - SetToken - SetTokenCreator -) +# Copy the contract ABI code into the bind mounted working directory +copy_contracts "${PROTOCOL_CONTRACTS[@]}" -# Define the Set module contracts of interest for the subgraph development -MODULE_CONTRACTS=( - StreamingFeeModule - TradeModule -) +## REPO set-v2-strategies CONTRACTS +## -------------------------------- -# Copy the contract ABI code into the bind mounted working directory -for c in "${PROTOCOL_CONTRACTS[@]}"; do - cp "contracts/protocol/$c.sol/$c.json" "/subgraph/abis" -done -for c in "${MODULE_CONTRACTS[@]}"; do - cp "contracts/protocol/modules/$c.sol/$c.json" "/subgraph/abis" -done +# Define the path to each contract of interest for the subgraph development +# Note: Path is relative to repo root dir +STRATEGIES_CONTRACTS=( + "contracts/ManagerCore" + "contracts/factories/DelegatedManagerFactory" + "contracts/manager/DelegatedManager" +) # Clone and compile the Set V2 Strategies contracts repo cd /tmp -git clone -q --depth=1 "${STRATEGIES_REPO_URL}" +ls -al +git clone -q --depth=1 --branch "${STRATEGIES_REPO_BRANCH_OR_TAG}" "${STRATEGIES_REPO_URL}" +ls -al cd $(echo "${STRATEGIES_REPO_URL}" | rev | cut -d"/" -f1 | rev) cp .env.default .env yarn && yarn compile cd artifacts -# Define the Set manager factory contracts of interest for the subgraph development -MANAGER_FACTORY_CONTRACTS=( - DelegatedManagerFactory -) - -# Define the Set manager contracts of interest for the subgraph development -MANAGER_CONTRACTS=( - DelegatedManager -) - # Copy the contract ABI code into the bind mounted working directory -for c in "${MANAGER_FACTORY_CONTRACTS[@]}"; do - cp "contracts/factories/$c.sol/$c.json" "/subgraph/abis" -done -for c in "${MANAGER_CONTRACTS[@]}"; do - cp "contracts/manager/$c.sol/$c.json" "/subgraph/abis" -done \ No newline at end of file +copy_contracts "${STRATEGIES_CONTRACTS[@]}" diff --git a/test/deploy-state-delegated-manager.ts b/test/deploy-state-delegated-manager.ts index b5ad473..7217291 100644 --- a/test/deploy-state-delegated-manager.ts +++ b/test/deploy-state-delegated-manager.ts @@ -5,36 +5,45 @@ * * Setup * - Deploy system - * - Deploy ManagerCore and mock Extension + * - Deploy ManagerCore + * - Deploy DelegatedManagerFactory + * - Deploy IssuanceExtension with IssuanceModule + * - Deploy StreamingFeeSplitExtension + * - Deploy TradeExtension and TradeModule + * - Initialize ManagerCore * - * Case 1: DelegatedManager managed SetToken - * - Deploy SetToken - * - Deploy DelegatedManager - * - Add DelegatedManager to ManagerCore through factory - * - Transfer ownership to DelegatedManager + * Case 1: DelegatedManagerFactory deployed DelegatedManager and SetToken + * - Deploy DelegatedManager and SetToken through DelegatedManagerFactory + * - Initialize DelegatedManager through DelegatedManagerFactory * - Update owner * - Update methodologist * - Add operatorTwo * - Remove operatorOne * - * Case 2: EOA managed SetToken - * - Deploy SetToken + * Case 2: DelegatedManagerFactory deployed DelegatedManager with migrating SetToken + * - Deploy SetToken through SetTokenCreator + * - Deploy DelegatedManager through DelegatedManagerFactory + * - Initialize DelegatedManager through DelegatedManagerFactory * - * Case 3: DelegatedManager managed SetToken migrates to EOA manager - * - Deploy SetToken - * - Deploy DelegatedManager - * - Add DelegatedManager to ManagerCore through factory - * - Transfer ownership to DelegatedManager - * - Set manager to EOA + * Case 3: DelegatedManagerFactory deployed DelegatedManager and SetToken, migrate to EOA manager + * - Deploy DelegatedManager and SetToken through DelegatedManagerFactory + * - Initialize DelegatedManager through DelegatedManagerFactory + * - Remove extensions from DelegatedManager + * - Change SetToken manager to EOA manager + * + * Case 4: EOA managed SetToken + * - Deploy SetToken through SetTokenCreator */ import "module-alias/register"; -import { getSystemFixture } from "@setprotocol/set-protocol-v2/utils/test/index"; +import { getSystemFixture, getProtocolUtils } from "@setprotocol/set-protocol-v2/dist/utils/test/index"; import DeployHelper from "@utils/deploys"; import { ether, getAccounts, } from "@utils/index"; +import { ADDRESS_ZERO, ZERO } from "@utils/constants"; +import { StreamingFeeState } from "@utils/types"; async function main() { @@ -48,7 +57,6 @@ async function main() { methodologistTwo, operatorOne, operatorTwo, - factory, otherManager, ] = await getAccounts(); @@ -57,40 +65,108 @@ async function main() { // Deploy system const deployer = new DeployHelper(ownerOne.wallet); + const protocolUtils = getProtocolUtils(); const setV2Setup = getSystemFixture(ownerOne.address); await setV2Setup.initialize(); - // Deploy ManagerCore and mock Extension + // Deploy ManagerCore const managerCore = await deployer.managerCore.deployManagerCore(); - await managerCore.initialize([factory.address]); - const baseExtension = await deployer.mocks.deployBaseGlobalExtensionMock(managerCore.address); - // Case 1: DelegatedManager managed SetToken - // ----------------------------------------------- + // Deploy DelegatedManagerFactory + const delegatedManagerFactory = await deployer.factories.deployDelegatedManagerFactory( + managerCore.address, + setV2Setup.controller.address, + setV2Setup.factory.address + ); - // Deploy SetToken - const setTokenOne = await setV2Setup.createSetToken( - [setV2Setup.dai.address], - [ether(1)], - [setV2Setup.issuanceModule.address] + // Deploy IssuanceExtension with IssuanceModule + const issuanceModule = await deployer.setV2.deployIssuanceModule(setV2Setup.controller.address); + await setV2Setup.controller.addModule(issuanceModule.address); + const issuanceExtension = await deployer.globalExtensions.deployIssuanceExtension( + managerCore.address, + issuanceModule.address + ); + + // Deploy StreamingFeeSplitExtension + const streamingFeeSplitExtension = await deployer.globalExtensions.deployStreamingFeeSplitExtension( + managerCore.address, + setV2Setup.streamingFeeModule.address ); - // Deploy DelegatedManager - const delegatedManagerOne = await deployer.manager.deployDelegatedManager( - setTokenOne.address, + // Deploy TradeExtension and TradeModule + const tradeModule = await deployer.setDeployer.modules.deployTradeModule(setV2Setup.controller.address); + await setV2Setup.controller.addModule(tradeModule.address); + const tradeExtension = await deployer.globalExtensions.deployTradeExtension( + managerCore.address, + tradeModule.address + ); + + // Initialize ManagerCore + await managerCore.initialize( + [issuanceExtension.address, streamingFeeSplitExtension.address, tradeExtension.address], + [delegatedManagerFactory.address] + ); + + // Case 1: DelegatedManagerFactory deployed DelegatedManager and SetToken + // ----------------------------------------------- + + // Deploy DelegatedManager and SetToken through DelegatedManagerFactory + const txOne = await delegatedManagerFactory.connect(ownerOne.wallet).createSetAndManager( + [setV2Setup.dai.address, setV2Setup.wbtc.address], + [ether(1), ether(.1)], + "TestTokenOne", + "TTO", ownerOne.address, methodologistOne.address, - [baseExtension.address], + [issuanceModule.address, setV2Setup.streamingFeeModule.address, tradeModule.address], [operatorOne.address], - [setV2Setup.usdc.address, setV2Setup.weth.address], - true + [setV2Setup.dai.address, setV2Setup.wbtc.address], + [issuanceExtension.address, streamingFeeSplitExtension.address, tradeExtension.address] + ); + + const setTokenOneAddress = await protocolUtils.getCreatedSetTokenAddress(txOne.hash); + const initializeParamsOne = await delegatedManagerFactory.initializeState(setTokenOneAddress); + const delegatedManagerOne = await deployer.manager.getDelegatedManager(initializeParamsOne.manager); + + // Initialize DelegatedManager through DelegatedManagerFactory + const issuanceExtensionOneBytecode = issuanceExtension.interface.encodeFunctionData( + "initializeModuleAndExtension", + [ + delegatedManagerOne.address, + ether(0.1), + ether(0.01), + ether(0.01), + delegatedManagerOne.address, + ADDRESS_ZERO + ] + ); + + const feeSettingsOne = { + feeRecipient: delegatedManagerOne.address, + maxStreamingFeePercentage: ether(0.05), + streamingFeePercentage: ether(0.01), + lastStreamingFeeTimestamp: ZERO, + } as StreamingFeeState; + const streamingFeeSplitExtensionOneBytecode = streamingFeeSplitExtension.interface.encodeFunctionData( + "initializeModuleAndExtension", + [ + delegatedManagerOne.address, + feeSettingsOne + ] ); - // Add DelegatedManager to ManagerCore through factory - await managerCore.connect(factory.wallet).addManager(delegatedManagerOne.address); + const tradeExtensionOneBytecode = tradeExtension.interface.encodeFunctionData( + "initializeModuleAndExtension", + [delegatedManagerOne.address] + ); - // Transfer ownership to DelegatedManager - await setTokenOne.setManager(delegatedManagerOne.address); + await delegatedManagerFactory.connect(ownerOne.wallet).initialize( + setTokenOneAddress, + ether(0.5), + ownerOne.address, + [issuanceExtension.address, streamingFeeSplitExtension.address, tradeExtension.address], + [issuanceExtensionOneBytecode, streamingFeeSplitExtensionOneBytecode, tradeExtensionOneBytecode] + ); // Update owner await delegatedManagerOne.connect(ownerOne.wallet).transferOwnership(ownerTwo.address); @@ -104,45 +180,120 @@ async function main() { // Remove operatorOne await delegatedManagerOne.connect(ownerTwo.wallet).removeOperators([operatorOne.address]); - // Case 2: EOA managed SetToken + // Case 2: DelegatedManagerFactory deployed DelegatedManager with migrating SetToken // ----------------------------------------------- - // Deploy SetToken - await setV2Setup.createSetToken( + // Deploy SetToken through SetTokenCreator + const setTokenTwo = await setV2Setup.createSetToken( [setV2Setup.dai.address], [ether(1)], - [setV2Setup.issuanceModule.address] + [issuanceModule.address, setV2Setup.streamingFeeModule.address, tradeModule.address], ); - // Case 3: DelegatedManager managed SetToken migrates to EOA manager - // ----------------------------------------------- - - // Deploy SetToken - const setTokenTwo = await setV2Setup.createSetToken( - [setV2Setup.dai.address], - [ether(1)], - [setV2Setup.issuanceModule.address] + // Deploy DelegatedManager through DelegatedManagerFactory + await delegatedManagerFactory.createManager( + setTokenTwo.address, + ownerOne.address, + methodologistOne.address, + [operatorOne.address], + [setV2Setup.dai.address, setV2Setup.wbtc.address], + [issuanceExtension.address, streamingFeeSplitExtension.address, tradeExtension.address] ); - // Deploy DelegatedManager - const delegatedManagerTwo = await deployer.manager.deployDelegatedManager( + const initializeParamsTwo = await delegatedManagerFactory.initializeState(setTokenTwo.address); + const delegatedManagerTwo = await deployer.manager.getDelegatedManager(initializeParamsTwo.manager); + + // Initialize DelegatedManager through DelegatedManagerFactory + const issuanceExtensionTwoBytecode = issuanceExtension.interface.encodeFunctionData("initializeExtension", [delegatedManagerTwo.address]); + const streamingFeeSplitExtensionTwoBytecode = streamingFeeSplitExtension.interface.encodeFunctionData("initializeExtension", [delegatedManagerTwo.address]); + const tradeExtensionTwoBytecode = tradeExtension.interface.encodeFunctionData("initializeExtension", [delegatedManagerTwo.address]); + + await delegatedManagerFactory.connect(ownerOne.wallet).initialize( setTokenTwo.address, + ether(0.5), + ownerOne.address, + [issuanceExtension.address, streamingFeeSplitExtension.address, tradeExtension.address], + [issuanceExtensionTwoBytecode, streamingFeeSplitExtensionTwoBytecode, tradeExtensionTwoBytecode] + ); + + // Case 3: DelegatedManagerFactory deployed DelegatedManager and SetToken, migrate to EOA manager + // ----------------------------------------------- + + // Deploy DelegatedManager and SetToken through DelegatedManagerFactory + const txThree = await delegatedManagerFactory.connect(ownerOne.wallet).createSetAndManager( + [setV2Setup.dai.address, setV2Setup.wbtc.address], + [ether(1), ether(.1)], + "TestTokenThree", + "TTT", ownerOne.address, methodologistOne.address, - [baseExtension.address], + [issuanceModule.address, setV2Setup.streamingFeeModule.address, tradeModule.address], [operatorOne.address], - [setV2Setup.usdc.address, setV2Setup.weth.address], - true + [setV2Setup.dai.address, setV2Setup.wbtc.address], + [issuanceExtension.address, streamingFeeSplitExtension.address, tradeExtension.address] + ); + + const setTokenThreeAddress = await protocolUtils.getCreatedSetTokenAddress(txThree.hash); + const initializeParamsThree = await delegatedManagerFactory.initializeState(setTokenThreeAddress); + const delegatedManagerThree = await deployer.manager.getDelegatedManager(initializeParamsThree.manager); + + // Initialize DelegatedManager through DelegatedManagerFactory + const issuanceExtensionThreeBytecode = issuanceExtension.interface.encodeFunctionData( + "initializeModuleAndExtension", + [ + delegatedManagerThree.address, + ether(0.1), + ether(0.01), + ether(0.01), + delegatedManagerThree.address, + ADDRESS_ZERO + ] ); - // Add DelegatedManager to ManagerCore through factory - await managerCore.connect(factory.wallet).addManager(delegatedManagerTwo.address); + const feeSettingsThree = { + feeRecipient: delegatedManagerThree.address, + maxStreamingFeePercentage: ether(0.05), + streamingFeePercentage: ether(0.01), + lastStreamingFeeTimestamp: ZERO, + } as StreamingFeeState; + const streamingFeeSplitExtensionThreeBytecode = streamingFeeSplitExtension.interface.encodeFunctionData( + "initializeModuleAndExtension", + [ + delegatedManagerThree.address, + feeSettingsThree + ] + ); + + const tradeExtensionThreeBytecode = tradeExtension.interface.encodeFunctionData( + "initializeModuleAndExtension", + [delegatedManagerThree.address] + ); + + await delegatedManagerFactory.connect(ownerOne.wallet).initialize( + setTokenThreeAddress, + ether(0.5), + ownerOne.address, + [issuanceExtension.address, streamingFeeSplitExtension.address, tradeExtension.address], + [issuanceExtensionThreeBytecode, streamingFeeSplitExtensionThreeBytecode, tradeExtensionThreeBytecode] + ); + + // Remove extensions from DelegatedManager + await delegatedManagerThree.connect(ownerOne.wallet).removeExtensions( + [issuanceExtension.address, streamingFeeSplitExtension.address, tradeExtension.address] + ); - // Transfer ownership to DelegatedManager - await setTokenTwo.setManager(delegatedManagerTwo.address); + // Change SetToken manager to EOA manager + await delegatedManagerThree.connect(ownerOne.wallet).setManager(otherManager.address); - // Transfer ownership to EOA - await delegatedManagerTwo.setManager(otherManager.address); + // Case 4: EOA managed SetToken + // ----------------------------------------------- + + // Deploy SetToken through SetTokenCreator + await setV2Setup.createSetToken( + [setV2Setup.dai.address], + [ether(1)], + [setV2Setup.issuanceModule.address] + ); } main().catch(e => { diff --git a/test/deploy-state-multi-token.ts b/test/deploy-state-multi-token.ts index 5e7fdb3..4888a1e 100644 --- a/test/deploy-state-multi-token.ts +++ b/test/deploy-state-multi-token.ts @@ -14,11 +14,11 @@ import "module-alias/register"; import { BigNumber } from "@ethersproject/bignumber"; import { ethers } from "hardhat"; -import { EMPTY_BYTES, ONE_YEAR_IN_SECONDS, ZERO } from "@setprotocol/set-protocol-v2/utils/constants"; -import DeployHelper from "@setprotocol/set-protocol-v2/utils/deploys"; -import { ether } from "@setprotocol/set-protocol-v2/utils/index"; -import { getAccounts, getSystemFixture, increaseTimeAsync } from "@setprotocol/set-protocol-v2/utils/test/index"; -import { StreamingFeeState } from "@setprotocol/set-protocol-v2/utils/types"; +import { EMPTY_BYTES, ONE_YEAR_IN_SECONDS, ZERO } from "@setprotocol/set-protocol-v2/dist/utils/constants"; +import DeployHelper from "@setprotocol/set-protocol-v2/dist/utils/deploys"; +import { ether } from "@setprotocol/set-protocol-v2/dist/utils/index"; +import { getAccounts, getSystemFixture, increaseTimeAsync } from "@setprotocol/set-protocol-v2/dist/utils/test/index"; +import { StreamingFeeState } from "@setprotocol/set-protocol-v2/dist/utils/types"; async function main() { diff --git a/test/deploy-state.ts b/test/deploy-state.ts index e869c98..e904ee6 100644 --- a/test/deploy-state.ts +++ b/test/deploy-state.ts @@ -14,11 +14,11 @@ import "module-alias/register"; import { BigNumber } from "@ethersproject/bignumber"; import { ethers } from "hardhat"; -import { EMPTY_BYTES, ONE_YEAR_IN_SECONDS, ZERO } from "@setprotocol/set-protocol-v2/utils/constants"; -import DeployHelper from "@setprotocol/set-protocol-v2/utils/deploys"; -import { ether } from "@setprotocol/set-protocol-v2/utils/index"; -import { getAccounts, getSystemFixture, increaseTimeAsync } from "@setprotocol/set-protocol-v2/utils/test/index"; -import { StreamingFeeState } from "@setprotocol/set-protocol-v2/utils/types"; +import { EMPTY_BYTES, ONE_YEAR_IN_SECONDS, ZERO } from "@setprotocol/set-protocol-v2/dist/utils/constants"; +import DeployHelper from "@setprotocol/set-protocol-v2/dist/utils/deploys"; +import { ether } from "@setprotocol/set-protocol-v2/dist/utils/index"; +import { getAccounts, getSystemFixture, increaseTimeAsync } from "@setprotocol/set-protocol-v2/dist/utils/test/index"; +import { StreamingFeeState } from "@setprotocol/set-protocol-v2/dist/utils/types"; async function main() {