2023-11-30 06:52:36 +00:00
|
|
|
// SPDX-License-Identifier: UNLICENSED
|
|
|
|
pragma solidity ^0.8.13;
|
|
|
|
|
2023-12-05 22:44:17 +00:00
|
|
|
import {Script, console2} from "forge-std/Script.sol";
|
2023-11-30 06:52:36 +00:00
|
|
|
import { DCO2s } from "src/DCO2s.sol";
|
|
|
|
|
|
|
|
contract DCO2sScript is Script {
|
|
|
|
DCO2s public dco2sc;
|
2023-12-19 23:37:05 +00:00
|
|
|
string public baseURI;
|
2023-11-30 06:52:36 +00:00
|
|
|
|
|
|
|
function setUp() public {
|
2023-12-19 23:37:05 +00:00
|
|
|
baseURI = "https://gateway.decentralizedscience.org/ipfs/";
|
|
|
|
dco2sc = new DCO2s(0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266,
|
|
|
|
0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266,
|
|
|
|
baseURI,
|
|
|
|
"DCO2s",
|
|
|
|
"DCO2");
|
2023-12-05 22:44:17 +00:00
|
|
|
console2.log("The DCO2s contract address is: ", address(dco2sc));
|
2023-11-30 06:52:36 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// run is the entry point
|
|
|
|
function run() public {
|
|
|
|
// startBroadcast and stopBraodcast will let us execute transactions anything between them
|
|
|
|
vm.startBroadcast();
|
|
|
|
// here we just need to deploy a new contract
|
|
|
|
string memory URI = "bafkreibc6p3y36yjmeqqnttqfrpb2yttxa6aonoywxwdxl7nqym4jj3jwa";
|
|
|
|
dco2sc.safeMint(0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266, URI);
|
|
|
|
string memory tokenURI = dco2sc.tokenURI(0);
|
2023-12-05 22:44:17 +00:00
|
|
|
console2.log("Token0 URI is:", tokenURI);
|
2023-11-30 06:52:36 +00:00
|
|
|
vm.stopBroadcast();
|
|
|
|
}
|
|
|
|
}
|