diff --git a/examples/smartContracts/deployer.ts b/examples/smartContracts/deployer.ts index 2543cbe8..e267ab94 100644 --- a/examples/smartContracts/deployer.ts +++ b/examples/smartContracts/deployer.ts @@ -3,10 +3,10 @@ import { IAccount } from '../../src/interfaces/IAccount'; import { IContractData } from '../../src/interfaces/IContractData'; import { Client } from '../../src/web3/Client'; import { EOperationStatus } from '../../src/interfaces/EOperationStatus'; -import { Args } from '../../src/utils/arguments'; + import { readFileSync } from 'fs'; -import { u64ToBytes, u8toByte } from '../../src/utils/serializers'; -import { fromMAS } from '../../src'; + +import { Args, fromMAS, u64ToBytes, u8toByte } from '../../src'; const path = require('path'); const chalk = require('chalk'); @@ -74,19 +74,19 @@ export const deploySmartContracts = async ( fee = 0n, maxGas = 1_000_000n, maxCoins = fromMAS(0.1), - deployerAccount?: IAccount, + deployerAccount: IAccount, ): Promise => { let deploymentOperationId: string; try { // do checks - if (!deployerAccount) { - const baseAccount = web3Client.wallet().getBaseAccount(); - if (baseAccount === null) { - throw new Error('Failed to get base account'); - } else { - deployerAccount = baseAccount; - } - } + // if (!deployerAccount) { + // const baseAccount = web3Client.wallet().getBaseAccount(); + // if (baseAccount === null) { + // throw new Error('Failed to get base account'); + // } else { + // deployerAccount = baseAccount; + // } + // } // check deployer account balance const coinsRequired = contractsToDeploy.reduce( diff --git a/examples/smartContracts/index.ts b/examples/smartContracts/index.ts index 514ba642..7136b700 100644 --- a/examples/smartContracts/index.ts +++ b/examples/smartContracts/index.ts @@ -6,7 +6,6 @@ import { IEvent } from '../../src/interfaces/IEvent'; import { IReadData } from '../../src/interfaces/IReadData'; import { WalletClient } from '../../src/web3/WalletClient'; import { awaitTxConfirmation, deploySmartContracts } from './deployer'; -import { Args } from '../../src/utils/arguments'; import { readFileSync } from 'fs'; import { Client } from '../../src/web3/Client'; import { @@ -16,16 +15,19 @@ import { } from '../../src/web3/EventPoller'; import { INodeStatus } from '../../src/interfaces/INodeStatus'; import { withTimeoutRejection } from '../../src/utils/time'; -import { strToBytes } from '../../src/utils/serializers'; import { IDatastoreEntryInput } from '../../src/interfaces/IDatastoreEntryInput'; import { ICallData } from '../../src/interfaces/ICallData'; import * as dotenv from 'dotenv'; import { IProvider, ProviderType } from '../../src/interfaces/IProvider'; -import { fromMAS, toMAS } from '../../src'; import { + Args, IDeserializedResult, ISerializable, -} from '../../src/interfaces/ISerializable'; + fromMAS, + strToBytes, + toMAS, +} from '../../src'; + const path = require('path'); const chalk = require('chalk'); const ora = require('ora');