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

Add chainId to project initialiser #381

Merged
merged 6 commits into from
Dec 29, 2023
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
127 changes: 114 additions & 13 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 2 additions & 4 deletions packages/sc-deployer/assembly/contracts/deployer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,9 @@ import {
functionExists,
hasOpKey,
} from '@massalabs/massa-as-sdk';
import { Args, stringToBytes } from '@massalabs/as-types';
import { setOf } from '@massalabs/massa-as-sdk/assembly/std/storage';
import { Args } from '@massalabs/as-types';

const CONSTRUCTOR = 'constructor';
const PROTO_KEY = 'protoMassa';

/**
* This function deploys and calls the constructor function of the deployed smart contract.
Expand All @@ -23,7 +21,7 @@ const PROTO_KEY = 'protoMassa';
export function main(_: StaticArray<u8>): StaticArray<u8> {
let masterKey = new StaticArray<u8>(1);
masterKey[0] = 0x00;
let protoKey = stringToBytes(PROTO_KEY);

if (!hasOpKey(masterKey)) {
return [];
}
Expand Down
4 changes: 2 additions & 2 deletions packages/sc-deployer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
"license": "ISC",
"dependencies": {
"@massalabs/as-types": "^2.0.0",
"@massalabs/massa-as-sdk": "^2.5.2",
"@massalabs/massa-as-sdk": "^2.5.4",
"@massalabs/massa-sc-compiler": "^0.1.0",
"@massalabs/massa-web3": "^3.0.0",
"@massalabs/massa-web3": "^3.0.2",
"@types/node": "^18.11.10",
"assemblyscript": "^0.27.19",
"rimraf": "^5.0.1",
Expand Down
4 changes: 2 additions & 2 deletions packages/sc-deployer/powered-by.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ The following is a list of all the dependencies of this project:

**License:** (MIT AND Apache-2.0) - perpetual

**Used version:** 2.5.2
**Used version:** 2.5.4

**Many thanks to:** [Massa Labs](info@massa.net)

Expand All @@ -29,7 +29,7 @@ The following is a list of all the dependencies of this project:

**License:** MIT - perpetual

**Used version:** 3.0.0
**Used version:** 3.0.2

**Many thanks to:** [Massa Labs](info@massa.net)

Expand Down
2 changes: 1 addition & 1 deletion packages/sc-project-initializer/commands/init/.env.example
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
WALLET_SECRET_KEY=""

JSON_RPC_URL_PUBLIC=https://test.massa.net/api/v2:33035
JSON_RPC_URL_PUBLIC=https://buildnet.massa.net/api/v2:33035