Skip to content

Commit

Permalink
Rename deploy scripts for clarity
Browse files Browse the repository at this point in the history
  • Loading branch information
MattPereira committed Aug 15, 2024
1 parent a6f15ed commit aa868a9
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions packages/foundry/script/Deploy.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@
pragma solidity ^0.8.24;

import { ScaffoldHelpers } from "./ScaffoldHelpers.sol";
import { DeployMockTokens } from "./DeployMockTokens.s.sol";
import { DeployConstantSum } from "./DeployConstantSum.s.sol";
import { DeployConstantProduct } from "./DeployConstantProduct.s.sol";
import { DeployMockTokens } from "./00_DeployMockTokens.s.sol";
import { DeployConstantSum } from "./01_DeployConstantSum.s.sol";
import { DeployConstantProduct } from "./02_DeployConstantProduct.s.sol";
import { IERC20 } from "@openzeppelin/contracts/interfaces/IERC20.sol";

/**
* @title Deploy Script
* @notice Import all deploy scripts here so that scaffold can exportDeployments()
* @dev Import & run deploy scripts here so that contract Abis are carried to /nextjs
* @dev Run this script with `yarn deploy`
*/
contract DeployScript is ScaffoldHelpers {
function run() external virtual {
function run() external virtual export {
// Deploy mock tokens to be used for pools and hooks contracts
DeployMockTokens deployMockTokens = new DeployMockTokens();
(IERC20 mockToken1, IERC20 mockToken2, IERC20 mockVeBAL) = deployMockTokens.run();
Expand All @@ -25,12 +25,10 @@ contract DeployScript is ScaffoldHelpers {
// Deploy a constant product factory, a hooks contract, and a pool
DeployConstantProduct deployConstantProduct = new DeployConstantProduct();
deployConstantProduct.run(mockToken1, mockToken2, mockVeBAL);
}

/**
* This function generates the file containing the contracts Abi definitions that are carried from /foundry to /nextjs.
* These definitions are used to derive the types needed in the custom scaffold-eth hooks, for example.
* This function should be called last.
*/
modifier export() {
_;
exportDeployments();
}
}

0 comments on commit aa868a9

Please sign in to comment.