CRYPTO NEWS

Philippine SEC cautions the public not to invest with Binance

Infrawatch PH Convenor Terry Ridon said that the SEC’s response clarifies the government’s position on crypto platform operations.

Upgradable Contracts From Scratch Without Openzeppelin

I’m on a tight deadline so I don’t have time to go through all of openzeppelin’s upgradable contract logic. However, I need upgradable contracts. I understand the general concept of what the library does, but I don’t want to use its code without understanding it as I’m building a real-world project. I have thought of::Listen

I’m on a tight deadline so I don’t have time to go through all of openzeppelin’s upgradable contract logic. However, I need upgradable contracts.

I understand the general concept of what the library does, but I don’t want to use its code without understanding it as I’m building a real-world project.

I have thought of my own upgrade pattern. Please let me know if this would work and why.

Contracts: DataContract, Logic Contract

So I create my data structure inside the dataContract, and then I have functions inside dataContract that call the logicContract with the necessary data as an input. The call is made through the interface ILogicContract.

On the logicContract, the function with the appropriate call is fired with the inputs from dataContract. This function then returns the outputs back to dataContract.

dataContract then takes these outputs from logicContract and writes them to its own storage all within the same function call that called logicContract for those outputs.

If I need to upgrade the logicContract I can simply change the address to the new logicContract2 by inputting it into the interface ILogicContract on the dataContract. Now all new calls will be made to the new logicContract2.

Should my flow work, or is there something wrong with it? It seems too simple to be true, but then again, I don’t want to use code I don’t understand. I would read it and understand it, but the person who reached out to me did so on short notice, and I’m determined to finish the work.

Philippine SEC cautions the public not to invest with Binance

Shopping cart
There are no products in the cart!
Continue shopping
0