diff --git a/examples/sdk-simple/index.ts b/examples/sdk-simple/index.ts index 145ac476..0a8f9912 100644 --- a/examples/sdk-simple/index.ts +++ b/examples/sdk-simple/index.ts @@ -1,13 +1,13 @@ -import { dot, moonbeam, polkadot } from '@moonbeam-network/xcm-config'; -import { Sdk, type TransferData } from '@moonbeam-network/xcm-sdk'; -import { Keyring } from '@polkadot/api'; -import { cryptoWaitReady } from '@polkadot/util-crypto'; -import { http, type Address, createWalletClient } from 'viem'; -import { privateKeyToAccount } from 'viem/accounts'; +import { dot, moonbeam, polkadot } from "@moonbeam-network/xcm-config"; +import { Sdk, type TransferData } from "@moonbeam-network/xcm-sdk"; +import { Keyring } from "@polkadot/api"; +import { cryptoWaitReady } from "@polkadot/util-crypto"; +import { http, type Address, createWalletClient } from "viem"; +import { privateKeyToAccount } from "viem/accounts"; // Moonbeam Signer =========================================================== -const moonbeamPrivateKey = ''; +const moonbeamPrivateKey = ""; const account = privateKeyToAccount(moonbeamPrivateKey as Address); const walletClient = createWalletClient({ account, @@ -17,12 +17,12 @@ const walletClient = createWalletClient({ // Polkadot Signer =========================================================== -const polkadotPrivateKey = ''; +const polkadotPrivateKey = ""; await cryptoWaitReady(); const keyring = new Keyring({ ss58Format: polkadot.ss58Format, - type: 'sr25519', + type: "sr25519", }); const pair = keyring.createFromUri(polkadotPrivateKey); @@ -32,14 +32,14 @@ export function logBalances(data: TransferData): void { console.log( `Balance on ${data.source.chain.name} ${data.source.balance.toDecimal()} ${ data.source.balance.symbol - }`, + }` ); console.log( `Balance on ${ data.destination.chain.name } ${data.destination.balance.toDecimal()} ${ data.destination.balance.symbol - }`, + }` ); } @@ -57,12 +57,12 @@ export function logTxDetails(data: TransferData): void { data.source.chain.name } and ${data.destination.fee.toDecimal()} ${ data.destination.fee.symbol - } fee on ${data.destination.chain.name}.`, + } fee on ${data.destination.chain.name}.` ); } export async function fromPolkadot() { - console.log('\nTransfer from Polkadot to Moonbeam\n'); + console.log("\nTransfer from Polkadot to Moonbeam\n"); const data = await Sdk().getTransferData({ destinationAddress: account.address, @@ -86,7 +86,7 @@ export async function fromPolkadot() { } export async function fromMoonbeam() { - console.log('\nTransfer from Moonbeam to Polkadot\n'); + console.log("\nTransfer from Moonbeam to Polkadot\n"); const data = await Sdk() .assets() @@ -118,12 +118,12 @@ async function main() { console.log(`Polkadot address: ${pair.address}.`); await fromPolkadot(); - console.log('\nWaiting 30 seconds...'); + console.log("\nWaiting 30 seconds..."); await setTimeout(30000); await fromMoonbeam(); } main() - .then(() => console.log('done!')) + .then(() => console.log("done!")) .catch(console.error) .finally(() => process.exit()); diff --git a/packages/sdk/CHANGELOG.md b/packages/sdk/CHANGELOG.md index 3688d1a0..5eb0154d 100644 --- a/packages/sdk/CHANGELOG.md +++ b/packages/sdk/CHANGELOG.md @@ -1,5 +1,11 @@ # @moonbeam-network/xcm-sdk +## 2.5.14 + +### Patch Changes + +- [#348](https://github.com/moonbeam-foundation/xcm-sdk/pull/348) [`61e7143`](https://github.com/moonbeam-foundation/xcm-sdk/commit/61e71430e7826e8450da2bf93e92a3269470b310) Thanks [@mmaurello](https://github.com/mmaurello)! - Fix Ethers contract identification + ## 2.5.13 ### Patch Changes diff --git a/packages/sdk/package.json b/packages/sdk/package.json index dd0dd19a..340df121 100644 --- a/packages/sdk/package.json +++ b/packages/sdk/package.json @@ -1,6 +1,6 @@ { "name": "@moonbeam-network/xcm-sdk", - "version": "2.5.13", + "version": "2.5.14", "description": "The Moonbeam XCM SDK enables developers to easily deposit and withdraw assets to Moonbeam/Moonriver from the relay chain and other parachains in the Polkadot/Kusama ecosystem", "scripts": { "build": "tsup",