Bohao | Flow (2024-05-16)
[C0.42] Is it a bug or a feature? Does it work in C1.0?
Log result is
No contract is deployed in the account
4 Replies
I've created a thread for your message. Please continue any relevant discussion in this thread.
You can rename this thread using
/title <new title>
If this is a technical question that others may benefit from, considering also asking it on Stackoverflow: https://stackoverflow.com/questions/ask?tags=onflow-cadenceThis behaviour is correct, and the same in the current version of Cadence (v0.42) nd the upcoming version (v1.0). Contract deployments are only effective after the transaction completed (i.e. in the next transaction). We might improve that in the future, feel free to open a feature request
Got it.
so it is not possible to register a new deployed ft contract to my token list in same transaction for now. (Borrow ViewResolver will be failed in the same transaction)
Will open a feature request
GitHub
Let new added contract be accessable in the same transaction after ...
Issue to be solved log("Deploying the contract to the account: ".concat(childAddr.toString())) // add the contract childAcctRef.contracts.add(name: contractName, code: ftContract.code) //...