From cf9551e30edff4fa500ee5ed790d5e049e46d506 Mon Sep 17 00:00:00 2001 From: BenRey Date: Wed, 29 May 2024 16:03:55 +0200 Subject: [PATCH] Move datastore file and remove code snippet --- packages/massa-web3/code-snippets/README.md | 3 --- .../code-snippets/walletGenerateNewAccount.ts | 13 ------------- .../src/{deployerGeneration => }/dataStore.ts | 4 ++-- packages/massa-web3/src/smartContract.ts | 2 +- 4 files changed, 3 insertions(+), 19 deletions(-) delete mode 100644 packages/massa-web3/code-snippets/README.md delete mode 100644 packages/massa-web3/code-snippets/walletGenerateNewAccount.ts rename packages/massa-web3/src/{deployerGeneration => }/dataStore.ts (95%) diff --git a/packages/massa-web3/code-snippets/README.md b/packages/massa-web3/code-snippets/README.md deleted file mode 100644 index 713c1c3b..00000000 --- a/packages/massa-web3/code-snippets/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Code Snippets - -**WARNING**: Do not manually edit files in this directory. They are automatically generated. \ No newline at end of file diff --git a/packages/massa-web3/code-snippets/walletGenerateNewAccount.ts b/packages/massa-web3/code-snippets/walletGenerateNewAccount.ts deleted file mode 100644 index fc1ad207..00000000 --- a/packages/massa-web3/code-snippets/walletGenerateNewAccount.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { WalletClient } from '@massalabs/massa-web3' -;(async () => { - const newAccount = await WalletClient.walletGenerateNewAccount() - // print the account address, public and private keys - console.log( - 'Address: ', - newAccount.address, - 'Public key', - newAccount.publicKey, - 'Private key', - newAccount.secretKey - ) -})() diff --git a/packages/massa-web3/src/deployerGeneration/dataStore.ts b/packages/massa-web3/src/dataStore.ts similarity index 95% rename from packages/massa-web3/src/deployerGeneration/dataStore.ts rename to packages/massa-web3/src/dataStore.ts index 2b67b996..2e9aa5d3 100644 --- a/packages/massa-web3/src/deployerGeneration/dataStore.ts +++ b/packages/massa-web3/src/dataStore.ts @@ -1,5 +1,5 @@ -import { ZERO_BYTE, ONE, ZERO } from '../utils' -import { Args, U64, U8 } from '../basicElements' +import { ZERO_BYTE, ONE, ZERO } from './utils' +import { Args, U64, U8 } from './basicElements' const CONTRACTS_NUMBER_KEY = new Uint8Array([ZERO_BYTE]) diff --git a/packages/massa-web3/src/smartContract.ts b/packages/massa-web3/src/smartContract.ts index 6c4e316b..af99c10e 100644 --- a/packages/massa-web3/src/smartContract.ts +++ b/packages/massa-web3/src/smartContract.ts @@ -11,7 +11,7 @@ import { BlockchainClient, ReadOnlyCallResult } from './client' import { Account } from './account' import { ErrorInsufficientBalance, ErrorMaxGas } from './errors' import { deployer } from './generated/deployer-bytecode' -import { populateDatastore } from './deployerGeneration/dataStore' +import { populateDatastore } from './dataStore' import { ONE, ZERO } from './utils' import { execute } from './basicElements/bytecode' import { Mas } from './basicElements/mas'