Skip to content

Commit 183e4d0

Browse files
authored
Deploy to Base and Base Sepolia (#3)
* Deploy to Base * Deploy to Base Sepolia
1 parent 9ac4230 commit 183e4d0

File tree

4 files changed

+60
-9
lines changed

4 files changed

+60
-9
lines changed

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2023 Brian Gershon
3+
Copyright (c) 2023-2024 Bittrees
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 40 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -71,15 +71,23 @@ Admin role: 0x0
7171
Minter role: 0x9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6
7272
Pauser role: 0x65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a
7373

74-
### Testnet (Goerli)
74+
### Testnet (Base Sepolia)
7575

76-
Contract: https://goerli.etherscan.io/address/0x1Ca23BB7dca2BEa5F57552AE99C3A44fA7307B5f
77-
78-
Assign minter and pauser role to `0xa657a18cAaFBdb58536B8Ce366A570CD3dbCAc61` and `0xE5350D96FC3161BF5c385843ec5ee24E8B465B2f` via `grantRole` method on contract.
76+
Contract: https://sepolia.basescan.org/address/0xCa6f24a651bc4Ab545661a41a81EF387086a34C2
7977

8078
### Mainnet (Ethereum)
8179

82-
Contract: 0x6bDdE71Cf0C751EB6d5EdB8418e43D3d9427e436
80+
Contract: https://etherscan.io/address/0x6bDdE71Cf0C751EB6d5EdB8418e43D3d9427e436
81+
82+
Roles and Wallets
83+
84+
- Minter, Authority (Board of Directors): 0xa657a18cAaFBdb58536B8Ce366A570CD3dbCAc61
85+
- Pauser (Core DAO): 0x2268E2b8F7640a29752C5c58b8735906F4E84F60
86+
- Recipient is Bittrees Capital: 0x6e4063a6481ab48FED6eeEBceA440d3bFe1e5Dcd <https://app.safe.global/home?safe=eth:0x6e4063a6481ab48FED6eeEBceA440d3bFe1e5Dcd>
87+
88+
### Mainnet (Base)
89+
90+
Contract: https://basescan.org/address/0x4DE534be4793C52ACc69A230A0318fF1A06aF8A0
8391

8492
Roles and Wallets
8593

@@ -97,8 +105,29 @@ npx hardhat console --network testnet
97105
```javascript
98106
const Contract = await ethers.getContractFactory('BTREEToken');
99107
const contract = await Contract.attach(
100-
'0x1Ca23BB7dca2BEa5F57552AE99C3A44fA7307B5f'
108+
'0x4DE534be4793C52ACc69A230A0318fF1A06aF8A0'
101109
);
110+
111+
// minter role
112+
await contract.grantRole(
113+
'0x9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6',
114+
'0xa657a18cAaFBdb58536B8Ce366A570CD3dbCAc61'
115+
);
116+
await contract.hasRole(
117+
'0x9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6',
118+
'0xa657a18cAaFBdb58536B8Ce366A570CD3dbCAc61'
119+
);
120+
121+
// pauser role
122+
await contract.grantRole(
123+
'0x65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a',
124+
'0x2268E2b8F7640a29752C5c58b8735906F4E84F60'
125+
);
126+
await contract.hasRole(
127+
'0x65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a',
128+
'0x2268E2b8F7640a29752C5c58b8735906F4E84F60'
129+
);
130+
102131
await contract.balanceOf('0x7435e7f3e6B5c656c33889a3d5EaFE1e17C033CD');
103132

104133
// mint 5,000,000 BTREE
@@ -114,12 +143,15 @@ await contract.transfer(
114143
);
115144

116145
// increaseAllowance by 550,000 BTREE for contract (`0x14dBB93a78B5e89540e902d1E6Ee26C989e08ef0`) wanting to spent it
117-
// FIRST: ensure you using test wallet that you want to increase allowance for
146+
// FIRST: ensure you are using test wallet that you want to increase allowance for
118147
await contract.increaseAllowance(
119148
'0x14dBB93a78B5e89540e902d1E6Ee26C989e08ef0',
120149
'555000000000000000000000'
121150
);
122151

123152
// owner and sender
124-
await contract.allowance('0x458788Af51027917462c87AA6959269249CE8B4c', '0x14dBB93a78B5e89540e902d1E6Ee26C989e08ef0')
153+
await contract.allowance(
154+
'0x458788Af51027917462c87AA6959269249CE8B4c',
155+
'0x14dBB93a78B5e89540e902d1E6Ee26C989e08ef0'
156+
);
125157
```

contract/.env.sample

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ PRIVATE_KEY=
1212
# Create and add your API key for your chain's "scan" site.
1313
# - If Polygon, create one here: https://polygonscan.com/myapikey
1414
# - If Ethereum, create one here: https://etherscan.io/myapikey
15+
# - If Base Sepolia, create one here: https://basescan.org/myapikey
1516
ETHERSCAN_API_KEY=
1617

1718
# For upgradeable functionality. Update this once initial contract was deployed

contract/hardhat.config.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,24 @@ const config: HardhatUserConfig = {
3232
},
3333
etherscan: {
3434
apiKey: process.env.ETHERSCAN_API_KEY ?? '',
35+
customChains: [
36+
{
37+
network: 'base',
38+
chainId: 8453,
39+
urls: {
40+
apiURL: 'https://api.basescan.org/api',
41+
browserURL: 'https://basescan.org/',
42+
},
43+
},
44+
{
45+
network: 'base sepolia',
46+
chainId: 84532,
47+
urls: {
48+
apiURL: 'https://api-sepolia.basescan.org/api',
49+
browserURL: 'https://sepolia.basescan.org/',
50+
},
51+
},
52+
],
3553
},
3654
gasReporter: {
3755
enabled: process.env.REPORT_GAS ? true : false,

0 commit comments

Comments
 (0)