IntersectMBO / plutus

The Plutus language implementation and tools
Apache License 2.0
1.57k stars 479 forks source link

[Plinth] Ban using 'toBuiltin' and 'fromBuiltin' #6342

Closed effectfully closed 3 months ago

effectfully commented 3 months ago

It used to be possible to use toBuiltin/fromBuiltin within a smart contract, but this is no longer the case, but this isn't obvious to the users as they already have code with toBuiltin/fromBuiltin that now just misbehaves instead of throwing a type error or breaking compilation some other way. This fixes the problem by throwing on any usage of toBuiltin/fromBuiltin with a suggestion to use toOpaque/fromOpaque instead.