You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi. In Distributed programming paradigm we have a problem with gas management when we trying to redeploy an already deployed contract.
I'll try to explain it with by using tip-3 architecture. When some application transfers tokens from one wallet to another we always firstly deploy the target wallet, then we send an onAcceptTokensTransfer call with amount of tokens to transfer. If target wallet is already deployed - constructor will throw an error and gas will be bounce back to the contract which one tried to deploy the wallet. But we would like to send remain gas to the user's wallet which one started the transaction.
Thanks for the suggestion! We don't think that adding new built-in "magic" functions will solve the problem, and we're moving towards expanding the possibilities of the language, with which it will be possible to describe the solution to almost any situation.
Hi. In Distributed programming paradigm we have a problem with gas management when we trying to redeploy an already deployed contract.
I'll try to explain it with by using tip-3 architecture. When some application transfers tokens from one wallet to another we always firstly deploy the target wallet, then we send an onAcceptTokensTransfer call with amount of tokens to transfer. If target wallet is already deployed - constructor will throw an error and gas will be bounce back to the contract which one tried to deploy the wallet. But we would like to send remain gas to the user's wallet which one started the transaction.
So we have a constructor like this:
If contract already deployed, message will bounce back to the msg.sender. Will be nice to to have an opportunity to declare such special function:
Because an attempt to re-deploy is a regular situation for our application.
If you need more details I can try to draw a scheme of some real application.
The text was updated successfully, but these errors were encountered: