hashgraph / hedera-services

Crypto, token, consensus, file, and smart contract services for the Hedera public ledger
Apache License 2.0
266 stars 119 forks source link

Remove `contracts.allowAutoAssociations` flag in HIP-904 #13954

Closed tinker-michaelj closed 1 week ago

tinker-michaelj commented 3 weeks ago

Problem

Before HIP-904, adding auto-association slots to a contract or account required "pre-paying" for the resources that would be used by the associations.

There was no clear way to make an internal CONTRACT_CREATE cover this pre-payment while also respecting the precedent of child contracts inheriting all the Hedera-native properties of their parent contract.

Therefore we added a contracts.allowAutoAssociations=false property to block all use of auto-association slots with contracts.

But with HIP-904, resources used by associations are always charged at point-of-use to the payer account of the transaction that is creating the association.

So there is need to have this contracts.allowAutoAssociations toggle any more.

Solution

Remove this property and all its uses.

Alternatives

No response