Skip to content

added the hub connected with TreasurySpoke in the constructor, so each treasury spoke will be connected with a hub - #1322

Open
web3devLuBdF wants to merge 2 commits into
aave:mainfrom
web3devLuBdF:add-treasury-spoke-per-hub
Open

added the hub connected with TreasurySpoke in the constructor, so each treasury spoke will be connected with a hub#1322
web3devLuBdF wants to merge 2 commits into
aave:mainfrom
web3devLuBdF:add-treasury-spoke-per-hub

Conversation

@web3devLuBdF

Copy link
Copy Markdown

Closes #799

An Immutable variabile named "HUB" has been added at the contract level , because it is immutable it will be part of the final bytecode and its value will not can be changed after deployment and it has been marked as public.
A constructor has been added in "TreasurySpoke" contract and the variabile "HUB" has been initialized in it, so each treasury spoke will have a hub.
Although "TreasurySpoke" contains upgradeable elements (for Ownable2StepUpgradeable), the presence of constructor is not a problem if it does not affect upgradeable pattern logic.
Naturally "TreasurySpokeInstance" and "MockTreasurySpokeInstance" contracts that inherit directly by "TreasurySpoke" had to indicate "HUB" variable as argument in their constructors.
Initially the deployment of treasury spoke instance failed in treasury spoke tests with the error "FailedCreate2FactoryCall" because it is deployed with CREATE2, so the addition of constructor in "TreasurySpoke" contract has changed final expected bytecode in deterministic deployment.
Because of this has been necessary to encode the "TreasurySpoke" argument in the final bytecode, and all files involved in treasury spoke deployment have added this argument to ensure that deployment succeds.
Since all this files are quite numerous, is necessary to be careful to how the argument integrates with the other variables.
For this reason if is needed change "HUB" variable visibility, modify the position of treasury spoke instance argument in all files involved in deployment or any other change and addition, i am willing to do it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update Treasury Spoke - allow for registering reserveIds

1 participant