Skip to content

Commit

Permalink
feat: deploy attester proxy for EthereumYear badge
Browse files Browse the repository at this point in the history
  • Loading branch information
Thegaram committed Apr 10, 2024
1 parent 8110247 commit d99d4cf
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
2 changes: 0 additions & 2 deletions script/DeployCanvasContracts.sol
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,6 @@ contract DeployCanvasContracts is Script {
blacklist[0] = keccak256(bytes("vpn"));
ProfileRegistry(profileRegistryProxy).blacklistUsername(blacklist);

ProfileRegistry(profileRegistryProxy).updateSigner(0x70997970C51812dc3A010C7d01b50e0d17dc79C8);

// log addresses
logAddress("DEPLOYER_ADDRESS", vm.addr(DEPLOYER_PRIVATE_KEY));
logAddress("SIGNER_ADDRESS", SIGNER_ADDRESS);
Expand Down
12 changes: 11 additions & 1 deletion script/DeployCanvasTestBadgeContracts.sol
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ pragma solidity 0.8.19;
import {Script} from "forge-std/Script.sol";
import {console} from "forge-std/console.sol";

import {Attestation} from "@eas/contracts/IEAS.sol";
import {Attestation, IEAS} from "@eas/contracts/IEAS.sol";

import {AttesterProxy} from "../src/AttesterProxy.sol";
import {ScrollBadge} from "../src/badge/ScrollBadge.sol";
import {EthereumYearBadge} from "../src/badge/examples/EthereumYearBadge.sol";
import {ScrollBadgeTokenOwner} from "../src/badge/examples/ScrollBadgeTokenOwner.sol";
Expand Down Expand Up @@ -47,6 +48,9 @@ contract DeployCanvasTestBadgeContracts is Script {
uint256 DEPLOYER_PRIVATE_KEY = vm.envUint("DEPLOYER_PRIVATE_KEY");

address RESOLVER_ADDRESS = vm.envAddress("SCROLL_BADGE_RESOLVER_CONTRACT_ADDRESS");
address ETHEREUM_YEAR_SIGNER_ADDRESS = vm.envAddress("ETHEREUM_YEAR_SIGNER_ADDRESS");

address EAS_ADDRESS = vm.envAddress("EAS_ADDRESS");

function run() external {
vm.startBroadcast(DEPLOYER_PRIVATE_KEY);
Expand Down Expand Up @@ -74,6 +78,11 @@ contract DeployCanvasTestBadgeContracts is Script {

// deploy Ethereum year badge
EthereumYearBadge badge5 = new EthereumYearBadge(address(resolver), "https://nft.scroll.io/canvas/year/");
AttesterProxy yearBadgeProxy = new AttesterProxy(IEAS(EAS_ADDRESS));

// set permissions
badge5.toggleAttester(address(yearBadgeProxy), true);
yearBadgeProxy.toggleAttester(ETHEREUM_YEAR_SIGNER_ADDRESS, true);

// set permissions
resolver.toggleBadge(address(badge1), true);
Expand All @@ -89,6 +98,7 @@ contract DeployCanvasTestBadgeContracts is Script {
logAddress("SIMPLE_BADGE_C_CONTRACT_ADDRESS", address(badge3));
logAddress("ORIGINS_BADGE_ADDRESS", address(badge4));
logAddress("ETHEREUM_YEAR_BADGE_ADDRESS", address(badge5));
logAddress("ETHEREUM_YEAR_ATTESTER_PROXY_ADDRESS", address(yearBadgeProxy));

vm.stopBroadcast();
}
Expand Down

0 comments on commit d99d4cf

Please sign in to comment.