-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ab52515
commit 5e4017b
Showing
2 changed files
with
112 additions
and
0 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,53 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.20; | ||
|
||
import { Script, console } from "forge-std/Script.sol"; | ||
import { FollowerSinceStamp } from "../../src/stamps/FollowerSinceStamp.sol"; | ||
import { FollowerSincePoints } from "../../src/points/FollowerSincePoints.sol"; | ||
import { FixedQuestion } from "../../src/voting/FixedQuestion.sol"; | ||
import { DeployPoCArgs } from "./DeployPoCArgs.s.sol"; | ||
|
||
contract DeployPoC is Script { | ||
function run() public { | ||
uint256 deployerPrivateKey = vm.envUint("PRIVATE_KEY"); | ||
|
||
// Create an instance of DeployPoCArgs with the deployer's address | ||
address deployer = vm.addr(deployerPrivateKey); | ||
console.log("Deployer address:", deployer); | ||
|
||
DeployPoCArgs deployArgs = new DeployPoCArgs(); | ||
DeployPoCArgs.DeploymentArgs memory args = deployArgs.getArgs(); | ||
|
||
vm.startBroadcast(deployerPrivateKey); | ||
|
||
// Deploy FollowerSinceStamp | ||
FollowerSinceStamp followerStamp = new FollowerSinceStamp( | ||
args.stampSigner, | ||
args.stampPlatform, | ||
args.stampFollowed | ||
); | ||
console.log("FollowerSinceStamp deployed at:", address(followerStamp)); | ||
|
||
// Deploy FollowerSincePoints | ||
FollowerSincePoints followerPoints = new FollowerSincePoints( | ||
address(followerStamp), | ||
args.pointsName, | ||
args.pointsSymbol | ||
); | ||
console.log("FollowerSincePoints deployed at:", address(followerPoints)); | ||
|
||
// Deploy FixedQuestion | ||
FixedQuestion fixedQuestion = new FixedQuestion( | ||
args.questionOwner, | ||
args.questionTitle, | ||
args.questionDescription, | ||
args.questionDeadline, | ||
address(followerPoints), | ||
args.questionOptionTitles, | ||
args.questionOptionDescriptions | ||
); | ||
console.log("FixedQuestion deployed at:", address(fixedQuestion)); | ||
|
||
vm.stopBroadcast(); | ||
} | ||
} |
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,59 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.20; | ||
|
||
import { Script } from "forge-std/Script.sol"; | ||
|
||
contract DeployPoCArgs is Script { | ||
struct DeploymentArgs { | ||
// FollowerSinceStamp args | ||
address stampSigner; | ||
string stampPlatform; | ||
string stampFollowed; | ||
// FollowerSincePoints args | ||
string pointsName; | ||
string pointsSymbol; | ||
// FixedQuestion args | ||
address questionOwner; | ||
string questionTitle; | ||
string questionDescription; | ||
uint256 questionDeadline; | ||
string[] questionOptionTitles; | ||
string[] questionOptionDescriptions; | ||
} | ||
|
||
function getArgs() public view returns (DeploymentArgs memory) { | ||
address deployer = vm.addr(vm.envUint("PRIVATE_KEY")); | ||
|
||
DeploymentArgs memory args = DeploymentArgs({ | ||
// FollowerSinceStamp args | ||
stampSigner: deployer, | ||
stampPlatform: "Instagram", | ||
stampFollowed: "base_onchain", | ||
// FollowerSincePoints args | ||
pointsName: "Based Follower Points", | ||
pointsSymbol: "BFP", | ||
// FixedQuestion args | ||
questionOwner: deployer, | ||
questionTitle: "Location for the Next Onchain Summit", | ||
questionDescription: "The inaugural Onchain Summit in San Francisco was a resounding success, bringing together blockchain enthusiasts, developers, and industry leaders from around the world. As we look to the future, we want your input on where to host our next groundbreaking event. Each potential location offers unique advantages and opportunities for the crypto community. Consider factors such as local blockchain ecosystems, accessibility, cultural experiences, and potential for fostering global connections. Your vote will help shape the future of this influential gathering and potentially impact the global blockchain landscape. Where should we convene next to continue driving innovation and collaboration in the Web3 space?", | ||
questionDeadline: block.timestamp + 7 days, | ||
questionOptionTitles: new string[](3), | ||
questionOptionDescriptions: new string[](3) | ||
}); | ||
|
||
args.questionOptionTitles[0] = "Buenos Aires, Argentina"; | ||
args.questionOptionTitles[1] = "New York City, USA"; | ||
args.questionOptionTitles[2] = "London, UK"; | ||
args.questionOptionDescriptions[ | ||
0 | ||
] = "Buenos Aires is the capital of Argentina and a vibrant city known for its rich culture, tango, and steak. It's also an emerging crypto hub in Latin America. Obviously the right choice!"; | ||
args.questionOptionDescriptions[ | ||
1 | ||
] = "New York City is the cultural, financial, and media capital of the world."; | ||
args.questionOptionDescriptions[ | ||
2 | ||
] = "London is a world-class city known for its rich history, museums, and the iconic Big Ben."; | ||
|
||
return args; | ||
} | ||
} |