Glow-Lang / glow

The Glow language for Blockchain Decentralized Applications.
https://glow-lang.org
Apache License 2.0
58 stars 8 forks source link

Restore first-code-block contract-creation in cases without withdraw or nonnative deposit #433

Open AlexKnauth opened 2 years ago

AlexKnauth commented 2 years ago

Related issues/pull-requests: https://github.com/Glow-Lang/glow/issues/188, https://github.com/Glow-Lang/glow/pull/410.

PR #410 fixed the part of issue #188 for single transaction interactions in the "wrong" way by splitting the first transaction into two in all cases, where it should only need to split the first transaction into two in cases where the first code block contains a withdraw or a nonnative deposit.

In the common case where the first code block only contains native deposits and publish statements, the first code block should be included in the contract-creation transaction. This can be done without regressing on issue #188.