-
Notifications
You must be signed in to change notification settings - Fork 16
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
5334306
commit 0a9c4ea
Showing
10 changed files
with
2,124 additions
and
165 deletions.
There are no files selected for viewing
Submodule reputation
updated
14 files
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,36 @@ | ||
//SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.19; | ||
|
||
import {console} from "forge-std/console.sol"; | ||
|
||
import {ScaffoldETHDeploy} from "./DeployHelpers.s.sol"; | ||
import {ReputationTokensFactory} from | ||
"@atxdao/contracts/reputation/ReputationTokensFactory.sol"; | ||
import {ReputationTokensUpgradeable} from | ||
"@atxdao/contracts/reputation/ReputationTokensUpgradeable.sol"; | ||
|
||
contract DeployFactoryScript is ScaffoldETHDeploy { | ||
error InvalidPrivateKey(string); | ||
|
||
address controller = 0x2F15D4A66D22ecC6967928b6A76Ab06897b05676; //replace with burner or other address from wallet! | ||
|
||
function run() external { | ||
uint256 deployerPrivateKey = setupLocalhostEnv(); | ||
if (deployerPrivateKey == 0) { | ||
revert InvalidPrivateKey( | ||
"You don't have a deployer account. Make sure you have set DEPLOYER_PRIVATE_KEY in .env or use `yarn generate` to generate a new random account" | ||
); | ||
} | ||
address deployerPubKey = vm.createWallet(deployerPrivateKey).addr; | ||
|
||
vm.startBroadcast(deployerPrivateKey); | ||
address[] memory admins = new address[](2); | ||
admins[0] = deployerPubKey; | ||
admins[1] = controller; | ||
|
||
ReputationTokensUpgradeable implementation = | ||
new ReputationTokensUpgradeable(); | ||
ReputationTokensFactory factory = | ||
new ReputationTokensFactory(admins, admins, address(implementation)); | ||
} | ||
} |
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,15 @@ | ||
"use client"; | ||
|
||
export function Factory() { | ||
return ( | ||
<> | ||
<div className="py-5 space-y-5 flex flex-col justify-center items-center bg-primary bg-[length:100%_100%] py-1 px-5 sm:px-0 lg:py-auto max-w-[100vw] "> | ||
<div className="flex flex-row justify-center items-center"> | ||
<div className="flex flex-col justify-center items-center"> | ||
<p>{"hello"}</p> | ||
</div> | ||
</div> | ||
</div> | ||
</> | ||
); | ||
} |
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,18 @@ | ||
import { Factory } from "./_components/Factory"; | ||
import type { NextPage } from "next"; | ||
import { getMetadata } from "~~/utils/scaffold-eth/getMetadata"; | ||
|
||
export const metadata = getMetadata({ | ||
title: "Factory", | ||
description: "Factory", | ||
}); | ||
|
||
const FactoryPage: NextPage = () => { | ||
return ( | ||
<> | ||
<Factory /> | ||
</> | ||
); | ||
}; | ||
|
||
export default FactoryPage; |
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
Oops, something went wrong.