@net-protocol/cli 0.1.33 → 0.1.34

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,11 +1,11 @@
1
1
  import chalk12 from 'chalk';
2
2
  import { FeedRegistryClient, FeedClient, AgentRegistryClient } from '@net-protocol/feeds';
3
- import { NULL_ADDRESS, getChainRpcUrls, getBaseDataSuffix, NetClient } from '@net-protocol/core';
3
+ import { NULL_ADDRESS, getBaseDataSuffix, getChainRpcUrls, NetClient } from '@net-protocol/core';
4
4
  import '@net-protocol/storage';
5
5
  import * as fs from 'fs';
6
6
  import * as path from 'path';
7
7
  import * as os from 'os';
8
- import { encodeFunctionData, createWalletClient, http } from 'viem';
8
+ import { encodeFunctionData, concat, createWalletClient, http } from 'viem';
9
9
  import { privateKeyToAccount } from 'viem/accounts';
10
10
  import * as readline from 'readline';
11
11
 
@@ -521,9 +521,11 @@ function encodeTransaction(config, chainId) {
521
521
  functionName: config.functionName,
522
522
  args: config.args
523
523
  });
524
+ const suffix = getBaseDataSuffix(chainId);
525
+ const data = suffix ? concat([calldata, suffix]) : calldata;
524
526
  return {
525
527
  to: config.to,
526
- data: calldata,
528
+ data,
527
529
  chainId,
528
530
  value: config.value?.toString() ?? "0"
529
531
  };