Skip to content

Commit

Permalink
[Plinth] [Builtins] Fix 'writeBits'
Browse files Browse the repository at this point in the history
  • Loading branch information
effectfully committed Jul 25, 2024
1 parent 7f02fab commit 96a316f
Show file tree
Hide file tree
Showing 22 changed files with 346 additions and 310 deletions.
8 changes: 8 additions & 0 deletions plutus-tx-plugin/src/PlutusTx/Compiler/Builtins.hs
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,8 @@ builtinNames = [
, 'Builtins.head
, 'Builtins.tail
, 'Builtins.chooseList
, 'Builtins.mkNilInteger
, 'Builtins.mkNilBool
, 'Builtins.mkNilData
, 'Builtins.mkNilPairData
, 'Builtins.mkCons
Expand Down Expand Up @@ -332,6 +334,12 @@ defineBuiltinTerms = do
-- Text constant
defineBuiltinTerm annMayInline 'Builtins.emptyString $ PIR.mkConstant annMayInline ("" :: Text)

-- List constants
defineBuiltinTerm annMayInline 'Builtins.mkNilInteger $
PIR.mkConstant annMayInline ([] @Integer)
defineBuiltinTerm annMayInline 'Builtins.mkNilBool $
PIR.mkConstant annMayInline ([] @Bool)

-- The next two constants are 48 bytes long, so in fact we may not want to inline them.
defineBuiltinTerm annMayInline 'Builtins.bls12_381_G1_compressed_generator $
PIR.mkConstant annMayInline BLS12_381.G1.compressed_generator
Expand Down
Loading

0 comments on commit 96a316f

Please sign in to comment.