legend-cli 1.0.2 → 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,14 +0,0 @@
1
- {
2
- "name": "hardhat3",
3
- "version": "1.0.0",
4
- "type": "module",
5
- "devDependencies": {
6
- "@nomicfoundation/hardhat-ignition": "^3.0.5",
7
- "@nomicfoundation/hardhat-toolbox-viem": "^5.0.1",
8
- "@types/node": "^22.19.1",
9
- "forge-std": "github:foundry-rs/forge-std#v1.9.4",
10
- "hardhat": "^3.0.15",
11
- "typescript": "~5.8.0",
12
- "viem": "^2.40.0"
13
- }
14
- }
@@ -1,31 +0,0 @@
1
- import { network } from "hardhat";
2
-
3
- const { viem } = await network.connect({
4
- network: "hardhatOp",
5
- chainType: "op",
6
- });
7
-
8
- console.log("Sending transaction using the OP chain type");
9
-
10
- const publicClient = await viem.getPublicClient();
11
- const [senderClient] = await viem.getWalletClients();
12
-
13
- console.log("Sending 1 wei from", senderClient.account.address, "to itself");
14
-
15
- const l1Gas = await publicClient.estimateL1Gas({
16
- account: senderClient.account.address,
17
- to: senderClient.account.address,
18
- value: 1n,
19
- });
20
-
21
- console.log("Estimated L1 gas:", l1Gas);
22
-
23
- console.log("Sending L2 transaction");
24
- const tx = await senderClient.sendTransaction({
25
- to: senderClient.account.address,
26
- value: 1n,
27
- });
28
-
29
- await publicClient.waitForTransactionReceipt({ hash: tx });
30
-
31
- console.log("Transaction sent successfully");
@@ -1,46 +0,0 @@
1
- import assert from "node:assert/strict";
2
- import { describe, it } from "node:test";
3
-
4
- import { network } from "hardhat";
5
-
6
- describe("Counter", async function () {
7
- const { viem } = await network.connect();
8
- const publicClient = await viem.getPublicClient();
9
-
10
- it("Should emit the Increment event when calling the inc() function", async function () {
11
- const counter = await viem.deployContract("Counter");
12
-
13
- await viem.assertions.emitWithArgs(
14
- counter.write.inc(),
15
- counter,
16
- "Increment",
17
- [1n],
18
- );
19
- });
20
-
21
- it("The sum of the Increment events should match the current value", async function () {
22
- const counter = await viem.deployContract("Counter");
23
- const deploymentBlockNumber = await publicClient.getBlockNumber();
24
-
25
- // run a series of increments
26
- for (let i = 1n; i <= 10n; i++) {
27
- await counter.write.incBy([i]);
28
- }
29
-
30
- const events = await publicClient.getContractEvents({
31
- address: counter.address,
32
- abi: counter.abi,
33
- eventName: "Increment",
34
- fromBlock: deploymentBlockNumber,
35
- strict: true,
36
- });
37
-
38
- // check that the aggregated events match the current value
39
- let total = 0n;
40
- for (const event of events) {
41
- total += event.args.by;
42
- }
43
-
44
- assert.equal(total, await counter.read.x());
45
- });
46
- });
@@ -1,13 +0,0 @@
1
- /* Based on https://github.com/tsconfig/bases/blob/501da2bcd640cf95c95805783e1012b992338f28/bases/node22.json */
2
- {
3
- "compilerOptions": {
4
- "lib": ["es2023"],
5
- "module": "node16",
6
- "target": "es2022",
7
- "strict": true,
8
- "esModuleInterop": true,
9
- "skipLibCheck": true,
10
- "moduleResolution": "node16",
11
- "outDir": "dist"
12
- }
13
- }
package/temp/createApp.js DELETED
@@ -1,69 +0,0 @@
1
- import { Prompt } from '@poppinss/prompts'
2
- import chalk from 'chalk'
3
- import path from 'path'
4
- import { MESSAGES } from '../helpers/constant.js'
5
- import { extractExampleRepo, getExamples } from '../helpers/utils.js'
6
- import { install } from '../helpers/exec.js'
7
- import { createProject } from './createProject.js'
8
- import ora from 'ora'
9
-
10
- const prompt = new Prompt()
11
-
12
- const FRAMEWORKS = [
13
- // { name: 'cra', message: 'CRA' },
14
- { name: 'next', message: 'Next' },
15
- // { name: 'vite', message: 'Vite' },
16
- ]
17
-
18
- const LANGUAGES = [
19
-
20
- ]
21
-
22
- const BLOCKCHAINS = [
23
-
24
- ]
25
-
26
- const TEMPLATES = [
27
- { name: 'connect-wallet', message: 'Connect Wallet', framework: 'next' }
28
- ]
29
-
30
- const createApp = async(options) => {
31
- let { template } = options
32
-
33
- console.log("OPTIONS", options)
34
-
35
- const { name, appRoot, appName } = await createProject({ default: 'creator' })
36
- const spinner = ora({ color: 'magenta' })
37
-
38
- console.log(`\nCreating a new HashKit app in ${chalk.green(appRoot)} \n`)
39
-
40
- const framework = await prompt.choice(MESSAGES.framework, FRAMEWORKS, { default: 'next' })
41
-
42
- if (!template) {
43
- spinner.start(`Fetching templates. Please wait, do not press any key\n`)
44
- const tpls = await getExamples()
45
- spinner.stop()
46
- template = await prompt.choice(MESSAGES.template, tpls)
47
- }
48
-
49
- // console.log("TPLS", tpls)
50
- // const template = await prompt.choice(MESSAGES.template, TEMPLATES.filter(t => t.framework == framework))
51
-
52
- spinner.start(`Downloading files for template ${template}. This might take a moment\n`)
53
- await extractExampleRepo(appRoot, template)
54
- process.chdir(path.resolve(name))
55
- spinner.stop()
56
- console.log(`\nDownloaded and extracted template ${chalk.green(template)} for ${chalk.magenta(appName)}\n`)
57
-
58
- console.log(`Installing packages. This might take a couple of minutes \n`)
59
- await install('yarn', [`--cwd ${appRoot}`])
60
-
61
- console.log()
62
- console.log(`${chalk.green('Congratulations!')} You have created ${chalk.magenta(appName)} at ${chalk.gray(appRoot)}`)
63
- console.log(`To begin, start typing: \n`)
64
- console.log(`\t${chalk.green('cd')} ${appName}`)
65
- console.log(`\t${chalk.green('yarn dev')}`)
66
- console.log()
67
- }
68
-
69
- export default createApp
@@ -1,77 +0,0 @@
1
- import { Prompt } from '@poppinss/prompts'
2
- import chalk from 'chalk'
3
- import path from 'path'
4
- import { extractContractRepo, getContracts } from '../helpers/utils.js'
5
- import { createProject } from './createProject.js'
6
- import { install } from '../helpers/exec.js'
7
- import ora from 'ora'
8
-
9
- const prompt = new Prompt()
10
-
11
- const FRAMEWORKS = [
12
- { name: 'truffle', message: 'Truffle' },
13
- { name: 'hardhat', message: 'Hardhat' },
14
- { name: 'foundry', message: 'Foundry' }
15
- ]
16
-
17
- const BLOCKCHAINS = [
18
- { name: 'evm', message: 'Ethereum Virtual Machine' },
19
- { name: 'solana', message: 'Solana' }
20
- ]
21
-
22
- const CONTRACTS = [
23
- { name: 'blank', message: 'Blank Contract' },
24
- { name: 'erc20', message: 'ERC20' },
25
- { name: 'erc721', message: 'ERC721' },
26
- { name: 'erc1155', message: 'ERC1155' },
27
- ]
28
-
29
- const EXTENSIONS = [
30
-
31
- ]
32
-
33
- const LANGUAGES = [
34
-
35
- ]
36
-
37
- const TEMPLATES = [
38
- { name: 'connect-wallet', message: 'Connect Wallet', framework: 'next' }
39
- ]
40
-
41
- const createContract = async(options) => {
42
- let { template } = options
43
-
44
- const spinner = ora({ color: 'magenta' })
45
- const { name, appRoot, appName } = await createProject({ default: 'hashkit-contract' })
46
-
47
- console.log(`\nCreating a new HashKit contract in ${chalk.green(appRoot)} \n`)
48
-
49
- if (!template) {
50
- spinner.start(`Fetching templates. Please wait, do not press any key\n`)
51
- const tpls = await getContracts()
52
- spinner.stop()
53
- template = await prompt.choice('Which contract template you want to use?', tpls)
54
- }
55
-
56
- spinner.start(`Downloading files for template ${template}. This might take a moment`)
57
- await extractContractRepo(appRoot, template)
58
- process.chdir(path.resolve(name))
59
- spinner.stop()
60
- console.log(chalk.green(`\nExtracted ${template} to ${appRoot}\n`))
61
-
62
- console.log(`Installing packages. This might take a couple of minutes \n`)
63
- await install('yarn', [`--cwd ${appRoot}`])
64
-
65
- console.log()
66
- console.log(`${chalk.green('Congratulations!')} You have created ${chalk.magenta(appName)} at ${chalk.green(appRoot)}`)
67
- console.log(`To begin, start typing: \n`)
68
- console.log(`\t${chalk.green('cd')} ${appName}`)
69
- console.log(`\t${chalk.green('yarn compile')}`)
70
- console.log()
71
-
72
- }
73
-
74
- export default createContract
75
-
76
- // const framework = await prompt.choice('What framework do you want to use?', FRAMEWORKS, { default: 'hardh' })
77
- // const contract = await prompt.choice('What contract do you want to begin with?', CONTRACTS)
@@ -1,77 +0,0 @@
1
- import { Prompt } from '@poppinss/prompts'
2
- import chalk from 'chalk'
3
- import path from 'path'
4
- import { extractContractRepo, getContracts } from '../helpers/utils.js'
5
- import { createProject } from './createProject.js'
6
- import { install } from '../helpers/exec.js'
7
- import ora from 'ora'
8
-
9
- const prompt = new Prompt()
10
-
11
- const FRAMEWORKS = [
12
- { name: 'truffle', message: 'Truffle' },
13
- { name: 'hardhat', message: 'Hardhat' },
14
- { name: 'foundry', message: 'Foundry' }
15
- ]
16
-
17
- const BLOCKCHAINS = [
18
- { name: 'evm', message: 'Ethereum Virtual Machine' },
19
- { name: 'solana', message: 'Solana' }
20
- ]
21
-
22
- const CONTRACTS = [
23
- { name: 'blank', message: 'Blank Contract' },
24
- { name: 'erc20', message: 'ERC20' },
25
- { name: 'erc721', message: 'ERC721' },
26
- { name: 'erc1155', message: 'ERC1155' },
27
- ]
28
-
29
- const EXTENSIONS = [
30
-
31
- ]
32
-
33
- const LANGUAGES = [
34
-
35
- ]
36
-
37
- const TEMPLATES = [
38
- { name: 'connect-wallet', message: 'Connect Wallet', framework: 'next' }
39
- ]
40
-
41
- export const createContract = async(options) => {
42
- let { template } = options
43
-
44
- const spinner = ora({ color: 'magenta' })
45
- const { name, appRoot, appName } = await createProject({ default: 'hashkit-contract' })
46
-
47
- console.log(`\nCreating a new HashKit contract in ${chalk.green(appRoot)} \n`)
48
-
49
- if (!template) {
50
- spinner.start(`Fetching templates. Please wait, do not press any key\n`)
51
- const tpls = await getContracts()
52
- spinner.stop()
53
- template = await prompt.choice('Which contract template you want to use?', tpls)
54
- }
55
-
56
- spinner.start(`Downloading files for template ${template}. This might take a moment`)
57
- await extractContractRepo(appRoot, template)
58
- process.chdir(path.resolve(name))
59
- spinner.stop()
60
- console.log(chalk.green(`\nExtracted ${template} to ${appRoot}\n`))
61
-
62
- console.log(`Installing packages. This might take a couple of minutes \n`)
63
- await install('yarn', [`--cwd ${appRoot}`])
64
-
65
- console.log()
66
- console.log(`${chalk.green('Congratulations!')} You have created ${chalk.magenta(appName)} at ${chalk.green(appRoot)}`)
67
- console.log(`To begin, start typing: \n`)
68
- console.log(`\t${chalk.green('cd')} ${appName}`)
69
- console.log(`\t${chalk.green('yarn compile')}`)
70
- console.log()
71
-
72
- }
73
-
74
- // export default createContract
75
-
76
- // const framework = await prompt.choice('What framework do you want to use?', FRAMEWORKS, { default: 'hardh' })
77
- // const contract = await prompt.choice('What contract do you want to begin with?', CONTRACTS)
@@ -1,31 +0,0 @@
1
- import { Prompt } from '@poppinss/prompts'
2
- import path from 'path'
3
- import { validatePackageName } from '../helpers/validate.js'
4
- import { MESSAGES } from '../helpers/constant.js'
5
- import { mkdir } from '../helpers/files.js'
6
- import { banner } from '../helpers/banner.js'
7
-
8
- const prompt = new Prompt()
9
-
10
- const ASK_CONFIG = { default: 'hashkit-app' }
11
-
12
- export const createProject = async(config = ASK_CONFIG) => {
13
- try {
14
- banner()
15
-
16
- let name = await prompt.ask(MESSAGES.project, config)
17
- const validName = validatePackageName(name)
18
- if (!validName) {
19
- return false
20
- }
21
- name = name.toLowerCase()
22
-
23
- const appRoot = path.resolve(name)
24
- const appName = path.basename(appRoot)
25
- await mkdir(appRoot)
26
- return { appName, appRoot, name }
27
-
28
- } catch (e) {
29
- return false
30
- }
31
- }
package/temp/extract.js DELETED
@@ -1,8 +0,0 @@
1
- import { getExamples } from "../helpers/utils.js"
2
-
3
- const extract = async() => {
4
- const names = await getExamples()
5
- console.log("PROJECT NAMES", names)
6
- }
7
-
8
- export default extract
@@ -1,38 +0,0 @@
1
- import { Prompt } from "@poppinss/prompts"
2
- import { writeFileSync } from 'fs'
3
- import { TEMPLATE_STDLIB } from "../src/templates/func-libs.js"
4
- import { mkdir } from "../src/helpers/files.js"
5
- import { fixPath } from "../src/helpers/os.js"
6
- import { logError, logSuccess } from "../src/helpers/logger.js"
7
- import { TEMPLATE_COUNTER } from "../src/templates/func-counter.js"
8
-
9
- export const initContract = async(opts) => {
10
- try {
11
-
12
- const root = process.cwd()
13
- const prompt = new Prompt()
14
-
15
- const folderName = await prompt.ask(`Contract Project Name: `, { default: 'func-project' })
16
-
17
- await mkdir(fixPath(`${root}/${folderName}/contracts`))
18
- await mkdir(fixPath(`${root}/${folderName}/contracts/imports`))
19
- await mkdir(fixPath(`${root}/${folderName}/build/imports`))
20
-
21
- writeFileSync(fixPath(`${root}/${folderName}/build/imports/stdlib.fc`), TEMPLATE_STDLIB)
22
- writeFileSync(fixPath(`${root}/${folderName}/contracts/counter.fc`), TEMPLATE_COUNTER)
23
- writeFileSync(fixPath(`${root}/${folderName}/contracts/imports/stdlib.fc`), TEMPLATE_STDLIB)
24
- writeFileSync(fixPath(`${root}/${folderName}/hashkit.config.js`), JSON.stringify({ contract: true }))
25
-
26
- logSuccess(
27
- '🎪 Congrats! Your new smart contract project is ready \nSuccessfully initialized by HashKit',
28
- 'To make changes to your project',
29
- `cd ${folderName}/`
30
- )
31
-
32
- } catch (e) {
33
-
34
- logError(e)
35
- console.log(e)
36
- }
37
- // console.log("INITIALIZE CONTRACT FOLDER")
38
- }
@@ -1,120 +0,0 @@
1
- import { writeFileSync, readFileSync } from 'fs'
2
- import { glob } from 'glob'
3
- import ora from 'ora'
4
- import { Prompt } from '@poppinss/prompts'
5
- // import { compileContract } from 'ton-compiler'
6
- import { compileFunc } from '@ton-community/func-js'
7
- import { isHashkit } from "../helpers/detection.js"
8
- import { log, logError } from "../helpers/logger.js"
9
- import { fixPath, isWindows } from '../helpers/os.js'
10
- import { funcParser } from '../helpers/func-parser.js'
11
- import { ipfsUpload } from '../helpers/ipfs.js'
12
- import { exit } from 'process'
13
-
14
- export const publishContract = async(contractName, ops) => {
15
- try {
16
- const root = process.cwd()
17
-
18
- const spinner = ora({ color: 'magenta' })
19
-
20
- console.log("CONTRACT", contractName, ops)
21
-
22
- // return
23
-
24
- let contractPath
25
-
26
- if (!isHashkit(root)) {
27
- throw Error('Not HashKit contract project')
28
- }
29
-
30
- const prompt = new Prompt()
31
-
32
- let contracts = await glob(`contracts/*.fc`, { ignore: ['node_modules/**', 'artifacts/**'] })
33
-
34
- if (!contractName) {
35
- const contractNames = contracts
36
- .map(f => f
37
- .substring((isWindows ? f.lastIndexOf("\\") : f.lastIndexOf('/')) + 1)
38
- .replace(`.fc`, '')
39
- )
40
- contractName = await prompt.choice('Select which contract to compile', contractNames)
41
- }
42
-
43
- contractPath = contracts.find(f => f.endsWith(`${contractName}.fc`))
44
- log(`Selected File: ${contractName} ${contractPath}`)
45
-
46
-
47
- const contract = funcParser(`${root}/${contractPath}`)
48
-
49
- // const files = [
50
- // fixPath(`${root}/contracts/imports/stdlib.fc`),
51
- // fixPath(`${root}/contracts/${contractName}.fc`)
52
- // ]
53
-
54
- const sourceName = `${contractName}.fc`
55
- const mainSource = readFileSync(fixPath(`${root}/contracts/${sourceName}`)).toString().replace(/imports\//gm, '')
56
-
57
- const sources = contract.files.reduce((o, c) => ({
58
- ...o,
59
- [c]: readFileSync(fixPath(`${root}/contracts/imports/${c}`)).toString()
60
- }), { })
61
-
62
- const compiled = await compileFunc({ targets: [sourceName], sources: { ...sources, [sourceName]: mainSource } })
63
-
64
- if (!compiled.status) {
65
- console.log("Something broke", compiled)
66
- exit()
67
- }
68
-
69
- // console.log("CONTRACT", contract)
70
- // console.log("COMPILED", Object.keys(compiled))
71
- // console.log("STATUS", compiled.status)
72
- // console.log("BOC", compiled.codeBoc)
73
- // console.log("SNAP", compiled.snapshot)
74
-
75
- // const compiled = await compileContract({ files, stdlib: false, version: 'latest' })
76
-
77
- // const b64code = compiled.output.toString('base64')
78
- // const hexcode = compiled.output.toString('hex')
79
-
80
- const b64code = compiled.codeBoc
81
- const hexcode = compiled.codeHashHex
82
-
83
- spinner.start(`Publishing contract content\n`)
84
-
85
- const ipfs = await ipfsUpload(JSON.stringify(compiled.snapshot))
86
-
87
- // console.log("IPFS", ipfs.Hash)
88
-
89
- spinner.succeed(`Contract code uploaded! Preparing metadata`)
90
-
91
- writeFileSync(fixPath(`${root}/build/${contractName}.fif`), compiled.fiftCode)
92
-
93
- const contractData = {
94
- name: contractName,
95
- license: 'MIT',
96
- params: contract.params,
97
- getters: contract.getters,
98
- code: `ipfs://${ipfs.Hash}`,
99
- b64: b64code,
100
- hex: hexcode,
101
- size: atob(b64code).length / 1e+6,
102
- version: 2,
103
- publisher: 'HashKit CLI',
104
- publisherUrl: 'https://hashkit.xyz',
105
- }
106
-
107
- writeFileSync(fixPath(`${root}/build/${contractName}.abi.json`), JSON.stringify(contractData))
108
-
109
- spinner.start(`Publishing contract metadata\n`)
110
-
111
- const meta = await ipfsUpload(JSON.stringify(contractData))
112
-
113
- spinner.succeed(`Contract metadata uploaded ipfs://${meta.Hash}`)
114
-
115
- // console.log("ROOT", contractData, main)
116
-
117
- } catch (e) {
118
- logError(e)
119
- }
120
- }
@@ -1,120 +0,0 @@
1
- import { writeFileSync, readFileSync } from 'fs'
2
- import { glob } from 'glob'
3
- import ora from 'ora'
4
- import { Prompt } from '@poppinss/prompts'
5
- // import { compileContract } from 'ton-compiler'
6
- import { compileFunc } from '@ton-community/func-js'
7
- import { isHashkit } from "../helpers/detection.js"
8
- import { log, logError } from "../helpers/logger.js"
9
- import { fixPath, isWindows } from '../helpers/os.js'
10
- import { funcParser } from '../helpers/func-parser.js'
11
- import { ipfsUpload } from '../helpers/ipfs.js'
12
- import { exit } from 'process'
13
-
14
- export const publishContract = async(contractName, ops) => {
15
- try {
16
- const root = process.cwd()
17
-
18
- const spinner = ora({ color: 'magenta' })
19
-
20
- console.log("CONTRACT", contractName, ops)
21
-
22
- // return
23
-
24
- let contractPath
25
-
26
- if (!isHashkit(root)) {
27
- throw Error('Not HashKit contract project')
28
- }
29
-
30
- const prompt = new Prompt()
31
-
32
- let contracts = await glob(`contracts/*.fc`, { ignore: ['node_modules/**', 'artifacts/**'] })
33
-
34
- if (!contractName) {
35
- const contractNames = contracts
36
- .map(f => f
37
- .substring((isWindows ? f.lastIndexOf("\\") : f.lastIndexOf('/')) + 1)
38
- .replace(`.fc`, '')
39
- )
40
- contractName = await prompt.choice('Select which contract to compile', contractNames)
41
- }
42
-
43
- contractPath = contracts.find(f => f.endsWith(`${contractName}.fc`))
44
- log(`Selected File: ${contractName} ${contractPath}`)
45
-
46
-
47
- const contract = funcParser(`${root}/${contractPath}`)
48
-
49
- // const files = [
50
- // fixPath(`${root}/contracts/imports/stdlib.fc`),
51
- // fixPath(`${root}/contracts/${contractName}.fc`)
52
- // ]
53
-
54
- const sourceName = `${contractName}.fc`
55
- const mainSource = readFileSync(fixPath(`${root}/contracts/${sourceName}`)).toString().replace(/imports\//gm, '')
56
-
57
- const sources = contract.files.reduce((o, c) => ({
58
- ...o,
59
- [c]: readFileSync(fixPath(`${root}/contracts/imports/${c}`)).toString()
60
- }), { })
61
-
62
- const compiled = await compileFunc({ targets: [sourceName], sources: { ...sources, [sourceName]: mainSource } })
63
-
64
- if (!compiled.status) {
65
- console.log("Something broke", compiled)
66
- exit()
67
- }
68
-
69
- // console.log("CONTRACT", contract)
70
- // console.log("COMPILED", Object.keys(compiled))
71
- // console.log("STATUS", compiled.status)
72
- // console.log("BOC", compiled.codeBoc)
73
- // console.log("SNAP", compiled.snapshot)
74
-
75
- // const compiled = await compileContract({ files, stdlib: false, version: 'latest' })
76
-
77
- // const b64code = compiled.output.toString('base64')
78
- // const hexcode = compiled.output.toString('hex')
79
-
80
- const b64code = compiled.codeBoc
81
- const hexcode = compiled.codeHashHex
82
-
83
- spinner.start(`Publishing contract content\n`)
84
-
85
- const ipfs = await ipfsUpload(JSON.stringify(compiled.snapshot))
86
-
87
- // console.log("IPFS", ipfs.Hash)
88
-
89
- spinner.succeed(`Contract code uploaded! Preparing metadata`)
90
-
91
- writeFileSync(fixPath(`${root}/build/${contractName}.fif`), compiled.fiftCode)
92
-
93
- const contractData = {
94
- name: contractName,
95
- license: 'MIT',
96
- params: contract.params,
97
- getters: contract.getters,
98
- code: `ipfs://${ipfs.Hash}`,
99
- b64: b64code,
100
- hex: hexcode,
101
- size: atob(b64code).length / 1e+6,
102
- version: 2,
103
- publisher: 'HashKit CLI',
104
- publisherUrl: 'https://hashkit.xyz',
105
- }
106
-
107
- writeFileSync(fixPath(`${root}/build/${contractName}.abi.json`), JSON.stringify(contractData))
108
-
109
- spinner.start(`Publishing contract metadata\n`)
110
-
111
- const meta = await ipfsUpload(JSON.stringify(contractData))
112
-
113
- spinner.succeed(`Contract metadata uploaded ipfs://${meta.Hash}`)
114
-
115
- // console.log("ROOT", contractData, main)
116
-
117
- } catch (e) {
118
- logError(e)
119
- }
120
- }