From 7fe233337fb594aca13252cce4b47535f71ceb1d Mon Sep 17 00:00:00 2001 From: 0xAustrian Date: Wed, 4 Sep 2024 10:39:48 -0300 Subject: [PATCH 1/6] create DeployBase.sol --- script/DeployBase.sol | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 script/DeployBase.sol diff --git a/script/DeployBase.sol b/script/DeployBase.sol new file mode 100644 index 000000000..9909af399 --- /dev/null +++ b/script/DeployBase.sol @@ -0,0 +1,21 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.19; + +import {Script, console} from "forge-std/Script.sol"; + +abstract contract DeployBase is Script { + /// @notice Deployment parameters for each chain + mapping(uint256 _chainId => bytes _deploymentData) internal _deploymentParams; + + function run() public { + bytes memory _params = _deploymentParams[block.chainid]; + + vm.startBroadcast(); + address _contract = _deploy(block.chainid, _params); + vm.stopBroadcast(); + + console.log("Deployed contract at address: %s", _contract); + } + + function _deploy(uint256 _chainId, bytes memory _data) internal virtual returns (address _contract) {} +} From 99b62a4d350bea7ffad33a4c6564f4b09ad3dc7b Mon Sep 17 00:00:00 2001 From: 0xAustrian Date: Wed, 4 Sep 2024 10:40:17 -0300 Subject: [PATCH 2/6] create DeployDirectAllocation.sol --- script/DeployDirectAllocation.sol | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 script/DeployDirectAllocation.sol diff --git a/script/DeployDirectAllocation.sol b/script/DeployDirectAllocation.sol new file mode 100644 index 000000000..2a7d75565 --- /dev/null +++ b/script/DeployDirectAllocation.sol @@ -0,0 +1,17 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.19; + +import {DeployBase} from "script/DeployBase.sol"; +import {DirectAllocationStrategy} from "contracts/strategies/examples/direct-allocation/DirectAllocation.sol"; + +contract DeployDirectAllocation is DeployBase { + function setUp() public { + // Mainnet + address _allo = 0x0000000000000000000000000000000000000000; + _deploymentParams[1] = abi.encode(_allo); + } + + function _deploy(uint256, bytes memory _data) internal override returns (address _contract) { + return address(new DirectAllocationStrategy(abi.decode(_data, (address)))); + } +} From 3a63ee254a6496d6c0250b443ca9a8ae1ae0ba72 Mon Sep 17 00:00:00 2001 From: 0xAustrian Date: Wed, 4 Sep 2024 11:16:32 -0300 Subject: [PATCH 3/6] create deploy script for strategies --- script/DeployBase.sol | 2 +- ...DeployDonationVotingMerkleDistribution.sol | 20 +++++++++++++++++++ script/DeployDonationVotingOffchain.sol | 19 ++++++++++++++++++ script/DeployDonationVotingOnchain.sol | 17 ++++++++++++++++ script/DeployEasyRPGF.sol | 17 ++++++++++++++++ script/DeployQVImpactStream.sol | 17 ++++++++++++++++ script/DeployQVSimple.sol | 17 ++++++++++++++++ script/DeployRFPSimple.sol | 17 ++++++++++++++++ 8 files changed, 125 insertions(+), 1 deletion(-) create mode 100644 script/DeployDonationVotingMerkleDistribution.sol create mode 100644 script/DeployDonationVotingOffchain.sol create mode 100644 script/DeployDonationVotingOnchain.sol create mode 100644 script/DeployEasyRPGF.sol create mode 100644 script/DeployQVImpactStream.sol create mode 100644 script/DeployQVSimple.sol create mode 100644 script/DeployRFPSimple.sol diff --git a/script/DeployBase.sol b/script/DeployBase.sol index 9909af399..0a6645416 100644 --- a/script/DeployBase.sol +++ b/script/DeployBase.sol @@ -13,7 +13,7 @@ abstract contract DeployBase is Script { vm.startBroadcast(); address _contract = _deploy(block.chainid, _params); vm.stopBroadcast(); - + console.log("Deployed contract at address: %s", _contract); } diff --git a/script/DeployDonationVotingMerkleDistribution.sol b/script/DeployDonationVotingMerkleDistribution.sol new file mode 100644 index 000000000..6ff4eb960 --- /dev/null +++ b/script/DeployDonationVotingMerkleDistribution.sol @@ -0,0 +1,20 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.19; + +import {DeployBase} from "script/DeployBase.sol"; +import {DonationVotingMerkleDistribution} from + "contracts/strategies/examples/donation-voting/DonationVotingMerkleDistribution.sol"; + +contract DeployDonationVotingMerkleDistribution is DeployBase { + function setUp() public { + // Mainnet + address _allo = 0x0000000000000000000000000000000000000000; + bool _directTransfer = false; + _deploymentParams[1] = abi.encode(_allo, _directTransfer); + } + + function _deploy(uint256, bytes memory _data) internal override returns (address _contract) { + (address _allo, bool _directTransfer) = abi.decode(_data, (address, bool)); + return address(new DonationVotingMerkleDistribution(_allo, _directTransfer)); + } +} diff --git a/script/DeployDonationVotingOffchain.sol b/script/DeployDonationVotingOffchain.sol new file mode 100644 index 000000000..2a06f4bdc --- /dev/null +++ b/script/DeployDonationVotingOffchain.sol @@ -0,0 +1,19 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.19; + +import {DeployBase} from "script/DeployBase.sol"; +import {DonationVotingOffchain} from "contracts/strategies/examples/donation-voting/DonationVotingOffchain.sol"; + +contract DeployDonationVotingOffchain is DeployBase { + function setUp() public { + // Mainnet + address _allo = 0x0000000000000000000000000000000000000000; + bool _directTransfer = false; + _deploymentParams[1] = abi.encode(_allo, _directTransfer); + } + + function _deploy(uint256, bytes memory _data) internal override returns (address _contract) { + (address _allo, bool _directTransfer) = abi.decode(_data, (address, bool)); + return address(new DonationVotingOffchain(_allo, _directTransfer)); + } +} diff --git a/script/DeployDonationVotingOnchain.sol b/script/DeployDonationVotingOnchain.sol new file mode 100644 index 000000000..1ae92d5c8 --- /dev/null +++ b/script/DeployDonationVotingOnchain.sol @@ -0,0 +1,17 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.19; + +import {DeployBase} from "script/DeployBase.sol"; +import {DonationVotingOnchain} from "contracts/strategies/examples/donation-voting/DonationVotingOnchain.sol"; + +contract DeployDonationVotingOnchain is DeployBase { + function setUp() public { + // Mainnet + address _allo = 0x0000000000000000000000000000000000000000; + _deploymentParams[1] = abi.encode(_allo); + } + + function _deploy(uint256, bytes memory _data) internal override returns (address _contract) { + return address(new DonationVotingOnchain(abi.decode(_data, (address)))); + } +} diff --git a/script/DeployEasyRPGF.sol b/script/DeployEasyRPGF.sol new file mode 100644 index 000000000..4b6570ac9 --- /dev/null +++ b/script/DeployEasyRPGF.sol @@ -0,0 +1,17 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.19; + +import {DeployBase} from "script/DeployBase.sol"; +import {EasyRPGF} from "contracts/strategies/examples/easy-rpgf/EasyRPGF.sol"; + +contract DeployEasyRPGF is DeployBase { + function setUp() public { + // Mainnet + address _allo = 0x0000000000000000000000000000000000000000; + _deploymentParams[1] = abi.encode(_allo); + } + + function _deploy(uint256, bytes memory _data) internal override returns (address _contract) { + return address(new EasyRPGF(abi.decode(_data, (address)))); + } +} diff --git a/script/DeployQVImpactStream.sol b/script/DeployQVImpactStream.sol new file mode 100644 index 000000000..84cd07b39 --- /dev/null +++ b/script/DeployQVImpactStream.sol @@ -0,0 +1,17 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.19; + +import {DeployBase} from "script/DeployBase.sol"; +import {QVImpactStream} from "contracts/strategies/examples/impact-stream/QVImpactStream.sol"; + +contract DeployQVImpactStream is DeployBase { + function setUp() public { + // Mainnet + address _allo = 0x0000000000000000000000000000000000000000; + _deploymentParams[1] = abi.encode(_allo); + } + + function _deploy(uint256, bytes memory _data) internal override returns (address _contract) { + return address(new QVImpactStream(abi.decode(_data, (address)))); + } +} diff --git a/script/DeployQVSimple.sol b/script/DeployQVSimple.sol new file mode 100644 index 000000000..50c76c1d4 --- /dev/null +++ b/script/DeployQVSimple.sol @@ -0,0 +1,17 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.19; + +import {DeployBase} from "script/DeployBase.sol"; +import {QVSimple} from "contracts/strategies/examples/quadratic-voting/QVSimple.sol"; + +contract DeployQVSimple is DeployBase { + function setUp() public { + // Mainnet + address _allo = 0x0000000000000000000000000000000000000000; + _deploymentParams[1] = abi.encode(_allo); + } + + function _deploy(uint256, bytes memory _data) internal override returns (address _contract) { + return address(new QVSimple(abi.decode(_data, (address)))); + } +} diff --git a/script/DeployRFPSimple.sol b/script/DeployRFPSimple.sol new file mode 100644 index 000000000..2bb252aa8 --- /dev/null +++ b/script/DeployRFPSimple.sol @@ -0,0 +1,17 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.19; + +import {DeployBase} from "script/DeployBase.sol"; +import {RFPSimple} from "contracts/strategies/examples/rfp/RFPSimple.sol"; + +contract DeployRFPSimple is DeployBase { + function setUp() public { + // Mainnet + address _allo = 0x0000000000000000000000000000000000000000; + _deploymentParams[1] = abi.encode(_allo); + } + + function _deploy(uint256, bytes memory _data) internal override returns (address _contract) { + return address(new RFPSimple(abi.decode(_data, (address)))); + } +} From e1798c68177e54336909a77a8e9149f2807a684c Mon Sep 17 00:00:00 2001 From: 0xAustrian Date: Mon, 9 Sep 2024 07:30:03 -0300 Subject: [PATCH 4/6] feat: move deployment params to .env --- .env.sample | 5 +++++ script/DeployBase.sol | 9 ++------- script/DeployDirectAllocation.sol | 11 +++-------- script/DeployDonationVotingMerkleDistribution.sol | 12 +++--------- script/DeployDonationVotingOffchain.sol | 12 +++--------- script/DeployDonationVotingOnchain.sol | 11 +++-------- script/DeployEasyRPGF.sol | 11 +++-------- script/DeployQVImpactStream.sol | 11 +++-------- script/DeployQVSimple.sol | 11 +++-------- script/DeployRFPSimple.sol | 11 +++-------- 10 files changed, 31 insertions(+), 73 deletions(-) diff --git a/.env.sample b/.env.sample index a3e08ec67..3ecc608dd 100644 --- a/.env.sample +++ b/.env.sample @@ -30,3 +30,8 @@ ANVIL_PRIVATE_KEY= # Gas report COINMARKETCAP_API_KEY= + +# Strategy deployment params +ALLO_ADDRESS= +DONATION_VOTING_MERKLE_DISTRIBUTION_IS_DIRECT_TRANSFER= +DONATION_VOTING_OFFCHAIN_IS_DIRECT_TRANSFER= \ No newline at end of file diff --git a/script/DeployBase.sol b/script/DeployBase.sol index 0a6645416..8dd42a103 100644 --- a/script/DeployBase.sol +++ b/script/DeployBase.sol @@ -4,18 +4,13 @@ pragma solidity ^0.8.19; import {Script, console} from "forge-std/Script.sol"; abstract contract DeployBase is Script { - /// @notice Deployment parameters for each chain - mapping(uint256 _chainId => bytes _deploymentData) internal _deploymentParams; - function run() public { - bytes memory _params = _deploymentParams[block.chainid]; - vm.startBroadcast(); - address _contract = _deploy(block.chainid, _params); + address _contract = _deploy(); vm.stopBroadcast(); console.log("Deployed contract at address: %s", _contract); } - function _deploy(uint256 _chainId, bytes memory _data) internal virtual returns (address _contract) {} + function _deploy() internal virtual returns (address _contract) {} } diff --git a/script/DeployDirectAllocation.sol b/script/DeployDirectAllocation.sol index 2a7d75565..832dcb627 100644 --- a/script/DeployDirectAllocation.sol +++ b/script/DeployDirectAllocation.sol @@ -5,13 +5,8 @@ import {DeployBase} from "script/DeployBase.sol"; import {DirectAllocationStrategy} from "contracts/strategies/examples/direct-allocation/DirectAllocation.sol"; contract DeployDirectAllocation is DeployBase { - function setUp() public { - // Mainnet - address _allo = 0x0000000000000000000000000000000000000000; - _deploymentParams[1] = abi.encode(_allo); - } - - function _deploy(uint256, bytes memory _data) internal override returns (address _contract) { - return address(new DirectAllocationStrategy(abi.decode(_data, (address)))); + function _deploy() internal override returns (address _contract) { + address _allo = vm.envAddress("ALLO_ADDRESS"); + return address(new DirectAllocationStrategy(_allo)); } } diff --git a/script/DeployDonationVotingMerkleDistribution.sol b/script/DeployDonationVotingMerkleDistribution.sol index 6ff4eb960..3b23c9683 100644 --- a/script/DeployDonationVotingMerkleDistribution.sol +++ b/script/DeployDonationVotingMerkleDistribution.sol @@ -6,15 +6,9 @@ import {DonationVotingMerkleDistribution} from "contracts/strategies/examples/donation-voting/DonationVotingMerkleDistribution.sol"; contract DeployDonationVotingMerkleDistribution is DeployBase { - function setUp() public { - // Mainnet - address _allo = 0x0000000000000000000000000000000000000000; - bool _directTransfer = false; - _deploymentParams[1] = abi.encode(_allo, _directTransfer); - } - - function _deploy(uint256, bytes memory _data) internal override returns (address _contract) { - (address _allo, bool _directTransfer) = abi.decode(_data, (address, bool)); + function _deploy() internal override returns (address _contract) { + address _allo = vm.envAddress("ALLO_ADDRESS"); + bool _directTransfer = vm.envBool("DONATION_VOTING_MERKLE_DISTRIBUTION_IS_DIRECT_TRANSFER"); return address(new DonationVotingMerkleDistribution(_allo, _directTransfer)); } } diff --git a/script/DeployDonationVotingOffchain.sol b/script/DeployDonationVotingOffchain.sol index 2a06f4bdc..4ef239e8a 100644 --- a/script/DeployDonationVotingOffchain.sol +++ b/script/DeployDonationVotingOffchain.sol @@ -5,15 +5,9 @@ import {DeployBase} from "script/DeployBase.sol"; import {DonationVotingOffchain} from "contracts/strategies/examples/donation-voting/DonationVotingOffchain.sol"; contract DeployDonationVotingOffchain is DeployBase { - function setUp() public { - // Mainnet - address _allo = 0x0000000000000000000000000000000000000000; - bool _directTransfer = false; - _deploymentParams[1] = abi.encode(_allo, _directTransfer); - } - - function _deploy(uint256, bytes memory _data) internal override returns (address _contract) { - (address _allo, bool _directTransfer) = abi.decode(_data, (address, bool)); + function _deploy() internal override returns (address _contract) { + address _allo = vm.envAddress("ALLO_ADDRESS"); + bool _directTransfer = vm.envBool("DONATION_VOTING_OFFCHAIN_IS_DIRECT_TRANSFER"); return address(new DonationVotingOffchain(_allo, _directTransfer)); } } diff --git a/script/DeployDonationVotingOnchain.sol b/script/DeployDonationVotingOnchain.sol index 1ae92d5c8..16062529a 100644 --- a/script/DeployDonationVotingOnchain.sol +++ b/script/DeployDonationVotingOnchain.sol @@ -5,13 +5,8 @@ import {DeployBase} from "script/DeployBase.sol"; import {DonationVotingOnchain} from "contracts/strategies/examples/donation-voting/DonationVotingOnchain.sol"; contract DeployDonationVotingOnchain is DeployBase { - function setUp() public { - // Mainnet - address _allo = 0x0000000000000000000000000000000000000000; - _deploymentParams[1] = abi.encode(_allo); - } - - function _deploy(uint256, bytes memory _data) internal override returns (address _contract) { - return address(new DonationVotingOnchain(abi.decode(_data, (address)))); + function _deploy() internal override returns (address _contract) { + address _allo = vm.envAddress("ALLO_ADDRESS"); + return address(new DonationVotingOnchain(_allo)); } } diff --git a/script/DeployEasyRPGF.sol b/script/DeployEasyRPGF.sol index 4b6570ac9..c09a4b4d5 100644 --- a/script/DeployEasyRPGF.sol +++ b/script/DeployEasyRPGF.sol @@ -5,13 +5,8 @@ import {DeployBase} from "script/DeployBase.sol"; import {EasyRPGF} from "contracts/strategies/examples/easy-rpgf/EasyRPGF.sol"; contract DeployEasyRPGF is DeployBase { - function setUp() public { - // Mainnet - address _allo = 0x0000000000000000000000000000000000000000; - _deploymentParams[1] = abi.encode(_allo); - } - - function _deploy(uint256, bytes memory _data) internal override returns (address _contract) { - return address(new EasyRPGF(abi.decode(_data, (address)))); + function _deploy() internal override returns (address _contract) { + address _allo = vm.envAddress("ALLO_ADDRESS"); + return address(new EasyRPGF(_allo)); } } diff --git a/script/DeployQVImpactStream.sol b/script/DeployQVImpactStream.sol index 84cd07b39..9576a94cb 100644 --- a/script/DeployQVImpactStream.sol +++ b/script/DeployQVImpactStream.sol @@ -5,13 +5,8 @@ import {DeployBase} from "script/DeployBase.sol"; import {QVImpactStream} from "contracts/strategies/examples/impact-stream/QVImpactStream.sol"; contract DeployQVImpactStream is DeployBase { - function setUp() public { - // Mainnet - address _allo = 0x0000000000000000000000000000000000000000; - _deploymentParams[1] = abi.encode(_allo); - } - - function _deploy(uint256, bytes memory _data) internal override returns (address _contract) { - return address(new QVImpactStream(abi.decode(_data, (address)))); + function _deploy() internal override returns (address _contract) { + address _allo = vm.envAddress("ALLO_ADDRESS"); + return address(new QVImpactStream(_allo)); } } diff --git a/script/DeployQVSimple.sol b/script/DeployQVSimple.sol index 50c76c1d4..43859857f 100644 --- a/script/DeployQVSimple.sol +++ b/script/DeployQVSimple.sol @@ -5,13 +5,8 @@ import {DeployBase} from "script/DeployBase.sol"; import {QVSimple} from "contracts/strategies/examples/quadratic-voting/QVSimple.sol"; contract DeployQVSimple is DeployBase { - function setUp() public { - // Mainnet - address _allo = 0x0000000000000000000000000000000000000000; - _deploymentParams[1] = abi.encode(_allo); - } - - function _deploy(uint256, bytes memory _data) internal override returns (address _contract) { - return address(new QVSimple(abi.decode(_data, (address)))); + function _deploy() internal override returns (address _contract) { + address _allo = vm.envAddress("ALLO_ADDRESS"); + return address(new QVSimple(_allo)); } } diff --git a/script/DeployRFPSimple.sol b/script/DeployRFPSimple.sol index 2bb252aa8..3a38a615a 100644 --- a/script/DeployRFPSimple.sol +++ b/script/DeployRFPSimple.sol @@ -5,13 +5,8 @@ import {DeployBase} from "script/DeployBase.sol"; import {RFPSimple} from "contracts/strategies/examples/rfp/RFPSimple.sol"; contract DeployRFPSimple is DeployBase { - function setUp() public { - // Mainnet - address _allo = 0x0000000000000000000000000000000000000000; - _deploymentParams[1] = abi.encode(_allo); - } - - function _deploy(uint256, bytes memory _data) internal override returns (address _contract) { - return address(new RFPSimple(abi.decode(_data, (address)))); + function _deploy() internal override returns (address _contract) { + address _allo = vm.envAddress("ALLO_ADDRESS"); + return address(new RFPSimple(_allo)); } } From 4b207be789c1774c4bfef9def3a9f8d8957be3dc Mon Sep 17 00:00:00 2001 From: 0xAustrian Date: Mon, 9 Sep 2024 08:35:19 -0300 Subject: [PATCH 5/6] docs: add README --- script/README.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 script/README.md diff --git a/script/README.md b/script/README.md new file mode 100644 index 000000000..d48e55c35 --- /dev/null +++ b/script/README.md @@ -0,0 +1,17 @@ +# Deployment scripts + +This folder contains the scripts neccessary to deploy strategies and Allo contracts to the blockchain. + +# Usage + +1. Install dependencies by running `bun install`. +2. Compile contracts by running `bun smock && bun compile`. +3. Fill the necessary environment variables in `.env` file. You can use `.env.example` as a template. +4. Run the deployment script with: +``` +forge script script/${SCRIPT_FILENAME}.sol:${SCRIPT_CONTRACT_NAME} --fork-url ${RPC_URL} --private-key ${PRIVATE_KEY} --broadcast +``` +For example: +``` +forge script script/DeployDirectAllocation.sol:DeployDirectAllocation --fork-url https://eth-sepolia.public.blastapi.io --private-key 0x0000 --broadcast +``` \ No newline at end of file From ab5aa16ed044cc512d3ff4f3f47572036a1063ca Mon Sep 17 00:00:00 2001 From: 0xAustrian Date: Wed, 11 Sep 2024 08:55:29 -0300 Subject: [PATCH 6/6] feat: add contract name when deploying --- script/DeployBase.sol | 5 +++-- script/DeployDirectAllocation.sol | 6 ++++-- script/DeployDonationVotingMerkleDistribution.sol | 6 ++++-- script/DeployDonationVotingOffchain.sol | 6 ++++-- script/DeployDonationVotingOnchain.sol | 6 ++++-- script/DeployEasyRPGF.sol | 6 ++++-- script/DeployQVImpactStream.sol | 6 ++++-- script/DeployQVSimple.sol | 6 ++++-- script/DeployRFPSimple.sol | 6 ++++-- 9 files changed, 35 insertions(+), 18 deletions(-) diff --git a/script/DeployBase.sol b/script/DeployBase.sol index 8dd42a103..e2c575cb7 100644 --- a/script/DeployBase.sol +++ b/script/DeployBase.sol @@ -6,11 +6,12 @@ import {Script, console} from "forge-std/Script.sol"; abstract contract DeployBase is Script { function run() public { vm.startBroadcast(); - address _contract = _deploy(); + (address _contract, string memory _contractName) = _deploy(); vm.stopBroadcast(); + console.log("Contract name: %s", _contractName); console.log("Deployed contract at address: %s", _contract); } - function _deploy() internal virtual returns (address _contract) {} + function _deploy() internal virtual returns (address _contract, string memory _contractName) {} } diff --git a/script/DeployDirectAllocation.sol b/script/DeployDirectAllocation.sol index 832dcb627..bce0c41a2 100644 --- a/script/DeployDirectAllocation.sol +++ b/script/DeployDirectAllocation.sol @@ -5,8 +5,10 @@ import {DeployBase} from "script/DeployBase.sol"; import {DirectAllocationStrategy} from "contracts/strategies/examples/direct-allocation/DirectAllocation.sol"; contract DeployDirectAllocation is DeployBase { - function _deploy() internal override returns (address _contract) { + function _deploy() internal override returns (address _contract, string memory _contractName) { address _allo = vm.envAddress("ALLO_ADDRESS"); - return address(new DirectAllocationStrategy(_allo)); + + _contract = address(new DirectAllocationStrategy(_allo)); + _contractName = "DirectAllocationStrategy"; } } diff --git a/script/DeployDonationVotingMerkleDistribution.sol b/script/DeployDonationVotingMerkleDistribution.sol index 3b23c9683..3bce28966 100644 --- a/script/DeployDonationVotingMerkleDistribution.sol +++ b/script/DeployDonationVotingMerkleDistribution.sol @@ -6,9 +6,11 @@ import {DonationVotingMerkleDistribution} from "contracts/strategies/examples/donation-voting/DonationVotingMerkleDistribution.sol"; contract DeployDonationVotingMerkleDistribution is DeployBase { - function _deploy() internal override returns (address _contract) { + function _deploy() internal override returns (address _contract, string memory _contractName) { address _allo = vm.envAddress("ALLO_ADDRESS"); bool _directTransfer = vm.envBool("DONATION_VOTING_MERKLE_DISTRIBUTION_IS_DIRECT_TRANSFER"); - return address(new DonationVotingMerkleDistribution(_allo, _directTransfer)); + + _contract = address(new DonationVotingMerkleDistribution(_allo, _directTransfer)); + _contractName = "DonationVotingMerkleDistributionStrategy"; } } diff --git a/script/DeployDonationVotingOffchain.sol b/script/DeployDonationVotingOffchain.sol index 4ef239e8a..80c269675 100644 --- a/script/DeployDonationVotingOffchain.sol +++ b/script/DeployDonationVotingOffchain.sol @@ -5,9 +5,11 @@ import {DeployBase} from "script/DeployBase.sol"; import {DonationVotingOffchain} from "contracts/strategies/examples/donation-voting/DonationVotingOffchain.sol"; contract DeployDonationVotingOffchain is DeployBase { - function _deploy() internal override returns (address _contract) { + function _deploy() internal override returns (address _contract, string memory _contractName) { address _allo = vm.envAddress("ALLO_ADDRESS"); bool _directTransfer = vm.envBool("DONATION_VOTING_OFFCHAIN_IS_DIRECT_TRANSFER"); - return address(new DonationVotingOffchain(_allo, _directTransfer)); + + _contract = address(new DonationVotingOffchain(_allo, _directTransfer)); + _contractName = "DonationVotingOffchainStrategy"; } } diff --git a/script/DeployDonationVotingOnchain.sol b/script/DeployDonationVotingOnchain.sol index 16062529a..602993ce6 100644 --- a/script/DeployDonationVotingOnchain.sol +++ b/script/DeployDonationVotingOnchain.sol @@ -5,8 +5,10 @@ import {DeployBase} from "script/DeployBase.sol"; import {DonationVotingOnchain} from "contracts/strategies/examples/donation-voting/DonationVotingOnchain.sol"; contract DeployDonationVotingOnchain is DeployBase { - function _deploy() internal override returns (address _contract) { + function _deploy() internal override returns (address _contract, string memory _contractName) { address _allo = vm.envAddress("ALLO_ADDRESS"); - return address(new DonationVotingOnchain(_allo)); + + _contract = address(new DonationVotingOnchain(_allo)); + _contractName = "DonationVotingOnchainStrategy"; } } diff --git a/script/DeployEasyRPGF.sol b/script/DeployEasyRPGF.sol index c09a4b4d5..7c07909b9 100644 --- a/script/DeployEasyRPGF.sol +++ b/script/DeployEasyRPGF.sol @@ -5,8 +5,10 @@ import {DeployBase} from "script/DeployBase.sol"; import {EasyRPGF} from "contracts/strategies/examples/easy-rpgf/EasyRPGF.sol"; contract DeployEasyRPGF is DeployBase { - function _deploy() internal override returns (address _contract) { + function _deploy() internal override returns (address _contract, string memory _contractName) { address _allo = vm.envAddress("ALLO_ADDRESS"); - return address(new EasyRPGF(_allo)); + + _contract = address(new EasyRPGF(_allo)); + _contractName = "EasyRPGFStrategy"; } } diff --git a/script/DeployQVImpactStream.sol b/script/DeployQVImpactStream.sol index 9576a94cb..6777db537 100644 --- a/script/DeployQVImpactStream.sol +++ b/script/DeployQVImpactStream.sol @@ -5,8 +5,10 @@ import {DeployBase} from "script/DeployBase.sol"; import {QVImpactStream} from "contracts/strategies/examples/impact-stream/QVImpactStream.sol"; contract DeployQVImpactStream is DeployBase { - function _deploy() internal override returns (address _contract) { + function _deploy() internal override returns (address _contract, string memory _contractName) { address _allo = vm.envAddress("ALLO_ADDRESS"); - return address(new QVImpactStream(_allo)); + + _contract = address(new QVImpactStream(_allo)); + _contractName = "QVImpactStreamStrategy"; } } diff --git a/script/DeployQVSimple.sol b/script/DeployQVSimple.sol index 43859857f..73611daa7 100644 --- a/script/DeployQVSimple.sol +++ b/script/DeployQVSimple.sol @@ -5,8 +5,10 @@ import {DeployBase} from "script/DeployBase.sol"; import {QVSimple} from "contracts/strategies/examples/quadratic-voting/QVSimple.sol"; contract DeployQVSimple is DeployBase { - function _deploy() internal override returns (address _contract) { + function _deploy() internal override returns (address _contract, string memory _contractName) { address _allo = vm.envAddress("ALLO_ADDRESS"); - return address(new QVSimple(_allo)); + + _contract = address(new QVSimple(_allo)); + _contractName = "QVSimpleStrategy"; } } diff --git a/script/DeployRFPSimple.sol b/script/DeployRFPSimple.sol index 3a38a615a..0a12d87bf 100644 --- a/script/DeployRFPSimple.sol +++ b/script/DeployRFPSimple.sol @@ -5,8 +5,10 @@ import {DeployBase} from "script/DeployBase.sol"; import {RFPSimple} from "contracts/strategies/examples/rfp/RFPSimple.sol"; contract DeployRFPSimple is DeployBase { - function _deploy() internal override returns (address _contract) { + function _deploy() internal override returns (address _contract, string memory _contractName) { address _allo = vm.envAddress("ALLO_ADDRESS"); - return address(new RFPSimple(_allo)); + + _contract = address(new RFPSimple(_allo)); + _contractName = "RFPSimpleStrategy"; } }