Skip to content

Commit

Permalink
ethereum: add contractDeployerAddress to context
Browse files Browse the repository at this point in the history
Signed-off-by: Ben Burns <[email protected]>
  • Loading branch information
benjamincburns committed Apr 18, 2020
1 parent 021f6d5 commit 4d0c15f
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions packages/caliper-ethereum/lib/ethereum.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,16 @@ class Ethereum extends BlockchainInterface {
estimateGas: args.contracts[key].estimateGas
};
}

if (this.ethereumConfig.fromAddress) {
context.fromAddress = this.ethereumConfig.fromAddress;
}

if (this.ethereumConfig.contractDeployerAddress) {
context.contractDeployerAddress = this.ethereumConfig.contractDeployerAddress;
context.contractDeployerAddressPrivateKey = this.ethereumConfig.contractDeployerAddressPrivateKey;
}

if (this.ethereumConfig.fromAddressSeed) {
let hdwallet = EthereumHDKey.fromMasterSeed(this.ethereumConfig.fromAddressSeed);
let wallet = hdwallet.derivePath('m/44\'/60\'/' + this.clientIndex + '\'/0/0').getWallet();
Expand Down

0 comments on commit 4d0c15f

Please sign in to comment.