Skip to content
This repository has been archived by the owner on Nov 27, 2024. It is now read-only.

feat: Deploy script #215

Merged
merged 29 commits into from
Apr 13, 2023
Merged

feat: Deploy script #215

merged 29 commits into from
Apr 13, 2023

Conversation

davidlaprade
Copy link
Contributor

@davidlaprade davidlaprade commented Apr 7, 2023

Motivation:

We want an automated way to deploy the Vertex infrastructure on different networks, ensuring that important contracts on each network have the same address. We also want to make sure that this is done safely, ideally without the possibility that anyone could frontrun a transaction, e.g. to intialize an important contract.

Modifications:

This PR:

  • adds a DeployVertex script to deploy logic contracts, the lens, and the factory to a new chain
  • adds a README documenting safe script usage and best practices for use at deploy time
  • uses DeployVertex as a part of the test suite setup, so that all tests run against the state prepared by the deploy script

Result:

We have a script to safely deploy Vertex on multiple chains

Copy link
Collaborator

@mds1 mds1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know it's still a draft, but figured I'd leave a few small comments

script/DeployVertex.s.sol Outdated Show resolved Hide resolved
script/DeployVertex.s.sol Outdated Show resolved Hide resolved
script/DeployVertex.s.sol Outdated Show resolved Hide resolved
script/input/1/deployVertex.json Outdated Show resolved Hide resolved
script/README.md Show resolved Hide resolved
test/DeployVertex.t.sol Outdated Show resolved Hide resolved
test/DeployVertex.t.sol Outdated Show resolved Hide resolved
@davidlaprade davidlaprade force-pushed the davidlaprade/factory-deploy-script branch from c26934e to 75b85a5 Compare April 11, 2023 19:28
@davidlaprade davidlaprade marked this pull request as ready for review April 11, 2023 19:53
Copy link
Collaborator

@mds1 mds1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great, awesome job!

script/DeployVertex.s.sol Outdated Show resolved Hide resolved
script/DeployVertex.s.sol Outdated Show resolved Hide resolved
script/DeployVertex.s.sol Outdated Show resolved Hide resolved
script/DeployVertex.s.sol Outdated Show resolved Hide resolved
test/script/DeployVertex.t.sol Outdated Show resolved Hide resolved
test/utils/VertexTestSetup.sol Outdated Show resolved Hide resolved
@davidlaprade davidlaprade force-pushed the davidlaprade/factory-deploy-script branch from 40240b5 to 5002249 Compare April 12, 2023 13:28
@davidlaprade davidlaprade requested a review from mds1 April 12, 2023 15:02
@davidlaprade davidlaprade force-pushed the davidlaprade/factory-deploy-script branch from 11b1337 to 133c1a7 Compare April 13, 2023 13:33
foundry.toml Show resolved Hide resolved
Copy link
Contributor

@0xrajath 0xrajath left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Left a couple of clarifying questions for my own learning

@davidlaprade davidlaprade force-pushed the davidlaprade/factory-deploy-script branch from 8f7da46 to ef0a8c0 Compare April 13, 2023 21:00
@github-actions
Copy link

Coverage after merging davidlaprade/factory-deploy-script into main will be

91.03%

Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
src
   VertexAccount.sol100%100%100%100%
   VertexCore.sol86.58%81.43%83.33%89.78%209, 232–233, 233, 233–234, 274, 276, 328, 341–342, 342, 342–343, 378, 393–394, 394, 394–395, 512, 514, 552, 618, 622, 626, 628
   VertexFactory.sol100%100%100%100%
   VertexLens.sol100%100%100%100%
   VertexPolicy.sol99.28%95.83%100%100%199
   VertexPolicyTokenURI.sol100%100%100%100%
   VertexStrategy.sol96.72%75%100%100%210, 95
src/lib
   Checkpoints.sol79.68%72.22%94.44%80.87%105, 204, 216–217, 258–260, 260, 260–261, 263, 266, 294–295, 333–335, 337–339, 341–343, 345–347, 349–351, 353–355, 361–362, 380, 389, 53
   ERC721NonTransferableMinimalProxy.sol72.46%72.73%72.73%72.22%102, 104, 106, 118, 190, 88, 88, 88, 90, 90, 90, 92, 92, 92, 97, 99

@davidlaprade davidlaprade merged commit 291d83e into main Apr 13, 2023
@davidlaprade davidlaprade deleted the davidlaprade/factory-deploy-script branch April 13, 2023 21:26
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants