From d3822b85bfea8d2adee2a980eb29a70741e5f9dd Mon Sep 17 00:00:00 2001 From: Sebastian Gerske <13647606+H34D@users.noreply.github.com> Date: Fri, 8 Sep 2023 10:25:22 +0200 Subject: [PATCH] prettier --- src/cli.ts | 46 ++++++++++++------------- src/commands/account.ts | 2 +- src/commands/credit-score/info.ts | 6 ++-- src/commands/credit-score/load.ts | 2 +- src/commands/green/create.ts | 15 ++++---- src/commands/green/info.ts | 6 ++-- src/commands/identity/create.ts | 4 +-- src/commands/identity/info.ts | 6 ++-- src/commands/sbt/ASBT/deploy.ts | 8 ++--- src/commands/sbt/ASBT/mint.ts | 2 +- src/commands/sbt/SSSBT/add-authority.ts | 2 +- src/commands/sbt/SSSBT/deploy.ts | 10 +++--- src/commands/sbt/SSSBT/mint.ts | 2 +- src/commands/sbt/info.ts | 4 +-- src/commands/settings.ts | 2 +- src/commands/soul-linker/break.ts | 2 +- src/commands/soul-linker/create.ts | 4 +-- src/commands/soul-linker/establish.ts | 2 +- src/commands/soul-linker/query.ts | 2 +- src/commands/soul-linker/verify.ts | 4 +-- src/commands/soul-name/create.ts | 4 +-- src/commands/soul-name/info.ts | 8 ++--- src/commands/soul-name/resolve.ts | 2 +- src/commands/soul-name/show.ts | 2 +- src/commands/version.ts | 6 ++-- src/doc.ts | 10 +++--- src/helpers/masa.ts | 8 ++--- src/helpers/verify-contract.ts | 4 +-- 28 files changed, 87 insertions(+), 88 deletions(-) diff --git a/src/cli.ts b/src/cli.ts index 26a6e34..b9290aa 100644 --- a/src/cli.ts +++ b/src/cli.ts @@ -61,7 +61,7 @@ import { clear(); console.log( - chalk.red(figlet.textSync("Masa CLI", { horizontalLayout: "full" })) + chalk.red(figlet.textSync("Masa CLI", { horizontalLayout: "full" })), ); let overrides: Partial & { @@ -104,7 +104,7 @@ program (privateKey) => { overrides.privateKey = privateKey; reloadMasa(overrides); - } + }, ) .option("-r, --rpcUrl ", "RPC URL override", (rpcUrl) => { overrides.rpcUrl = rpcUrl; @@ -143,7 +143,7 @@ program .argument("", "Period of registration") .description("Creates a masa identity with soul name") .action((soulName: string, duration: number) => - identityCreate("ETH", soulName, duration) + identityCreate("ETH", soulName, duration), ); identity @@ -172,7 +172,7 @@ program (soulNameContractAddress) => { overrides.soulNameContractAddress = soulNameContractAddress; reloadMasa(overrides); - } + }, ) .description("Soul Name Commands"); @@ -211,7 +211,7 @@ program .argument("", "period of registration") .description("Creates a new soul name") .action((soulName: string, duration: number) => - soulNameCreate("ETH", soulName, duration) + soulNameCreate("ETH", soulName, duration), ); soulName @@ -226,7 +226,7 @@ program .argument("", "Receiver to receive the Soul Name") .description("Sends a soul name to that you own to a receiver") .action((soulName: string, receiver: string) => - soulNameSend(soulName, receiver) + soulNameSend(soulName, receiver), ); soulName @@ -285,11 +285,11 @@ program .argument("", "ID of the Credit Score to grant access") .argument( "", - "ID of the identity that should receive access" + "ID of the identity that should receive access", ) .description("Creates a Soul Linker Passport") .action((creditScoreId, readerIdentityId) => - createLink(masa.creditScore.links, creditScoreId, readerIdentityId) + createLink(masa.creditScore.links, creditScoreId, readerIdentityId), ); creditScoreLink @@ -297,7 +297,7 @@ program .argument("", "Masa Soul Linker passport") .description("Establishes a link to a Credit Score") .action((passport) => - establishLink(masa.creditScore.links, "ETH", passport) + establishLink(masa.creditScore.links, "ETH", passport), ); creditScoreLink @@ -310,11 +310,11 @@ program .command("list") .argument( "", - "ID of the Credit Score to list all the links of" + "ID of the Credit Score to list all the links of", ) .description("Lists all soul links for a credit score id") .action((creditScoreId) => - listLinks(masa.creditScore.links, creditScoreId) + listLinks(masa.creditScore.links, creditScoreId), ); creditScoreLink @@ -322,11 +322,11 @@ program .argument("", "ID of the Credit Score to grant access") .option( "-r, --reader-identity-id ", - "ID of the identity that should receive access" + "ID of the identity that should receive access", ) .description("Verifies a Soul Link") .action((creditScoreId, { readerIdentityId }) => - verifyLink(masa.creditScore.links, creditScoreId, readerIdentityId) + verifyLink(masa.creditScore.links, creditScoreId, readerIdentityId), ); creditScoreLink @@ -334,11 +334,11 @@ program .argument("", "ID of the Credit Score to grant access") .argument( "", - "ID of the identity that should receive access" + "ID of the identity that should receive access", ) .description("Breaks a Soul Link") .action((creditScoreId, readerIdentityId) => - breakLink(masa.creditScore.links, creditScoreId, readerIdentityId) + breakLink(masa.creditScore.links, creditScoreId, readerIdentityId), ); } } @@ -385,7 +385,7 @@ program .argument("", "Address of the SBT contract to list") .option("-a, --address
", "Address override") .action((contractAddress: string, { address }) => - sbtList(contractAddress, address) + sbtList(contractAddress, address), ); sbt @@ -394,7 +394,7 @@ program .argument("", "ID of the SBT to burn") .description("Burns an SBT") .action((contractAddress: string, SBTId: string) => - sbtBurn(contractAddress, SBTId) + sbtBurn(contractAddress, SBTId), ); } @@ -426,7 +426,7 @@ program .argument("", "Address of the SBT to mint on") .argument("", "Address of the SBT receiver") .action((contractAddress, soulname) => - asbtMintFromSoulname(contractAddress, soulname) + asbtMintFromSoulname(contractAddress, soulname), ); } @@ -444,11 +444,11 @@ program .description("Adds an Authority to the SSSBT") .argument( "", - "Address of the SBT to add the authority to" + "Address of the SBT to add the authority to", ) .argument("", "Address of the Authority") .action((contractAddress: string, authorityAddress: string) => - sssbtAddAuthority(contractAddress, authorityAddress) + sssbtAddAuthority(contractAddress, authorityAddress), ); sssbt @@ -457,7 +457,7 @@ program .argument("", "Address of the SBT to mint on") .argument("", "Address of the SBT receiver") .action((contractAddress: string, receiver: string) => - sssbtSign(contractAddress, receiver) + sssbtSign(contractAddress, receiver), ); sssbt @@ -472,9 +472,9 @@ program contractAddress: string, authorityAddress: string, signatureDate: number, - signature: string + signature: string, ) => - sssbtMint(contractAddress, authorityAddress, signatureDate, signature) + sssbtMint(contractAddress, authorityAddress, signatureDate, signature), ); } diff --git a/src/commands/account.ts b/src/commands/account.ts index 1af7e98..2c89590 100644 --- a/src/commands/account.ts +++ b/src/commands/account.ts @@ -30,7 +30,7 @@ export const account = async (address?: string) => { console.log( `${symbol}: '${ balance % 1 === 0 ? balance : balance.toFixed(precision) - }'` + }'`, ); } } diff --git a/src/commands/credit-score/info.ts b/src/commands/credit-score/info.ts index 23d6cc3..2185115 100644 --- a/src/commands/credit-score/info.ts +++ b/src/commands/credit-score/info.ts @@ -4,17 +4,17 @@ export const info = async () => { if (masa.contracts.instances.SoulboundCreditScoreContract.hasAddress) { console.log("Soulbound Credit Score"); console.log( - `Contract Address: '${masa.contracts.instances.SoulboundCreditScoreContract.address}'` + `Contract Address: '${masa.contracts.instances.SoulboundCreditScoreContract.address}'`, ); console.log( `Total Credit Scores: ${( await masa.contracts.instances.SoulboundCreditScoreContract.totalSupply() - ).toNumber()}` + ).toNumber()}`, ); console.log(`Network: '${masa.config.networkName}'`); } else { console.error( - `Soulbound Credit Score is not deployed to network: '${masa.config.networkName}'` + `Soulbound Credit Score is not deployed to network: '${masa.config.networkName}'`, ); } }; diff --git a/src/commands/credit-score/load.ts b/src/commands/credit-score/load.ts index b08bfa9..d0f2017 100644 --- a/src/commands/credit-score/load.ts +++ b/src/commands/credit-score/load.ts @@ -3,7 +3,7 @@ import { BigNumber } from "ethers"; export const load = async (creditScoreId?: string) => { const creditScore = await masa.creditScore.load( - BigNumber.from(creditScoreId) + BigNumber.from(creditScoreId), ); console.log(JSON.stringify({ creditScore }, null, 2)); }; diff --git a/src/commands/green/create.ts b/src/commands/green/create.ts index 7f4ce69..a1ed956 100644 --- a/src/commands/green/create.ts +++ b/src/commands/green/create.ts @@ -8,27 +8,26 @@ import { export const create = async ( paymentMethod: PaymentMethod, - phoneNumber: string + phoneNumber: string, ): Promise => { console.log(`Creating Green for phone number: '${phoneNumber}'`); - const generateResult: GenerateGreenResult = await masa.green.generate( - phoneNumber - ); + const generateResult: GenerateGreenResult = + await masa.green.generate(phoneNumber); if (generateResult.success) { let verifyGreenResult: VerifyGreenResult | undefined; do { const code: string = await readLine( - "The code that has been sent to your phone number: " + "The code that has been sent to your phone number: ", ); verifyGreenResult = await masa.green.verify(phoneNumber, code); if (verifyGreenResult) { if (!verifyGreenResult.success) { console.error( - `Verifying Green failed! '${verifyGreenResult.message}'` + `Verifying Green failed! '${verifyGreenResult.message}'`, ); } @@ -53,12 +52,12 @@ export const create = async ( paymentMethod, verifyGreenResult.authorityAddress, verifyGreenResult.signatureDate, - verifyGreenResult.signature + verifyGreenResult.signature, ); if (mintGreenResult.tokenId) { console.log( - `Green successfully minted on '${masa.config.networkName}' with token ID: '${mintGreenResult.tokenId}'` + `Green successfully minted on '${masa.config.networkName}' with token ID: '${mintGreenResult.tokenId}'`, ); } } while (!mintGreenResult.tokenId); diff --git a/src/commands/green/info.ts b/src/commands/green/info.ts index 4c3709d..3127a94 100644 --- a/src/commands/green/info.ts +++ b/src/commands/green/info.ts @@ -4,17 +4,17 @@ export const info = async () => { if (masa.contracts.instances.SoulboundGreenContract.hasAddress) { console.log("Soulbound Green"); console.log( - `Contract Address: '${masa.contracts.instances.SoulboundGreenContract.address}'` + `Contract Address: '${masa.contracts.instances.SoulboundGreenContract.address}'`, ); console.log( `Total Greens: ${( await masa.contracts.instances.SoulboundGreenContract.totalSupply() - ).toNumber()}` + ).toNumber()}`, ); console.log(`Network: '${masa.config.networkName}'`); } else { console.error( - `Soulbound Green is not deployed to network: '${masa.config.networkName}'` + `Soulbound Green is not deployed to network: '${masa.config.networkName}'`, ); } }; diff --git a/src/commands/identity/create.ts b/src/commands/identity/create.ts index bb59d52..7c56445 100644 --- a/src/commands/identity/create.ts +++ b/src/commands/identity/create.ts @@ -4,12 +4,12 @@ import { PaymentMethod } from "@masa-finance/masa-sdk"; export const create = async ( paymentMethod: PaymentMethod, soulName: string, - duration: number + duration: number, ) => { const { success, message } = await masa.identity.createWithSoulName( paymentMethod, soulName, - duration + duration, ); if (!success) { diff --git a/src/commands/identity/info.ts b/src/commands/identity/info.ts index 85b4d34..c4e1424 100644 --- a/src/commands/identity/info.ts +++ b/src/commands/identity/info.ts @@ -4,17 +4,17 @@ export const info = async () => { if (masa.contracts.instances.SoulboundIdentityContract.hasAddress) { console.log("Soulbound Identity"); console.log( - `Contract Address: '${masa.contracts.instances.SoulboundIdentityContract.address}'` + `Contract Address: '${masa.contracts.instances.SoulboundIdentityContract.address}'`, ); console.log( `Total Identities: ${( await masa.contracts.instances.SoulboundIdentityContract.totalSupply() - ).toNumber()}` + ).toNumber()}`, ); console.log(`Network: '${masa.config.networkName}'`); } else { console.error( - `Soulbound Identity is not deployed to network: '${masa.config.networkName}'` + `Soulbound Identity is not deployed to network: '${masa.config.networkName}'`, ); } }; diff --git a/src/commands/sbt/ASBT/deploy.ts b/src/commands/sbt/ASBT/deploy.ts index d7b803c..2e019f6 100644 --- a/src/commands/sbt/ASBT/deploy.ts +++ b/src/commands/sbt/ASBT/deploy.ts @@ -2,7 +2,7 @@ import { masa, readLine, verifyContract } from "../../../helpers"; import fs from "fs"; const ReferenceSBTAuthorityPath = require.resolve( - "@masa-finance/masa-contracts-identity/contracts/reference/ReferenceSBTAuthorityFlattened.sol" + "@masa-finance/masa-contracts-identity/contracts/reference/ReferenceSBTAuthorityFlattened.sol", ); export const deployASBT = async (etherscanKey?: string) => { @@ -12,10 +12,10 @@ export const deployASBT = async (etherscanKey?: string) => { const symbol = await readLine("Enter the ticker of the SBT: "); const baseTokenUri = await readLine("Enter the URL for the metadata image: "); const adminAddress = await readLine( - `Admin address (leave empty to use: '${await masa.config.signer.getAddress()}'): ` + `Admin address (leave empty to use: '${await masa.config.signer.getAddress()}'): `, ); const limit = await readLine( - "Enter mint limit (0 = no limit, default = 1): " + "Enter mint limit (0 = no limit, default = 1): ", ); const deployResult = await masa.asbt.deploy({ @@ -41,7 +41,7 @@ export const deployASBT = async (etherscanKey?: string) => { address, name, abiEncodedConstructorArguments, - ReferenceSBTAuthority + ReferenceSBTAuthority, ); } }; diff --git a/src/commands/sbt/ASBT/mint.ts b/src/commands/sbt/ASBT/mint.ts index 44dd5de..ab31705 100644 --- a/src/commands/sbt/ASBT/mint.ts +++ b/src/commands/sbt/ASBT/mint.ts @@ -12,7 +12,7 @@ export const mintASBT = async (contractAddress: string, receiver: string) => { export const mintFromSoulname = async ( contractAddress: string, - soulname: string + soulname: string, ) => { const address = await masa.soulName.resolve(soulname); diff --git a/src/commands/sbt/SSSBT/add-authority.ts b/src/commands/sbt/SSSBT/add-authority.ts index 8025bee..60c8420 100644 --- a/src/commands/sbt/SSSBT/add-authority.ts +++ b/src/commands/sbt/SSSBT/add-authority.ts @@ -7,7 +7,7 @@ import { masa } from "../../../helpers"; */ export const addAuthoritySSSBT = async ( contractAddress: string, - authorityAddress: string + authorityAddress: string, ) => { const { contract } = await masa.sssbt.connect(contractAddress); diff --git a/src/commands/sbt/SSSBT/deploy.ts b/src/commands/sbt/SSSBT/deploy.ts index c9c680f..31c5311 100644 --- a/src/commands/sbt/SSSBT/deploy.ts +++ b/src/commands/sbt/SSSBT/deploy.ts @@ -2,7 +2,7 @@ import { masa, readLine, verifyContract } from "../../../helpers"; import fs from "fs"; const ReferenceSBTAuthorityPath = require.resolve( - "@masa-finance/masa-contracts-identity/contracts/reference/ReferenceSBTSelfSovereignFlattened.sol" + "@masa-finance/masa-contracts-identity/contracts/reference/ReferenceSBTSelfSovereignFlattened.sol", ); export const deploySSSBT = async (etherscanKey?: string) => { @@ -12,13 +12,13 @@ export const deploySSSBT = async (etherscanKey?: string) => { const symbol = await readLine("Enter the ticker of the SBT: "); const baseTokenUri = await readLine("Enter the URL for the metadata image: "); const authorityAddress = await readLine( - `Authority address (leave empty to use: '${await masa.config.signer.getAddress()}'): ` + `Authority address (leave empty to use: '${await masa.config.signer.getAddress()}'): `, ); const adminAddress = await readLine( - `Admin address (leave empty to use: '${await masa.config.signer.getAddress()}'): ` + `Admin address (leave empty to use: '${await masa.config.signer.getAddress()}'): `, ); const limit = await readLine( - "Enter mint limit (0 = no limit, default = 1): " + "Enter mint limit (0 = no limit, default = 1): ", ); const deployResult = await masa.sssbt.deploy({ @@ -45,7 +45,7 @@ export const deploySSSBT = async (etherscanKey?: string) => { address, name, abiEncodedConstructorArguments, - ReferenceSBTAuthority + ReferenceSBTAuthority, ); } }; diff --git a/src/commands/sbt/SSSBT/mint.ts b/src/commands/sbt/SSSBT/mint.ts index 5a03044..43742d1 100644 --- a/src/commands/sbt/SSSBT/mint.ts +++ b/src/commands/sbt/SSSBT/mint.ts @@ -11,7 +11,7 @@ export const mintSSSBT = async ( contractAddress: string, authorityAddress: string, signatureDate: number, - signature: string + signature: string, ) => { const { mint } = await masa.sssbt.connect(contractAddress); diff --git a/src/commands/sbt/info.ts b/src/commands/sbt/info.ts index f3d9917..e1342b2 100644 --- a/src/commands/sbt/info.ts +++ b/src/commands/sbt/info.ts @@ -12,7 +12,7 @@ export const info = async (address: string) => { if (supply > 0) { try { console.log( - `Contract Token URI: '${await contract.tokenURI(supply - 1)}'` + `Contract Token URI: '${await contract.tokenURI(supply - 1)}'`, ); } catch { // ignore @@ -30,7 +30,7 @@ export const info = async (address: string) => { console.log(`Total SBTs: ${supply}`); } else { console.error( - `Contract ${address} is not deployed to network: '${masa.config.networkName}'` + `Contract ${address} is not deployed to network: '${masa.config.networkName}'`, ); } }; diff --git a/src/commands/settings.ts b/src/commands/settings.ts index a5cef29..283680f 100644 --- a/src/commands/settings.ts +++ b/src/commands/settings.ts @@ -21,7 +21,7 @@ export const settingsSet = (key: string, value: string | number) => { export const settingsPreset = (environmentName: string) => { const presetEnvironment: Environment | undefined = environments.find( - (environment) => environment.name === environmentName.toLowerCase() + (environment) => environment.name === environmentName.toLowerCase(), ); if (presetEnvironment) { diff --git a/src/commands/soul-linker/break.ts b/src/commands/soul-linker/break.ts index bd172e9..b4a7cdf 100644 --- a/src/commands/soul-linker/break.ts +++ b/src/commands/soul-linker/break.ts @@ -4,7 +4,7 @@ import { MasaSoulLinker } from "@masa-finance/masa-sdk"; export const breakLink = async ( links: MasaSoulLinker, tokenId: string, - readerIdentityId: string + readerIdentityId: string, ) => { await links.break(BigNumber.from(tokenId), BigNumber.from(readerIdentityId)); }; diff --git a/src/commands/soul-linker/create.ts b/src/commands/soul-linker/create.ts index d4733dd..5c82098 100644 --- a/src/commands/soul-linker/create.ts +++ b/src/commands/soul-linker/create.ts @@ -4,11 +4,11 @@ import { MasaSoulLinker } from "@masa-finance/masa-sdk"; export const create = async ( links: MasaSoulLinker, tokenId: string, - readerIdentityId: string + readerIdentityId: string, ) => { const { success, message } = await links.create( BigNumber.from(tokenId), - BigNumber.from(readerIdentityId) + BigNumber.from(readerIdentityId), ); if (!success) { diff --git a/src/commands/soul-linker/establish.ts b/src/commands/soul-linker/establish.ts index 1db3210..0aafe5a 100644 --- a/src/commands/soul-linker/establish.ts +++ b/src/commands/soul-linker/establish.ts @@ -9,7 +9,7 @@ import { MasaSoulLinker, PaymentMethod } from "@masa-finance/masa-sdk"; export const establish = async ( links: MasaSoulLinker, paymentMethod: PaymentMethod, - passport: string + passport: string, ) => { await links.establish(paymentMethod, passport); }; diff --git a/src/commands/soul-linker/query.ts b/src/commands/soul-linker/query.ts index eb0a90e..058b02e 100644 --- a/src/commands/soul-linker/query.ts +++ b/src/commands/soul-linker/query.ts @@ -9,7 +9,7 @@ import { MasaSoulLinker, PaymentMethod } from "@masa-finance/masa-sdk"; export const query = async ( links: MasaSoulLinker, paymentMethod: PaymentMethod, - passport: string + passport: string, ) => { await links.query(paymentMethod, passport); }; diff --git a/src/commands/soul-linker/verify.ts b/src/commands/soul-linker/verify.ts index fb15eb9..61d4997 100644 --- a/src/commands/soul-linker/verify.ts +++ b/src/commands/soul-linker/verify.ts @@ -4,10 +4,10 @@ import { MasaSoulLinker } from "@masa-finance/masa-sdk"; export const verify = async ( links: MasaSoulLinker, tokenId: string, - readerIdentityId?: string + readerIdentityId?: string, ) => { await links.verify( BigNumber.from(tokenId), - readerIdentityId ? BigNumber.from(readerIdentityId) : undefined + readerIdentityId ? BigNumber.from(readerIdentityId) : undefined, ); }; diff --git a/src/commands/soul-name/create.ts b/src/commands/soul-name/create.ts index 142517f..11f0003 100644 --- a/src/commands/soul-name/create.ts +++ b/src/commands/soul-name/create.ts @@ -4,12 +4,12 @@ import { PaymentMethod } from "@masa-finance/masa-sdk"; export const create = async ( paymentMethod: PaymentMethod, soulName: string, - duration: number + duration: number, ) => { const { success, message } = await masa.soulName.create( paymentMethod, soulName, - duration + duration, ); if (!success) { diff --git a/src/commands/soul-name/info.ts b/src/commands/soul-name/info.ts index adccbe0..77ff698 100644 --- a/src/commands/soul-name/info.ts +++ b/src/commands/soul-name/info.ts @@ -4,20 +4,20 @@ export const info = async () => { if (masa.contracts.instances.SoulNameContract.hasAddress) { console.log("Soul Name"); console.log( - `Contract Address: '${masa.contracts.instances.SoulNameContract.address}'` + `Contract Address: '${masa.contracts.instances.SoulNameContract.address}'`, ); console.log( - `Extension: '${await masa.contracts.instances.SoulNameContract.extension()}'` + `Extension: '${await masa.contracts.instances.SoulNameContract.extension()}'`, ); console.log( `Total Soul Names: ${( await masa.contracts.instances.SoulNameContract.totalSupply() - ).toNumber()}` + ).toNumber()}`, ); console.log(`Network: '${masa.config.networkName}'`); } else { console.error( - `Soul Name is not deployed to network: '${masa.config.networkName}'` + `Soul Name is not deployed to network: '${masa.config.networkName}'`, ); } }; diff --git a/src/commands/soul-name/resolve.ts b/src/commands/soul-name/resolve.ts index d4a3ea8..c91b56f 100644 --- a/src/commands/soul-name/resolve.ts +++ b/src/commands/soul-name/resolve.ts @@ -19,7 +19,7 @@ export const resolveReverse = async (address: string) => { if (soulNames.length > 0) { console.log("Soul names:", "\n"); soulNames.forEach((soulName: string) => - console.log(`${soulName}${extension}`) + console.log(`${soulName}${extension}`), ); } else { console.log(`No soul names for ${address}`); diff --git a/src/commands/soul-name/show.ts b/src/commands/soul-name/show.ts index c392c89..d38278a 100644 --- a/src/commands/soul-name/show.ts +++ b/src/commands/soul-name/show.ts @@ -5,7 +5,7 @@ export const show = async (soulName: string) => { const extension = await masa.contracts.instances.SoulNameContract.extension(); const details = await masa.soulName.loadSoulNameByName( - soulName.replace(extension, "") + soulName.replace(extension, ""), ); if (details) { diff --git a/src/commands/version.ts b/src/commands/version.ts index b6311f3..1f14044 100644 --- a/src/commands/version.ts +++ b/src/commands/version.ts @@ -5,12 +5,12 @@ import { version as cliVersion } from "../../package.json"; export const version = () => { const versions = masa.utils.version(); console.log( - `CLI: v${cliVersion} Contracts: v${versions.contractsVersion} SDK: v${versions.sdkVersion}` + `CLI: v${cliVersion} Contracts: v${versions.contractsVersion} SDK: v${versions.sdkVersion}`, ); console.log( `Arweave Endpoint: ${config.get("arweave-protocol")}://${config.get( - "arweave-host" - )}:${config.get("arweave-port")}` + "arweave-host", + )}:${config.get("arweave-port")}`, ); console.log(`RPC Endpoint: ${config.get("rpc-url")}`); console.log(`Network: ${config.get("network")}`); diff --git a/src/doc.ts b/src/doc.ts index bd024fa..ceb8cf9 100644 --- a/src/doc.ts +++ b/src/doc.ts @@ -63,7 +63,7 @@ const printSubCommand = (command: DocCommand, subCommand: DocCommand) => { console.log( `\n#### \`masa ${`${command.command} ${ subCommand.command - } ${formatArguments(subCommand.arguments)}`.trimEnd()}\`` + } ${formatArguments(subCommand.arguments)}`.trimEnd()}\``, ); printDetails(subCommand); @@ -72,12 +72,12 @@ const printSubCommand = (command: DocCommand, subCommand: DocCommand) => { const printSubSubCommand = ( command: DocCommand, subCommand: DocCommand, - subSubCommand: DocCommand + subSubCommand: DocCommand, ) => { console.log( `\n##### \`masa ${`${command.command} ${subCommand.command} ${ subSubCommand.command - } ${formatArguments(subSubCommand.arguments)}`.trimEnd()}\`` + } ${formatArguments(subSubCommand.arguments)}`.trimEnd()}\``, ); printDetails(subSubCommand); @@ -86,8 +86,8 @@ const printSubSubCommand = ( for (const command of commands) { console.log( `### \`masa ${`${command.command} ${formatArguments( - command.arguments - )}`.trimEnd()}\`` + command.arguments, + )}`.trimEnd()}\``, ); console.log(`${escape(command.description)}`); console.log(listArguments(command.arguments)); diff --git a/src/helpers/masa.ts b/src/helpers/masa.ts index 46ea923..b7764e9 100644 --- a/src/helpers/masa.ts +++ b/src/helpers/masa.ts @@ -17,7 +17,7 @@ const loadWallet = ({ } = {}) => new Wallet( privateKey || (config.get("private-key") as string), - new providers.JsonRpcProvider(rpcUrl || (config.get("rpc-url") as string)) + new providers.JsonRpcProvider(rpcUrl || (config.get("rpc-url") as string)), ); const masaArgs: MasaArgs = { @@ -40,7 +40,7 @@ export const reloadMasa = ( privateKey?: string; rpcUrl?: string; soulNameContractAddress?: string; - } + }, ) => { // override network if (overrideConfig.networkName) { @@ -55,7 +55,7 @@ export const reloadMasa = ( }; } else { console.error( - `Network '${overrideConfig.networkName}' not found! Using '${masaArgs.networkName}'` + `Network '${overrideConfig.networkName}' not found! Using '${masaArgs.networkName}'`, ); // network not found overrideConfig = { @@ -94,7 +94,7 @@ export const reloadMasa = ( contractOverrides: { SoulNameContract: SoulName__factory.connect( overrideConfig.soulNameContractAddress, - overrideConfig?.signer || masa.config.signer + overrideConfig?.signer || masa.config.signer, ), }, }; diff --git a/src/helpers/verify-contract.ts b/src/helpers/verify-contract.ts index 39c660c..bf23111 100644 --- a/src/helpers/verify-contract.ts +++ b/src/helpers/verify-contract.ts @@ -7,7 +7,7 @@ export const verifyContract = async ( contractaddress: string, name: string, abiEncodedConstructorArguments: string, - sourceCode: string + sourceCode: string, ) => { console.log(`Verifying contract '${contractaddress}'`); @@ -40,7 +40,7 @@ export const verifyContract = async ( headers: { "Content-Type": "application/x-www-form-urlencoded", }, - } + }, ); const { result: guid, status } = verifySourcecodeResult;