-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* soon -> carrot, comment out broken testnet tests * rename file * fix: renaming soon --------- Co-authored-by: ksatyarth2 <erkumar@protonmail.ch>
- Loading branch information
1 parent
0b9f95c
commit 3c749a1
Showing
6 changed files
with
103 additions
and
103 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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(); | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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); | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.