Skip to content

Commit

Permalink
feat(connector-xdai): remove hard dependency on keychain
Browse files Browse the repository at this point in the history
Resolves #1162

Signed-off-by: Elena Izaguirre <e.izaguirre.equiza@accenture.com>
  • Loading branch information
elenaizaguirre committed Dec 3, 2021
1 parent 45c4a69 commit 0891745
Show file tree
Hide file tree
Showing 14 changed files with 1,965 additions and 241 deletions.
3 changes: 3 additions & 0 deletions .taprc
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,11 @@ files:
- ./packages/cactus-plugin-ledger-connector-iroha/src/test/typescript/unit/iroha-test-ledger-parameters.test.ts
- ./packages/cactus-plugin-ledger-connector-iroha/src/test/typescript/unit/postgres-test-container-parameters.test.ts
- ./packages/cactus-plugin-ledger-connector-xdai/src/test/typescript/integration/deploy-contract-from-json-xdai.test.ts
- ./packages/cactus-plugin-ledger-connector-xdai/src/test/typescript/integration/deploy-contract-from-json-xdai.test-json-object.ts
- ./packages/cactus-plugin-ledger-connector-xdai/src/test/typescript/integration/invoke-contract-xdai.test.ts
- ./packages/cactus-plugin-ledger-connector-xdai/src/test/typescript/integration/invoke-contract-xdai-json-object.test.ts
- ./packages/cactus-plugin-ledger-connector-xdai/src/test/typescript/integration/openapi/openapi-validation.test.ts
- ./packages/cactus-plugin-ledger-connector-xdai/src/test/typescript/integration/openapi/openapi-validation-no-keychain.test.ts
- ./packages/cactus-common/src/test/typescript/unit/servers.test.ts
- ./packages/cactus-common/src/test/typescript/unit/key-converter.test.ts
- ./packages/cactus-common/src/test/typescript/unit/strings/replace-all.test.ts
Expand Down
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
3 changes: 3 additions & 0 deletions jest.config.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 0891745

Please sign in to comment.