File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ // SPDX-License-Identifier: MIT
2+ pragma solidity ^ 0.8.29 ;
3+
4+ import {Script} from "forge-std/Script.sol " ;
5+ import {console} from "forge-std/console.sol " ;
6+ import {ERC1967Proxy } from "openzeppelin-contracts/proxy/ERC1967/ERC1967Proxy.sol " ;
7+
8+ import {BuilderCodes} from "../src/BuilderCodes.sol " ;
9+
10+ /// @notice Script for granting a Builder Codes register role to an account
11+ contract GrantRegisterRole is Script {
12+ // production
13+ // BuilderCodes public builderCodes = BuilderCodes(0x000000BC7E6457e610fe52Dcc0ca5b3ce59C8E80);
14+
15+ // development
16+ BuilderCodes public builderCodes = BuilderCodes (0xf20b8A32C39f3C56bBD27fe8438090B5a03b6381 );
17+
18+ function run () external {
19+ vm.startBroadcast ();
20+
21+ bytes32 role = builderCodes.REGISTER_ROLE ();
22+ address account = 0x6Bd08aCF2f8839eAa8a2443601F2DeED892cd389 ; // Spindl dev server wallet
23+
24+ builderCodes.grantRole (role, account);
25+
26+ assert (builderCodes.hasRole (role, account));
27+
28+ console.log ("Granted REGISTER_ROLE to " , account);
29+
30+ vm.stopBroadcast ();
31+ }
32+ }
You can’t perform that action at this time.
0 commit comments