storyprotocol / protocol-periphery-v1

Periphery contract for story protocol, mainnet repo
MIT License
28 stars 20 forks source link

SPG Deployment Script Issue #22

Closed bpolania closed 2 months ago

bpolania commented 2 months ago

Description and context

An issue in the deployment script results in an OwnableUnauthorizedAccount error when run directly. This error stems from the manner in which the UpgradeableBeacon is instantiated.

Solution recommendation

57Blocks team suggest the following modification to the deployment script:

//Before:
abi.encodePacked(type(UpgradeableBeacon).creationCode, abi.encode(address(spgNftImpl), deployer))

//After:
abi.encodePacked(type(UpgradeableBeacon).creationCode, abi.encode(address(spgNftImpl), address(this)))
sebsadface commented 2 months ago

I believe this issue was caused by the incorrect ordering of the _endBroadcast(); call and the transferOwnership(address(spg)); call in the deployment script.

This issue should already be fixed by #18.

Please pull the latest deployment code and try again. Let me know if the issue persists.

bpolania commented 2 months ago

This issue was already fixed in this PR https://github.com/storyprotocol/protocol-periphery-v1/issues/22