Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show Debug Info #308

Merged
merged 7 commits into from
Feb 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .project.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"fullNodeVersion": "v2.8.0",
"fullNodeVersion": "v2.8.2",
"compilerOptionsUsed": {
"ignoreUnusedConstantsWarnings": false,
"ignoreUnusedVariablesWarnings": false,
Expand All @@ -11,9 +11,9 @@
"infos": {
"Add": {
"sourceFile": "add/add.ral",
"sourceCodeHash": "6c08da762c111145d8c876e36bb9f69dcbc86368a546b4c5bfe23f0f4db1975b",
"bytecodeDebugPatch": "",
"codeHashDebug": "2b9e382c20b4facf21eb745a46a72447dae221c274518e19c60b5ddfe478cc9c",
"sourceCodeHash": "f7d27ecff8f7da7afcfee957842d8629930c9980f87a1c6d17561bb1fbe6dab6",
"bytecodeDebugPatch": "=8+4=1-1=2-2+64=3-1+d=37+77e010a=1+1646450726976617465=154",
"codeHashDebug": "a49f0624ccbec8df1bf3ad7f628fb47a42cc448fe7369fc0da02071df6787b69",
"warnings": [
"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)\"."
Expand Down Expand Up @@ -158,7 +158,7 @@
},
"Main": {
"sourceFile": "add/add.ral",
"sourceCodeHash": "6c08da762c111145d8c876e36bb9f69dcbc86368a546b4c5bfe23f0f4db1975b",
"sourceCodeHash": "f7d27ecff8f7da7afcfee957842d8629930c9980f87a1c6d17561bb1fbe6dab6",
"bytecodeDebugPatch": "",
"codeHashDebug": "",
"warnings": []
Expand Down
2 changes: 1 addition & 1 deletion artifacts/add/Add.ral.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "v2.8.0",
"version": "v2.8.2",
"name": "Add",
"bytecode": "02040d4036405740600100020402041600160100010200000202021605160016015f06160016015fa00016002a16012aa100a000160016010e0dce0001000201030404000b160313c40de0b6b3a7640000a2160116021401001600130164c1180102010100021600b0",
"codeHash": "2b9e382c20b4facf21eb745a46a72447dae221c274518e19c60b5ddfe478cc9c",
Expand Down
2 changes: 1 addition & 1 deletion artifacts/add/DestroyAdd.ral.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "v2.8.0",
"version": "v2.8.2",
"name": "DestroyAdd",
"bytecodeTemplate": "01010300000005{1}0d0c{0}0103",
"fieldsSig": {
Expand Down
2 changes: 1 addition & 1 deletion artifacts/add/Main.ral.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "v2.8.0",
"version": "v2.8.2",
"name": "Main",
"bytecodeTemplate": "0101030001000a{0}17000e0d0e0e160001001818",
"fieldsSig": {
Expand Down
2 changes: 1 addition & 1 deletion artifacts/greeter/Greeter.ral.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "v2.8.0",
"version": "v2.8.2",
"name": "Greeter",
"bytecode": "19010c010000000105030c7bce0002",
"codeHash": "3813cf61a6e0f126463190119cd861a14ca9c2f92839e193c4f9934517b02477",
Expand Down
2 changes: 1 addition & 1 deletion artifacts/greeter/GreeterMain.ral.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "v2.8.0",
"version": "v2.8.2",
"name": "GreeterMain",
"bytecodeTemplate": "01010300020014{0}17000c0d160001000d2f0c7b{0}17010c0d160101000d2f0c7b",
"fieldsSig": {
Expand Down
2 changes: 1 addition & 1 deletion artifacts/nft/DeprecatedNFTTest1.ral.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "v2.8.0",
"version": "v2.8.2",
"name": "DeprecatedNFTTest1",
"bytecode": "020109010000000102ce0102",
"codeHash": "3d89da71c0a6e905dd54267f897137ec6beb9603bb787e0e4a36bfc76f7a712b",
Expand Down
2 changes: 1 addition & 1 deletion artifacts/nft/DeprecatedNFTTest2.ral.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "v2.8.0",
"version": "v2.8.2",
"name": "DeprecatedNFTTest2",
"bytecode": "02020912010000000102ce0102010000000102ce0002",
"codeHash": "c3e8a33252664e2f79903788d8abd79ee2c6785c580fa6911a0868436c59f59e",
Expand Down
2 changes: 1 addition & 1 deletion artifacts/nft/DeprecatedNFTTest3.ral.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "v2.8.0",
"version": "v2.8.2",
"name": "DeprecatedNFTTest3",
"bytecode": "0202090f010000000102ce0102010000000000",
"codeHash": "75181639c8575ce108d1ecb0b1b73a373a8652ffe6f5f6621d9f9eee5a0b2eb4",
Expand Down
2 changes: 1 addition & 1 deletion artifacts/nft/DeprecatedNFTTest4.ral.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "v2.8.0",
"version": "v2.8.2",
"name": "DeprecatedNFTTest4",
"bytecode": "02020911010000000102ce01020100000001020402",
"codeHash": "d8f8650c15cc96211608a52ae7d43a15d7b28306ac13acec672c0f1ed02a0538",
Expand Down
2 changes: 1 addition & 1 deletion artifacts/nft/DeprecatedNFTTest5.ral.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "v2.8.0",
"version": "v2.8.2",
"name": "DeprecatedNFTTest5",
"bytecode": "02020914010000000102ce0102010000000304ce000c0c02",
"codeHash": "65c9d8a07f42939e84b4ae2fdc94dbbe3545c8ddb0832df08ef69b3cab50ebe3",
Expand Down
2 changes: 1 addition & 1 deletion artifacts/nft/DeprecatedNFTTest6.ral.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "v2.8.0",
"version": "v2.8.2",
"name": "DeprecatedNFTTest6",
"bytecode": "02020912010000000102ce01020100000002030c0d02",
"codeHash": "88822622be55e862a1759c4e0c02300da75fe9e3dbe73c8fbe0fa8714996629e",
Expand Down
2 changes: 1 addition & 1 deletion artifacts/nft/DeprecatedNFTTest7.ral.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "v2.8.0",
"version": "v2.8.2",
"name": "DeprecatedNFTTest7",
"bytecode": "02020913010000000102ce0102010000000203ce000b02",
"codeHash": "33ddc42a153c6b9940924d989dcd107d7ff234ecbe9c494ece35ed06bd24450d",
Expand Down
2 changes: 1 addition & 1 deletion artifacts/nft/MintNFTTest.ral.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "v2.8.0",
"version": "v2.8.2",
"name": "MintNFTTest",
"bytecodeTemplate": "01010300000015{2}4c0ab413c40de0b6b3a7640000a2{1}0d0d{0}0107184a09b413c40de0b6b3a7640000a2{1}0d0d{0}010418",
"fieldsSig": {
Expand Down
2 changes: 1 addition & 1 deletion artifacts/nft/NFTCollectionTest.ral.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "v2.8.0",
"version": "v2.8.2",
"name": "NFTCollectionTest",
"bytecode": "04050912402d40404085010000000102ce0102010000000102a0000201000102010f16000001310c7b160040cb17011601c50d7b16010201000203000816010002170216001602410e7b01030105011eb41701b1a00016001406414c5048000313046413006417031702160113c40de0b6b3a7640000a2a00040ce00160216030d1601c91704a0000d2aa100160402",
"codeHash": "c84f4fd5d3fdee90b3421174c85011437a10c6f440e0c261b1f69ff77bc5ab70",
Expand Down
2 changes: 1 addition & 1 deletion artifacts/nft/NFTCollectionWithRoyaltyTest.ral.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "v2.8.0",
"version": "v2.8.2",
"name": "NFTCollectionWithRoyaltyTest",
"bytecode": "06080912402d40404050405b406c40b1010000000102ce0102010000000102a0000201000102010f16000001310c7b160040cb17011601c50d7b16010201000203000816010002170216001602410e7b0100020201061601ce032c1367102d0201010202000316001601a9010202020008b4ce02450d7b16001601a801030105011eb41701b1a00016001406414c5048000313046413006417031702160113c40de0b6b3a7640000a2a00040ce00160216030d1601c91704a0000d2aa100160402",
"codeHash": "1c162da87d31289c9b392bd48767386336bb1d208101a8680d92b7dc74098ce0",
Expand Down
2 changes: 1 addition & 1 deletion artifacts/nft/NFTTest.ral.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "v2.8.0",
"version": "v2.8.2",
"name": "NFTTest",
"bytecode": "04020914010000000102ce0202010000000203ce00ce0102",
"codeHash": "4897086210869e612d82995b765a447c5319a55a56e8a0c3c07b4d9ca81e15b1",
Expand Down
2 changes: 1 addition & 1 deletion artifacts/nft/WithdrawNFTCollectionTest.ral.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "v2.8.0",
"version": "v2.8.2",
"name": "WithdrawNFTCollectionTest",
"bytecodeTemplate": "01010300000006b4{1}0e0c{0}0106",
"fieldsSig": {
Expand Down
2 changes: 1 addition & 1 deletion artifacts/nft/WrongNFTTest.ral.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "v2.8.0",
"version": "v2.8.2",
"name": "WrongNFTTest",
"bytecode": "04020917010000000102ce0202010000000206040c7bce00ce0102",
"codeHash": "7dd2ed643a98b2a1a52a9b9e536fcdae60d961b583b8109f777d846bfdfcae8d",
Expand Down
2 changes: 1 addition & 1 deletion artifacts/sub/Sub.ral.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "v2.8.0",
"version": "v2.8.2",
"name": "Sub",
"bytecode": "01011901000202010c05160016015fa00016002a16012ba100a00002",
"codeHash": "513645f5c95a28d55a51070f3d5c51edbda05a98f46b23cad59952e2ee4846a1",
Expand Down
2 changes: 1 addition & 1 deletion artifacts/test/Assert.ral.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "v2.8.0",
"version": "v2.8.2",
"name": "Assert",
"bytecode": "00010b0100000000050d0e2f0f7b",
"codeHash": "5bd05924fb9a23ea105df065a8c2dfa463b9ee53cc14a60320140d19dd6151ca",
Expand Down
2 changes: 1 addition & 1 deletion artifacts/test/Debug.ral.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "v2.8.0",
"version": "v2.8.2",
"name": "Debug",
"bytecode": "000106010000000000",
"codeHash": "928360bf58942dd1fdd8d197e0e2ef59ecddbf71a6e8fe25d2c0665274f80ce3",
Expand Down
2 changes: 1 addition & 1 deletion artifacts/test/MetaData.ral.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "v2.8.0",
"version": "v2.8.2",
"name": "MetaData",
"bytecode": "0003144027402e010300000005b4b413c40de0b6b3a7640000a702000200000004b213c40de0b6b3a7640000a90200000000000102",
"codeHash": "cade0de390b8e15960b263ac35aa013cb84f844bce6e3e53e6bfe2cc9166623f",
Expand Down
2 changes: 1 addition & 1 deletion artifacts/test/Warnings.ral.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "v2.8.0",
"version": "v2.8.2",
"name": "Warnings",
"bytecode": "02010701000202000102",
"codeHash": "9a0c90d67d729a478062d6794cf7b75c27483c50f6fe2ad13c5ed8873ad1fde2",
Expand Down
2 changes: 1 addition & 1 deletion artifacts/token/FakeTokenTest.ral.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "v2.8.0",
"version": "v2.8.2",
"name": "FakeTokenTest",
"bytecode": "010509121b4024402a010000000103044d18010000000103044d18010000000103044d18010000000103044d18010000000000",
"codeHash": "88d74dcc19bfd075e97c90ab5f48d374f9ff982133d8257d4efc32305c5885b3",
Expand Down
2 changes: 1 addition & 1 deletion artifacts/token/TokenTest.ral.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "v2.8.0",
"version": "v2.8.2",
"name": "TokenTest",
"bytecode": "050409121b4024010000000102ce0002010000000102ce0102010000000102ce0202010000000102ce0302",
"codeHash": "a2800413eb2c5c23d48068db23df5f8eeaba04653e12c8ed59d589720d96dadd",
Expand Down
4 changes: 2 additions & 2 deletions artifacts/ts/Add.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,8 @@ class Factory extends ContractFactory<AddInstance, AddTypes.Fields> {
export const Add = new Factory(
Contract.fromJson(
AddContractJson,
"",
"2b9e382c20b4facf21eb745a46a72447dae221c274518e19c60b5ddfe478cc9c"
"=8+4=1-1=2-2+64=3-1+d=37+77e010a=1+1646450726976617465=154",
"a49f0624ccbec8df1bf3ad7f628fb47a42cc448fe7369fc0da02071df6787b69"
)
);

Expand Down
125 changes: 0 additions & 125 deletions artifacts/ts/DeprecatedNFTTest.ts

This file was deleted.

1 change: 1 addition & 0 deletions contracts/add/add.ral
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Contract Add(sub: Sub, mut result : U256) {

@using(updateFields = true)
fn addPrivate(array: [U256; 2]) -> ([U256; 2]) {
emit Debug(`addPrivate`)
emit Add(array[0], array[1])
emit Add1(array[0], array[1])
result = result + array[0] + array[1]
Expand Down
2 changes: 1 addition & 1 deletion docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ services:
condition: service_healthy

alephium:
image: alephium/dev-alephium:2.8.0
image: alephium/dev-alephium:2.8.2
restart: unless-stopped
ports:
- 19973:19973/tcp
Expand Down
8 changes: 6 additions & 2 deletions packages/cli/src/deployment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ import {
ContractInstance,
ExecutableScript,
ProjectArtifact,
isHexString
isHexString,
isDevnet
} from '@alephium/web3'
import { PrivateKeyWallet } from '@alephium/web3-wallet'
import path from 'path'
Expand Down Expand Up @@ -318,7 +319,10 @@ function createDeployer<Settings = unknown>(
taskTag?: string
): Promise<DeployContractResult<T>> => {
const initialFields = addStdIdToFields(contractFactory.contract, params.initialFields ?? {})
const initFieldsAndByteCode = contractFactory.contract.buildByteCodeToDeploy(initialFields)
const initFieldsAndByteCode = contractFactory.contract.buildByteCodeToDeploy(
initialFields,
isDevnet(network.networkId)
)
const codeHash = cryptojs.SHA256(initFieldsAndByteCode).toString()
const taskId = getTaskId(contractFactory.contract, taskTag)
const previous = deployContractResults.get(taskId)
Expand Down
2 changes: 1 addition & 1 deletion packages/web3/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
},
"author": "Alephium dev <dev@alephium.org>",
"config": {
"alephium_version": "2.8.0",
"alephium_version": "2.8.2",
"explorer_backend_version": "1.16.1"
},
"scripts": {
Expand Down
Loading
Loading