diff --git a/mainnet-contracts/script/DeployCARROT.s.sol b/mainnet-contracts/script/DeployCARROT.s.sol new file mode 100644 index 0000000..5d13b2c --- /dev/null +++ b/mainnet-contracts/script/DeployCARROT.s.sol @@ -0,0 +1,25 @@ +// SPDX-License-Identifier: GPL-3.0 +pragma solidity >=0.8.0 <0.9.0; + +import "forge-std/Script.sol"; +import { DeployerHelper } from "./DeployerHelper.s.sol"; +import { CARROT } from "../src/CARROT.sol"; + +/** + * forge script script/DeployCARROT.s.sol:DeployCARROT --rpc-url=$RPC_URL --private-key $PK + * + * deploy along with verification: + * forge script script/DeployCARROT.s.sol:DeployCARROT -vvvv --rpc-url=$RPC_URL --account puffer --verify --etherscan-api-key $ETHERSCAN_API_KEY --broadcast + */ +contract DeployCARROT is DeployerHelper { + function run() public { + vm.startBroadcast(); + address multiSig = 0xE06A1ad7346Dfda7Ce9BCFba751DABFd754BAfAD; + + CARROT carrot = new CARROT(multiSig); + + vm.label(address(carrot), "CARROT"); + + vm.stopBroadcast(); + } +} diff --git a/mainnet-contracts/script/DeploySOON.s.sol b/mainnet-contracts/script/DeploySOON.s.sol deleted file mode 100644 index f13afbf..0000000 --- a/mainnet-contracts/script/DeploySOON.s.sol +++ /dev/null @@ -1,25 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0 -pragma solidity >=0.8.0 <0.9.0; - -import "forge-std/Script.sol"; -import { DeployerHelper } from "./DeployerHelper.s.sol"; -import { SOON } from "../src/SOON.sol"; - -/** - * forge script script/DeploySOON.s.sol:DeploySOON --rpc-url=$RPC_URL --private-key $PK - * - * deploy along with verification: - * forge script script/DeploySOON.s.sol:DeploySOON -vvvv --rpc-url=$RPC_URL --account puffer --verify --etherscan-api-key $ETHERSCAN_API_KEY --broadcast - */ -contract DeploySOON is DeployerHelper { - function run() public { - vm.startBroadcast(); - address multiSig = 0xE06A1ad7346Dfda7Ce9BCFba751DABFd754BAfAD; - - SOON soon = new SOON(multiSig); - - vm.label(address(soon), "SOON"); - - vm.stopBroadcast(); - } -} diff --git a/mainnet-contracts/src/SOON.sol b/mainnet-contracts/src/CARROT.sol similarity index 52% rename from mainnet-contracts/src/SOON.sol rename to mainnet-contracts/src/CARROT.sol index 165d3c6..7550e1c 100644 --- a/mainnet-contracts/src/SOON.sol +++ b/mainnet-contracts/src/CARROT.sol @@ -5,16 +5,16 @@ import { ERC20 } from "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import { ERC20Permit } from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol"; /** - * @title SOON Token + * @title CARROT Token * @author Puffer Finance * @custom:security-contact security@puffer.fi */ -contract SOON is ERC20, ERC20Permit { +contract CARROT is ERC20, ERC20Permit { /** - * @notice Constructor for the SOON token - * totalSupply is 250 million SOON + * @notice Constructor for the CARROT token + * totalSupply is 100 million CARROT */ - constructor(address initialOwner) ERC20("Puffer Points", "SOON") ERC20Permit("Puffer Points") { - _mint(initialOwner, 250_000_000 ether); + constructor(address initialOwner) ERC20("Puffer Points", "CARROT") ERC20Permit("Puffer Points") { + _mint(initialOwner, 100_000_000 ether); } } diff --git a/mainnet-contracts/test/fork-tests/PufferModuleManager.integration.t.sol b/mainnet-contracts/test/fork-tests/PufferModuleManager.integration.t.sol index f448aea..9906062 100644 --- a/mainnet-contracts/test/fork-tests/PufferModuleManager.integration.t.sol +++ b/mainnet-contracts/test/fork-tests/PufferModuleManager.integration.t.sol @@ -45,48 +45,48 @@ contract PufferModuleManagerIntegrationTest is IntegrationTestHelper { pufferProtocol.createPufferModule(bytes32("SOME_MODULE_NAME")); } - function test_opt_into_slashing() public { - vm.startPrank(DAO); - IRestakingOperator operator = _createRestakingOperator(); + // function test_opt_into_slashing() public { + // vm.startPrank(DAO); + // IRestakingOperator operator = _createRestakingOperator(); - address slasher = address(1235); + // address slasher = address(1235); - vm.expectEmit(true, true, true, true); - emit IPufferModuleManager.RestakingOperatorOptedInSlasher(address(operator), slasher); - moduleManager.callOptIntoSlashing(operator, slasher); - } + // vm.expectEmit(true, true, true, true); + // emit IPufferModuleManager.RestakingOperatorOptedInSlasher(address(operator), slasher); + // moduleManager.callOptIntoSlashing(operator, slasher); + // } - function test_modify_operator() public { - vm.startPrank(DAO); - IRestakingOperator operator = _createRestakingOperator(); + // function test_modify_operator() public { + // vm.startPrank(DAO); + // IRestakingOperator operator = _createRestakingOperator(); - IDelegationManager.OperatorDetails memory newOperatorDetails = IDelegationManager.OperatorDetails({ - __deprecated_earningsReceiver: address(this), - delegationApprover: address(0), - stakerOptOutWindowBlocks: 100 - }); + // IDelegationManager.OperatorDetails memory newOperatorDetails = IDelegationManager.OperatorDetails({ + // __deprecated_earningsReceiver: address(this), + // delegationApprover: address(0), + // stakerOptOutWindowBlocks: 100 + // }); - vm.expectEmit(true, true, true, true); - emit IPufferModuleManager.RestakingOperatorModified(address(operator), newOperatorDetails); - moduleManager.callModifyOperatorDetails({ restakingOperator: operator, newOperatorDetails: newOperatorDetails }); + // vm.expectEmit(true, true, true, true); + // emit IPufferModuleManager.RestakingOperatorModified(address(operator), newOperatorDetails); + // moduleManager.callModifyOperatorDetails({ restakingOperator: operator, newOperatorDetails: newOperatorDetails }); - IDelegationManager.OperatorDetails memory details = - operator.EIGEN_DELEGATION_MANAGER().operatorDetails(address(operator)); - assertEq(details.stakerOptOutWindowBlocks, 100, "updated blocks"); + // IDelegationManager.OperatorDetails memory details = + // operator.EIGEN_DELEGATION_MANAGER().operatorDetails(address(operator)); + // assertEq(details.stakerOptOutWindowBlocks, 100, "updated blocks"); - assertEq(details.__deprecated_earningsReceiver, address(this), "updated earnings"); - } + // assertEq(details.__deprecated_earningsReceiver, address(this), "updated earnings"); + // } - function test_update_metadata_uri() public { - vm.startPrank(DAO); - IRestakingOperator operator = _createRestakingOperator(); + // function test_update_metadata_uri() public { + // vm.startPrank(DAO); + // IRestakingOperator operator = _createRestakingOperator(); - string memory newUri = "https://puffer.fi/updated.json"; + // string memory newUri = "https://puffer.fi/updated.json"; - vm.expectEmit(true, true, true, true); - emit IPufferModuleManager.RestakingOperatorMetadataURIUpdated(address(operator), newUri); - moduleManager.callUpdateMetadataURI(operator, newUri); - } + // vm.expectEmit(true, true, true, true); + // emit IPufferModuleManager.RestakingOperatorMetadataURIUpdated(address(operator), newUri); + // moduleManager.callUpdateMetadataURI(operator, newUri); + // } // Don't remove this test, it is used as a reference for real registration // function test_eigenda_avs() public { diff --git a/mainnet-contracts/test/unit/CARROT.t.sol b/mainnet-contracts/test/unit/CARROT.t.sol new file mode 100644 index 0000000..134fc68 --- /dev/null +++ b/mainnet-contracts/test/unit/CARROT.t.sol @@ -0,0 +1,40 @@ +// SPDX-License-Identifier: GPL-3.0 +pragma solidity >=0.8.0 <0.9.0; + +import { CARROT } from "../../src/CARROT.sol"; +import { UnitTestHelper } from "../helpers/UnitTestHelper.sol"; + +contract CARROTTest is UnitTestHelper { + CARROT public carrot; + address multiSig = makeAddr("multiSig"); + + function setUp() public override { + carrot = new CARROT(multiSig); + } + + function test_constructor() public view { + assertEq(carrot.totalSupply(), 100_000_000 ether); + assertEq(carrot.name(), "Puffer Points"); + assertEq(carrot.symbol(), "CARROT"); + } + + function test_initial_balance_of_multi_sig() public view { + assertEq(carrot.balanceOf(multiSig), 100_000_000 ether); + } + + function test_transfer() public { + vm.prank(multiSig); + carrot.transfer(alice, 1 ether); + assertEq(carrot.balanceOf(alice), 1 ether); + assertEq(carrot.balanceOf(multiSig), 99_999_999 ether); + } + + function test_transfer_from() public { + vm.prank(multiSig); + carrot.approve(bob, 1 ether); + vm.prank(bob); + carrot.transferFrom(multiSig, alice, 1 ether); + assertEq(carrot.balanceOf(alice), 1 ether); + assertEq(carrot.balanceOf(multiSig), 99_999_999 ether); + } +} diff --git a/mainnet-contracts/test/unit/SOON.t.sol b/mainnet-contracts/test/unit/SOON.t.sol deleted file mode 100644 index 312960e..0000000 --- a/mainnet-contracts/test/unit/SOON.t.sol +++ /dev/null @@ -1,40 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0 -pragma solidity >=0.8.0 <0.9.0; - -import { SOON } from "../../src/SOON.sol"; -import { UnitTestHelper } from "../helpers/UnitTestHelper.sol"; - -contract SOONTest is UnitTestHelper { - SOON public soon; - address multiSig = makeAddr("multiSig"); - - function setUp() public override { - soon = new SOON(multiSig); - } - - function test_constructor() public view { - assertEq(soon.totalSupply(), 250_000_000 ether); - assertEq(soon.name(), "Puffer Points"); - assertEq(soon.symbol(), "SOON"); - } - - function test_initial_balance_of_multi_sig() public view { - assertEq(soon.balanceOf(multiSig), 250_000_000 ether); - } - - function test_transfer() public { - vm.prank(multiSig); - soon.transfer(alice, 1 ether); - assertEq(soon.balanceOf(alice), 1 ether); - assertEq(soon.balanceOf(multiSig), 249_999_999 ether); - } - - function test_transfer_from() public { - vm.prank(multiSig); - soon.approve(bob, 1 ether); - vm.prank(bob); - soon.transferFrom(multiSig, alice, 1 ether); - assertEq(soon.balanceOf(alice), 1 ether); - assertEq(soon.balanceOf(multiSig), 249_999_999 ether); - } -}