diff --git a/src/accounts/accountManager.ts b/src/accounts/accountManager.ts index 609bb67..cbb008f 100644 --- a/src/accounts/accountManager.ts +++ b/src/accounts/accountManager.ts @@ -28,10 +28,6 @@ export class AccountManager { await AccountManager.setupAccount(account, options); - if (EOSManager.signatureProvider) { - EOSManager.signatureProvider.keys.set(publicKey, privateKey); - } - accounts.push(account); } @@ -51,8 +47,6 @@ export class AccountManager { EOSManager.signatureProvider.availableKeys.push(nonLegacyPublicKey); } - console.log('Signature provider', EOSManager.signatureProvider); - const systemContract = await eos.getContract('eosio'); const actions: any = [ @@ -90,8 +84,8 @@ export class AccountManager { ]; // Note: You can deploy the system without system contracts. In this scenario, - // newaccount alone is enough. If there is a system contract with that action, - // then we definitely need to do it though. + // newaccount alone is enough. If there is a system contract with the buyrambytes action, + // then we definitely need to do it, but if there isn't, then trying to call it is an error. if (systemContract.actions.has('buyrambytes')) { actions.push({ account: 'eosio', diff --git a/src/contracts/contractDeployer.ts b/src/contracts/contractDeployer.ts index 922604a..2dae9ba 100644 --- a/src/contracts/contractDeployer.ts +++ b/src/contracts/contractDeployer.ts @@ -14,8 +14,6 @@ export class ContractDeployer { account: Account, contractIdentifier: string ) { - console.log('Available keys', await EOSManager.signatureProvider.getAvailableKeys()); - const buffer = new Serialize.SerialBuffer({ textEncoder: EOSManager.api.textEncoder, textDecoder: EOSManager.api.textDecoder, @@ -40,52 +38,22 @@ export class ContractDeployer { ); abiDefinition.serialize(buffer, abi); - const requiredKeys = await EOSManager.rpc.getRequiredKeys({ - transaction: { - actions: [ - { - account: `eosio`, - name: `setcode`, - authorization: account.active, - data: { - account: account.name, - vmtype: 0, - vmversion: 0, - code: wasm.toString(`hex`), - }, - }, - { - account: `eosio`, - name: `setabi`, - authorization: account.active, - data: { - account: account.name, - abi: Buffer.from(buffer.asUint8Array()).toString(`hex`), - }, - }, - ], - }, - availableKeys: await EOSManager.signatureProvider.getAvailableKeys(), - }); - - console.log('Required keys', requiredKeys); - await EOSManager.transact({ actions: [ { - account: `eosio`, - name: `setcode`, + account: 'eosio', + name: 'setcode', authorization: account.active, data: { account: account.name, vmtype: 0, vmversion: 0, - code: wasm.toString(`hex`), + code: wasm.toString('hex'), }, }, { - account: `eosio`, - name: `setabi`, + account: 'eosio', + name: 'setabi', authorization: account.active, data: { account: account.name,