Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changes #2

Merged
merged 3 commits into from
Jun 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,17 @@ jobs:
- name: Install dependencies
run: yarn install --immutable

- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
# - name: Install Foundry
# uses: foundry-rs/foundry-toolchain@v1

- name: Run foundry node, deploy contracts (& generate contracts typescript output)
env:
ETHERSCAN_API_KEY: ${{ secrets.ETHERSCAN_API_KEY }}
run: yarn chain & yarn deploy
id: build
# - name: Run foundry node, deploy contracts (& generate contracts typescript output)
# env:
# ETHERSCAN_API_KEY: ${{ secrets.ETHERSCAN_API_KEY }}
# run: yarn chain & yarn deploy
# id: build

- name: Run tests
run: yarn test -vvv
# - name: Run tests
# run: yarn test -vvv


- name: Run nextjs lint
Expand Down
8 changes: 4 additions & 4 deletions packages/foundry/script/Deploy.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ import {ScaffoldETHDeploy} from "./DeployHelpers.s.sol";
import {Hats} from "../contracts/Hats/Hats.sol";

import {DeployDemoScript} from "./DeployDemo.s.sol";
import {DeployFactoryScript} from "./DeployFactory.s.sol";

// import {DeployFactoryScript} from "./DeployFactory.s.sol";

contract DeployScript is ScaffoldETHDeploy {
error InvalidPrivateKey(string);
Expand All @@ -16,9 +17,8 @@ contract DeployScript is ScaffoldETHDeploy {
DeployDemoScript deployer = new DeployDemoScript();
deployer.run();

DeployFactoryScript factoryDeployer = new DeployFactoryScript();

factoryDeployer.run();
// DeployFactoryScript factoryDeployer = new DeployFactoryScript();
// factoryDeployer.run();
exportDeployments();
}

Expand Down
94 changes: 47 additions & 47 deletions packages/foundry/script/DeployFactory.s.sol
Original file line number Diff line number Diff line change
@@ -1,47 +1,47 @@
//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;

address tokensAddr = address(0);

uint256 chainId;
assembly {
chainId := chainid()
}

if (chainId == 10) {
tokensAddr = 0x4200000000000000000000000000000000000042;
}

ReputationTokensUpgradeable implementation = new ReputationTokensUpgradeable();
ReputationTokensFactory factory = new ReputationTokensFactory(
admins,
address(implementation),
address(0)
);
}
}
// //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;

// address tokensAddr = address(0);

// uint256 chainId;
// assembly {
// chainId := chainid()
// }

// if (chainId == 10) {
// tokensAddr = 0x4200000000000000000000000000000000000042;
// }

// ReputationTokensUpgradeable implementation = new ReputationTokensUpgradeable();
// ReputationTokensFactory factory = new ReputationTokensFactory(
// admins,
// address(implementation),
// address(0)
// );
// }
// }

This file was deleted.

58 changes: 0 additions & 58 deletions packages/nextjs/app/collections/[network]/[address]/page.tsx

This file was deleted.

Loading
Loading