Skip to content
This repository was archived by the owner on Jul 30, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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}
Expand All @@ -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}'
Expand Down Expand Up @@ -117,7 +117,7 @@ services:
init: true
restart: unless-stopped
depends_on:
alice:
bob:
condition: service_started
vault:
condition: service_started
Expand All @@ -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'
Expand Down
5 changes: 5 additions & 0 deletions envs/7.3.0.env
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion scripts/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
6 changes: 3 additions & 3 deletions src/consts.ts
Original file line number Diff line number Diff line change
@@ -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;

Expand Down
4 changes: 2 additions & 2 deletions src/sdk/assets/manageDistributions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 });
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/sdk/connect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<Polymesh> {
// 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) {
Expand Down
6 changes: 3 additions & 3 deletions src/sdk/settlements/manageTrustedClaimIssuers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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],
},
],
Expand All @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion src/sdk/settlements/transferRestrictions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Loading