diff --git a/docker-compose.yml b/docker-compose.yml index 70dca9d..3ed4eaa 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -38,7 +38,7 @@ services: ARTEMIS_PASSWORD: artemis AMQ_EXTRA_ARGS: '--nio' # "aio" offers better performance, but less platforms support it - alice: + bob: healthcheck: test: "timeout 5 bash -c 'cat < /dev/null > /dev/tcp/localhost/9933' && exit 0 || exit 1" interval: 10s @@ -55,7 +55,7 @@ services: volumes: - './docker/chain-entry.sh:/chain-entry.sh' entrypoint: '/chain-entry.sh' - command: ['--alice --chain dev'] + command: ['--bob --chain dev'] subquery: image: ${SUBQUERY_INDEXER_IMAGE} @@ -71,14 +71,14 @@ services: depends_on: postgres: condition: service_started - alice: + bob: condition: service_healthy ports: - 3002:3000 environment: START_BLOCK: 1 - NETWORK_ENDPOINT: ws://alice:9944 - NETWORK_HTTP_ENDPOINT: http://alice:9933 + NETWORK_ENDPOINT: ws://bob:9944 + NETWORK_HTTP_ENDPOINT: http://bob:9933 DB_USER: '${PG_USER:-postgres}' DB_PASS: '${PG_PASSWORD:-postgres}' DB_DATABASE: '${PG_DB:-postgres}' @@ -117,7 +117,7 @@ services: init: true restart: unless-stopped depends_on: - alice: + bob: condition: service_started vault: condition: service_started @@ -130,7 +130,7 @@ services: ports: - ${REST_PORT:-3004}:3000 environment: - POLYMESH_NODE_URL: 'ws://alice:9944' + POLYMESH_NODE_URL: 'ws://bob:9944' POLYMESH_MIDDLEWARE_V2_URL: 'http://graphql:3000' VAULT_URL: 'http://vault:8200/v1/transit' VAULT_TOKEN: 'root' diff --git a/envs/7.3.0.env b/envs/7.3.0.env new file mode 100644 index 0000000..005444e --- /dev/null +++ b/envs/7.3.0.env @@ -0,0 +1,5 @@ +CHAIN_IMAGE=polymeshassociation/polymesh-ci:latest-ci-runtime-docker-image-debian +SUBQUERY_INDEXER_IMAGE=polymeshassociation/polymesh-subquery:v18.0.2 + +SUBQUERY_QUERY_IMAGE=onfinality/subql-query:v2.11.0 +REST_IMAGE=polymeshassociation/polymesh-rest-api:v7.0.0 diff --git a/scripts/setup.sh b/scripts/setup.sh index 39f7c41..7efb645 100755 --- a/scripts/setup.sh +++ b/scripts/setup.sh @@ -7,7 +7,7 @@ SCRIPT_DIR=$(dirname "$0") IMAGE_REPO=polymeshassociation/polymesh # Chain version to test -VERSION='7.0.0' +VERSION='7.3.0' # service manifest ENV_FILE="$SCRIPT_DIR/../envs/$VERSION.env" diff --git a/src/consts.ts b/src/consts.ts index c3fce67..20fd019 100644 --- a/src/consts.ts +++ b/src/consts.ts @@ -1,9 +1,9 @@ const prefixedDidLength = 66; // 64 bytes + 2 for `0x` export const wellKnown = { - alice: { - did: '0x01'.padEnd(prefixedDidLength, '0'), - mnemonic: '//Alice', + bob: { + did: '0x04'.padEnd(prefixedDidLength, '0'), + mnemonic: '//Bob', }, } as const; diff --git a/src/sdk/assets/manageDistributions.ts b/src/sdk/assets/manageDistributions.ts index c4dc163..d2847e4 100644 --- a/src/sdk/assets/manageDistributions.ts +++ b/src/sdk/assets/manageDistributions.ts @@ -23,7 +23,7 @@ export const manageDistributions = async ( const signingIdentity = await sdk.getSigningIdentity(); assert(signingIdentity); - const alice = await sdk.identities.getIdentity({ did: wellKnown.alice.did }); + const bob = await sdk.identities.getIdentity({ did: wellKnown.bob.did }); // The signing identity should be an agent of the Asset and have appropriate permission const asset = await sdk.assets.getFungibleAsset({ ticker }); @@ -58,7 +58,7 @@ export const manageDistributions = async ( // (optional) individuals can be excluded from distributions targets: { // identities can be specified with an Identity object or DID string - identities: [alice, '0x0200000000000000000000000000000000000000000000000000000000000000'], + identities: [bob, '0x0200000000000000000000000000000000000000000000000000000000000000'], treatment: TargetTreatment.Exclude, }, // (optional) individual holders can be targeted with a different rate diff --git a/src/sdk/connect.ts b/src/sdk/connect.ts index 582e191..bd306e7 100644 --- a/src/sdk/connect.ts +++ b/src/sdk/connect.ts @@ -8,12 +8,12 @@ const { nodeUrl } = env; let sdk: Polymesh; /** - * This function shows how to create a Polymesh SDK instance configured with `//Alice` as the default signing key + * This function shows how to create a Polymesh SDK instance configured with `//Bob` as the default signing key */ export async function getPolymeshSdk(): Promise { // Note, different signing managers can be found [here](https://github.com/PolymeshAssociation/signing-managers#projects) const signingManager = await LocalSigningManager.create({ - accounts: [{ uri: '//Alice' }], + accounts: [{ uri: '//Bob' }], }); if (!sdk) { diff --git a/src/sdk/settlements/manageTrustedClaimIssuers.ts b/src/sdk/settlements/manageTrustedClaimIssuers.ts index b75b628..69990f0 100644 --- a/src/sdk/settlements/manageTrustedClaimIssuers.ts +++ b/src/sdk/settlements/manageTrustedClaimIssuers.ts @@ -35,11 +35,11 @@ export const manageTrustedClaimIssuers = async ( await addClaimIssuerTx.run(); assert(addClaimIssuerTx.isSuccess); - // Make Alice the only trusted issuer for certain claims + // Make Bob the only trusted issuer for certain claims const setTrustedClaimIssuersTx = await compliance.trustedClaimIssuers.set({ claimIssuers: [ { - identity: wellKnown.alice.did, + identity: wellKnown.bob.did, trustedFor: [ClaimType.Accredited, ClaimType.Affiliate], }, ], @@ -52,7 +52,7 @@ export const manageTrustedClaimIssuers = async ( // Remove a trusted issuers. Identities no longer compliant will be able to send, but not receive the Asset const removeClaimIssuerTx = await compliance.trustedClaimIssuers.remove({ - claimIssuers: [wellKnown.alice.did], + claimIssuers: [wellKnown.bob.did], }); await removeClaimIssuerTx.run(); assert(removeClaimIssuerTx.isSuccess); diff --git a/src/sdk/settlements/transferRestrictions.ts b/src/sdk/settlements/transferRestrictions.ts index 84e8d30..a24d2f6 100644 --- a/src/sdk/settlements/transferRestrictions.ts +++ b/src/sdk/settlements/transferRestrictions.ts @@ -73,7 +73,7 @@ export const transferRestrictions = async (sdk: Polymesh, asset: FungibleAsset): // Create a restriction to limit the Asset to have at most 10 holders const addCountRestrictionTx = await asset.transferRestrictions.count.addRestriction({ count: new BigNumber(10), - exemptedIdentities: [wellKnown.alice.did, identity], + exemptedIdentities: [wellKnown.bob.did, identity], }); await addCountRestrictionTx.run(); assert(addCountRestrictionTx.isSuccess);