Proto: add a test scenario combining storage allocation and internal transfer
Context
This MR adds the following test scenarios :
-
Define a contract which upon invocation,
stores the parameter of the call (which will allocate storage if necessary), and transfers the contract's funds to the source of the operation -
OT1H, originate the contract with no initial balance,
call it from an account short of sufficient funds to cover storage fees,
and check that this indeed fails. -
OTOH, originate the contract with a sufficient initial balance to cover storage fees,
call the originated contract from an account short of sufficient funds to cover storage fees,
check that, as expected, this succeeds since the caller receives the originated contract's initial balance
The latter scenario happens on mainnet (e.g. see operations ooLbS8ZH3mrc3KDXYyspkYu8bDHvVLrDFBVEAnbtpoCqt9roEWz,
ooNPyM6ytotuWhH1NAgoBB8M6d25DJ4fyCtCDm1pk6NnUjsx7Lw, ooNPyM6ytotuWhH1NAgoBB8M6d25DJ4fyCtCDm1pk6NnUjsx7Lw).
So it seems useful to have these tests as a way of checking that storage fees can be payed after more funds
are received at the end of a transaction.
Manually testing the MR
CI.