feat: publishing infernet-container-starter v0.1.0
This commit is contained in:
19
projects/hello-world/contracts/script/CallContract.s.sol
Normal file
19
projects/hello-world/contracts/script/CallContract.s.sol
Normal file
@ -0,0 +1,19 @@
|
||||
// SPDX-License-Identifier: BSD-3-Clause-Clear
|
||||
pragma solidity ^0.8.0;
|
||||
|
||||
import {Script, console2} from "forge-std/Script.sol";
|
||||
import {SaysGM} from "../src/SaysGM.sol";
|
||||
|
||||
contract CallContract is Script {
|
||||
function run() public {
|
||||
// Setup wallet
|
||||
uint256 deployerPrivateKey = vm.envUint("PRIVATE_KEY");
|
||||
vm.startBroadcast(deployerPrivateKey);
|
||||
|
||||
SaysGM saysGm = SaysGM(0x663F3ad617193148711d28f5334eE4Ed07016602);
|
||||
|
||||
saysGm.sayGM();
|
||||
|
||||
vm.stopBroadcast();
|
||||
}
|
||||
}
|
26
projects/hello-world/contracts/script/Deploy.s.sol
Normal file
26
projects/hello-world/contracts/script/Deploy.s.sol
Normal file
@ -0,0 +1,26 @@
|
||||
// SPDX-License-Identifier: BSD-3-Clause-Clear
|
||||
pragma solidity ^0.8.13;
|
||||
|
||||
import {Script, console2} from "forge-std/Script.sol";
|
||||
import {SaysGM} from "../src/SaysGM.sol";
|
||||
|
||||
contract Deploy is Script {
|
||||
function run() public {
|
||||
// Setup wallet
|
||||
uint256 deployerPrivateKey = vm.envUint("PRIVATE_KEY");
|
||||
vm.startBroadcast(deployerPrivateKey);
|
||||
|
||||
// Log address
|
||||
address deployerAddress = vm.addr(deployerPrivateKey);
|
||||
console2.log("Loaded deployer: ", deployerAddress);
|
||||
|
||||
address coordinator = 0x5FbDB2315678afecb367f032d93F642f64180aa3;
|
||||
// Create consumer
|
||||
SaysGM saysGm = new SaysGM(coordinator);
|
||||
console2.log("Deployed SaysHello: ", address(saysGm));
|
||||
|
||||
// Execute
|
||||
vm.stopBroadcast();
|
||||
vm.broadcast();
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user