Skip to content
This repository was archived by the owner on Aug 21, 2023. It is now read-only.

Commit e4fecb6

Browse files
committed
Deployed "safeBatchTransferFrom" fix to main Terminus
1 parent 8c5dfc5 commit e4fecb6

1 file changed

Lines changed: 222 additions & 0 deletions

File tree

Lines changed: 222 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,222 @@
1+
# Update the Terminus contract
2+
3+
The Terminus contract is deployed as an EIP2535 Diamond proxy contract with a Terminus facet attached to it.
4+
5+
This checklist describes how to update the `TerminusFacet` on the Terminus diamond contract.
6+
7+
## Purpose of update
8+
9+
Make `safeBatchTransferFrom` respect non-transferable Terminus pools. (And add `setController`.)
10+
11+
## Deployed addresses
12+
13+
You will modify this section as you go through the checklist
14+
15+
### `TerminusFacet` address
16+
17+
```
18+
export TERMINUS_FACET_ADDRESS="0xaA91032E567fD3CF2e7102f65B1AaF21530583a0"
19+
```
20+
21+
## Environment variables
22+
23+
- [x] `export DAO_NETWORK=polygon-main`
24+
- [x] `export DAO_OWNER=<redacted>`
25+
- [x] `export DAO_OWNER_ADDRESS=$(jq -r .address $DAO_OWNER)`
26+
- [x] `export GAS_PRICE="80 gwei"`
27+
- [x] `export CONFIRMATIONS=5`
28+
- [x] `export TERMINUS_DIAMOND=0x062BEc5e84289Da2CD6147E0e4DA402B33B8f796`
29+
- [x] `export POLYGONSCAN_TOKEN=<redacted>`
30+
31+
## Deploy `TerminusFacet`
32+
33+
- [x] Check out relevant commit and `brownie compile`.
34+
35+
- [x] Deploy `TerminusFacet` contract
36+
37+
```bash
38+
dao terminus deploy \
39+
--network $DAO_NETWORK \
40+
--sender $DAO_OWNER \
41+
--gas-price "$GAS_PRICE" \
42+
--confirmations $CONFIRMATIONS
43+
```
44+
45+
46+
- [x] Export address of deployed contract as `export TERMINUS_FACET_ADDRESS=0xaA91032E567fD3CF2e7102f65B1AaF21530583a0`
47+
48+
- [x] Store address of deployed contract under `Deployed addresses / TerminusFacet address` above
49+
50+
- [x] Verify `TerminusFacet` contract
51+
52+
```
53+
dao terminus verify-contract --network $DAO_NETWORK --address $TERMINUS_FACET_ADDRESS
54+
```
55+
56+
- [ ] Build [Inspector Facet](https://github.com/bugout-dev/inpsector-facet) report for Diamond contract:
57+
58+
```
59+
- - -
60+
Facet at address: 0x539d0E4A68F720b35c1670B6421673a852de52DB
61+
Possible contracts: IDiamondCut, DiamondCutFacet
62+
IDiamondCut:
63+
Missing methods:
64+
Mounted selectors:
65+
Selector: 0x1f931c1c, Function: diamondCut
66+
DiamondCutFacet:
67+
Missing methods:
68+
Mounted selectors:
69+
Selector: 0x1f931c1c, Function: diamondCut
70+
- - -
71+
Facet at address: 0x024e974B4524f245fE3da60CbD70EC62875f8194
72+
Possible contracts: DiamondLoupeFacet
73+
DiamondLoupeFacet:
74+
Missing methods:
75+
Mounted selectors:
76+
Selector: 0xcdffacc6, Function: facetAddress
77+
Selector: 0x52ef6b2c, Function: facetAddresses
78+
Selector: 0xadfca15e, Function: facetFunctionSelectors
79+
Selector: 0x7a0ed627, Function: facets
80+
Selector: 0x01ffc9a7, Function: supportsInterface
81+
- - -
82+
Facet at address: 0x35f2d4877C7a468eA76f2D6666d3D8a487D73A9B
83+
Possible contracts: OwnershipFacet, IERC173
84+
OwnershipFacet:
85+
Missing methods:
86+
Mounted selectors:
87+
Selector: 0x8da5cb5b, Function: owner
88+
Selector: 0xf2fde38b, Function: transferOwnership
89+
IERC173:
90+
Missing methods:
91+
Mounted selectors:
92+
Selector: 0x8da5cb5b, Function: owner
93+
Selector: 0xf2fde38b, Function: transferOwnership
94+
- - -
95+
Facet at address: 0x6396813307826Fb315e65CA7138A41CFa09a8AB3
96+
Possible contracts: TerminusFacet
97+
TerminusFacet:
98+
Missing methods:
99+
Missing selector: 0x01ffc9a7, Function: supportsInterface
100+
Mounted selectors:
101+
Selector: 0x85bc82e2, Function: approveForPool
102+
Selector: 0x00fdd58e, Function: balanceOf
103+
Selector: 0x4e1273f4, Function: balanceOfBatch
104+
Selector: 0xf5298aca, Function: burn
105+
Selector: 0xe8a3d485, Function: contractURI
106+
Selector: 0x3bad2d82, Function: createPoolV1
107+
Selector: 0xb507ef52, Function: createSimplePool
108+
Selector: 0xe985e9c5, Function: isApprovedForAll
109+
Selector: 0x027b3fc2, Function: isApprovedForPool
110+
Selector: 0x731133e9, Function: mint
111+
Selector: 0x1f7fdffa, Function: mintBatch
112+
Selector: 0x3013ce29, Function: paymentToken
113+
Selector: 0x8925d013, Function: poolBasePrice
114+
Selector: 0x21adca96, Function: poolMintBatch
115+
Selector: 0x2eb2c2d6, Function: safeBatchTransferFrom
116+
Selector: 0xf242432a, Function: safeTransferFrom
117+
Selector: 0xa22cb465, Function: setApprovalForAll
118+
Selector: 0x938e3d7b, Function: setContractURI
119+
Selector: 0x92eefe9b, Function: setController
120+
Selector: 0x6a326ab1, Function: setPaymentToken
121+
Selector: 0x78cf2e84, Function: setPoolBasePrice
122+
Selector: 0xdc55d0b2, Function: setPoolController
123+
Selector: 0x862440e2, Function: setURI
124+
Selector: 0x366e59e3, Function: terminusController
125+
Selector: 0x5dc8bdf8, Function: terminusPoolCapacity
126+
Selector: 0xd0c402e5, Function: terminusPoolController
127+
Selector: 0xa44cfc82, Function: terminusPoolSupply
128+
Selector: 0xab3c7e52, Function: totalPools
129+
Selector: 0x0e89341c, Function: uri
130+
Selector: 0x0e7afec5, Function: withdrawPayments
131+
```
132+
133+
- [x] Replace existing `TerminusFacet` methods on diamond:
134+
135+
```bash
136+
dao core facet-cut \
137+
--address $TERMINUS_DIAMOND \
138+
--network $DAO_NETWORK \
139+
--sender $DAO_OWNER \
140+
--gas-price "$GAS_PRICE" \
141+
--confirmations $CONFIRMATIONS \
142+
--facet-name TerminusFacet \
143+
--facet-address $TERMINUS_FACET_ADDRESS \
144+
--action replace
145+
```
146+
147+
- [x] Build [Inspector Facet](https://github.com/bugout-dev/inpsector-facet) report for Diamond contract:
148+
149+
```
150+
- - -
151+
Facet at address: 0x539d0E4A68F720b35c1670B6421673a852de52DB
152+
Possible contracts: IDiamondCut, DiamondCutFacet
153+
IDiamondCut:
154+
Missing methods:
155+
Mounted selectors:
156+
Selector: 0x1f931c1c, Function: diamondCut
157+
DiamondCutFacet:
158+
Missing methods:
159+
Mounted selectors:
160+
Selector: 0x1f931c1c, Function: diamondCut
161+
- - -
162+
Facet at address: 0x024e974B4524f245fE3da60CbD70EC62875f8194
163+
Possible contracts: DiamondLoupeFacet
164+
DiamondLoupeFacet:
165+
Missing methods:
166+
Mounted selectors:
167+
Selector: 0xcdffacc6, Function: facetAddress
168+
Selector: 0x52ef6b2c, Function: facetAddresses
169+
Selector: 0xadfca15e, Function: facetFunctionSelectors
170+
Selector: 0x7a0ed627, Function: facets
171+
Selector: 0x01ffc9a7, Function: supportsInterface
172+
- - -
173+
Facet at address: 0x35f2d4877C7a468eA76f2D6666d3D8a487D73A9B
174+
Possible contracts: OwnershipFacet, IERC173
175+
OwnershipFacet:
176+
Missing methods:
177+
Mounted selectors:
178+
Selector: 0x8da5cb5b, Function: owner
179+
Selector: 0xf2fde38b, Function: transferOwnership
180+
IERC173:
181+
Missing methods:
182+
Mounted selectors:
183+
Selector: 0x8da5cb5b, Function: owner
184+
Selector: 0xf2fde38b, Function: transferOwnership
185+
- - -
186+
Facet at address: 0xaA91032E567fD3CF2e7102f65B1AaF21530583a0
187+
Possible contracts: TerminusFacet
188+
TerminusFacet:
189+
Missing methods:
190+
Missing selector: 0x01ffc9a7, Function: supportsInterface
191+
Mounted selectors:
192+
Selector: 0x85bc82e2, Function: approveForPool
193+
Selector: 0x00fdd58e, Function: balanceOf
194+
Selector: 0x4e1273f4, Function: balanceOfBatch
195+
Selector: 0xf5298aca, Function: burn
196+
Selector: 0xe8a3d485, Function: contractURI
197+
Selector: 0x3bad2d82, Function: createPoolV1
198+
Selector: 0xb507ef52, Function: createSimplePool
199+
Selector: 0xe985e9c5, Function: isApprovedForAll
200+
Selector: 0x027b3fc2, Function: isApprovedForPool
201+
Selector: 0x731133e9, Function: mint
202+
Selector: 0x1f7fdffa, Function: mintBatch
203+
Selector: 0x3013ce29, Function: paymentToken
204+
Selector: 0x8925d013, Function: poolBasePrice
205+
Selector: 0x21adca96, Function: poolMintBatch
206+
Selector: 0x2eb2c2d6, Function: safeBatchTransferFrom
207+
Selector: 0xf242432a, Function: safeTransferFrom
208+
Selector: 0xa22cb465, Function: setApprovalForAll
209+
Selector: 0x938e3d7b, Function: setContractURI
210+
Selector: 0x92eefe9b, Function: setController
211+
Selector: 0x6a326ab1, Function: setPaymentToken
212+
Selector: 0x78cf2e84, Function: setPoolBasePrice
213+
Selector: 0xdc55d0b2, Function: setPoolController
214+
Selector: 0x862440e2, Function: setURI
215+
Selector: 0x366e59e3, Function: terminusController
216+
Selector: 0x5dc8bdf8, Function: terminusPoolCapacity
217+
Selector: 0xd0c402e5, Function: terminusPoolController
218+
Selector: 0xa44cfc82, Function: terminusPoolSupply
219+
Selector: 0xab3c7e52, Function: totalPools
220+
Selector: 0x0e89341c, Function: uri
221+
Selector: 0x0e7afec5, Function: withdrawPayments
222+
```

0 commit comments

Comments
 (0)