Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
Szegoo committed May 11, 2024
1 parent cefbbb3 commit 664e236
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 13 deletions.
18 changes: 7 additions & 11 deletions src/regionx/index.init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,16 @@ export async function regionxInit(relayEndpoint: string, regionxEndpoint: string
await setupRelayAsset(regionxApi);

if (regionxAccount) {
await transferRelayTokensToRegionX(10n**12n, relayApi, alice);
await transferRelayTokensToRegionX(10n ** 12n, relayApi, alice);
}
}

async function setupRelayAsset(api: ApiPromise) {
log("Settting up relay token on RegionX");
const assetMetadata = {
decimals: 12,
name: 'ROC',
symbol: 'ROC',
name: "ROC",
symbol: "ROC",
existentialDeposit: 10n ** 3n,
location: null,
additional: null,
Expand All @@ -38,17 +38,13 @@ async function setupRelayAsset(api: ApiPromise) {
const batchCall = api.tx.utility.batch(assetSetupCalls);
return force(api, batchCall);
}
async function transferRelayTokensToRegionX(
amount: bigint,
relayApi: ApiPromise,
signer: KeyringPair
): Promise<void> {
async function transferRelayTokensToRegionX(amount: bigint, relayApi: ApiPromise, signer: KeyringPair): Promise<void> {
log("Teleporting relay tokens to RegionX");
const receiverKeypair = new Keyring();
receiverKeypair.addFromAddress(signer.address);

const feeAssetItem = 0;
const weightLimit = 'Unlimited';
const weightLimit = "Unlimited";
const reserveTransfer = relayApi.tx.xcmPallet.limitedReserveTransferAssets(
{ V3: { parents: 0, interior: { X1: { Parachain: 2000 } } } }, //dest
{
Expand All @@ -57,7 +53,7 @@ async function transferRelayTokensToRegionX(
interior: {
X1: {
AccountId32: {
chain: 'Any',
chain: "Any",
id: receiverKeypair.pairs[0].publicKey,
},
},
Expand All @@ -68,7 +64,7 @@ async function transferRelayTokensToRegionX(
V3: [
{
id: {
Concrete: { parents: 0, interior: 'Here' },
Concrete: { parents: 0, interior: "Here" },
},
fun: {
Fungible: amount,
Expand Down
4 changes: 2 additions & 2 deletions src/zombienet.init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ program
.option("--coretimeInit")
.option("--regionxInit")
.option("--coretimeAccount <string>")
.option("--regionxAccount <string>")
.option("--regionxAccount <string>");

program.parse(process.argv);

Expand All @@ -32,7 +32,7 @@ async function init() {
await coretimeInit(CORETIME_ENDPOINT, program.opts().coretimeAccount || "");
}

if(program.opts().regionxInit) {
if (program.opts().regionxInit) {
await regionxInit(ROCOCO_ENDPOINT, REGIONX_ENDPOINT, program.opts().regionxAccount || "");
}
}
Expand Down

0 comments on commit 664e236

Please sign in to comment.