0

I have a project where users deploy their own instances of a contract and those instances need off-chain data through chainlink oracle, what's the best between making the contract has its own request data logic (it cost more gas deploying the instances since it have to implement all function and variables to get data), or making the request logic in another contract (which will be deployed on single time) and make instances call that contract (it cost less gas on deploying but more gas when calling request contract and then it returns the data in another transaction which means two or more transaction) .

1 Answer 1

1

You can use a library with external functions and this will reduce the cost of smart contracts. (if a library have external functions then it can be deployed separated).

It is a bit weird to have a different smart contract for each user if probably the logic is the same. Basically you can create any kind of logic in the same smart contract and hold a separated state for each user.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.