I’m currently looking for solution for smart contract upgrades and came across the beacon pattern. I found some good tutorials here in the forum about deploying upgradable porxies with truffle but still those solutions don’t fit my requirements, or at least I don’t see it. So here is my setup and my understanding so far:
I have an api were I can have an endpoint for
POST contract/. This endpoint will then trigger a deployment of a new smart contract. I will deploy quite a lot of smart contracts to a private PoA network.
Now I want to integrate the upgradable feature for the smart contract and so far I came across the proxy pattern where each proxy contract delegates the calls to the implementation contract. The thing is if I have a few hundred smart contracts, upgrading all of them requires to iterate over each of one of them. That’s why I found the beacon approach very interesting.
In the plugins for hardhat an truffle exist a function like
deployProxy but so far they are only used in the migrations of truffle.
- My questions would be if there is a way to deploy new proxies from an route handler and thus outside of the truffle migrations?
- I found the beacon proxy in the docs but how do I use it with truffle?
Thanks a lot and all the best