Skip to content

Commit

Permalink
fix: xdai - remove hard dependency on keychain
Browse files Browse the repository at this point in the history
Resolves hyperledger-cacti#1162

Signed-off-by: Elena Izaguirre <e.izaguirre.equiza@accenture.com>
  • Loading branch information
elenaizaguirre committed Dec 1, 2021
1 parent 1c800a8 commit 8948689
Show file tree
Hide file tree
Showing 12 changed files with 1,959 additions and 241 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -374,14 +374,12 @@ export class CarbonAccountingAppDummyInfrastructure {
this._xdaiAccount = await this.xdai.createEthTestAccount(10000000);

{
const { contractName, bytecode, abi: contractAbi } = DaoTokenContract;
const { contractName } = DaoTokenContract;
this.log.info(`Deploying ${contractName}...`);

const res = await besuPlugin.deployContract({
contractName,
keychainId: keychainPlugin.getKeychainId(),
bytecode,
contractAbi,
constructorArgs: [this.xdaiAccount.get().address],
gas: 8000000,
web3SigningCredential: {
Expand All @@ -405,7 +403,7 @@ export class CarbonAccountingAppDummyInfrastructure {
}

{
const { contractName, bytecode, abi: contractAbi } = GovernorContract;
const { contractName } = GovernorContract;
this.log.info(`Deploying ${contractName}...`);

const timelockAccount = await this.xdai.createEthTestAccount(2000000);
Expand All @@ -414,8 +412,6 @@ export class CarbonAccountingAppDummyInfrastructure {
const res = await besuPlugin.deployContract({
contractName,
keychainId: keychainPlugin.getKeychainId(),
bytecode,
contractAbi,
// address timelock_, address dclm8_, address guardian_
constructorArgs: [
timelockAccount.address,
Expand Down Expand Up @@ -444,16 +440,14 @@ export class CarbonAccountingAppDummyInfrastructure {
}

{
const { contractName, bytecode, abi: contractAbi } = TimelockContract;
const { contractName } = TimelockContract;
this.log.info(`Deploying ${contractName}...`);

const adminAccount = await this.xdai.createEthTestAccount(2000000);
const delay = 7 * 60 * 60 * 24;
const res = await besuPlugin.deployContract({
contractName,
keychainId: keychainPlugin.getKeychainId(),
bytecode,
contractAbi,
constructorArgs: [adminAccount.address, delay],
gas: 8000000,
web3SigningCredential: {
Expand All @@ -477,19 +471,13 @@ export class CarbonAccountingAppDummyInfrastructure {
}

{
const {
contractName,
bytecode,
abi: contractAbi,
} = NetEmissionsTokenNetworkContract;
const { contractName } = NetEmissionsTokenNetworkContract;

this.log.info(`Deploying ${contractName}...`);
const adminAccount = await this.xdai.createEthTestAccount(2000000);
const res = await besuPlugin.deployContract({
contractName,
keychainId: keychainPlugin.getKeychainId(),
bytecode,
contractAbi,
constructorArgs: [adminAccount.address],
gas: 8000000,
web3SigningCredential: {
Expand Down
Loading

0 comments on commit 8948689

Please sign in to comment.