Skip to content

Commit

Permalink
chore: leave uri data to be set for each token
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffprestes committed Dec 2, 2024
1 parent d6449f0 commit cfeedbf
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion cache/solidity-files-cache.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion script/CarbonProjectDeploy.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ contract CarbonProjectDeployScript is Script {
uint256 deployerPrivateKey = vm.envUint("PRIVATE_KEY");
vm.startBroadcast(deployerPrivateKey);
address owner = address(0x7aC722a69CDb106127f1f2cC86761B28176E5379);
cp = new CarbonProject("https://www.neocarbon.com.br/br/registro/projeto?id={id}", owner);
cp = new CarbonProject("", owner);
}

}
Expand Down
7 changes: 3 additions & 4 deletions test/CarbonProject.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {CarbonProject} from "../src/CarbonProject.sol";
import {Test, console} from "forge-std/Test.sol";

contract CarbonProjectTest is Test {
string public uri = "https://www.neocarbon.com.br/br/registro/projeto?id={id}";
string public uri = "";
address public owner = address(0x123);
uint256 public initialTokenAmount = 42338179;
uint256 public additionalTokenAmount = 7661821;
Expand All @@ -18,9 +18,7 @@ contract CarbonProjectTest is Test {

function test_CarbonProject() public view {
console.log("CarbonProject: ", address(carbonProject));
console.log("URI: ", carbonProject.uri(5451));
console.log("Owner: ", carbonProject.owner());
assertEq(carbonProject.uri(5451), uri);
assertEq(carbonProject.owner(), owner);
}

Expand Down Expand Up @@ -56,6 +54,7 @@ contract CarbonProjectTest is Test {
assertEq(endDate, 1723593600);
assertEq(period, 315360000);
assertEq(areaSize, "2102.83 hectares");
assertEq(carbonProject.uri(id), "https://www.neocarbon.com.br/br/registro/projeto?id=4561");
}

function testFail_SetDataTwice() public {
Expand Down Expand Up @@ -109,7 +108,7 @@ contract CarbonProjectTest is Test {
1723593600,
315360000,
"2102.83 hectares",
"4561.json");
"https://www.neocarbon.com.br/br/registro/projeto?id=4561");

console.log("CarbonProject: ", address(carbonProject));
console.log("Executed setProjectData: ", executed);
Expand Down

0 comments on commit cfeedbf

Please sign in to comment.