diff --git a/.project.json b/.project.json index 3949b6a0c..8153d3595 100644 --- a/.project.json +++ b/.project.json @@ -1,5 +1,5 @@ { - "fullNodeVersion": "v3.3.0", + "fullNodeVersion": "v3.4.0", "compilerOptionsUsed": { "ignoreUnusedConstantsWarnings": false, "ignoreUnusedVariablesWarnings": false, @@ -13,401 +13,319 @@ "sourceFile": "add/add.ral", "sourceCodeHash": "e53e74ff98c352525e856abd4311868176d45c61c957791c3d42eae274088df0", "bytecodeDebugPatch": "=12-2+5c=2-2+81=3-1+e=2-2+bc=83-1+97e010a61646450726976617465=266", - "codeHashDebug": "c46db1ae7bae8b332c115869126eb1402bc71574925608a2adcea3cf7b9f8e7e", - "warnings": [ - "Found unused variables in Add: add2.addS, add2.address, add2.array2", - "The return values of the function \"Add.copyCreateSubContract\" are not used. If this is intentional, consider using anonymous variables to suppress this warning.", - "The return values of the function \"Add.copyCreateSubContract\" are not used. If this is intentional, consider using anonymous variables to suppress this warning.", - "No external caller check for function \"Add.createSubContract\". Please use \"checkCaller!(...)\" in the function or its callees, or disable it with \"@using(checkExternalCaller = false)\".", - "No external caller check for function \"Add.add\". Please use \"checkCaller!(...)\" in the function or its callees, or disable it with \"@using(checkExternalCaller = false)\".", - "No external caller check for function \"Add.add2\". Please use \"checkCaller!(...)\" in the function or its callees, or disable it with \"@using(checkExternalCaller = false)\".", - "No external caller check for function \"Add.createSubContractAndTransfer\". Please use \"checkCaller!(...)\" in the function or its callees, or disable it with \"@using(checkExternalCaller = false)\"." - ] + "codeHashDebug": "c46db1ae7bae8b332c115869126eb1402bc71574925608a2adcea3cf7b9f8e7e" }, "AddMain": { "sourceFile": "add/add.ral", "sourceCodeHash": "e53e74ff98c352525e856abd4311868176d45c61c957791c3d42eae274088df0", "bytecodeDebugPatch": "", - "codeHashDebug": "", - "warnings": [ - "The return values of the function \"Add.add\" are not used. If this is intentional, consider using anonymous variables to suppress this warning." - ] + "codeHashDebug": "" }, "AddStruct1": { "sourceFile": "add/add.ral", "sourceCodeHash": "e53e74ff98c352525e856abd4311868176d45c61c957791c3d42eae274088df0", "bytecodeDebugPatch": "", - "codeHashDebug": "", - "warnings": [] + "codeHashDebug": "" }, "AddStruct2": { "sourceFile": "add/add.ral", "sourceCodeHash": "e53e74ff98c352525e856abd4311868176d45c61c957791c3d42eae274088df0", "bytecodeDebugPatch": "", - "codeHashDebug": "", - "warnings": [] + "codeHashDebug": "" }, "Assert": { "sourceFile": "test/assert.ral", - "sourceCodeHash": "9f400f63bcdefcbccb09253140532bea0054f543fa7264b555abcadc0da2d87d", + "sourceCodeHash": "2cb837275917553343581f13e3c2e33a5943ae1483b887408ff97f93d6f12d3f", "bytecodeDebugPatch": "", - "codeHashDebug": "46dc5e3835be6551dacbf81565912ec67575aa77522312ceed88472817735d6b", - "warnings": [ - "Found unused constants in Assert: A, Addresses.A, Addresses.B, B, ByteVecs.A, ByteVecs.B, C, Numbers.A, Numbers.B, Numbers.C" - ] + "codeHashDebug": "46dc5e3835be6551dacbf81565912ec67575aa77522312ceed88472817735d6b" }, "Balances": { "sourceFile": "test/struct.ral", "sourceCodeHash": "7690ad7d8b8c4b952fc6f439eb75648164532e055e6a47881882097c0600bb6a", "bytecodeDebugPatch": "", - "codeHashDebug": "", - "warnings": [] + "codeHashDebug": "" }, "CallScript0": { "sourceFile": "test/call_scripts.ral", "sourceCodeHash": "71ecb0e86393e15d1b284326c92ac9b0d15e8fdad75cd5dc197cd34679ca83f1", "bytecodeDebugPatch": "", - "codeHashDebug": "", - "warnings": [] + "codeHashDebug": "" }, "CallScript1": { "sourceFile": "test/call_scripts.ral", "sourceCodeHash": "71ecb0e86393e15d1b284326c92ac9b0d15e8fdad75cd5dc197cd34679ca83f1", "bytecodeDebugPatch": "", - "codeHashDebug": "", - "warnings": [] + "codeHashDebug": "" }, "Debug": { "sourceFile": "test/debug.ral", "sourceCodeHash": "0d7cdfad264cf2009dd8907b716ba0d79cc4cf722b35773129645c5415bcb4dc", "bytecodeDebugPatch": "=4-2+18=11-1+3=10+ca7e020748656c6c6f2c200121", - "codeHashDebug": "eb4209d8f543d9f623d72578f7ed9b271d62cf396dcce42d10f5e68dba3cecd3", - "warnings": [] + "codeHashDebug": "eb4209d8f543d9f623d72578f7ed9b271d62cf396dcce42d10f5e68dba3cecd3" }, "DeprecatedNFTTest1": { "sourceFile": "nft/deprecated_nft.ral", "sourceCodeHash": "ef29c0be80692016b71dc5a400cf093884acef3e07ed2c7ead78bc3927e0f478", "bytecodeDebugPatch": "", - "codeHashDebug": "cc6928c9c6777077abcb5b9c4f7c5d620d6cae07ec6f00f5e8b0efe6a7b913c4", - "warnings": [] + "codeHashDebug": "cc6928c9c6777077abcb5b9c4f7c5d620d6cae07ec6f00f5e8b0efe6a7b913c4" }, "DeprecatedNFTTest2": { "sourceFile": "nft/deprecated_nft.ral", "sourceCodeHash": "ef29c0be80692016b71dc5a400cf093884acef3e07ed2c7ead78bc3927e0f478", "bytecodeDebugPatch": "", - "codeHashDebug": "ade9aee476ee752050a1e9e1b19039f05261cb3f53941152617174faf9eae572", - "warnings": [] + "codeHashDebug": "ade9aee476ee752050a1e9e1b19039f05261cb3f53941152617174faf9eae572" }, "DeprecatedNFTTest3": { "sourceFile": "nft/deprecated_nft.ral", "sourceCodeHash": "ef29c0be80692016b71dc5a400cf093884acef3e07ed2c7ead78bc3927e0f478", "bytecodeDebugPatch": "", - "codeHashDebug": "465bc3739cd1649e58e0470971bd2fabf21363ab9fc2c15052fb2440dd06ada5", - "warnings": [ - "Found unused fields in DeprecatedNFTTest3: collectionId" - ] + "codeHashDebug": "465bc3739cd1649e58e0470971bd2fabf21363ab9fc2c15052fb2440dd06ada5" }, "DeprecatedNFTTest4": { "sourceFile": "nft/deprecated_nft.ral", "sourceCodeHash": "ef29c0be80692016b71dc5a400cf093884acef3e07ed2c7ead78bc3927e0f478", "bytecodeDebugPatch": "", - "codeHashDebug": "a5de0fa0b3580303ac63423f09ce5ed95fccbf789679b32130a53c26fef182e9", - "warnings": [] + "codeHashDebug": "a5de0fa0b3580303ac63423f09ce5ed95fccbf789679b32130a53c26fef182e9" }, "DeprecatedNFTTest5": { "sourceFile": "nft/deprecated_nft.ral", "sourceCodeHash": "ef29c0be80692016b71dc5a400cf093884acef3e07ed2c7ead78bc3927e0f478", "bytecodeDebugPatch": "", - "codeHashDebug": "8b1374f39db98c485af3dd05d0b0ce861e9528f290ca9dc0d7108e8b48b50161", - "warnings": [] + "codeHashDebug": "8b1374f39db98c485af3dd05d0b0ce861e9528f290ca9dc0d7108e8b48b50161" }, "DeprecatedNFTTest6": { "sourceFile": "nft/deprecated_nft.ral", "sourceCodeHash": "ef29c0be80692016b71dc5a400cf093884acef3e07ed2c7ead78bc3927e0f478", "bytecodeDebugPatch": "", - "codeHashDebug": "8bc0d39f0607d4a771ec70ae1057b71dbcde404177cb3b25fd7d93d553a2b8cd", - "warnings": [] + "codeHashDebug": "8bc0d39f0607d4a771ec70ae1057b71dbcde404177cb3b25fd7d93d553a2b8cd" }, "DeprecatedNFTTest7": { "sourceFile": "nft/deprecated_nft.ral", "sourceCodeHash": "ef29c0be80692016b71dc5a400cf093884acef3e07ed2c7ead78bc3927e0f478", "bytecodeDebugPatch": "", - "codeHashDebug": "b95c9acf088b090f5d9d34f28ab079cf22b9e53af8ae6864113c71172231ef4c", - "warnings": [] + "codeHashDebug": "b95c9acf088b090f5d9d34f28ab079cf22b9e53af8ae6864113c71172231ef4c" }, "DestroyAdd": { "sourceFile": "add/destroy_add.ral", "sourceCodeHash": "dbddae3cd53736478c299026ac67683909fcc04d036f98ce6dc72af7d92a4835", "bytecodeDebugPatch": "", - "codeHashDebug": "", - "warnings": [] + "codeHashDebug": "" }, "FakeTokenTest": { "sourceFile": "token/fake_token_test.ral", "sourceCodeHash": "c51d0d664dc1c0ff0e2c4f9c133bbd4d8cc6b8c55b44df42c98a19b43fe329e5", "bytecodeDebugPatch": "", - "codeHashDebug": "52f971cb44d54a5353e94dc8db991d2726f76760af782e79bd8a66a9b5b294b7", - "warnings": [] + "codeHashDebug": "52f971cb44d54a5353e94dc8db991d2726f76760af782e79bd8a66a9b5b294b7" }, "FungibleTokenUnimplemented": { "sourceFile": "../packages/web3/std/fungible_token_unimplemented.ral", "sourceCodeHash": "df36ccc9548da207df716192341e864c7a8d0ea22ea9214b9cfad13bf324a0f6", "bytecodeDebugPatch": "", - "codeHashDebug": "", - "warnings": [] + "codeHashDebug": "" }, "Greeter": { "sourceFile": "greeter/greeter.ral", "sourceCodeHash": "703915a6b6d323f3e5a4f62f53a2a1ae2302539b5941570af254617f45ff99d3", "bytecodeDebugPatch": "", - "codeHashDebug": "3813cf61a6e0f126463190119cd861a14ca9c2f92839e193c4f9934517b02477", - "warnings": [] + "codeHashDebug": "4bbf82c83dcb0a3df905c290fbc12a19ce5160a7b655c1a347913481da12d747" }, "GreeterInterface": { "sourceFile": "greeter/greeter.ral", "sourceCodeHash": "703915a6b6d323f3e5a4f62f53a2a1ae2302539b5941570af254617f45ff99d3", "bytecodeDebugPatch": "", - "codeHashDebug": "", - "warnings": [] + "codeHashDebug": "" }, "GreeterMain": { "sourceFile": "greeter/greeter.ral", "sourceCodeHash": "703915a6b6d323f3e5a4f62f53a2a1ae2302539b5941570af254617f45ff99d3", "bytecodeDebugPatch": "", - "codeHashDebug": "", - "warnings": [] + "codeHashDebug": "" }, "IFungibleToken": { "sourceFile": "../packages/web3/std/fungible_token_interface.ral", "sourceCodeHash": "62910bf11e1eeb6cb2fd468626ff606a9b06306b2b81590c3b10f6deb5966bde", "bytecodeDebugPatch": "", - "codeHashDebug": "", - "warnings": [] + "codeHashDebug": "" }, "INFT": { "sourceFile": "../packages/web3/std/nft_interface.ral", "sourceCodeHash": "92956f4e61c198f011b48dbda2ed76193ffc79ac9c39f60bf1763a34e02f2c41", "bytecodeDebugPatch": "", - "codeHashDebug": "", - "warnings": [] + "codeHashDebug": "" }, "INFTCollection": { "sourceFile": "../packages/web3/std/nft_collection_interface.ral", "sourceCodeHash": "9b199426ea89c188ce858b48ab809f13b9fc1ed0d64ca91e3d600eda8fbf6c42", "bytecodeDebugPatch": "", - "codeHashDebug": "", - "warnings": [] + "codeHashDebug": "" }, "INFTCollectionWithRoyalty": { "sourceFile": "../packages/web3/std/nft_collection_with_royalty_interface.ral", "sourceCodeHash": "293aad668909a21df80183c9296f3d1a8edb76a43faa2cbf395a766d1879cdc6", "bytecodeDebugPatch": "", - "codeHashDebug": "", - "warnings": [] + "codeHashDebug": "" }, "INewFungibleToken": { "sourceFile": "token/token_test_std.ral", "sourceCodeHash": "a93692964e6b76a29683ddf914eb96ea79f8cb6c6287b294ef19172e4dd41ee3", "bytecodeDebugPatch": "", - "codeHashDebug": "", - "warnings": [] + "codeHashDebug": "" }, "INewNFT": { "sourceFile": "nft/nft_test_std.ral", "sourceCodeHash": "2a6c8e61f798ac8a69fcd7e665e871bd655a66bcdab763950a092ffe03d5ea5e", "bytecodeDebugPatch": "", - "codeHashDebug": "", - "warnings": [] + "codeHashDebug": "" }, "InsertIntoMap": { "sourceFile": "test/map.ral", "sourceCodeHash": "f797013ab9c7bf780bb8f452c0724703e877bbd9d71a60b400ed5009eb0f08e8", "bytecodeDebugPatch": "", - "codeHashDebug": "", - "warnings": [] + "codeHashDebug": "" }, "MapTest": { "sourceFile": "test/map.ral", "sourceCodeHash": "f797013ab9c7bf780bb8f452c0724703e877bbd9d71a60b400ed5009eb0f08e8", "bytecodeDebugPatch": "=6-2+a8=1-3+128=2-2+ea=1+2=1-2+7=10-2+4025=50+7a7e0214696e73657274206174206d617020706174683a2000=56+7a7e0214696e73657274206174206d617020706174683a2000=54+7a7e0214696e73657274206174206d617020706174683a2000=280-2+33=124+7a7e021472656d6f7665206174206d617020706174683a2000=46+7a7e021472656d6f7665206174206d617020706174683a2000=48+7a7e021472656d6f7665206174206d617020706174683a2000=96", - "codeHashDebug": "31aed0ff7b29f2cbc2d8360a83f31af4e9db00f0084a7406bd84b7745181373d", - "warnings": [ - "No external caller check for function \"MapTest.remove\". Please use \"checkCaller!(...)\" in the function or its callees, or disable it with \"@using(checkExternalCaller = false)\".", - "No external caller check for function \"MapTest.update\". Please use \"checkCaller!(...)\" in the function or its callees, or disable it with \"@using(checkExternalCaller = false)\".", - "No external caller check for function \"MapTest.insert\". Please use \"checkCaller!(...)\" in the function or its callees, or disable it with \"@using(checkExternalCaller = false)\"." - ] + "codeHashDebug": "31aed0ff7b29f2cbc2d8360a83f31af4e9db00f0084a7406bd84b7745181373d" }, "MapValue": { "sourceFile": "test/map.ral", "sourceCodeHash": "f797013ab9c7bf780bb8f452c0724703e877bbd9d71a60b400ed5009eb0f08e8", "bytecodeDebugPatch": "", - "codeHashDebug": "", - "warnings": [] + "codeHashDebug": "" }, "MetaData": { "sourceFile": "test/metadata.ral", "sourceCodeHash": "79099ed139ae980aeb7010a648998ebeaf4ee4102cb76c40addb1a0d5dd9c684", "bytecodeDebugPatch": "", - "codeHashDebug": "af0b3119565ef5f833f7b3514005a6b00ac9957d5a7779765edfc6e6ce6321c5", - "warnings": [ - "No external caller check for function \"MetaData.foo\". Please use \"checkCaller!(...)\" in the function or its callees, or disable it with \"@using(checkExternalCaller = false)\".", - "Private function \"MetaData.bar\" is not used", - "Private function \"MetaData.baz\" is not used" - ] + "codeHashDebug": "af0b3119565ef5f833f7b3514005a6b00ac9957d5a7779765edfc6e6ce6321c5" }, "MintNFTTest": { "sourceFile": "nft/mint_nft_test.ral", "sourceCodeHash": "1fb25375808315eddf482b5e6bf58a9e4d6b1ee875c35f72c2b5692f024c8ba8", "bytecodeDebugPatch": "", - "codeHashDebug": "", - "warnings": [ - "The return values of the function \"NFTCollectionWithRoyaltyTest.mint\" are not used. If this is intentional, consider using anonymous variables to suppress this warning.", - "The return values of the function \"NFTCollectionTest.mint\" are not used. If this is intentional, consider using anonymous variables to suppress this warning." - ] + "codeHashDebug": "" }, "NFTCollectionTest": { "sourceFile": "nft/nft_collection_test.ral", "sourceCodeHash": "ac1d8da86e8cb3e5c412c463d7cf0376db563d9cbc459eb034d3067dcaa2045e", "bytecodeDebugPatch": "", - "codeHashDebug": "087f9292bb326a4d39a6fac09928cb25edf2837718f830f3a166a937f8724779", - "warnings": [ - "No external caller check for function \"NFTCollectionTest.mint\". Please use \"checkCaller!(...)\" in the function or its callees, or disable it with \"@using(checkExternalCaller = false)\"." - ] + "codeHashDebug": "087f9292bb326a4d39a6fac09928cb25edf2837718f830f3a166a937f8724779" }, "NFTCollectionTestBase": { "sourceFile": "nft/nft_collection_test_base.ral", - "sourceCodeHash": "60406d258606a398d4fd9b8e233fa2ddf08dc111fae040be0f43c60a4cd77dcc", + "sourceCodeHash": "09a0fb1bf8bea319c735c58b73de9c9cbb8c927dc9988519c7b34f43b33d6ac2", "bytecodeDebugPatch": "", - "codeHashDebug": "", - "warnings": [] + "codeHashDebug": "" }, "NFTCollectionWithRoyaltyTest": { "sourceFile": "nft/nft_collection_with_royalty_test.ral", - "sourceCodeHash": "797c82a70c622eb1c8b06a1aade4e44050e9f198afd0496231b61c7cb7c4b1c7", + "sourceCodeHash": "a33a90ab5f62b34b1e6619f675e5e01e6bb59c956be3780d161e2aed5281fe33", "bytecodeDebugPatch": "", - "codeHashDebug": "919808beff802a8043d62c5ff23249f22dbfdbd2fae56264f5f108af59eb171e", - "warnings": [ - "No external caller check for function \"NFTCollectionWithRoyaltyTest.mint\". Please use \"checkCaller!(...)\" in the function or its callees, or disable it with \"@using(checkExternalCaller = false)\"." - ] + "codeHashDebug": "3b64d5e360566a4e4f568f773536a3ea74e66d12231aa44f19d2214ba87b38d6" }, "NFTTest": { "sourceFile": "nft/nft_test.ral", "sourceCodeHash": "ddcc7fedd2dcbce030a9428f5560deb53124688f9cee396433192700131ed73f", "bytecodeDebugPatch": "", - "codeHashDebug": "4897086210869e612d82995b765a447c5319a55a56e8a0c3c07b4d9ca81e15b1", - "warnings": [] + "codeHashDebug": "4897086210869e612d82995b765a447c5319a55a56e8a0c3c07b4d9ca81e15b1" }, "NFTTestStd": { "sourceFile": "nft/nft_test_std.ral", "sourceCodeHash": "2a6c8e61f798ac8a69fcd7e665e871bd655a66bcdab763950a092ffe03d5ea5e", "bytecodeDebugPatch": "", - "codeHashDebug": "b7ff3fa8dfacc7ae5edbabd6573d0699dffc5a0f07ad14023f682a201b7bce55", - "warnings": [] + "codeHashDebug": "b7ff3fa8dfacc7ae5edbabd6573d0699dffc5a0f07ad14023f682a201b7bce55" }, "OwnerOnly": { "sourceFile": "test/owner.ral", "sourceCodeHash": "fcf5f080df9ad62ec723c6127c3d9b153feff9669af0ecc46470526d46db1209", "bytecodeDebugPatch": "", - "codeHashDebug": "c8ecfd7b7e1f3d0169d80e0abb59702516eeff301d47e0e7be70a631bd9414ca", - "warnings": [] + "codeHashDebug": "c8ecfd7b7e1f3d0169d80e0abb59702516eeff301d47e0e7be70a631bd9414ca" }, "RemoveFromMap": { "sourceFile": "test/map.ral", "sourceCodeHash": "f797013ab9c7bf780bb8f452c0724703e877bbd9d71a60b400ed5009eb0f08e8", "bytecodeDebugPatch": "", - "codeHashDebug": "", - "warnings": [] + "codeHashDebug": "" }, "Sub": { "sourceFile": "sub/sub.ral", "sourceCodeHash": "c8b669babea2f36bdb8f92afb17747bfb9eecb13ac17c5a02388426c91a4434e", "bytecodeDebugPatch": "", - "codeHashDebug": "3461ebfaca02ad0a3f587a5b67a461c0cbd82d14261407b1d9277ed4ad129234", - "warnings": [] + "codeHashDebug": "3461ebfaca02ad0a3f587a5b67a461c0cbd82d14261407b1d9277ed4ad129234" }, "TemplateArrayVar": { "sourceFile": "test/template_array_var.ral", "sourceCodeHash": "9d4585b01c450c8602f797f63995d1a734a260ea5579d68b81ba84272c9de235", "bytecodeDebugPatch": "", - "codeHashDebug": "", - "warnings": [] + "codeHashDebug": "" }, "TestAssert": { "sourceFile": "test/assert.ral", - "sourceCodeHash": "9f400f63bcdefcbccb09253140532bea0054f543fa7264b555abcadc0da2d87d", + "sourceCodeHash": "2cb837275917553343581f13e3c2e33a5943ae1483b887408ff97f93d6f12d3f", "bytecodeDebugPatch": "", - "codeHashDebug": "", - "warnings": [] + "codeHashDebug": "" }, "TokenBalance": { "sourceFile": "test/struct.ral", "sourceCodeHash": "7690ad7d8b8c4b952fc6f439eb75648164532e055e6a47881882097c0600bb6a", "bytecodeDebugPatch": "", - "codeHashDebug": "", - "warnings": [] + "codeHashDebug": "" }, "TokenTest": { "sourceFile": "token/token_test.ral", "sourceCodeHash": "c1e103565399f5caa255ce48c8b441001c928754cea5722467521446d36ca3f4", "bytecodeDebugPatch": "", - "codeHashDebug": "a2800413eb2c5c23d48068db23df5f8eeaba04653e12c8ed59d589720d96dadd", - "warnings": [] + "codeHashDebug": "a2800413eb2c5c23d48068db23df5f8eeaba04653e12c8ed59d589720d96dadd" }, "TokenTestStd": { "sourceFile": "token/token_test_std.ral", "sourceCodeHash": "a93692964e6b76a29683ddf914eb96ea79f8cb6c6287b294ef19172e4dd41ee3", "bytecodeDebugPatch": "", - "codeHashDebug": "4aa5c769148cada8eeb1cd3791f6e793ed92009ac79ebb64dc79d4d7f2969c8b", - "warnings": [] + "codeHashDebug": "4aa5c769148cada8eeb1cd3791f6e793ed92009ac79ebb64dc79d4d7f2969c8b" }, "UpdateMapValue": { "sourceFile": "test/map.ral", "sourceCodeHash": "f797013ab9c7bf780bb8f452c0724703e877bbd9d71a60b400ed5009eb0f08e8", "bytecodeDebugPatch": "", - "codeHashDebug": "", - "warnings": [] + "codeHashDebug": "" }, "UpdateUserAccount": { "sourceFile": "test/struct.ral", "sourceCodeHash": "7690ad7d8b8c4b952fc6f439eb75648164532e055e6a47881882097c0600bb6a", "bytecodeDebugPatch": "", - "codeHashDebug": "", - "warnings": [] + "codeHashDebug": "" }, "UserAccount": { "sourceFile": "test/struct.ral", "sourceCodeHash": "7690ad7d8b8c4b952fc6f439eb75648164532e055e6a47881882097c0600bb6a", "bytecodeDebugPatch": "", - "codeHashDebug": "4e9f7eac1b76eaa2268b5af6ebb5640252892dc170aad6c1ee7b639131a55816", - "warnings": [ - "Function \"UserAccount.updateBalance\" updates fields. Please use \"@using(updateFields = true)\" for the function.", - "Function \"UserAccount.updateAddress\" updates fields. Please use \"@using(updateFields = true)\" for the function." - ] + "codeHashDebug": "4e9f7eac1b76eaa2268b5af6ebb5640252892dc170aad6c1ee7b639131a55816" }, "Warnings": { "sourceFile": "test/warnings.ral", "sourceCodeHash": "974d69b74d3b88e9c5c23e8c8674d78dcd2e9b261fcae7be5adafddb777a3d01", "bytecodeDebugPatch": "", - "codeHashDebug": "873e095edb39cdb4b11b1157003daeacad06d259a938cd270e22b8e89b75feea", - "warnings": [ - "Found unused variables in Warnings: foo.y", - "Found unused constants in Warnings: C", - "Found unused fields in Warnings: b" - ] + "codeHashDebug": "873e095edb39cdb4b11b1157003daeacad06d259a938cd270e22b8e89b75feea" }, "WithdrawNFTCollectionTest": { "sourceFile": "nft/withdraw_nft_collection_test.ral", "sourceCodeHash": "b06eed2252a147738da24c9098452123c444d325f8de4d6134d10fea92b3ee45", "bytecodeDebugPatch": "", - "codeHashDebug": "", - "warnings": [] + "codeHashDebug": "" }, "WrongNFTTest": { "sourceFile": "nft/wrong_nft_test.ral", "sourceCodeHash": "7d7c2d3ba4c523554010c80d06c1d3a4213546d450838e6a0effc50a31b6599c", "bytecodeDebugPatch": "", - "codeHashDebug": "7dd2ed643a98b2a1a52a9b9e536fcdae60d961b583b8109f777d846bfdfcae8d", - "warnings": [] + "codeHashDebug": "7dd2ed643a98b2a1a52a9b9e536fcdae60d961b583b8109f777d846bfdfcae8d" + }, + "constants": { + "sourceFile": "constants.ral", + "sourceCodeHash": "0d6844f5e0962a52404362924f8992c5ee0a641688527788db0de0492dd0d675", + "bytecodeDebugPatch": "", + "codeHashDebug": "" } } } \ No newline at end of file diff --git a/artifacts/add/Add.ral.json b/artifacts/add/Add.ral.json index 0ab9fc8b3..1faabb285 100644 --- a/artifacts/add/Add.ral.json +++ b/artifacts/add/Add.ral.json @@ -1,5 +1,5 @@ { - "version": "v3.2.0", + "version": "v3.4.0", "name": "Add", "bytecode": "0206124024404f407440a140af010002100205d34fbb20db1600160100020201000c0c0205d36a51f82d1600160100020200000202021805160016015f06160016015f075da00016002a16012aa100a000160016010e0dce000100020103040c0011d319adf50e1300641600130164170517041603d1a21601160216041605c118010104060015d3f6ce55a6130064160013016417051704160316021340c8ac1603d1a21601160216041605c118010201010003d320f98f621600b0", "codeHash": "6a1f1415a68d55365e205b39e5418cd1f6fc8c2c7926d3662c77d69b55c92681", diff --git a/artifacts/add/AddMain.ral.json b/artifacts/add/AddMain.ral.json index f890728a6..32066544d 100644 --- a/artifacts/add/AddMain.ral.json +++ b/artifacts/add/AddMain.ral.json @@ -1,5 +1,5 @@ { - "version": "v3.2.0", + "version": "v3.4.0", "name": "AddMain", "bytecodeTemplate": "0101030002000c{1}{2}17011700160016010e0e{0}01001818", "fieldsSig": { diff --git a/artifacts/add/DestroyAdd.ral.json b/artifacts/add/DestroyAdd.ral.json index c3c407553..35ccf599a 100644 --- a/artifacts/add/DestroyAdd.ral.json +++ b/artifacts/add/DestroyAdd.ral.json @@ -1,5 +1,5 @@ { - "version": "v2.14.7", + "version": "v3.4.0", "name": "DestroyAdd", "bytecodeTemplate": "01010300000005{1}0d0c{0}0105", "fieldsSig": { @@ -19,9 +19,6 @@ "functions": [ { "name": "main", - "usePreapprovedAssets": true, - "useAssetsInContract": false, - "isPublic": true, "paramNames": [], "paramTypes": [], "paramIsMutable": [], diff --git a/artifacts/constants.ral.json b/artifacts/constants.ral.json new file mode 100644 index 000000000..928c4406c --- /dev/null +++ b/artifacts/constants.ral.json @@ -0,0 +1,138 @@ +{ + "constants": [ + { + "name": "AssertError", + "value": { + "type": "U256", + "value": "3" + } + }, + { + "name": "A", + "value": { + "type": "I256", + "value": "-3" + } + }, + { + "name": "B", + "value": { + "type": "Address", + "value": "1DrDyTr9RpRsQnDnXo2YRiPzPW4ooHX5LLoqXrqfMrpQH" + } + }, + { + "name": "ConstantTrue", + "value": { + "type": "Bool", + "value": true + } + }, + { + "name": "ConstantFalse", + "value": { + "type": "Bool", + "value": false + } + } + ], + "enums": [ + { + "name": "Numbers", + "fields": [ + { + "name": "A", + "value": { + "type": "U256", + "value": "0" + } + }, + { + "name": "B", + "value": { + "type": "U256", + "value": "1" + } + }, + { + "name": "C", + "value": { + "type": "U256", + "value": "115792089237316195423570985008687907853269984665640564039457584007913129639935" + } + } + ] + }, + { + "name": "Addresses", + "fields": [ + { + "name": "A", + "value": { + "type": "Address", + "value": "1DrDyTr9RpRsQnDnXo2YRiPzPW4ooHX5LLoqXrqfMrpQH" + } + }, + { + "name": "B", + "value": { + "type": "Address", + "value": "14UAjZ3qcmEVKdTo84Kwf4RprTQi86w2TefnnGFjov9xF" + } + } + ] + }, + { + "name": "ByteVecs", + "fields": [ + { + "name": "A", + "value": { + "type": "ByteVec", + "value": "00" + } + }, + { + "name": "B", + "value": { + "type": "ByteVec", + "value": "11" + } + } + ] + }, + { + "name": "ErrorCodes", + "fields": [ + { + "name": "IncorrectTokenIndex", + "value": { + "type": "U256", + "value": "0" + } + }, + { + "name": "NFTNotFound", + "value": { + "type": "U256", + "value": "1" + } + }, + { + "name": "NFTNotPartOfCollection", + "value": { + "type": "U256", + "value": "2" + } + }, + { + "name": "CollectionOwnerAllowedOnly", + "value": { + "type": "U256", + "value": "3" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/artifacts/greeter/Greeter.ral.json b/artifacts/greeter/Greeter.ral.json index 114f6a844..94a74083d 100644 --- a/artifacts/greeter/Greeter.ral.json +++ b/artifacts/greeter/Greeter.ral.json @@ -1,8 +1,8 @@ { - "version": "v2.14.7", + "version": "v3.4.0", "name": "Greeter", - "bytecode": "19010c010000000105030c7bce0002", - "codeHash": "3813cf61a6e0f126463190119cd861a14ca9c2f92839e193c4f9934517b02477", + "bytecode": "190111010000000106d3952f757b030c7bce0002", + "codeHash": "4bbf82c83dcb0a3df905c290fbc12a19ce5160a7b655c1a347913481da12d747", "fieldsSig": { "names": [ "btcPrice", @@ -30,9 +30,6 @@ "functions": [ { "name": "greet", - "usePreapprovedAssets": false, - "useAssetsInContract": false, - "isPublic": true, "paramNames": [], "paramTypes": [], "paramIsMutable": [], diff --git a/artifacts/greeter/GreeterMain.ral.json b/artifacts/greeter/GreeterMain.ral.json index b4fd00302..ebce976a8 100644 --- a/artifacts/greeter/GreeterMain.ral.json +++ b/artifacts/greeter/GreeterMain.ral.json @@ -1,7 +1,7 @@ { - "version": "v2.14.7", + "version": "v3.4.0", "name": "GreeterMain", - "bytecodeTemplate": "01010300020014{0}17000c0d160001000d2f0c7b{0}17010c0d160101000d2f0c7b", + "bytecodeTemplate": "01010300020014{0}17000c0d160001000d2f0c7b{0}17010c0d1601d4952f757b0d2f0c7b", "fieldsSig": { "names": [ "greeterContractId" @@ -16,9 +16,6 @@ "functions": [ { "name": "main", - "usePreapprovedAssets": true, - "useAssetsInContract": false, - "isPublic": true, "paramNames": [], "paramTypes": [], "paramIsMutable": [], diff --git a/artifacts/nft/DeprecatedNFTTest1.ral.json b/artifacts/nft/DeprecatedNFTTest1.ral.json index 9126d5139..acb23f30d 100644 --- a/artifacts/nft/DeprecatedNFTTest1.ral.json +++ b/artifacts/nft/DeprecatedNFTTest1.ral.json @@ -1,5 +1,5 @@ { - "version": "v2.14.7", + "version": "v3.4.0", "name": "DeprecatedNFTTest1", "bytecode": "02010e010000000103d3ee6a5cd5ce0102", "codeHash": "cc6928c9c6777077abcb5b9c4f7c5d620d6cae07ec6f00f5e8b0efe6a7b913c4", @@ -21,9 +21,6 @@ "functions": [ { "name": "getTokenUri", - "usePreapprovedAssets": false, - "useAssetsInContract": false, - "isPublic": true, "paramNames": [], "paramTypes": [], "paramIsMutable": [], diff --git a/artifacts/nft/DeprecatedNFTTest2.ral.json b/artifacts/nft/DeprecatedNFTTest2.ral.json index d82bfb870..07787954e 100644 --- a/artifacts/nft/DeprecatedNFTTest2.ral.json +++ b/artifacts/nft/DeprecatedNFTTest2.ral.json @@ -1,5 +1,5 @@ { - "version": "v2.14.7", + "version": "v3.4.0", "name": "DeprecatedNFTTest2", "bytecode": "02020e1c010000000103d3ee6a5cd5ce0102010000000103d33e65d93dce0002", "codeHash": "ade9aee476ee752050a1e9e1b19039f05261cb3f53941152617174faf9eae572", @@ -21,9 +21,6 @@ "functions": [ { "name": "getTokenUri", - "usePreapprovedAssets": false, - "useAssetsInContract": false, - "isPublic": true, "paramNames": [], "paramTypes": [], "paramIsMutable": [], @@ -33,9 +30,6 @@ }, { "name": "getCollectionId", - "usePreapprovedAssets": false, - "useAssetsInContract": false, - "isPublic": true, "paramNames": [], "paramTypes": [], "paramIsMutable": [], diff --git a/artifacts/nft/DeprecatedNFTTest3.ral.json b/artifacts/nft/DeprecatedNFTTest3.ral.json index 2727f77bc..d09860f76 100644 --- a/artifacts/nft/DeprecatedNFTTest3.ral.json +++ b/artifacts/nft/DeprecatedNFTTest3.ral.json @@ -1,5 +1,5 @@ { - "version": "v2.14.7", + "version": "v3.4.0", "name": "DeprecatedNFTTest3", "bytecode": "02020e19010000000103d3ee6a5cd5ce0102010000000001d34d12f529", "codeHash": "465bc3739cd1649e58e0470971bd2fabf21363ab9fc2c15052fb2440dd06ada5", @@ -21,9 +21,6 @@ "functions": [ { "name": "getTokenUri", - "usePreapprovedAssets": false, - "useAssetsInContract": false, - "isPublic": true, "paramNames": [], "paramTypes": [], "paramIsMutable": [], @@ -33,9 +30,6 @@ }, { "name": "returnNothing", - "usePreapprovedAssets": false, - "useAssetsInContract": false, - "isPublic": true, "paramNames": [], "paramTypes": [], "paramIsMutable": [], diff --git a/artifacts/nft/DeprecatedNFTTest4.ral.json b/artifacts/nft/DeprecatedNFTTest4.ral.json index 1b82de482..bf53a1a4c 100644 --- a/artifacts/nft/DeprecatedNFTTest4.ral.json +++ b/artifacts/nft/DeprecatedNFTTest4.ral.json @@ -1,5 +1,5 @@ { - "version": "v2.14.7", + "version": "v3.4.0", "name": "DeprecatedNFTTest4", "bytecode": "02020e1b010000000103d3ee6a5cd5ce0102010000000103d35f9a418a0402", "codeHash": "a5de0fa0b3580303ac63423f09ce5ed95fccbf789679b32130a53c26fef182e9", @@ -21,9 +21,6 @@ "functions": [ { "name": "getTokenUri", - "usePreapprovedAssets": false, - "useAssetsInContract": false, - "isPublic": true, "paramNames": [], "paramTypes": [], "paramIsMutable": [], @@ -33,9 +30,6 @@ }, { "name": "getBool", - "usePreapprovedAssets": false, - "useAssetsInContract": false, - "isPublic": true, "paramNames": [], "paramTypes": [], "paramIsMutable": [], diff --git a/artifacts/nft/DeprecatedNFTTest5.ral.json b/artifacts/nft/DeprecatedNFTTest5.ral.json index f7690c922..56213c734 100644 --- a/artifacts/nft/DeprecatedNFTTest5.ral.json +++ b/artifacts/nft/DeprecatedNFTTest5.ral.json @@ -1,5 +1,5 @@ { - "version": "v2.14.7", + "version": "v3.4.0", "name": "DeprecatedNFTTest5", "bytecode": "02020e1e010000000103d3ee6a5cd5ce0102010000000305d35c9ec8a3ce000c0c02", "codeHash": "8b1374f39db98c485af3dd05d0b0ce861e9528f290ca9dc0d7108e8b48b50161", @@ -21,9 +21,6 @@ "functions": [ { "name": "getTokenUri", - "usePreapprovedAssets": false, - "useAssetsInContract": false, - "isPublic": true, "paramNames": [], "paramTypes": [], "paramIsMutable": [], @@ -33,9 +30,6 @@ }, { "name": "returnMoreValues", - "usePreapprovedAssets": false, - "useAssetsInContract": false, - "isPublic": true, "paramNames": [], "paramTypes": [], "paramIsMutable": [], diff --git a/artifacts/nft/DeprecatedNFTTest6.ral.json b/artifacts/nft/DeprecatedNFTTest6.ral.json index 75337a63e..2295bb0c5 100644 --- a/artifacts/nft/DeprecatedNFTTest6.ral.json +++ b/artifacts/nft/DeprecatedNFTTest6.ral.json @@ -1,5 +1,5 @@ { - "version": "v2.14.7", + "version": "v3.4.0", "name": "DeprecatedNFTTest6", "bytecode": "02020e1c010000000103d3ee6a5cd5ce0102010000000204d30e0a3ac10c0d02", "codeHash": "8bc0d39f0607d4a771ec70ae1057b71dbcde404177cb3b25fd7d93d553a2b8cd", @@ -21,9 +21,6 @@ "functions": [ { "name": "getTokenUri", - "usePreapprovedAssets": false, - "useAssetsInContract": false, - "isPublic": true, "paramNames": [], "paramTypes": [], "paramIsMutable": [], @@ -33,9 +30,6 @@ }, { "name": "getArray", - "usePreapprovedAssets": false, - "useAssetsInContract": false, - "isPublic": true, "paramNames": [], "paramTypes": [], "paramIsMutable": [], diff --git a/artifacts/nft/DeprecatedNFTTest7.ral.json b/artifacts/nft/DeprecatedNFTTest7.ral.json index c465f4176..81ca99375 100644 --- a/artifacts/nft/DeprecatedNFTTest7.ral.json +++ b/artifacts/nft/DeprecatedNFTTest7.ral.json @@ -1,5 +1,5 @@ { - "version": "v2.14.7", + "version": "v3.4.0", "name": "DeprecatedNFTTest7", "bytecode": "02020e1d010000000103d3ee6a5cd5ce0102010000000204d3289dd321ce000b02", "codeHash": "b95c9acf088b090f5d9d34f28ab079cf22b9e53af8ae6864113c71172231ef4c", @@ -21,9 +21,6 @@ "functions": [ { "name": "getTokenUri", - "usePreapprovedAssets": false, - "useAssetsInContract": false, - "isPublic": true, "paramNames": [], "paramTypes": [], "paramIsMutable": [], @@ -33,9 +30,6 @@ }, { "name": "returnNegativeIndex", - "usePreapprovedAssets": false, - "useAssetsInContract": false, - "isPublic": true, "paramNames": [], "paramTypes": [], "paramIsMutable": [], diff --git a/artifacts/nft/MintNFTTest.ral.json b/artifacts/nft/MintNFTTest.ral.json index f802c2827..5d5080df9 100644 --- a/artifacts/nft/MintNFTTest.ral.json +++ b/artifacts/nft/MintNFTTest.ral.json @@ -1,5 +1,5 @@ { - "version": "v2.14.7", + "version": "v3.4.0", "name": "MintNFTTest", "bytecodeTemplate": "01010300000015{2}4c0ab413c40de0b6b3a7640000a2{1}0d0d{0}0107184a09b413c40de0b6b3a7640000a2{1}0d0d{0}010418", "fieldsSig": { @@ -22,9 +22,6 @@ "functions": [ { "name": "main", - "usePreapprovedAssets": true, - "useAssetsInContract": false, - "isPublic": true, "paramNames": [], "paramTypes": [], "paramIsMutable": [], diff --git a/artifacts/nft/NFTCollectionTest.ral.json b/artifacts/nft/NFTCollectionTest.ral.json index 99d9682d7..07a0a17b4 100644 --- a/artifacts/nft/NFTCollectionTest.ral.json +++ b/artifacts/nft/NFTCollectionTest.ral.json @@ -1,5 +1,5 @@ { - "version": "v2.14.7", + "version": "v3.4.0", "name": "NFTCollectionTest", "bytecode": "04050912402d4040408a010000000102ce0102010000000102a0000201000102010f16000001310c7b160040cb17011601c50d7b16010201000203000816010002170216001602410e7b01030105011fd3b8b591eeb41701b1a00016001406414c5048000313046413006417031702160113c40de0b6b3a7640000a2a00040ce00160216030d1601c91704a0000d2aa100160402", "codeHash": "087f9292bb326a4d39a6fac09928cb25edf2837718f830f3a166a937f8724779", @@ -27,9 +27,6 @@ "functions": [ { "name": "getCollectionUri", - "usePreapprovedAssets": false, - "useAssetsInContract": false, - "isPublic": true, "paramNames": [], "paramTypes": [], "paramIsMutable": [], @@ -39,9 +36,6 @@ }, { "name": "totalSupply", - "usePreapprovedAssets": false, - "useAssetsInContract": false, - "isPublic": true, "paramNames": [], "paramTypes": [], "paramIsMutable": [], @@ -51,9 +45,6 @@ }, { "name": "nftByIndex", - "usePreapprovedAssets": false, - "useAssetsInContract": false, - "isPublic": true, "paramNames": [ "index" ], @@ -69,9 +60,6 @@ }, { "name": "validateNFT", - "usePreapprovedAssets": false, - "useAssetsInContract": false, - "isPublic": true, "paramNames": [ "nftId", "nftIndex" @@ -88,9 +76,6 @@ }, { "name": "mint", - "usePreapprovedAssets": true, - "useAssetsInContract": false, - "isPublic": true, "paramNames": [ "nftUri" ], @@ -106,33 +91,6 @@ } ], "constants": [], - "enums": [ - { - "name": "ErrorCodes", - "fields": [ - { - "name": "IncorrectTokenIndex", - "value": { - "type": "U256", - "value": "0" - } - }, - { - "name": "NFTNotFound", - "value": { - "type": "U256", - "value": "1" - } - }, - { - "name": "NFTNotPartOfCollection", - "value": { - "type": "U256", - "value": "2" - } - } - ] - } - ], + "enums": [], "stdInterfaceId": "0002" } \ No newline at end of file diff --git a/artifacts/nft/NFTCollectionWithRoyaltyTest.ral.json b/artifacts/nft/NFTCollectionWithRoyaltyTest.ral.json index a3fafbb20..fdc911e63 100644 --- a/artifacts/nft/NFTCollectionWithRoyaltyTest.ral.json +++ b/artifacts/nft/NFTCollectionWithRoyaltyTest.ral.json @@ -1,8 +1,8 @@ { - "version": "v2.14.7", + "version": "v3.4.0", "name": "NFTCollectionWithRoyaltyTest", - "bytecode": "06080912402d40404050405b406c40b6010000000102ce0102010000000102a0000201000102010f16000001310c7b160040cb17011601c50d7b16010201000203000816010002170216001602410e7b0100020201061601ce032c1367102d0201010202000316001601a9010202020008b4ce02450d7b16001601a801030105011fd3b8b591eeb41701b1a00016001406414c5048000313046413006417031702160113c40de0b6b3a7640000a2a00040ce00160216030d1601c91704a0000d2aa100160402", - "codeHash": "919808beff802a8043d62c5ff23249f22dbfdbd2fae56264f5f108af59eb171e", + "bytecode": "06080912402d40404050405b406c40b6010000000102ce0102010000000102a0000201000102010f16000001310c7b160040cb17011601c50d7b16010201000203000816010002170216001602410e7b0100020201061601ce032c1367102d0201010202000316001601a9010202020008b4ce02450f7b16001601a801030105011fd3b8b591eeb41701b1a00016001406414c5048000313046413006417031702160113c40de0b6b3a7640000a2a00040ce00160216030d1601c91704a0000d2aa100160402", + "codeHash": "3b64d5e360566a4e4f568f773536a3ea74e66d12231aa44f19d2214ba87b38d6", "fieldsSig": { "names": [ "nftTemplateId", @@ -33,9 +33,6 @@ "functions": [ { "name": "getCollectionUri", - "usePreapprovedAssets": false, - "useAssetsInContract": false, - "isPublic": true, "paramNames": [], "paramTypes": [], "paramIsMutable": [], @@ -45,9 +42,6 @@ }, { "name": "totalSupply", - "usePreapprovedAssets": false, - "useAssetsInContract": false, - "isPublic": true, "paramNames": [], "paramTypes": [], "paramIsMutable": [], @@ -57,9 +51,6 @@ }, { "name": "nftByIndex", - "usePreapprovedAssets": false, - "useAssetsInContract": false, - "isPublic": true, "paramNames": [ "index" ], @@ -75,9 +66,6 @@ }, { "name": "validateNFT", - "usePreapprovedAssets": false, - "useAssetsInContract": false, - "isPublic": true, "paramNames": [ "nftId", "nftIndex" @@ -94,9 +82,6 @@ }, { "name": "royaltyAmount", - "usePreapprovedAssets": false, - "useAssetsInContract": false, - "isPublic": true, "paramNames": [ "tokenId", "salePrice" @@ -115,9 +100,6 @@ }, { "name": "payRoyalty", - "usePreapprovedAssets": true, - "useAssetsInContract": true, - "isPublic": true, "paramNames": [ "payer", "amount" @@ -134,9 +116,6 @@ }, { "name": "withdrawRoyalty", - "usePreapprovedAssets": false, - "useAssetsInContract": true, - "isPublic": true, "paramNames": [ "recipient", "amount" @@ -153,9 +132,6 @@ }, { "name": "mint", - "usePreapprovedAssets": true, - "useAssetsInContract": false, - "isPublic": true, "paramNames": [ "nftUri" ], @@ -171,40 +147,6 @@ } ], "constants": [], - "enums": [ - { - "name": "ErrorCodes", - "fields": [ - { - "name": "IncorrectTokenIndex", - "value": { - "type": "U256", - "value": "0" - } - }, - { - "name": "NFTNotFound", - "value": { - "type": "U256", - "value": "1" - } - }, - { - "name": "NFTNotPartOfCollection", - "value": { - "type": "U256", - "value": "2" - } - }, - { - "name": "CollectionOwnerAllowedOnly", - "value": { - "type": "U256", - "value": "1" - } - } - ] - } - ], + "enums": [], "stdInterfaceId": "000201" } \ No newline at end of file diff --git a/artifacts/nft/NFTTest.ral.json b/artifacts/nft/NFTTest.ral.json index d41c52679..28db0b8cf 100644 --- a/artifacts/nft/NFTTest.ral.json +++ b/artifacts/nft/NFTTest.ral.json @@ -1,5 +1,5 @@ { - "version": "v2.14.7", + "version": "v3.4.0", "name": "NFTTest", "bytecode": "04020914010000000102ce0202010000000203ce00ce0102", "codeHash": "4897086210869e612d82995b765a447c5319a55a56e8a0c3c07b4d9ca81e15b1", @@ -27,9 +27,6 @@ "functions": [ { "name": "getTokenUri", - "usePreapprovedAssets": false, - "useAssetsInContract": false, - "isPublic": true, "paramNames": [], "paramTypes": [], "paramIsMutable": [], @@ -39,9 +36,6 @@ }, { "name": "getCollectionIndex", - "usePreapprovedAssets": false, - "useAssetsInContract": false, - "isPublic": true, "paramNames": [], "paramTypes": [], "paramIsMutable": [], diff --git a/artifacts/nft/NFTTestStd.ral.json b/artifacts/nft/NFTTestStd.ral.json index 15a941b5c..1dc19e573 100644 --- a/artifacts/nft/NFTTestStd.ral.json +++ b/artifacts/nft/NFTTestStd.ral.json @@ -1,5 +1,5 @@ { - "version": "v3.3.0", + "version": "v3.4.0", "name": "NFTTestStd", "bytecode": "040309144020010000000102ce0202010000000203ce00ce0102010000000002d36811cfdd02", "codeHash": "b7ff3fa8dfacc7ae5edbabd6573d0699dffc5a0f07ad14023f682a201b7bce55", diff --git a/artifacts/nft/WithdrawNFTCollectionTest.ral.json b/artifacts/nft/WithdrawNFTCollectionTest.ral.json index 6786d5955..9eb74752a 100644 --- a/artifacts/nft/WithdrawNFTCollectionTest.ral.json +++ b/artifacts/nft/WithdrawNFTCollectionTest.ral.json @@ -1,5 +1,5 @@ { - "version": "v2.14.7", + "version": "v3.4.0", "name": "WithdrawNFTCollectionTest", "bytecodeTemplate": "01010300000006b4{1}0e0c{0}0106", "fieldsSig": { @@ -19,9 +19,6 @@ "functions": [ { "name": "main", - "usePreapprovedAssets": true, - "useAssetsInContract": false, - "isPublic": true, "paramNames": [], "paramTypes": [], "paramIsMutable": [], diff --git a/artifacts/nft/WrongNFTTest.ral.json b/artifacts/nft/WrongNFTTest.ral.json index f65d1e36b..199a0b54d 100644 --- a/artifacts/nft/WrongNFTTest.ral.json +++ b/artifacts/nft/WrongNFTTest.ral.json @@ -1,5 +1,5 @@ { - "version": "v2.14.7", + "version": "v3.4.0", "name": "WrongNFTTest", "bytecode": "04020917010000000102ce0202010000000206040c7bce00ce0102", "codeHash": "7dd2ed643a98b2a1a52a9b9e536fcdae60d961b583b8109f777d846bfdfcae8d", @@ -27,9 +27,6 @@ "functions": [ { "name": "getTokenUri", - "usePreapprovedAssets": false, - "useAssetsInContract": false, - "isPublic": true, "paramNames": [], "paramTypes": [], "paramIsMutable": [], @@ -39,9 +36,6 @@ }, { "name": "getCollectionIndex", - "usePreapprovedAssets": false, - "useAssetsInContract": false, - "isPublic": true, "paramNames": [], "paramTypes": [], "paramIsMutable": [], diff --git a/artifacts/sub/Sub.ral.json b/artifacts/sub/Sub.ral.json index dc37e58cb..d3f9da4de 100644 --- a/artifacts/sub/Sub.ral.json +++ b/artifacts/sub/Sub.ral.json @@ -1,5 +1,5 @@ { - "version": "v2.14.7", + "version": "v3.4.0", "name": "Sub", "bytecode": "01011e01000202010dd321939f9e05160016015fa00016002a16012ba100a00002", "codeHash": "3461ebfaca02ad0a3f587a5b67a461c0cbd82d14261407b1d9277ed4ad129234", @@ -30,9 +30,6 @@ "functions": [ { "name": "sub", - "usePreapprovedAssets": false, - "useAssetsInContract": false, - "isPublic": true, "paramNames": [ "array" ], diff --git a/artifacts/test/Assert.ral.json b/artifacts/test/Assert.ral.json index 705648860..2c2c36089 100644 --- a/artifacts/test/Assert.ral.json +++ b/artifacts/test/Assert.ral.json @@ -1,5 +1,5 @@ { - "version": "v3.1.4", + "version": "v3.4.0", "name": "Assert", "bytecode": "000110010000000006d362d460120d0e2f0f7b", "codeHash": "46dc5e3835be6551dacbf81565912ec67575aa77522312ceed88472817735d6b", @@ -18,100 +18,6 @@ "returnTypes": [] } ], - "constants": [ - { - "name": "Error", - "value": { - "type": "U256", - "value": "3" - } - }, - { - "name": "A", - "value": { - "type": "I256", - "value": "-3" - } - }, - { - "name": "B", - "value": { - "type": "Address", - "value": "1DrDyTr9RpRsQnDnXo2YRiPzPW4ooHX5LLoqXrqfMrpQH" - } - }, - { - "name": "C", - "value": { - "type": "ByteVec", - "value": "0011" - } - } - ], - "enums": [ - { - "name": "Addresses", - "fields": [ - { - "name": "A", - "value": { - "type": "Address", - "value": "1DrDyTr9RpRsQnDnXo2YRiPzPW4ooHX5LLoqXrqfMrpQH" - } - }, - { - "name": "B", - "value": { - "type": "Address", - "value": "14UAjZ3qcmEVKdTo84Kwf4RprTQi86w2TefnnGFjov9xF" - } - } - ] - }, - { - "name": "Numbers", - "fields": [ - { - "name": "A", - "value": { - "type": "U256", - "value": "0" - } - }, - { - "name": "B", - "value": { - "type": "U256", - "value": "1" - } - }, - { - "name": "C", - "value": { - "type": "U256", - "value": "115792089237316195423570985008687907853269984665640564039457584007913129639935" - } - } - ] - }, - { - "name": "ByteVecs", - "fields": [ - { - "name": "A", - "value": { - "type": "ByteVec", - "value": "00" - } - }, - { - "name": "B", - "value": { - "type": "ByteVec", - "value": "11" - } - } - ] - } - ] + "constants": [], + "enums": [] } \ No newline at end of file diff --git a/artifacts/test/CallScript0.ral.json b/artifacts/test/CallScript0.ral.json index 5db31c9ae..181095042 100644 --- a/artifacts/test/CallScript0.ral.json +++ b/artifacts/test/CallScript0.ral.json @@ -1,5 +1,5 @@ { - "version": "v3.2.0", + "version": "v3.4.0", "name": "CallScript0", "bytecodeTemplate": "01010000000206{1}0d0e{0}010302", "fieldsSig": { diff --git a/artifacts/test/CallScript1.ral.json b/artifacts/test/CallScript1.ral.json index 695a26501..8589a845a 100644 --- a/artifacts/test/CallScript1.ral.json +++ b/artifacts/test/CallScript1.ral.json @@ -1,5 +1,5 @@ { - "version": "v3.2.0", + "version": "v3.4.0", "name": "CallScript1", "bytecodeTemplate": "0101000000070a{1}0d0e{0}01030c11{2}010202", "fieldsSig": { diff --git a/artifacts/test/Debug.ral.json b/artifacts/test/Debug.ral.json index 71b93d36f..206b252ad 100644 --- a/artifacts/test/Debug.ral.json +++ b/artifacts/test/Debug.ral.json @@ -1,5 +1,5 @@ { - "version": "v2.14.7", + "version": "v3.4.0", "name": "Debug", "bytecode": "00010b010000000001d38681d619", "codeHash": "cc0e1966e6847f2c03384e78df1dcd9a0c2b5db1b7c1e901d66e26e2b000eb2c", @@ -12,9 +12,6 @@ "functions": [ { "name": "debug", - "usePreapprovedAssets": false, - "useAssetsInContract": false, - "isPublic": true, "paramNames": [], "paramTypes": [], "paramIsMutable": [], diff --git a/artifacts/test/InsertIntoMap.ral.json b/artifacts/test/InsertIntoMap.ral.json index 1a75d0378..82565443f 100644 --- a/artifacts/test/InsertIntoMap.ral.json +++ b/artifacts/test/InsertIntoMap.ral.json @@ -1,5 +1,5 @@ { - "version": "v3.2.0", + "version": "v3.4.0", "name": "InsertIntoMap", "bytecodeTemplate": "01010300020010{2}{3}17011700{1}d10f2ca2{1}160016010f0c{0}0100", "fieldsSig": { diff --git a/artifacts/test/MapTest.ral.json b/artifacts/test/MapTest.ral.json index af529a961..36a86072d 100644 --- a/artifacts/test/MapTest.ral.json +++ b/artifacts/test/MapTest.ral.json @@ -1,5 +1,5 @@ { - "version": "v3.2.0", + "version": "v3.4.0", "name": "MapTest", "bytecode": "0004405c40dc4153418001030303001fd3a9cdcc691600d1a2140a5f5f6d61705f5f305f5f160047441601b11602d202011600d1a2140a5f5f6d61705f5f315f5f16014044b11602d201011600d1a2140a5f5f6d61705f5f325f5f1402001144b11602d2010101000104004036d3c50ed2bb0c0d0d140a5f5f6d61705f5f305f5f16004744cb1703160301000c0d0d160301011702170116020d2a0c0e0c140a5f5f6d61705f5f305f5f16004744cb010216020d2a0c0e0c140a5f5f6d61705f5f315f5f16014044cb010216020d2a0c0e0c140a5f5f6d61705f5f325f5f1402001144cb01020100010400402dd392ac08660c0d0d140a5f5f6d61705f5f305f5f16004744cb1703160301000c0d0d160301011702170116000d0c140a5f5f6d61705f5f305f5f16004744cb010316000d0c140a5f5f6d61705f5f315f5f16014044cb010316000d0c140a5f5f6d61705f5f325f5f1402001144cb0103010001020212d3143f7dc50c0d0d140a5f5f6d61705f5f305f5f16004744cb1701160101000c0d0d1601010102", "codeHash": "9c0dad73dd47255270a366794f84539f06816e30c68b1f1cca767707fa8db596", diff --git a/artifacts/test/MetaData.ral.json b/artifacts/test/MetaData.ral.json index 9560d9993..1beea7472 100644 --- a/artifacts/test/MetaData.ral.json +++ b/artifacts/test/MetaData.ral.json @@ -1,5 +1,5 @@ { - "version": "v2.14.7", + "version": "v3.4.0", "name": "MetaData", "bytecode": "000319402c4033010300000006d38d0b3636b4b413c40de0b6b3a7640000a702000200000004b213c40de0b6b3a7640000a90200000000000102", "codeHash": "af0b3119565ef5f833f7b3514005a6b00ac9957d5a7779765edfc6e6ce6321c5", @@ -12,9 +12,6 @@ "functions": [ { "name": "foo", - "usePreapprovedAssets": true, - "useAssetsInContract": false, - "isPublic": true, "paramNames": [], "paramTypes": [], "paramIsMutable": [], @@ -22,9 +19,6 @@ }, { "name": "bar", - "usePreapprovedAssets": false, - "useAssetsInContract": true, - "isPublic": false, "paramNames": [], "paramTypes": [], "paramIsMutable": [], @@ -32,9 +26,6 @@ }, { "name": "baz", - "usePreapprovedAssets": false, - "useAssetsInContract": false, - "isPublic": false, "paramNames": [], "paramTypes": [], "paramIsMutable": [], diff --git a/artifacts/test/OwnerOnly.ral.json b/artifacts/test/OwnerOnly.ral.json index 3ba0c9504..1ea330ba1 100644 --- a/artifacts/test/OwnerOnly.ral.json +++ b/artifacts/test/OwnerOnly.ral.json @@ -1,5 +1,5 @@ { - "version": "v2.14.7", + "version": "v3.4.0", "name": "OwnerOnly", "bytecode": "010111010000000006d3bf853dbdb4ce00450c7b", "codeHash": "c8ecfd7b7e1f3d0169d80e0abb59702516eeff301d47e0e7be70a631bd9414ca", @@ -18,9 +18,6 @@ "functions": [ { "name": "testOwner", - "usePreapprovedAssets": false, - "useAssetsInContract": false, - "isPublic": true, "paramNames": [], "paramTypes": [], "paramIsMutable": [], diff --git a/artifacts/test/RemoveFromMap.ral.json b/artifacts/test/RemoveFromMap.ral.json index 771f1161e..a6bb63e73 100644 --- a/artifacts/test/RemoveFromMap.ral.json +++ b/artifacts/test/RemoveFromMap.ral.json @@ -1,5 +1,5 @@ { - "version": "v3.2.0", + "version": "v3.4.0", "name": "RemoveFromMap", "bytecodeTemplate": "01010300000005{1}0d0c{0}0102", "fieldsSig": { diff --git a/artifacts/test/TemplateArrayVar.ral.json b/artifacts/test/TemplateArrayVar.ral.json index 539312253..9f6b8a1ec 100644 --- a/artifacts/test/TemplateArrayVar.ral.json +++ b/artifacts/test/TemplateArrayVar.ral.json @@ -1,5 +1,5 @@ { - "version": "v2.14.7", + "version": "v3.4.0", "name": "TemplateArrayVar", "bytecodeTemplate": "010103000e00408d{1}{2}{3}{4}1703170217011700{6}{7}{8}170617051704{0}18{5}1816030f2f16020e2f1a16010d2f1a16000c2f1a0c7b160016011708170716070c2f16080d2f1a0c7b16021603170a170916090e2f160a0f2f1a0c7b16060e2f16050d2f1a16040c2f1a0c7b0c170b160b0e314c40260c170c160c0e314c1b160b7a0e314d0e2c160c7a0e314d2a78160b0e2c160c2a2f0c7b160c0d2a170c4a21160b0d2a170b4a7fd60c170d160d0f314c11160d7a0f314d102a78160d2f0c7b160d0d2a170d4a2b", "fieldsSig": { @@ -25,9 +25,6 @@ "functions": [ { "name": "main", - "usePreapprovedAssets": true, - "useAssetsInContract": false, - "isPublic": true, "paramNames": [], "paramTypes": [], "paramIsMutable": [], diff --git a/artifacts/test/TestAssert.ral.json b/artifacts/test/TestAssert.ral.json index 0db4ad660..65b5594fb 100644 --- a/artifacts/test/TestAssert.ral.json +++ b/artifacts/test/TestAssert.ral.json @@ -1,5 +1,5 @@ { - "version": "v3.1.4", + "version": "v3.4.0", "name": "TestAssert", "bytecodeTemplate": "010103000000040c0c{0}0100", "fieldsSig": { diff --git a/artifacts/test/UpdateMapValue.ral.json b/artifacts/test/UpdateMapValue.ral.json index 9cfcd91fa..50abd529b 100644 --- a/artifacts/test/UpdateMapValue.ral.json +++ b/artifacts/test/UpdateMapValue.ral.json @@ -1,5 +1,5 @@ { - "version": "v3.2.0", + "version": "v3.4.0", "name": "UpdateMapValue", "bytecodeTemplate": "01010300000005{1}0d0c{0}0101", "fieldsSig": { diff --git a/artifacts/test/UpdateUserAccount.ral.json b/artifacts/test/UpdateUserAccount.ral.json index 2c2ed16a6..ba68a0efc 100644 --- a/artifacts/test/UpdateUserAccount.ral.json +++ b/artifacts/test/UpdateUserAccount.ral.json @@ -1,5 +1,5 @@ { - "version": "v2.14.7", + "version": "v3.4.0", "name": "UpdateUserAccount", "bytecodeTemplate": "01010300040015{1}{2}{3}{4}17031702170117001600160116021603100c{0}0100{5}0d0c{0}0101", "fieldsSig": { @@ -22,9 +22,6 @@ "functions": [ { "name": "main", - "usePreapprovedAssets": true, - "useAssetsInContract": false, - "isPublic": true, "paramNames": [], "paramTypes": [], "paramIsMutable": [], diff --git a/artifacts/test/UserAccount.ral.json b/artifacts/test/UserAccount.ral.json index 30c611943..37f8336c6 100644 --- a/artifacts/test/UserAccount.ral.json +++ b/artifacts/test/UserAccount.ral.json @@ -1,5 +1,5 @@ { - "version": "v2.14.7", + "version": "v3.4.0", "name": "UserAccount", "bytecode": "080340284037404d010004040013d388b067e71600ce01410c7b1602ce02410c7b1601a1021603a103160116032aa101010001010003d3185a39e11600a100010000000507d384cc0995a001ce01a002ce02a00302", "codeHash": "4e9f7eac1b76eaa2268b5af6ebb5640252892dc170aad6c1ee7b639131a55816", @@ -27,9 +27,6 @@ "functions": [ { "name": "updateBalance", - "usePreapprovedAssets": false, - "useAssetsInContract": false, - "isPublic": true, "paramNames": [ "tokens" ], @@ -43,9 +40,6 @@ }, { "name": "updateAddress", - "usePreapprovedAssets": false, - "useAssetsInContract": false, - "isPublic": true, "paramNames": [ "newAddress" ], @@ -59,9 +53,6 @@ }, { "name": "getBalances", - "usePreapprovedAssets": false, - "useAssetsInContract": false, - "isPublic": true, "paramNames": [], "paramTypes": [], "paramIsMutable": [], diff --git a/artifacts/test/Warnings.ral.json b/artifacts/test/Warnings.ral.json index 43ff5b697..c87b9ae49 100644 --- a/artifacts/test/Warnings.ral.json +++ b/artifacts/test/Warnings.ral.json @@ -1,5 +1,5 @@ { - "version": "v2.14.7", + "version": "v3.4.0", "name": "Warnings", "bytecode": "02010c010002020002d31bbce4a602", "codeHash": "873e095edb39cdb4b11b1157003daeacad06d259a938cd270e22b8e89b75feea", @@ -21,9 +21,6 @@ "functions": [ { "name": "foo", - "usePreapprovedAssets": false, - "useAssetsInContract": false, - "isPublic": true, "paramNames": [ "x", "y" diff --git a/artifacts/token/FakeTokenTest.ral.json b/artifacts/token/FakeTokenTest.ral.json index 4208d7d66..ad19c331c 100644 --- a/artifacts/token/FakeTokenTest.ral.json +++ b/artifacts/token/FakeTokenTest.ral.json @@ -1,5 +1,5 @@ { - "version": "v2.14.7", + "version": "v3.4.0", "name": "FakeTokenTest", "bytecode": "010509121b4024402f010000000103044d18010000000103044d18010000000103044d18010000000103044d18010000000001d38d0b3636", "codeHash": "52f971cb44d54a5353e94dc8db991d2726f76760af782e79bd8a66a9b5b294b7", @@ -18,9 +18,6 @@ "functions": [ { "name": "getSymbol", - "usePreapprovedAssets": false, - "useAssetsInContract": false, - "isPublic": true, "paramNames": [], "paramTypes": [], "paramIsMutable": [], @@ -30,9 +27,6 @@ }, { "name": "getName", - "usePreapprovedAssets": false, - "useAssetsInContract": false, - "isPublic": true, "paramNames": [], "paramTypes": [], "paramIsMutable": [], @@ -42,9 +36,6 @@ }, { "name": "getDecimals", - "usePreapprovedAssets": false, - "useAssetsInContract": false, - "isPublic": true, "paramNames": [], "paramTypes": [], "paramIsMutable": [], @@ -54,9 +45,6 @@ }, { "name": "getTotalSupply", - "usePreapprovedAssets": false, - "useAssetsInContract": false, - "isPublic": true, "paramNames": [], "paramTypes": [], "paramIsMutable": [], @@ -66,9 +54,6 @@ }, { "name": "foo", - "usePreapprovedAssets": false, - "useAssetsInContract": false, - "isPublic": true, "paramNames": [], "paramTypes": [], "paramIsMutable": [], diff --git a/artifacts/token/TokenTest.ral.json b/artifacts/token/TokenTest.ral.json index 1fea0726a..dcb7463f6 100644 --- a/artifacts/token/TokenTest.ral.json +++ b/artifacts/token/TokenTest.ral.json @@ -1,5 +1,5 @@ { - "version": "v2.14.7", + "version": "v3.4.0", "name": "TokenTest", "bytecode": "050409121b4024010000000102ce0002010000000102ce0102010000000102ce0202010000000102ce0302", "codeHash": "a2800413eb2c5c23d48068db23df5f8eeaba04653e12c8ed59d589720d96dadd", @@ -30,9 +30,6 @@ "functions": [ { "name": "getSymbol", - "usePreapprovedAssets": false, - "useAssetsInContract": false, - "isPublic": true, "paramNames": [], "paramTypes": [], "paramIsMutable": [], @@ -42,9 +39,6 @@ }, { "name": "getName", - "usePreapprovedAssets": false, - "useAssetsInContract": false, - "isPublic": true, "paramNames": [], "paramTypes": [], "paramIsMutable": [], @@ -54,9 +48,6 @@ }, { "name": "getDecimals", - "usePreapprovedAssets": false, - "useAssetsInContract": false, - "isPublic": true, "paramNames": [], "paramTypes": [], "paramIsMutable": [], @@ -66,9 +57,6 @@ }, { "name": "getTotalSupply", - "usePreapprovedAssets": false, - "useAssetsInContract": false, - "isPublic": true, "paramNames": [], "paramTypes": [], "paramIsMutable": [], diff --git a/artifacts/token/TokenTestStd.ral.json b/artifacts/token/TokenTestStd.ral.json index a90b558f0..c17f69510 100644 --- a/artifacts/token/TokenTestStd.ral.json +++ b/artifacts/token/TokenTestStd.ral.json @@ -1,5 +1,5 @@ { - "version": "v3.3.0", + "version": "v3.4.0", "name": "TokenTestStd", "bytecode": "050509121b40244030010000000102ce0002010000000102ce0102010000000102ce0202010000000102ce0302010000000002d36811cfdd02", "codeHash": "4aa5c769148cada8eeb1cd3791f6e793ed92009ac79ebb64dc79d4d7f2969c8b", diff --git a/artifacts/ts/Assert.ts b/artifacts/ts/Assert.ts index 60e5b8c2d..213905b39 100644 --- a/artifacts/ts/Assert.ts +++ b/artifacts/ts/Assert.ts @@ -86,25 +86,6 @@ class Factory extends ContractFactory { return encodeContractFields({}, this.contract.fieldsSig, AllStructs); } - consts = { - Error: BigInt("3"), - A: BigInt("-3"), - B: "1DrDyTr9RpRsQnDnXo2YRiPzPW4ooHX5LLoqXrqfMrpQH", - C: "0011", - Addresses: { - A: "1DrDyTr9RpRsQnDnXo2YRiPzPW4ooHX5LLoqXrqfMrpQH", - B: "14UAjZ3qcmEVKdTo84Kwf4RprTQi86w2TefnnGFjov9xF", - }, - Numbers: { - A: BigInt("0"), - B: BigInt("1"), - C: BigInt( - "115792089237316195423570985008687907853269984665640564039457584007913129639935" - ), - }, - ByteVecs: { A: "00", B: "11" }, - }; - at(address: string): AssertInstance { return new AssertInstance(address); } diff --git a/artifacts/ts/Greeter.ts b/artifacts/ts/Greeter.ts index da76fb2f0..4ddac5ecf 100644 --- a/artifacts/ts/Greeter.ts +++ b/artifacts/ts/Greeter.ts @@ -127,7 +127,7 @@ export const Greeter = new Factory( Contract.fromJson( GreeterContractJson, "", - "3813cf61a6e0f126463190119cd861a14ca9c2f92839e193c4f9934517b02477", + "4bbf82c83dcb0a3df905c290fbc12a19ce5160a7b655c1a347913481da12d747", AllStructs ) ); diff --git a/artifacts/ts/NFTCollectionTest.ts b/artifacts/ts/NFTCollectionTest.ts index a14d77b18..5adb75080 100644 --- a/artifacts/ts/NFTCollectionTest.ts +++ b/artifacts/ts/NFTCollectionTest.ts @@ -138,14 +138,6 @@ class Factory extends ContractFactory< return this.contract.getInitialFieldsWithDefaultValues() as NFTCollectionTestTypes.Fields; } - consts = { - ErrorCodes: { - IncorrectTokenIndex: BigInt("0"), - NFTNotFound: BigInt("1"), - NFTNotPartOfCollection: BigInt("2"), - }, - }; - at(address: string): NFTCollectionTestInstance { return new NFTCollectionTestInstance(address); } diff --git a/artifacts/ts/NFTCollectionWithRoyaltyTest.ts b/artifacts/ts/NFTCollectionWithRoyaltyTest.ts index 9e6a5766d..ad6da1d6e 100644 --- a/artifacts/ts/NFTCollectionWithRoyaltyTest.ts +++ b/artifacts/ts/NFTCollectionWithRoyaltyTest.ts @@ -173,15 +173,6 @@ class Factory extends ContractFactory< return this.contract.getInitialFieldsWithDefaultValues() as NFTCollectionWithRoyaltyTestTypes.Fields; } - consts = { - ErrorCodes: { - IncorrectTokenIndex: BigInt("0"), - NFTNotFound: BigInt("1"), - NFTNotPartOfCollection: BigInt("2"), - CollectionOwnerAllowedOnly: BigInt("1"), - }, - }; - at(address: string): NFTCollectionWithRoyaltyTestInstance { return new NFTCollectionWithRoyaltyTestInstance(address); } @@ -270,7 +261,7 @@ export const NFTCollectionWithRoyaltyTest = new Factory( Contract.fromJson( NFTCollectionWithRoyaltyTestContractJson, "", - "919808beff802a8043d62c5ff23249f22dbfdbd2fae56264f5f108af59eb171e", + "3b64d5e360566a4e4f568f773536a3ea74e66d12231aa44f19d2214ba87b38d6", AllStructs ) ); diff --git a/artifacts/ts/constants.ts b/artifacts/ts/constants.ts new file mode 100644 index 000000000..9dd86c9b0 --- /dev/null +++ b/artifacts/ts/constants.ts @@ -0,0 +1,27 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +export const AssertError = BigInt("3"); +export const A = BigInt("-3"); +export const B = "1DrDyTr9RpRsQnDnXo2YRiPzPW4ooHX5LLoqXrqfMrpQH"; +export const ConstantTrue = true; +export const ConstantFalse = false; +export const Numbers = { + A: BigInt("0"), + B: BigInt("1"), + C: BigInt( + "115792089237316195423570985008687907853269984665640564039457584007913129639935" + ), +}; +export const Addresses = { + A: "1DrDyTr9RpRsQnDnXo2YRiPzPW4ooHX5LLoqXrqfMrpQH", + B: "14UAjZ3qcmEVKdTo84Kwf4RprTQi86w2TefnnGFjov9xF", +}; +export const ByteVecs = { A: "00", B: "11" }; +export const ErrorCodes = { + IncorrectTokenIndex: BigInt("0"), + NFTNotFound: BigInt("1"), + NFTNotPartOfCollection: BigInt("2"), + CollectionOwnerAllowedOnly: BigInt("3"), +}; diff --git a/contracts/constants.ral b/contracts/constants.ral new file mode 100644 index 000000000..af4dc8e33 --- /dev/null +++ b/contracts/constants.ral @@ -0,0 +1,28 @@ +const AssertError = 3 +const A = -3i +const B = @1DrDyTr9RpRsQnDnXo2YRiPzPW4ooHX5LLoqXrqfMrpQH +const ConstantTrue = true +const ConstantFalse = false + +enum Numbers { + A = 0 + B = 1 + C = 115792089237316195423570985008687907853269984665640564039457584007913129639935 +} + +enum Addresses { + A = @1DrDyTr9RpRsQnDnXo2YRiPzPW4ooHX5LLoqXrqfMrpQH + B = @14UAjZ3qcmEVKdTo84Kwf4RprTQi86w2TefnnGFjov9xF +} + +enum ByteVecs { + A = #00 + B = #11 +} + +enum ErrorCodes { + IncorrectTokenIndex = 0 + NFTNotFound = 1 + NFTNotPartOfCollection = 2 + CollectionOwnerAllowedOnly = 3 +} \ No newline at end of file diff --git a/contracts/nft/nft_collection_test_base.ral b/contracts/nft/nft_collection_test_base.ral index 3bfb37d0e..765ae6732 100644 --- a/contracts/nft/nft_collection_test_base.ral +++ b/contracts/nft/nft_collection_test_base.ral @@ -5,12 +5,6 @@ Abstract Contract NFTCollectionTestBase( collectionUri: ByteVec, mut totalSupply: U256 ) implements INFTCollection { - enum ErrorCodes { - IncorrectTokenIndex = 0 - NFTNotFound = 1 - NFTNotPartOfCollection = 2 - } - pub fn getCollectionUri() -> ByteVec { return collectionUri } diff --git a/contracts/nft/nft_collection_with_royalty_test.ral b/contracts/nft/nft_collection_with_royalty_test.ral index b901c2c53..5833434c4 100644 --- a/contracts/nft/nft_collection_with_royalty_test.ral +++ b/contracts/nft/nft_collection_with_royalty_test.ral @@ -8,10 +8,6 @@ Contract NFTCollectionWithRoyaltyTest( mut totalSupply: U256 ) extends NFTCollectionTestBase(nftTemplateId, collectionUri, totalSupply) implements INFTCollectionWithRoyalty { - enum ErrorCodes { - CollectionOwnerAllowedOnly = 1 - } - pub fn royaltyAmount(@unused tokenId: ByteVec, salePrice: U256) -> (U256) { return salePrice * royaltyRate / 10000 } diff --git a/contracts/test/assert.ral b/contracts/test/assert.ral index fc35406ad..139b58460 100644 --- a/contracts/test/assert.ral +++ b/contracts/test/assert.ral @@ -1,27 +1,6 @@ Contract Assert() { - const Error = 3 - const A = -3i - const B = @1DrDyTr9RpRsQnDnXo2YRiPzPW4ooHX5LLoqXrqfMrpQH - const C = #0011 - - enum Numbers { - A = 0 - B = 1 - C = 115792089237316195423570985008687907853269984665640564039457584007913129639935 - } - - enum Addresses { - A = @1DrDyTr9RpRsQnDnXo2YRiPzPW4ooHX5LLoqXrqfMrpQH - B = @14UAjZ3qcmEVKdTo84Kwf4RprTQi86w2TefnnGFjov9xF - } - - enum ByteVecs { - A = #00 - B = #11 - } - pub fn test() -> () { - assert!(1 == 2, Error) + assert!(1 == 2, AssertError) } } diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index 5887e0d07..91adfbe02 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -31,7 +31,7 @@ services: condition: service_healthy alephium: - image: alephium/alephium:v3.3.0 + image: alephium/alephium:v3.4.0 restart: unless-stopped ports: - 19973:19973/tcp diff --git a/gen.ts b/gen.ts index 73580c52c..2011ff180 100644 --- a/gen.ts +++ b/gen.ts @@ -22,7 +22,14 @@ import { web3 } from '@alephium/web3' async function gen() { web3.setCurrentNodeProvider('http://127.0.0.1:22973') - const project = await Project.compile({ errorOnWarnings: false }) + const project = await Project.compile( + { errorOnWarnings: false }, + '.', + Project.DEFAULT_CONTRACTS_DIR, + Project.DEFAULT_ARTIFACTS_DIR, + undefined, + true + ) codegen(project) } diff --git a/packages/cli/src/codegen.ts b/packages/cli/src/codegen.ts index f9efc28f4..86552d496 100644 --- a/packages/cli/src/codegen.ts +++ b/packages/cli/src/codegen.ts @@ -228,9 +228,9 @@ function genEventIndex(contract: Contract): string { return `eventIndex = { ${defs} }` } -function genConsts(contract: Contract): string { - const constants = genConstants(contract.constants) - const enums = genEnums(contract.enums) +function genLocalConsts(contract: Contract): string { + const constants = genConstants(contract.constants, true) + const enums = genEnums(contract.enums, true) const constDefs = constants.concat(enums) if (constDefs.length === 0) { return '' @@ -238,17 +238,21 @@ function genConsts(contract: Contract): string { return `consts = { ${constDefs.join(',')} }` } -function genConstants(constants: Constant[]): string[] { - return constants.map((constant) => `${constant.name}: ${nodeValToString(constant.value)}`) +function genConstants(constants: Constant[], isLocal: boolean): string[] { + const prefix = isLocal ? '' : 'export const ' + const separator = isLocal ? ': ' : ' = ' + return constants.map((constant) => `${prefix}${constant.name}${separator}${nodeValToString(constant.value)}`) } -function genEnum(enumDef: Enum): string { +function genEnum(enumDef: Enum, isLocal: boolean): string { + const prefix = isLocal ? '' : 'export const ' + const separator = isLocal ? ': ' : ' = ' const fields = enumDef.fields.map((field) => `${field.name}: ${nodeValToString(field.value)}`).join(',') - return `${enumDef.name}: { ${fields} }` + return `${prefix}${enumDef.name}${separator}{ ${fields} }` } -function genEnums(enums: Enum[]): string[] { - return enums.map((enumDef) => genEnum(enumDef)) +function genEnums(enums: Enum[], isLocal: boolean): string[] { + return enums.map((enumDef) => genEnum(enumDef, isLocal)) } function genGetContractEventsCurrentCount(contract: Contract): string { @@ -524,7 +528,7 @@ function genContract(contract: Contract, artifactRelativePath: string): string { ${genEncodeFieldsFunc(contract)} ${genGetInitialFieldsWithDefaultValues(contract)} ${genEventIndex(contract)} - ${genConsts(contract)} + ${genLocalConsts(contract)} ${genAttach(getInstanceName(contract))} ${genTestMethods(contract)} } @@ -869,6 +873,19 @@ function genStructTypes(outDir: string) { formatAndSaveToFile(sourcePath, sourceCode) } +function genGlobalConstants(project: Project, outDir: string) { + const constants = project.constants + const enums = project.enums + if (constants.length === 0 && enums.length === 0) return + const sourceCode = ` + ${header} + ${genConstants(constants, false).join('\n')} + ${genEnums(enums, false).join('\n')} + ` + const sourcePath = path.join(outDir, 'constants.ts') + formatAndSaveToFile(sourcePath, sourceCode) +} + export function codegen(project: Project) { currentProject = project const artifactDir = project.artifactsRootDir @@ -882,6 +899,7 @@ export function codegen(project: Project) { const exports: string[] = [] try { genStructTypes(outDir) + genGlobalConstants(project, outDir) genContracts(outDir, artifactDir, exports) const contractNames = exports.map((p) => p.slice(2)) genContractByCodeHash(outDir, contractNames) diff --git a/packages/cli/src/project.test.ts b/packages/cli/src/project.test.ts index ac31bf7a0..372a8442c 100644 --- a/packages/cli/src/project.test.ts +++ b/packages/cli/src/project.test.ts @@ -25,8 +25,7 @@ describe('project', () => { sourceFile: '', sourceCodeHash: hash, bytecodeDebugPatch: '', - codeHashDebug: '', - warnings: [] + codeHashDebug: '' } } diff --git a/packages/cli/src/project.ts b/packages/cli/src/project.ts index e2a1d7772..c868085e0 100644 --- a/packages/cli/src/project.ts +++ b/packages/cli/src/project.ts @@ -27,7 +27,9 @@ import { node, web3, WebCrypto, - CompilerOptions + CompilerOptions, + Constant, + Enum } from '@alephium/web3' import * as path from 'path' import fs from 'fs' @@ -63,7 +65,8 @@ enum SourceKind { Script = 1, AbstractContract = 2, Interface = 3, - Struct = 4 + Struct = 4, + Constants = 5 } export class SourceInfo { @@ -132,7 +135,6 @@ export type CodeInfo = { sourceCodeHash: string bytecodeDebugPatch: string codeHashDebug: string - warnings: string[] } type SourceInfoIndexes = { @@ -262,11 +264,17 @@ export class ProjectArtifact { function removeOldArtifacts(dir: string, sourceFiles: SourceInfo[]) { const files = fs.readdirSync(dir) + const hasConstant = sourceFiles.find((s) => s.type === SourceKind.Constants) !== undefined + const hasStruct = sourceFiles.find((s) => s.type === SourceKind.Struct) !== undefined files.forEach((file) => { const filePath = path.join(dir, file) const stat = fs.statSync(filePath) if (stat.isDirectory()) { removeOldArtifacts(filePath, sourceFiles) + } else if (filePath.endsWith(Project.constantArtifactFileName)) { + if (!hasConstant) fs.unlinkSync(filePath) + } else if (filePath.endsWith(Project.structArtifactFileName)) { + if (!hasStruct) fs.unlinkSync(filePath) } else if (filePath.endsWith('.ral.json') || filePath.endsWith('.ral')) { const filename = path.basename(filePath) const artifactName = filename.slice(0, filename.indexOf('.')) @@ -289,6 +297,8 @@ export class Project { contracts: Map> scripts: Map> structs: Struct[] + constants: Constant[] + enums: Enum[] projectArtifact: ProjectArtifact readonly contractsRootDir: string @@ -311,6 +321,9 @@ export class Project { Project.structMatcher ] + static readonly structArtifactFileName = 'structs.ral.json' + static readonly constantArtifactFileName = 'constants.ral.json' + static buildProjectArtifact( fullNodeVersion: string, sourceInfos: SourceInfo[], @@ -324,8 +337,7 @@ export class Project { sourceFile: c.sourceInfo.contractRelativePath, sourceCodeHash: c.sourceInfo.sourceCodeHash, bytecodeDebugPatch: c.artifact.bytecodeDebugPatch, - codeHashDebug: c.artifact.codeHashDebug, - warnings: c.warnings + codeHashDebug: c.artifact.codeHashDebug }) }) scripts.forEach((s) => { @@ -333,8 +345,7 @@ export class Project { sourceFile: s.sourceInfo.contractRelativePath, sourceCodeHash: s.sourceInfo.sourceCodeHash, bytecodeDebugPatch: s.artifact.bytecodeDebugPatch, - codeHashDebug: '', - warnings: s.warnings + codeHashDebug: '' }) }) const compiledSize = contracts.size + scripts.size @@ -343,8 +354,7 @@ export class Project { sourceFile: c.contractRelativePath, sourceCodeHash: c.sourceCodeHash, bytecodeDebugPatch: '', - codeHashDebug: '', - warnings: [] + codeHashDebug: '' }) }) return new ProjectArtifact(fullNodeVersion, compilerOptions, files) @@ -357,6 +367,8 @@ export class Project { contracts: Map>, scripts: Map>, structs: Struct[], + constants: Constant[], + enums: Enum[], projectArtifact: ProjectArtifact ) { this.contractsRootDir = contractsRootDir @@ -365,17 +377,20 @@ export class Project { this.contracts = contracts this.scripts = scripts this.structs = structs + this.constants = constants + this.enums = enums this.projectArtifact = projectArtifact } static checkCompilerWarnings( contracts: Map>, scripts: Map>, + globalWarnings: string[], changedSources: string[], forceRecompile: boolean, errorOnWarnings: boolean ): void { - const warnings: string[] = [] + const warnings: string[] = forceRecompile ? globalWarnings : [] contracts.forEach((contract) => { if (Project.needToUpdate(forceRecompile, changedSources, contract.sourceInfo.name)) { warnings.push(...contract.warnings) @@ -415,7 +430,7 @@ export class Project { } private static async loadStructs(artifactsRootDir: string): Promise { - const filePath = path.join(artifactsRootDir, 'structs.ral.json') + const filePath = path.join(artifactsRootDir, Project.structArtifactFileName) if (!fs.existsSync(filePath)) return [] const content = await fsPromises.readFile(filePath) const json = JSON.parse(content.toString()) @@ -428,10 +443,34 @@ export class Project { private async saveStructsToFile(): Promise { if (this.structs.length === 0) return const structs = this.structs.map((s) => s.toJson()) - const filePath = path.join(this.artifactsRootDir, 'structs.ral.json') + const filePath = path.join(this.artifactsRootDir, Project.structArtifactFileName) return fsPromises.writeFile(filePath, JSON.stringify(structs, null, 2)) } + private static async loadConstants(artifactsRootDir: string): Promise<{ constants: Constant[]; enums: Enum[] }> { + const filePath = path.join(artifactsRootDir, Project.constantArtifactFileName) + if (!fs.existsSync(filePath)) return { constants: [], enums: [] } + const content = await fsPromises.readFile(filePath) + const json = JSON.parse(content.toString()) + let result: { constants: Constant[]; enums: Enum[] } = { constants: [], enums: [] } + if (json.constants) result = { ...result, constants: json.constants as Constant[] } + if (json.enums) result = { ...result, enums: json.enums as Enum[] } + return result + } + + private async saveConstantsToFile(): Promise { + if (this.constants.length === 0 && this.enums.length === 0) return + const object = {} + if (this.constants.length !== 0) { + object['constants'] = this.constants + } + if (this.enums.length !== 0) { + object['enums'] = this.enums + } + const filePath = path.join(this.artifactsRootDir, 'constants.ral.json') + return fsPromises.writeFile(filePath, JSON.stringify(object, null, 2)) + } + private static needToUpdate(forceRecompile: boolean, changedSources: string[], name: string): boolean { return forceRecompile || changedSources.includes(name) } @@ -481,6 +520,7 @@ export class Project { } } await this.saveStructsToFile() + await this.saveConstantsToFile() await this.saveProjectArtifact(projectRootDir, forceRecompile, changedSources) } @@ -595,7 +635,14 @@ export class Project { scripts, compilerOptions ) - Project.checkCompilerWarnings(contracts, scripts, changedSources, forceRecompile, errorOnWarnings) + Project.checkCompilerWarnings( + contracts, + scripts, + result.warnings ?? [], + changedSources, + forceRecompile, + errorOnWarnings + ) const project = new Project( contractsRootDir, artifactsRootDir, @@ -603,6 +650,8 @@ export class Project { contracts, scripts, structs, + result.constants ?? [], + result.enums ?? [], projectArtifact ) await project.saveArtifactsToFile(projectRootDir, forceRecompile, changedSources) @@ -628,12 +677,12 @@ export class Project { const contracts = new Map>() const scripts = new Map>() const structs = await Project.loadStructs(artifactsRootDir) + const constants = await Project.loadConstants(artifactsRootDir) for (const sourceInfo of sourceInfos) { const info = projectArtifact.infos.get(sourceInfo.name) if (typeof info === 'undefined') { throw Error(`Unable to find project info for ${sourceInfo.name}, please rebuild the project`) } - const warnings = info.warnings const artifactDir = sourceInfo.getArtifactPath(artifactsRootDir) if (sourceInfo.type === SourceKind.Contract) { const artifact = await Contract.fromArtifactFile( @@ -642,15 +691,24 @@ export class Project { info.codeHashDebug, structs ) - contracts.set(artifact.name, new Compiled(sourceInfo, artifact, warnings)) + contracts.set(artifact.name, new Compiled(sourceInfo, artifact, [])) } else if (sourceInfo.type === SourceKind.Script) { const artifact = await Script.fromArtifactFile(artifactDir, info.bytecodeDebugPatch, structs) - scripts.set(artifact.name, new Compiled(sourceInfo, artifact, warnings)) + scripts.set(artifact.name, new Compiled(sourceInfo, artifact, [])) } } - Project.checkCompilerWarnings(contracts, scripts, changedSources, forceRecompile, errorOnWarnings) - return new Project(contractsRootDir, artifactsRootDir, sourceInfos, contracts, scripts, structs, projectArtifact) + return new Project( + contractsRootDir, + artifactsRootDir, + sourceInfos, + contracts, + scripts, + structs, + constants.constants, + constants.enums, + projectArtifact + ) } catch (error) { console.log(`Failed to load artifacts, error: ${error}, try to re-compile contracts...`) return Project.compile_( @@ -742,13 +800,19 @@ export class Project { throw new Error(`Invalid import statements, source: ${sourcePath}`) } const sourceInfos = externalSourceInfos + let isConstantsFile = true for (const matcher of this.matchers) { - const results = sourceStr.matchAll(matcher.matcher) + const results = Array.from(sourceStr.matchAll(matcher.matcher)) + if (isConstantsFile) isConstantsFile = results.length === 0 for (const result of results) { const sourceInfo = await SourceInfo.from(matcher.type, result[1], sourceStr, contractRelativePath, isExternal) sourceInfos.push(sourceInfo) } } + if (isConstantsFile) { + const name = path.basename(sourcePath, path.extname(sourcePath)) + sourceInfos.push(await SourceInfo.from(SourceKind.Constants, name, sourceStr, contractRelativePath, false)) + } return sourceInfos } @@ -796,6 +860,7 @@ export class Project { const projectArtifact = await ProjectArtifact.from(projectRootDir) const changedSources = projectArtifact?.getChangedSources(sourceFiles) ?? sourceFiles.map((s) => s.name) if ( + forceRecompile || projectArtifact === undefined || projectArtifact.needToReCompile(nodeCompilerOptions, fullNodeVersion) || changedSources.length > 0 diff --git a/packages/web3/package.json b/packages/web3/package.json index 62bb25443..2d1441192 100644 --- a/packages/web3/package.json +++ b/packages/web3/package.json @@ -33,7 +33,7 @@ }, "author": "Alephium dev ", "config": { - "alephium_version": "3.3.0", + "alephium_version": "3.4.0", "explorer_backend_version": "2.0.0" }, "scripts": { diff --git a/packages/web3/src/api/api-alephium.ts b/packages/web3/src/api/api-alephium.ts index 744263193..7f3fe7a5b 100644 --- a/packages/web3/src/api/api-alephium.ts +++ b/packages/web3/src/api/api-alephium.ts @@ -503,6 +503,9 @@ export interface CompileProjectResult { contracts: CompileContractResult[] scripts: CompileScriptResult[] structs?: StructSig[] + constants?: Constant[] + enums?: Enum[] + warnings?: string[] } /** CompileScriptResult */ @@ -632,6 +635,12 @@ export interface ContractState { asset: AssetState } +/** CurrentDifficulty */ +export interface CurrentDifficulty { + /** @format bigint */ + difficulty: string +} + /** DebugMessage */ export interface DebugMessage { /** @format address */ @@ -738,6 +747,11 @@ export interface Group { group: number } +/** HashRateResponse */ +export interface HashRateResponse { + hashrate: string +} + /** HashesAtHeight */ export interface HashesAtHeight { headers: string[] @@ -1481,7 +1495,7 @@ export class HttpClient { /** * @title Alephium API - * @version 3.3.0 + * @version 3.4.0 * @baseUrl ../ */ export class Api extends HttpClient { @@ -2019,7 +2033,7 @@ export class Api extends HttpClient - this.request({ + this.request({ path: `/infos/history-hashrate`, method: 'GET', query: query, @@ -2045,7 +2059,7 @@ export class Api extends HttpClient - this.request({ + this.request({ path: `/infos/current-hashrate`, method: 'GET', query: query, @@ -2062,7 +2076,7 @@ export class Api extends HttpClient - this.request({ + this.request({ path: `/infos/current-difficulty`, method: 'GET', format: 'json', diff --git a/packages/web3/src/codec/script-codec.test.ts b/packages/web3/src/codec/script-codec.test.ts index 3225fac71..d2b3f8b00 100644 --- a/packages/web3/src/codec/script-codec.test.ts +++ b/packages/web3/src/codec/script-codec.test.ts @@ -25,7 +25,8 @@ import { U256Const0, U256Const1, U256Eq, - StoreLocal + StoreLocal, + CallExternalBySelector } from './instr-codec' import { Script, bs58, web3, Fields, FieldsSig, buildScriptByteCode, hexToBinUnsafe, binToHex } from '@alephium/web3' import { randomContractId, testAddress } from '@alephium/web3-test' @@ -209,7 +210,7 @@ describe('Encode & decode scripts', function () { U256Const0, U256Const1, LoadLocal(1), - CallExternal(0), + CallExternalBySelector(-1792051845), U256Const1, U256Eq, U256Const0, diff --git a/test/contract.test.ts b/test/contract.test.ts index 36a13541e..e96d6341d 100644 --- a/test/contract.test.ts +++ b/test/contract.test.ts @@ -65,6 +65,7 @@ import { UserAccount, NFTTest, OwnerOnly, TokenTest, MapTest, UserAccountTypes } import { randomBytes } from 'crypto' import { TokenBalance } from '../artifacts/ts/types' import { ProjectArtifact, Project } from '../packages/cli/src/project' +import { A, Addresses, B, ByteVecs, AssertError, Numbers, ConstantTrue, ConstantFalse } from '../artifacts/ts/constants' describe('contract', function () { let signer: PrivateKeyWallet @@ -258,12 +259,13 @@ describe('contract', function () { it('should load source files by order', async () => { const sourceFiles = await Project['loadSourceFiles']('.', './contracts') // `loadSourceFiles` is a private method - expect(sourceFiles.length).toEqual(52) + expect(sourceFiles.length).toEqual(53) sourceFiles.slice(0, 25).forEach((c) => expect(c.type).toEqual(0)) // contracts sourceFiles.slice(25, 38).forEach((s) => expect(s.type).toEqual(1)) // scripts sourceFiles.slice(38, 40).forEach((i) => expect(i.type).toEqual(2)) // abstract class sourceFiles.slice(40, 47).forEach((i) => expect(i.type).toEqual(3)) // interfaces - sourceFiles.slice(47).forEach((i) => expect(i.type).toEqual(4)) // structs + sourceFiles.slice(47, 52).forEach((i) => expect(i.type).toEqual(4)) // structs + expect(sourceFiles[52].type).toEqual(5) // constants }) it('should load contract from json', () => { @@ -287,18 +289,9 @@ describe('contract', function () { /Compilation warnings\:/ ) - const project0 = await Project.compile({ errorOnWarnings: false, ignoreUnusedConstantsWarnings: true }) - expect(project0.projectArtifact.infos.get('Warnings')!.warnings).toEqual([ - 'Found unused variables in Warnings: foo.y', - 'Found unused fields in Warnings: b' - ]) - - const project1 = await Project.compile({ errorOnWarnings: false, ignoreUnusedConstantsWarnings: false }) - expect(project1.projectArtifact.infos.get('Warnings')!.warnings).toEqual([ - 'Found unused variables in Warnings: foo.y', - 'Found unused constants in Warnings: C', - 'Found unused fields in Warnings: b' - ]) + expect(() => + Project.compile({ errorOnWarnings: false }, '.', 'contracts', 'artifacts', undefined, true) + ).not.toThrow() }) it('should debug', async () => { @@ -310,10 +303,10 @@ describe('contract', function () { }) it('should test assert!', async () => { - expect(Assert.consts.Numbers.C).toEqual((1n << 256n) - 1n) + expect(Numbers.C).toEqual((1n << 256n) - 1n) const contractAddress = randomContractAddress() - expectAssertionError(Assert.tests.test({ address: contractAddress }), contractAddress, Assert.consts.Error) + expectAssertionError(Assert.tests.test({ address: contractAddress }), contractAddress, AssertError) const assertDeployResult = await Assert.deploy(signer, { initialFields: {} }) const assertAddress = assertDeployResult.contractInstance.address @@ -321,7 +314,7 @@ describe('contract', function () { expectAssertionError( TestAssert.execute(signer, { initialFields: { assert: assertAddress } }), assertAddress, - Assert.consts.Error + AssertError ) expectAssertionError( @@ -335,16 +328,17 @@ describe('contract', function () { }) it('should test enums and constants', () => { - expect(Assert.consts.Error).toEqual(3n) - expect(Assert.consts.A).toEqual(-3n) - expect(Assert.consts.B).toEqual('1DrDyTr9RpRsQnDnXo2YRiPzPW4ooHX5LLoqXrqfMrpQH') - expect(Assert.consts.C).toEqual('0011') - expect(Assert.consts.Numbers.A).toEqual(0n) - expect(Assert.consts.Numbers.B).toEqual(1n) - expect(Assert.consts.Addresses.A).toEqual('1DrDyTr9RpRsQnDnXo2YRiPzPW4ooHX5LLoqXrqfMrpQH') - expect(Assert.consts.Addresses.B).toEqual('14UAjZ3qcmEVKdTo84Kwf4RprTQi86w2TefnnGFjov9xF') - expect(Assert.consts.ByteVecs.A).toEqual('00') - expect(Assert.consts.ByteVecs.B).toEqual('11') + expect(AssertError).toEqual(3n) + expect(A).toEqual(-3n) + expect(B).toEqual('1DrDyTr9RpRsQnDnXo2YRiPzPW4ooHX5LLoqXrqfMrpQH') + expect(ConstantTrue).toEqual(true) + expect(ConstantFalse).toEqual(false) + expect(Numbers.A).toEqual(0n) + expect(Numbers.B).toEqual(1n) + expect(Addresses.A).toEqual('1DrDyTr9RpRsQnDnXo2YRiPzPW4ooHX5LLoqXrqfMrpQH') + expect(Addresses.B).toEqual('14UAjZ3qcmEVKdTo84Kwf4RprTQi86w2TefnnGFjov9xF') + expect(ByteVecs.A).toEqual('00') + expect(ByteVecs.B).toEqual('11') }) it('should get contract by code hash', () => {