@sentio/cli 3.5.0 → 3.5.1-rc.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sentio/cli",
3
- "version": "3.5.0",
3
+ "version": "3.5.1-rc.2",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "exports": {
package/src/abi.ts CHANGED
@@ -3,7 +3,7 @@ import process from 'process'
3
3
  import path from 'path'
4
4
  import fs from 'fs-extra'
5
5
  import fetch from 'node-fetch'
6
- import { AptosChainId, ChainId, StarknetChainId, SuiChainId } from '@sentio/chain'
6
+ import { AptosChainId, ChainId, SuiChainId } from '@sentio/chain'
7
7
 
8
8
  import type { Aptos } from '@aptos-labs/ts-sdk'
9
9
  import type { IotaClient } from '@iota/iota-sdk/client'
@@ -11,7 +11,6 @@ import type { SuiJsonRpcClient } from '@mysten/sui/jsonRpc'
11
11
  import { ReadKey } from './key.js'
12
12
  import { Auth } from './commands/upload.js'
13
13
  import { getApiUrl } from './utils.js'
14
- import type { RpcProvider as Starknet } from 'starknet'
15
14
 
16
15
  export async function getABI(
17
16
  chain: ChainId,
@@ -135,30 +134,6 @@ export async function getABI(
135
134
  console.log('aptos module not loaded')
136
135
  }
137
136
 
138
- // starknet
139
- try {
140
- const Starknet = (await import('starknet')).RpcProvider
141
- let starknetClient: Starknet | undefined
142
-
143
- switch (chain) {
144
- case StarknetChainId.STARKNET_MAINNET:
145
- starknetClient = new Starknet({
146
- nodeUrl: 'https://starknet-mainnet.g.alchemy.com/starknet/version/rpc/v0_8/8sD5yitBslIYCPFzSq_Q1ObJHqPlZxFw'
147
- })
148
- break
149
- case StarknetChainId.STARKNET_SEPOLIA:
150
- starknetClient = new Starknet({
151
- nodeUrl: 'https://starknet-sepolia.g.alchemy.com/starknet/version/rpc/v0_8/8sD5yitBslIYCPFzSq_Q1ObJHqPlZxFw'
152
- })
153
- break
154
- }
155
- if (starknetClient) {
156
- const clazz = await starknetClient.getClassAt(address, 'latest')
157
- return { abi: clazz.abi, name }
158
- }
159
- } catch (e) {
160
- console.log('starknet module not loaded')
161
- }
162
137
 
163
138
  // ethereum
164
139
  try {
@@ -206,7 +181,7 @@ export async function getABI(
206
181
 
207
182
  export function getABIFilePath(chain: string, name: string, address?: string, folder?: string): string {
208
183
  let subpath
209
- let filename = name ?? address
184
+ const filename = name ?? address
210
185
  switch (chain) {
211
186
  case AptosChainId.APTOS_MAINNET:
212
187
  subpath = 'aptos'
@@ -235,14 +210,6 @@ export function getABIFilePath(chain: string, name: string, address?: string, fo
235
210
  case SuiChainId.IOTA_TESTNET:
236
211
  subpath = 'iota/testnet'
237
212
  break
238
- case StarknetChainId.STARKNET_MAINNET:
239
- subpath = 'starknet'
240
- filename = name && address ? `${name}-${address}` : (name ?? address)
241
- break
242
- case StarknetChainId.STARKNET_SEPOLIA:
243
- subpath = 'starknet/sepolia'
244
- filename = name && address ? `${name}-${address}` : (name ?? address)
245
- break
246
213
  default:
247
214
  subpath = 'eth'
248
215
  }
package/src/config.ts CHANGED
@@ -10,7 +10,7 @@ const HostMap: { [host: string]: string } = {
10
10
  prod: 'https://app.sentio.xyz'
11
11
  }
12
12
 
13
- export const CHAIN_TYPES = ['eth', 'solana', 'aptos', 'sui', 'iota', 'fuel', 'starknet']
13
+ export const CHAIN_TYPES = ['eth', 'solana', 'aptos', 'sui', 'iota', 'fuel']
14
14
 
15
15
  export interface YamlContractConfig {
16
16
  address: string
package/src/uploader.ts CHANGED
@@ -160,7 +160,7 @@ export abstract class BatchUploader {
160
160
  rollback,
161
161
  numWorkers,
162
162
  sentio_network: this.options.sentioNetwork,
163
- required_chain_ids: this.options.requiredChainIds
163
+ required_chains: this.options.requiredChainIds
164
164
  })
165
165
  })
166
166
 
@@ -1,65 +0,0 @@
1
- [
2
- {
3
- "type": "impl",
4
- "name": "VotingContractImpl",
5
- "interface_name": "contracts::IVotingContract"
6
- },
7
- {
8
- "type": "interface",
9
- "name": "contracts::IVotingContract",
10
- "items": [
11
- {
12
- "type": "function",
13
- "name": "vote",
14
- "inputs": [
15
- {
16
- "name": "vote",
17
- "type": "core::felt252"
18
- }
19
- ],
20
- "outputs": [],
21
- "state_mutability": "external"
22
- },
23
- {
24
- "type": "function",
25
- "name": "get_votes",
26
- "inputs": [],
27
- "outputs": [
28
- {
29
- "type": "(core::felt252, core::felt252)"
30
- }
31
- ],
32
- "state_mutability": "view"
33
- }
34
- ]
35
- },
36
- {
37
- "type": "event",
38
- "name": "contracts::VotingContract::VoteEvent",
39
- "kind": "struct",
40
- "members": [
41
- {
42
- "name": "voter",
43
- "type": "core::starknet::contract_address::ContractAddress",
44
- "kind": "key"
45
- },
46
- {
47
- "name": "vote",
48
- "type": "core::felt252",
49
- "kind": "data"
50
- }
51
- ]
52
- },
53
- {
54
- "type": "event",
55
- "name": "contracts::VotingContract::Event",
56
- "kind": "enum",
57
- "variants": [
58
- {
59
- "name": "VoteEvent",
60
- "type": "contracts::VotingContract::VoteEvent",
61
- "kind": "nested"
62
- }
63
- ]
64
- }
65
- ]
@@ -1,19 +0,0 @@
1
- {
2
- "private": true,
3
- "name": "template-starknet",
4
- "version": "1.0.0",
5
- "type": "module",
6
- "scripts": {
7
- "build": "sentio build",
8
- "gen": "sentio gen",
9
- "test": "sentio test",
10
- "upload": "sentio upload"
11
- },
12
- "dependencies": {
13
- "@sentio/sdk": "workspace:*"
14
- },
15
- "devDependencies": {
16
- "@sentio/cli": "workspace:*",
17
- "typescript": "^5.5.2"
18
- }
19
- }
@@ -1,6 +0,0 @@
1
- project: starknet-example
2
- host: local
3
- contracts:
4
- - name: VoteContract
5
- address: '0x00cf88f7ecf1bf36e9262333879e2937611cd81758db64a169776a2710464391'
6
- chain: starknet_sepolia
@@ -1,5 +0,0 @@
1
- import { VoteContractProcessor } from './types/starknet/VoteContract-processor.js'
2
-
3
- VoteContractProcessor.bind({}).onVoteEvent(async (event, ctx) => {
4
- const votes = await ctx.getContract().get_votes()
5
- })
@@ -1,24 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "importHelpers": true,
4
- "alwaysStrict": true,
5
- "sourceMap": true,
6
- "target": "esnext",
7
- "esModuleInterop": true,
8
- "noImplicitReturns": true,
9
- "noImplicitAny": true,
10
- "module": "nodenext",
11
- "moduleResolution": "nodenext",
12
- "strictNullChecks": true,
13
- "stripInternal": true,
14
- "noFallthroughCasesInSwitch": true,
15
- "noEmitOnError": false,
16
- "rootDir": "./src",
17
- "outDir": "./dist",
18
- "skipLibCheck": true,
19
- "resolveJsonModule": true,
20
- "experimentalDecorators": true,
21
- "emitDecoratorMetadata": true
22
- },
23
- "exclude": ["dist"]
24
- }