@net-protocol/cli 0.1.31 → 0.1.33
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.
- package/dist/cli/index.mjs +45 -23
- package/dist/cli/index.mjs.map +1 -1
- package/dist/profile/index.mjs +15 -8
- package/dist/profile/index.mjs.map +1 -1
- package/dist/upvote/index.mjs +2 -1
- package/dist/upvote/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/profile/index.mjs
CHANGED
|
@@ -5,7 +5,7 @@ import { PROFILE_PICTURE_STORAGE_KEY, PROFILE_METADATA_STORAGE_KEY, parseProfile
|
|
|
5
5
|
import { createWalletClient, http, publicActions, encodeFunctionData } from 'viem';
|
|
6
6
|
import { privateKeyToAccount } from 'viem/accounts';
|
|
7
7
|
import { base } from 'viem/chains';
|
|
8
|
-
import { getChainRpcUrls, toBytes32 } from '@net-protocol/core';
|
|
8
|
+
import { getChainRpcUrls, getBaseDataSuffix, toBytes32 } from '@net-protocol/core';
|
|
9
9
|
import * as fs from 'fs';
|
|
10
10
|
import * as path from 'path';
|
|
11
11
|
|
|
@@ -251,7 +251,8 @@ async function executeProfileSetPicture(options) {
|
|
|
251
251
|
account,
|
|
252
252
|
chain: base,
|
|
253
253
|
// TODO: Support other chains
|
|
254
|
-
transport: http(rpcUrls[0])
|
|
254
|
+
transport: http(rpcUrls[0]),
|
|
255
|
+
dataSuffix: getBaseDataSuffix(commonOptions.chainId)
|
|
255
256
|
}).extend(publicActions);
|
|
256
257
|
console.log(chalk3.blue(`\u{1F4F7} Setting profile picture...`));
|
|
257
258
|
console.log(chalk3.gray(` URL: ${options.url}`));
|
|
@@ -365,7 +366,8 @@ async function executeProfileSetUsername(options) {
|
|
|
365
366
|
account,
|
|
366
367
|
chain: base,
|
|
367
368
|
// TODO: Support other chains
|
|
368
|
-
transport: http(rpcUrls[0])
|
|
369
|
+
transport: http(rpcUrls[0]),
|
|
370
|
+
dataSuffix: getBaseDataSuffix(commonOptions.chainId)
|
|
369
371
|
}).extend(publicActions);
|
|
370
372
|
console.log(chalk3.blue(`Setting X username...`));
|
|
371
373
|
console.log(chalk3.gray(` Username: ${displayUsername}`));
|
|
@@ -466,7 +468,8 @@ async function executeProfileSetBio(options) {
|
|
|
466
468
|
account,
|
|
467
469
|
chain: base,
|
|
468
470
|
// TODO: Support other chains
|
|
469
|
-
transport: http(rpcUrls[0])
|
|
471
|
+
transport: http(rpcUrls[0]),
|
|
472
|
+
dataSuffix: getBaseDataSuffix(commonOptions.chainId)
|
|
470
473
|
}).extend(publicActions);
|
|
471
474
|
console.log(chalk3.blue(`Setting profile bio...`));
|
|
472
475
|
console.log(chalk3.gray(` Bio: ${options.bio}`));
|
|
@@ -567,7 +570,8 @@ async function executeProfileSetDisplayName(options) {
|
|
|
567
570
|
account,
|
|
568
571
|
chain: base,
|
|
569
572
|
// TODO: Support other chains
|
|
570
|
-
transport: http(rpcUrls[0])
|
|
573
|
+
transport: http(rpcUrls[0]),
|
|
574
|
+
dataSuffix: getBaseDataSuffix(commonOptions.chainId)
|
|
571
575
|
}).extend(publicActions);
|
|
572
576
|
console.log(chalk3.blue(`Setting display name...`));
|
|
573
577
|
console.log(chalk3.gray(` Name: ${options.name}`));
|
|
@@ -669,7 +673,8 @@ async function executeProfileSetTokenAddress(options) {
|
|
|
669
673
|
account,
|
|
670
674
|
chain: base,
|
|
671
675
|
// TODO: Support other chains
|
|
672
|
-
transport: http(rpcUrls[0])
|
|
676
|
+
transport: http(rpcUrls[0]),
|
|
677
|
+
dataSuffix: getBaseDataSuffix(commonOptions.chainId)
|
|
673
678
|
}).extend(publicActions);
|
|
674
679
|
console.log(chalk3.blue(`Setting profile token address...`));
|
|
675
680
|
console.log(chalk3.gray(` Token Address: ${normalizedAddress}`));
|
|
@@ -822,7 +827,8 @@ async function executeProfileSetCanvas(options) {
|
|
|
822
827
|
account,
|
|
823
828
|
chain: base,
|
|
824
829
|
// TODO: Support other chains
|
|
825
|
-
transport: http(rpcUrls[0])
|
|
830
|
+
transport: http(rpcUrls[0]),
|
|
831
|
+
dataSuffix: getBaseDataSuffix(commonOptions.chainId)
|
|
826
832
|
}).extend(publicActions);
|
|
827
833
|
console.log(chalk3.blue(`Setting profile canvas...`));
|
|
828
834
|
console.log(
|
|
@@ -1046,7 +1052,8 @@ ${available}`
|
|
|
1046
1052
|
const client = createWalletClient({
|
|
1047
1053
|
account,
|
|
1048
1054
|
chain: base,
|
|
1049
|
-
transport: http(rpcUrls[0])
|
|
1055
|
+
transport: http(rpcUrls[0]),
|
|
1056
|
+
dataSuffix: getBaseDataSuffix(commonOptions.chainId)
|
|
1050
1057
|
}).extend(publicActions);
|
|
1051
1058
|
console.log(chalk3.blue(`Setting profile CSS...`));
|
|
1052
1059
|
console.log(
|