@kasarlabs/opus-mcp 0.1.2 → 0.1.4

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,9 +1,5 @@
1
1
  import { constants } from 'starknet';
2
2
  export declare const getErc20Contract: (address: string) => import("starknet").TypedContractV2<readonly [{
3
- readonly type: "impl";
4
- readonly name: "ERC20Impl";
5
- readonly interface_name: "opus::mock::erc20::IERC20";
6
- }, {
7
3
  readonly type: "struct";
8
4
  readonly name: "core::integer::u256";
9
5
  readonly members: readonly [{
@@ -24,177 +20,86 @@ export declare const getErc20Contract: (address: string) => import("starknet").T
24
20
  readonly type: "()";
25
21
  }];
26
22
  }, {
27
- readonly type: "interface";
28
- readonly name: "opus::mock::erc20::IERC20";
29
- readonly items: readonly [{
30
- readonly type: "function";
31
- readonly name: "name";
32
- readonly inputs: readonly [];
33
- readonly outputs: readonly [{
34
- readonly type: "core::felt252";
35
- }];
36
- readonly state_mutability: "view";
37
- }, {
38
- readonly type: "function";
39
- readonly name: "symbol";
40
- readonly inputs: readonly [];
41
- readonly outputs: readonly [{
42
- readonly type: "core::felt252";
43
- }];
44
- readonly state_mutability: "view";
45
- }, {
46
- readonly type: "function";
47
- readonly name: "decimals";
48
- readonly inputs: readonly [];
49
- readonly outputs: readonly [{
50
- readonly type: "core::integer::u8";
51
- }];
52
- readonly state_mutability: "view";
53
- }, {
54
- readonly type: "function";
55
- readonly name: "total_supply";
56
- readonly inputs: readonly [];
57
- readonly outputs: readonly [{
58
- readonly type: "core::integer::u256";
59
- }];
60
- readonly state_mutability: "view";
61
- }, {
62
- readonly type: "function";
63
- readonly name: "balance_of";
64
- readonly inputs: readonly [{
65
- readonly name: "account";
66
- readonly type: "core::starknet::contract_address::ContractAddress";
67
- }];
68
- readonly outputs: readonly [{
69
- readonly type: "core::integer::u256";
70
- }];
71
- readonly state_mutability: "view";
72
- }, {
73
- readonly type: "function";
74
- readonly name: "allowance";
75
- readonly inputs: readonly [{
76
- readonly name: "owner";
77
- readonly type: "core::starknet::contract_address::ContractAddress";
78
- }, {
79
- readonly name: "spender";
80
- readonly type: "core::starknet::contract_address::ContractAddress";
81
- }];
82
- readonly outputs: readonly [{
83
- readonly type: "core::integer::u256";
84
- }];
85
- readonly state_mutability: "view";
86
- }, {
87
- readonly type: "function";
88
- readonly name: "transfer";
89
- readonly inputs: readonly [{
90
- readonly name: "recipient";
91
- readonly type: "core::starknet::contract_address::ContractAddress";
92
- }, {
93
- readonly name: "amount";
94
- readonly type: "core::integer::u256";
95
- }];
96
- readonly outputs: readonly [{
97
- readonly type: "core::bool";
98
- }];
99
- readonly state_mutability: "external";
100
- }, {
101
- readonly type: "function";
102
- readonly name: "transfer_from";
103
- readonly inputs: readonly [{
104
- readonly name: "sender";
105
- readonly type: "core::starknet::contract_address::ContractAddress";
106
- }, {
107
- readonly name: "recipient";
108
- readonly type: "core::starknet::contract_address::ContractAddress";
109
- }, {
110
- readonly name: "amount";
111
- readonly type: "core::integer::u256";
112
- }];
113
- readonly outputs: readonly [{
114
- readonly type: "core::bool";
115
- }];
116
- readonly state_mutability: "external";
23
+ readonly type: "function";
24
+ readonly name: "transfer";
25
+ readonly inputs: readonly [{
26
+ readonly name: "recipient";
27
+ readonly type: "core::starknet::contract_address::ContractAddress";
117
28
  }, {
118
- readonly type: "function";
119
- readonly name: "approve";
120
- readonly inputs: readonly [{
121
- readonly name: "spender";
122
- readonly type: "core::starknet::contract_address::ContractAddress";
123
- }, {
124
- readonly name: "amount";
125
- readonly type: "core::integer::u256";
126
- }];
127
- readonly outputs: readonly [{
128
- readonly type: "core::bool";
129
- }];
130
- readonly state_mutability: "external";
29
+ readonly name: "amount";
30
+ readonly type: "core::integer::u256";
131
31
  }];
32
+ readonly outputs: readonly [{
33
+ readonly type: "core::bool";
34
+ }];
35
+ readonly state_mutability: "external";
132
36
  }, {
133
- readonly type: "constructor";
134
- readonly name: "constructor";
37
+ readonly type: "function";
38
+ readonly name: "balance_of";
135
39
  readonly inputs: readonly [{
136
- readonly name: "name";
137
- readonly type: "core::felt252";
138
- }, {
139
- readonly name: "symbol";
140
- readonly type: "core::felt252";
141
- }, {
142
- readonly name: "decimals";
143
- readonly type: "core::integer::u8";
144
- }, {
145
- readonly name: "initial_supply";
146
- readonly type: "core::integer::u256";
147
- }, {
148
- readonly name: "recipient";
40
+ readonly name: "account";
149
41
  readonly type: "core::starknet::contract_address::ContractAddress";
150
42
  }];
43
+ readonly outputs: readonly [{
44
+ readonly type: "core::integer::u256";
45
+ }];
46
+ readonly state_mutability: "view";
151
47
  }, {
152
- readonly type: "event";
153
- readonly name: "opus::mock::erc20::erc20::Transfer";
154
- readonly kind: "struct";
155
- readonly members: readonly [{
156
- readonly name: "from";
157
- readonly type: "core::starknet::contract_address::ContractAddress";
158
- readonly kind: "key";
159
- }, {
160
- readonly name: "to";
48
+ readonly type: "function";
49
+ readonly name: "balanceOf";
50
+ readonly inputs: readonly [{
51
+ readonly name: "account";
161
52
  readonly type: "core::starknet::contract_address::ContractAddress";
162
- readonly kind: "key";
163
- }, {
164
- readonly name: "value";
53
+ }];
54
+ readonly outputs: readonly [{
165
55
  readonly type: "core::integer::u256";
166
- readonly kind: "data";
167
56
  }];
57
+ readonly state_mutability: "view";
168
58
  }, {
169
- readonly type: "event";
170
- readonly name: "opus::mock::erc20::erc20::Approval";
171
- readonly kind: "struct";
172
- readonly members: readonly [{
59
+ readonly type: "function";
60
+ readonly name: "allowance";
61
+ readonly inputs: readonly [{
173
62
  readonly name: "owner";
174
63
  readonly type: "core::starknet::contract_address::ContractAddress";
175
- readonly kind: "key";
176
64
  }, {
177
65
  readonly name: "spender";
178
66
  readonly type: "core::starknet::contract_address::ContractAddress";
179
- readonly kind: "key";
67
+ }];
68
+ readonly outputs: readonly [{
69
+ readonly type: "core::integer::u256";
70
+ }];
71
+ readonly state_mutability: "view";
72
+ }, {
73
+ readonly type: "function";
74
+ readonly name: "approve";
75
+ readonly inputs: readonly [{
76
+ readonly name: "spender";
77
+ readonly type: "core::starknet::contract_address::ContractAddress";
180
78
  }, {
181
- readonly name: "value";
79
+ readonly name: "amount";
182
80
  readonly type: "core::integer::u256";
183
- readonly kind: "data";
184
81
  }];
82
+ readonly outputs: readonly [{
83
+ readonly type: "core::bool";
84
+ }];
85
+ readonly state_mutability: "external";
185
86
  }, {
186
- readonly type: "event";
187
- readonly name: "opus::mock::erc20::erc20::Event";
188
- readonly kind: "enum";
189
- readonly variants: readonly [{
190
- readonly name: "Transfer";
191
- readonly type: "opus::mock::erc20::erc20::Transfer";
192
- readonly kind: "nested";
87
+ readonly type: "function";
88
+ readonly name: "transfer_from";
89
+ readonly inputs: readonly [{
90
+ readonly name: "sender";
91
+ readonly type: "core::starknet::contract_address::ContractAddress";
193
92
  }, {
194
- readonly name: "Approval";
195
- readonly type: "opus::mock::erc20::erc20::Approval";
196
- readonly kind: "nested";
93
+ readonly name: "recipient";
94
+ readonly type: "core::starknet::contract_address::ContractAddress";
95
+ }, {
96
+ readonly name: "amount";
97
+ readonly type: "core::integer::u256";
98
+ }];
99
+ readonly outputs: readonly [{
100
+ readonly type: "core::bool";
197
101
  }];
102
+ readonly state_mutability: "external";
198
103
  }]>;
199
104
  export declare const getAbbotContract: (chainId: constants.StarknetChainId) => import("starknet").TypedContractV2<readonly [{
200
105
  readonly type: "impl";
@@ -1,26 +1,42 @@
1
1
  import { Contract, RpcProvider } from 'starknet';
2
+ import { erc20Abi } from '@kasarlabs/ask-starknet-core';
2
3
  import { abbotAbi } from '../abis/abbotAbi.js';
3
- import { erc20Abi } from '../abis/erc20Abi.js';
4
4
  import { shrineAbi } from '../abis/shrineAbi.js';
5
5
  import { sentinelAbi } from '../abis/sentinelAbi.js';
6
6
  import { getOpusContractAddress } from '../constant/index.js';
7
7
  export const getErc20Contract = (address) => {
8
8
  const provider = new RpcProvider({ nodeUrl: process.env.STARKNET_RPC_URL });
9
- return new Contract(erc20Abi, address, provider).typedv2(erc20Abi);
9
+ return new Contract({
10
+ abi: erc20Abi,
11
+ address,
12
+ providerOrAccount: provider,
13
+ }).typedv2(erc20Abi);
10
14
  };
11
15
  export const getAbbotContract = (chainId) => {
12
16
  const provider = new RpcProvider({ nodeUrl: process.env.STARKNET_RPC_URL });
13
17
  const address = getOpusContractAddress({ chainId, contractName: 'abbot' });
14
- return new Contract(abbotAbi, address, provider).typedv2(abbotAbi);
18
+ return new Contract({
19
+ abi: abbotAbi,
20
+ address,
21
+ providerOrAccount: provider,
22
+ }).typedv2(abbotAbi);
15
23
  };
16
24
  export const getSentinelContract = (chainId) => {
17
25
  const provider = new RpcProvider({ nodeUrl: process.env.STARKNET_RPC_URL });
18
26
  const address = getOpusContractAddress({ chainId, contractName: 'sentinel' });
19
- return new Contract(sentinelAbi, address, provider).typedv2(sentinelAbi);
27
+ return new Contract({
28
+ abi: sentinelAbi,
29
+ address,
30
+ providerOrAccount: provider,
31
+ }).typedv2(sentinelAbi);
20
32
  };
21
33
  export const getShrineContract = (chainId) => {
22
34
  const provider = new RpcProvider({ nodeUrl: process.env.STARKNET_RPC_URL });
23
35
  const address = getOpusContractAddress({ chainId, contractName: 'shrine' });
24
- return new Contract(shrineAbi, address, provider).typedv2(shrineAbi);
36
+ return new Contract({
37
+ abi: shrineAbi,
38
+ address,
39
+ providerOrAccount: provider,
40
+ }).typedv2(shrineAbi);
25
41
  };
26
42
  //# sourceMappingURL=contracts.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"contracts.js","sourceRoot":"","sources":["../../../src/lib/utils/contracts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,QAAQ,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAC5D,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE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BAAsB,CAAC,EAAE,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,CAAC,CAAC;IAC3E,OAAO,IAAI,QAAQ,CAAC;QAClB,GAAG,EAAE,QAAQ;QACb,OAAO;QACP,iBAAiB,EAAE,QAAQ;KAC5B,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;AACvB,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,OAAkC,EAAE,EAAE;IACxE,MAAM,QAAQ,GAAG,IAAI,WAAW,CAAC,EAAE,OAAO,EAAE,OAAO,CAAC,GAAG,CAAC,gBAAgB,EAAE,CAAC,CAAC;IAC5E,MAAM,OAAO,GAAG,sBAAsB,CAAC,EAAE,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,CAAC,CAAC;IAC9E,OAAO,IAAI,QAAQ,CAAC;QAClB,GAAG,EAAE,WAAW;QAChB,OAAO;QACP,iBAAiB,EAAE,QAAQ;KAC5B,CAAC,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;AAC1B,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,OAAkC,EAAE,EAAE;IACtE,MAAM,QAAQ,GAAG,IAAI,WAAW,CAAC,EAAE,OAAO,EAAE,OAAO,CAAC,GAAG,CAAC,gBAAgB,EAAE,CAAC,CAAC;IAC5E,MAAM,OAAO,GAAG,sBAAsB,CAAC,EAAE,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,CAAC,CAAC;IAC5E,OAAO,IAAI,QAAQ,CAAC;QAClB,GAAG,EAAE,SAAS;QACd,OAAO;QACP,iBAAiB,EAAE,QAAQ;KAC5B,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;AACxB,CAAC,CAAC"}
@@ -1,11 +1,3 @@
1
1
  import { BorrowTroveParams } from '../schemas/index.js';
2
- import { onchainWrite } from '@kasarlabs/ask-starknet-core';
3
- export declare const borrowTrove: (env: onchainWrite, params: BorrowTroveParams) => Promise<{
4
- status: string;
5
- data: import("../interfaces/index.js").BorrowTroveResult;
6
- error?: undefined;
7
- } | {
8
- status: string;
9
- error: string;
10
- data?: undefined;
11
- }>;
2
+ import { onchainWrite, toolResult } from '@kasarlabs/ask-starknet-core';
3
+ export declare const borrowTrove: (env: onchainWrite, params: BorrowTroveParams) => Promise<toolResult>;
@@ -11,7 +11,7 @@ export const borrowTrove = async (env, params) => {
11
11
  }
12
12
  catch (error) {
13
13
  return {
14
- status: 'error',
14
+ status: 'failure',
15
15
  error: error instanceof Error ? error.message : 'Unknown error',
16
16
  };
17
17
  }
@@ -1 +1 @@
1
- {"version":3,"file":"borrowTrove.js","sourceRoot":"","sources":["../../src/tools/borrowTrove.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAGlE,MAAM,CAAC,MAAM,WAAW,GAAG,KAAK,EAC9B,GAAiB,EACjB,MAAyB,EACzB,EAAE;IACF,MAAM,cAAc,GAAG,GAAG,CAAC,OAAO,EAAE,OAAO,CAAC;IAE5C,IAAI,CAAC;QACH,MAAM,YAAY,GAAG,kBAAkB,CAAC,GAAG,EAAE,cAAc,CAAC,CAAC;QAC7D,MAAM,MAAM,GAAG,MAAM,YAAY,CAAC,iBAAiB,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;QACjE,OAAO;YACL,MAAM,EAAE,SAAS;YACjB,IAAI,EAAE,MAAM;SACb,CAAC;IACJ,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO;YACL,MAAM,EAAE,OAAO;YACf,KAAK,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,eAAe;SAChE,CAAC;IACJ,CAAC;AACH,CAAC,CAAC"}
1
+ {"version":3,"file":"borrowTrove.js","sourceRoot":"","sources":["../../src/tools/borrowTrove.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAGlE,MAAM,CAAC,MAAM,WAAW,GAAG,KAAK,EAC9B,GAAiB,EACjB,MAAyB,EACJ,EAAE;IACvB,MAAM,cAAc,GAAG,GAAG,CAAC,OAAO,EAAE,OAAO,CAAC;IAE5C,IAAI,CAAC;QACH,MAAM,YAAY,GAAG,kBAAkB,CAAC,GAAG,EAAE,cAAc,CAAC,CAAC;QAC7D,MAAM,MAAM,GAAG,MAAM,YAAY,CAAC,iBAAiB,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;QACjE,OAAO;YACL,MAAM,EAAE,SAAS;YACjB,IAAI,EAAE,MAAM;SACb,CAAC;IACJ,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO;YACL,MAAM,EAAE,SAAS;YACjB,KAAK,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,eAAe;SAChE,CAAC;IACJ,CAAC;AACH,CAAC,CAAC"}
@@ -1,11 +1,3 @@
1
1
  import { DepositTroveParams } from '../schemas/index.js';
2
- import { onchainWrite } from '@kasarlabs/ask-starknet-core';
3
- export declare const depositTrove: (env: onchainWrite, params: DepositTroveParams) => Promise<{
4
- status: string;
5
- data: import("../interfaces/index.js").DepositTroveResult;
6
- error?: undefined;
7
- } | {
8
- status: string;
9
- error: string;
10
- data?: undefined;
11
- }>;
2
+ import { onchainWrite, toolResult } from '@kasarlabs/ask-starknet-core';
3
+ export declare const depositTrove: (env: onchainWrite, params: DepositTroveParams) => Promise<toolResult>;
@@ -11,7 +11,7 @@ export const depositTrove = async (env, params) => {
11
11
  }
12
12
  catch (error) {
13
13
  return {
14
- status: 'error',
14
+ status: 'failure',
15
15
  error: error instanceof Error ? error.message : 'Unknown error',
16
16
  };
17
17
  }
@@ -1 +1 @@
1
- {"version":3,"file":"depositTrove.js","sourceRoot":"","sources":["../../src/tools/depositTrove.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EA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,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,eAAe;SAChE,CAAC;IACJ,CAAC;AACH,CAAC,CAAC"}
@@ -1,29 +1,5 @@
1
1
  import { GetTroveHealthParams, GetUserTrovesParams } from '../schemas/index.js';
2
- import { onchainWrite } from '@kasarlabs/ask-starknet-core';
3
- export declare const getUserTroves: (env: onchainWrite, params: GetUserTrovesParams) => Promise<{
4
- status: string;
5
- data: import("../interfaces/index.js").GetUserTrovesResult;
6
- error?: undefined;
7
- } | {
8
- status: string;
9
- error: string;
10
- data?: undefined;
11
- }>;
12
- export declare const getTroveHealth: (env: onchainWrite, params: GetTroveHealthParams) => Promise<{
13
- status: string;
14
- data: import("../interfaces/index.js").GetTroveHealthResult;
15
- error?: undefined;
16
- } | {
17
- status: string;
18
- error: string;
19
- data?: undefined;
20
- }>;
21
- export declare const getBorrowFee: (env: onchainWrite) => Promise<{
22
- status: string;
23
- data: import("../interfaces/index.js").GetBorrowFeeResult;
24
- error?: undefined;
25
- } | {
26
- status: string;
27
- error: string;
28
- data?: undefined;
29
- }>;
2
+ import { onchainWrite, toolResult } from '@kasarlabs/ask-starknet-core';
3
+ export declare const getUserTroves: (env: onchainWrite, params: GetUserTrovesParams) => Promise<toolResult>;
4
+ export declare const getTroveHealth: (env: onchainWrite, params: GetTroveHealthParams) => Promise<toolResult>;
5
+ export declare const getBorrowFee: (env: onchainWrite) => Promise<toolResult>;
@@ -11,7 +11,7 @@ export const getUserTroves = async (env, params) => {
11
11
  }
12
12
  catch (error) {
13
13
  return {
14
- status: 'error',
14
+ status: 'failure',
15
15
  error: error instanceof Error ? error.message : 'Unknown error',
16
16
  };
17
17
  }
@@ -28,7 +28,7 @@ export const getTroveHealth = async (env, params) => {
28
28
  }
29
29
  catch (error) {
30
30
  return {
31
- status: 'error',
31
+ status: 'failure',
32
32
  error: error instanceof Error ? error.message : 'Unknown error',
33
33
  };
34
34
  }
@@ -45,7 +45,7 @@ export const getBorrowFee = async (env) => {
45
45
  }
46
46
  catch (error) {
47
47
  return {
48
- status: 'error',
48
+ status: 'failure',
49
49
  error: error instanceof Error ? error.message : 'Unknown error',
50
50
  };
51
51
  }
@@ -1 +1 @@
1
- {"version":3,"file":"getters.js","sourceRoot":"","sources":["../../src/tools/getters.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAGlE,MAAM,CAAC,MAAM,aAAa,GAAG,KAAK,EAChC,GAAiB,EACjB,MAA2B,EAC3B,EAAE;IACF,MAAM,cAAc,GAAG,GAAG,CAAC,OAAO,EAAE,OAAO,CAAC;IAE5C,IAAI,CAAC;QACH,MAAM,YAAY,GAAG,kBAAkB,CAAC,GAAG,EAAE,cAAc,CAAC,CAAC;QAC7D,MAAM,MAAM,GAAG,MAAM,YAAY,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;QACxD,OAAO;YACL,MAAM,EAAE,SAAS;YACjB,IAAI,EAAE,MAAM;SACb,CAAC;IACJ,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO;YACL,MAAM,EAAE,OAAO;YACf,KAAK,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,eAAe;SAChE,CAAC;IACJ,CAAC;AACH,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,cAAc,GAAG,KAAK,EACjC,GAAiB,EACjB,MAA4B,EAC5B,EAAE;IACF,MAAM,cAAc,GAAG,GAAG,CAAC,OAAO,EAAE,OAAO,CAAC;IAE5C,IAAI,CAAC;QACH,MAAM,YAAY,GAAG,kBAAkB,CAAC,GAAG,EAAE,cAAc,CAAC,CAAC;QAC7D,MAAM,MAAM,GAAG,MAAM,YAAY,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC;QACzD,OAAO;YACL,MAAM,EAAE,SAAS;YACjB,IAAI,EAAE,MAAM;SACb,CAAC;IACJ,CAAC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SAAS;YACjB,KAAK,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,eAAe;SAChE,CAAC;IACJ,CAAC;AACH,CAAC,CAAC"}
@@ -1,11 +1,3 @@
1
1
  import { OpenTroveParams } from '../schemas/index.js';
2
- import { onchainWrite } from '@kasarlabs/ask-starknet-core';
3
- export declare const openTrove: (env: onchainWrite, params: OpenTroveParams) => Promise<{
4
- status: string;
5
- data: import("../interfaces/index.js").OpenTroveResult;
6
- error?: undefined;
7
- } | {
8
- status: string;
9
- error: string;
10
- data?: undefined;
11
- }>;
2
+ import { onchainWrite, toolResult } from '@kasarlabs/ask-starknet-core';
3
+ export declare const openTrove: (env: onchainWrite, params: OpenTroveParams) => Promise<toolResult>;
@@ -11,7 +11,7 @@ export const openTrove = async (env, params) => {
11
11
  }
12
12
  catch (error) {
13
13
  return {
14
- status: 'error',
14
+ status: 'failure',
15
15
  error: error instanceof Error ? error.message : 'Unknown error',
16
16
  };
17
17
  }
@@ -1 +1 @@
1
- {"version":3,"file":"openTrove.js","sourceRoot":"","sources":["../../src/tools/openTrove.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAGlE,MAAM,CAAC,MAAM,SAAS,GAAG,KAAK,EAAE,GAAiB,EAAE,MAAuB,EAAE,EAAE;IAC5E,MAAM,cAAc,GAAG,GAAG,CAAC,OAAO,EAAE,OAAO,CAAC;IAE5C,IAAI,CAAC;QACH,MAAM,YAAY,GAAG,kBAAkB,CAAC,GAAG,EAAE,cAAc,CAAC,CAAC;QAC7D,MAAM,MAAM,GAAG,MAAM,YAAY,CAAC,oBAAoB,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;QACpE,OAAO;YACL,MAAM,EAAE,SAAS;YACjB,IAAI,EAAE,MAAM;SACb,CAAC;IACJ,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO;YACL,MAAM,EAAE,OAAO;YACf,KAAK,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,eAAe;SAChE,CAAC;IACJ,CAAC;AACH,CAAC,CAAC"}
1
+ {"version":3,"file":"openTrove.js","sourceRoot":"","sources":["../../src/tools/openTrove.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAGlE,MAAM,CAAC,MAAM,SAAS,GAAG,KAAK,EAC5B,GAAiB,EACjB,MAAuB,EACF,EAAE;IACvB,MAAM,cAAc,GAAG,GAAG,CAAC,OAAO,EAAE,OAAO,CAAC;IAE5C,IAAI,CAAC;QACH,MAAM,YAAY,GAAG,kBAAkB,CAAC,GAAG,EAAE,cAAc,CAAC,CAAC;QAC7D,MAAM,MAAM,GAAG,MAAM,YAAY,CAAC,oBAAoB,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;QACpE,OAAO;YACL,MAAM,EAAE,SAAS;YACjB,IAAI,EAAE,MAAM;SACb,CAAC;IACJ,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO;YACL,MAAM,EAAE,SAAS;YACjB,KAAK,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,eAAe;SAChE,CAAC;IACJ,CAAC;AACH,CAAC,CAAC"}
@@ -1,11 +1,3 @@
1
1
  import { RepayTroveParams } from '../schemas/index.js';
2
- import { onchainWrite } from '@kasarlabs/ask-starknet-core';
3
- export declare const repayTrove: (env: onchainWrite, params: RepayTroveParams) => Promise<{
4
- status: string;
5
- data: import("../interfaces/index.js").RepayTroveResult;
6
- error?: undefined;
7
- } | {
8
- status: string;
9
- error: string;
10
- data?: undefined;
11
- }>;
2
+ import { onchainWrite, toolResult } from '@kasarlabs/ask-starknet-core';
3
+ export declare const repayTrove: (env: onchainWrite, params: RepayTroveParams) => Promise<toolResult>;
@@ -11,7 +11,7 @@ export const repayTrove = async (env, params) => {
11
11
  }
12
12
  catch (error) {
13
13
  return {
14
- status: 'error',
14
+ status: 'failure',
15
15
  error: error instanceof Error ? error.message : 'Unknown error',
16
16
  };
17
17
  }
@@ -1 +1 @@
1
- {"version":3,"file":"repayTrove.js","sourceRoot":"","sources":["../../src/tools/repayTrove.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAGlE,MAAM,CAAC,MAAM,UAAU,GAAG,KAAK,EAC7B,GAAiB,EACjB,MAAwB,EACxB,EAAE;IACF,MAAM,cAAc,GAAG,GAAG,CAAC,OAAO,EAAE,OAAO,CAAC;IAE5C,IAAI,CAAC;QACH,MAAM,YAAY,GAAG,kBAAkB,CAAC,GAAG,EAAE,cAAc,CAAC,CAAC;QAC7D,MAAM,MAAM,GAAG,MAAM,YAAY,CAAC,gBAAgB,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;QAChE,OAAO;YACL,MAAM,EAAE,SAAS;YACjB,IAAI,EAAE,MAAM;SACb,CAAC;IACJ,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO;YACL,MAAM,EAAE,OAAO;YACf,KAAK,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,eAAe;SAChE,CAAC;IACJ,CAAC;AACH,CAAC,CAAC"}
1
+ {"version":3,"file":"repayTrove.js","sourceRoot":"","sources":["../../src/tools/repayTrove.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAGlE,MAAM,CAAC,MAAM,UAAU,GAAG,KAAK,EAC7B,GAAiB,EACjB,MAAwB,EACH,EAAE;IACvB,MAAM,cAAc,GAAG,GAAG,CAAC,OAAO,EAAE,OAAO,CAAC;IAE5C,IAAI,CAAC;QACH,MAAM,YAAY,GAAG,kBAAkB,CAAC,GAAG,EAAE,cAAc,CAAC,CAAC;QAC7D,MAAM,MAAM,GAAG,MAAM,YAAY,CAAC,gBAAgB,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;QAChE,OAAO;YACL,MAAM,EAAE,SAAS;YACjB,IAAI,EAAE,MAAM;SACb,CAAC;IACJ,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO;YACL,MAAM,EAAE,SAAS;YACjB,KAAK,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,eAAe;SAChE,CAAC;IACJ,CAAC;AACH,CAAC,CAAC"}
@@ -1,11 +1,3 @@
1
1
  import { WithdrawTroveParams } from '../schemas/index.js';
2
- import { onchainWrite } from '@kasarlabs/ask-starknet-core';
3
- export declare const withdrawTrove: (env: onchainWrite, params: WithdrawTroveParams) => Promise<{
4
- status: string;
5
- data: import("../interfaces/index.js").WithdrawTroveResult;
6
- error?: undefined;
7
- } | {
8
- status: string;
9
- error: string;
10
- data?: undefined;
11
- }>;
2
+ import { onchainWrite, toolResult } from '@kasarlabs/ask-starknet-core';
3
+ export declare const withdrawTrove: (env: onchainWrite, params: WithdrawTroveParams) => Promise<toolResult>;
@@ -11,7 +11,7 @@ export const withdrawTrove = async (env, params) => {
11
11
  }
12
12
  catch (error) {
13
13
  return {
14
- status: 'error',
14
+ status: 'failure',
15
15
  error: error instanceof Error ? error.message : 'Unknown error',
16
16
  };
17
17
  }
@@ -1 +1 @@
1
- {"version":3,"file":"withdrawTrove.js","sourceRoot":"","sources":["../../src/tools/withdrawTrove.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAGlE,MAAM,CAAC,MAAM,aAAa,GAAG,KAAK,EAChC,GAAiB,EACjB,MAA2B,EAC3B,EAAE;IACF,MAAM,cAAc,GAAG,GAAG,CAAC,OAAO,EAAE,OAAO,CAAC;IAE5C,IAAI,CAAC;QACH,MAAM,YAAY,GAAG,kBAAkB,CAAC,GAAG,EAAE,cAAc,CAAC,CAAC;QAC7D,MAAM,MAAM,GAAG,MAAM,YAAY,CAAC,mBAAmB,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;QACnE,OAAO;YACL,MAAM,EAAE,SAAS;YACjB,IAAI,EAAE,MAAM;SACb,CAAC;IACJ,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO;YACL,MAAM,EAAE,OAAO;YACf,KAAK,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,eAAe;SAChE,CAAC;IACJ,CAAC;AACH,CAAC,CAAC"}
1
+ {"version":3,"file":"withdrawTrove.js","sourceRoot":"","sources":["../../src/tools/withdrawTrove.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAGlE,MAAM,CAAC,MAAM,aAAa,GAAG,KAAK,EAChC,GAAiB,EACjB,MAA2B,EACN,EAAE;IACvB,MAAM,cAAc,GAAG,GAAG,CAAC,OAAO,EAAE,OAAO,CAAC;IAE5C,IAAI,CAAC;QACH,MAAM,YAAY,GAAG,kBAAkB,CAAC,GAAG,EAAE,cAAc,CAAC,CAAC;QAC7D,MAAM,MAAM,GAAG,MAAM,YAAY,CAAC,mBAAmB,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;QACnE,OAAO;YACL,MAAM,EAAE,SAAS;YACjB,IAAI,EAAE,MAAM;SACb,CAAC;IACJ,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO;YACL,MAAM,EAAE,SAAS;YACjB,KAAK,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,eAAe;SAChE,CAAC;IACJ,CAAC;AACH,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kasarlabs/opus-mcp",
3
- "version": "0.1.2",
3
+ "version": "0.1.4",
4
4
  "main": "index.js",
5
5
  "type": "module",
6
6
  "bin": {
@@ -16,12 +16,12 @@
16
16
  "build"
17
17
  ],
18
18
  "dependencies": {
19
- "@kasarlabs/ask-starknet-core": "0.1.2",
19
+ "@kasarlabs/ask-starknet-core": "0.1.4",
20
20
  "@langchain/core": "^0.3.42",
21
- "@modelcontextprotocol/sdk": "^1.11.2",
21
+ "@modelcontextprotocol/sdk": "1.22.0",
22
22
  "dotenv": "^16.4.7",
23
23
  "ethers": "^6.15.0",
24
- "starknet": "^7.6.4",
24
+ "starknet": "~8.9.0",
25
25
  "winston": "^3.17.0",
26
26
  "zod": "^3.24.2"
27
27
  },
@@ -40,5 +40,5 @@
40
40
  "publishConfig": {
41
41
  "access": "public"
42
42
  },
43
- "gitHead": "967038b13c313def17911c88d85601cb208b8cd6"
43
+ "gitHead": "0799e2b085e950e5d102822d71a6b122290e8c38"
44
44
  }
@@ -1,197 +0,0 @@
1
- export declare const erc20Abi: readonly [{
2
- readonly type: "impl";
3
- readonly name: "ERC20Impl";
4
- readonly interface_name: "opus::mock::erc20::IERC20";
5
- }, {
6
- readonly type: "struct";
7
- readonly name: "core::integer::u256";
8
- readonly members: readonly [{
9
- readonly name: "low";
10
- readonly type: "core::integer::u128";
11
- }, {
12
- readonly name: "high";
13
- readonly type: "core::integer::u128";
14
- }];
15
- }, {
16
- readonly type: "enum";
17
- readonly name: "core::bool";
18
- readonly variants: readonly [{
19
- readonly name: "False";
20
- readonly type: "()";
21
- }, {
22
- readonly name: "True";
23
- readonly type: "()";
24
- }];
25
- }, {
26
- readonly type: "interface";
27
- readonly name: "opus::mock::erc20::IERC20";
28
- readonly items: readonly [{
29
- readonly type: "function";
30
- readonly name: "name";
31
- readonly inputs: readonly [];
32
- readonly outputs: readonly [{
33
- readonly type: "core::felt252";
34
- }];
35
- readonly state_mutability: "view";
36
- }, {
37
- readonly type: "function";
38
- readonly name: "symbol";
39
- readonly inputs: readonly [];
40
- readonly outputs: readonly [{
41
- readonly type: "core::felt252";
42
- }];
43
- readonly state_mutability: "view";
44
- }, {
45
- readonly type: "function";
46
- readonly name: "decimals";
47
- readonly inputs: readonly [];
48
- readonly outputs: readonly [{
49
- readonly type: "core::integer::u8";
50
- }];
51
- readonly state_mutability: "view";
52
- }, {
53
- readonly type: "function";
54
- readonly name: "total_supply";
55
- readonly inputs: readonly [];
56
- readonly outputs: readonly [{
57
- readonly type: "core::integer::u256";
58
- }];
59
- readonly state_mutability: "view";
60
- }, {
61
- readonly type: "function";
62
- readonly name: "balance_of";
63
- readonly inputs: readonly [{
64
- readonly name: "account";
65
- readonly type: "core::starknet::contract_address::ContractAddress";
66
- }];
67
- readonly outputs: readonly [{
68
- readonly type: "core::integer::u256";
69
- }];
70
- readonly state_mutability: "view";
71
- }, {
72
- readonly type: "function";
73
- readonly name: "allowance";
74
- readonly inputs: readonly [{
75
- readonly name: "owner";
76
- readonly type: "core::starknet::contract_address::ContractAddress";
77
- }, {
78
- readonly name: "spender";
79
- readonly type: "core::starknet::contract_address::ContractAddress";
80
- }];
81
- readonly outputs: readonly [{
82
- readonly type: "core::integer::u256";
83
- }];
84
- readonly state_mutability: "view";
85
- }, {
86
- readonly type: "function";
87
- readonly name: "transfer";
88
- readonly inputs: readonly [{
89
- readonly name: "recipient";
90
- readonly type: "core::starknet::contract_address::ContractAddress";
91
- }, {
92
- readonly name: "amount";
93
- readonly type: "core::integer::u256";
94
- }];
95
- readonly outputs: readonly [{
96
- readonly type: "core::bool";
97
- }];
98
- readonly state_mutability: "external";
99
- }, {
100
- readonly type: "function";
101
- readonly name: "transfer_from";
102
- readonly inputs: readonly [{
103
- readonly name: "sender";
104
- readonly type: "core::starknet::contract_address::ContractAddress";
105
- }, {
106
- readonly name: "recipient";
107
- readonly type: "core::starknet::contract_address::ContractAddress";
108
- }, {
109
- readonly name: "amount";
110
- readonly type: "core::integer::u256";
111
- }];
112
- readonly outputs: readonly [{
113
- readonly type: "core::bool";
114
- }];
115
- readonly state_mutability: "external";
116
- }, {
117
- readonly type: "function";
118
- readonly name: "approve";
119
- readonly inputs: readonly [{
120
- readonly name: "spender";
121
- readonly type: "core::starknet::contract_address::ContractAddress";
122
- }, {
123
- readonly name: "amount";
124
- readonly type: "core::integer::u256";
125
- }];
126
- readonly outputs: readonly [{
127
- readonly type: "core::bool";
128
- }];
129
- readonly state_mutability: "external";
130
- }];
131
- }, {
132
- readonly type: "constructor";
133
- readonly name: "constructor";
134
- readonly inputs: readonly [{
135
- readonly name: "name";
136
- readonly type: "core::felt252";
137
- }, {
138
- readonly name: "symbol";
139
- readonly type: "core::felt252";
140
- }, {
141
- readonly name: "decimals";
142
- readonly type: "core::integer::u8";
143
- }, {
144
- readonly name: "initial_supply";
145
- readonly type: "core::integer::u256";
146
- }, {
147
- readonly name: "recipient";
148
- readonly type: "core::starknet::contract_address::ContractAddress";
149
- }];
150
- }, {
151
- readonly type: "event";
152
- readonly name: "opus::mock::erc20::erc20::Transfer";
153
- readonly kind: "struct";
154
- readonly members: readonly [{
155
- readonly name: "from";
156
- readonly type: "core::starknet::contract_address::ContractAddress";
157
- readonly kind: "key";
158
- }, {
159
- readonly name: "to";
160
- readonly type: "core::starknet::contract_address::ContractAddress";
161
- readonly kind: "key";
162
- }, {
163
- readonly name: "value";
164
- readonly type: "core::integer::u256";
165
- readonly kind: "data";
166
- }];
167
- }, {
168
- readonly type: "event";
169
- readonly name: "opus::mock::erc20::erc20::Approval";
170
- readonly kind: "struct";
171
- readonly members: readonly [{
172
- readonly name: "owner";
173
- readonly type: "core::starknet::contract_address::ContractAddress";
174
- readonly kind: "key";
175
- }, {
176
- readonly name: "spender";
177
- readonly type: "core::starknet::contract_address::ContractAddress";
178
- readonly kind: "key";
179
- }, {
180
- readonly name: "value";
181
- readonly type: "core::integer::u256";
182
- readonly kind: "data";
183
- }];
184
- }, {
185
- readonly type: "event";
186
- readonly name: "opus::mock::erc20::erc20::Event";
187
- readonly kind: "enum";
188
- readonly variants: readonly [{
189
- readonly name: "Transfer";
190
- readonly type: "opus::mock::erc20::erc20::Transfer";
191
- readonly kind: "nested";
192
- }, {
193
- readonly name: "Approval";
194
- readonly type: "opus::mock::erc20::erc20::Approval";
195
- readonly kind: "nested";
196
- }];
197
- }];
@@ -1,273 +0,0 @@
1
- export const erc20Abi = [
2
- {
3
- type: 'impl',
4
- name: 'ERC20Impl',
5
- interface_name: 'opus::mock::erc20::IERC20',
6
- },
7
- {
8
- type: 'struct',
9
- name: 'core::integer::u256',
10
- members: [
11
- {
12
- name: 'low',
13
- type: 'core::integer::u128',
14
- },
15
- {
16
- name: 'high',
17
- type: 'core::integer::u128',
18
- },
19
- ],
20
- },
21
- {
22
- type: 'enum',
23
- name: 'core::bool',
24
- variants: [
25
- {
26
- name: 'False',
27
- type: '()',
28
- },
29
- {
30
- name: 'True',
31
- type: '()',
32
- },
33
- ],
34
- },
35
- {
36
- type: 'interface',
37
- name: 'opus::mock::erc20::IERC20',
38
- items: [
39
- {
40
- type: 'function',
41
- name: 'name',
42
- inputs: [],
43
- outputs: [
44
- {
45
- type: 'core::felt252',
46
- },
47
- ],
48
- state_mutability: 'view',
49
- },
50
- {
51
- type: 'function',
52
- name: 'symbol',
53
- inputs: [],
54
- outputs: [
55
- {
56
- type: 'core::felt252',
57
- },
58
- ],
59
- state_mutability: 'view',
60
- },
61
- {
62
- type: 'function',
63
- name: 'decimals',
64
- inputs: [],
65
- outputs: [
66
- {
67
- type: 'core::integer::u8',
68
- },
69
- ],
70
- state_mutability: 'view',
71
- },
72
- {
73
- type: 'function',
74
- name: 'total_supply',
75
- inputs: [],
76
- outputs: [
77
- {
78
- type: 'core::integer::u256',
79
- },
80
- ],
81
- state_mutability: 'view',
82
- },
83
- {
84
- type: 'function',
85
- name: 'balance_of',
86
- inputs: [
87
- {
88
- name: 'account',
89
- type: 'core::starknet::contract_address::ContractAddress',
90
- },
91
- ],
92
- outputs: [
93
- {
94
- type: 'core::integer::u256',
95
- },
96
- ],
97
- state_mutability: 'view',
98
- },
99
- {
100
- type: 'function',
101
- name: 'allowance',
102
- inputs: [
103
- {
104
- name: 'owner',
105
- type: 'core::starknet::contract_address::ContractAddress',
106
- },
107
- {
108
- name: 'spender',
109
- type: 'core::starknet::contract_address::ContractAddress',
110
- },
111
- ],
112
- outputs: [
113
- {
114
- type: 'core::integer::u256',
115
- },
116
- ],
117
- state_mutability: 'view',
118
- },
119
- {
120
- type: 'function',
121
- name: 'transfer',
122
- inputs: [
123
- {
124
- name: 'recipient',
125
- type: 'core::starknet::contract_address::ContractAddress',
126
- },
127
- {
128
- name: 'amount',
129
- type: 'core::integer::u256',
130
- },
131
- ],
132
- outputs: [
133
- {
134
- type: 'core::bool',
135
- },
136
- ],
137
- state_mutability: 'external',
138
- },
139
- {
140
- type: 'function',
141
- name: 'transfer_from',
142
- inputs: [
143
- {
144
- name: 'sender',
145
- type: 'core::starknet::contract_address::ContractAddress',
146
- },
147
- {
148
- name: 'recipient',
149
- type: 'core::starknet::contract_address::ContractAddress',
150
- },
151
- {
152
- name: 'amount',
153
- type: 'core::integer::u256',
154
- },
155
- ],
156
- outputs: [
157
- {
158
- type: 'core::bool',
159
- },
160
- ],
161
- state_mutability: 'external',
162
- },
163
- {
164
- type: 'function',
165
- name: 'approve',
166
- inputs: [
167
- {
168
- name: 'spender',
169
- type: 'core::starknet::contract_address::ContractAddress',
170
- },
171
- {
172
- name: 'amount',
173
- type: 'core::integer::u256',
174
- },
175
- ],
176
- outputs: [
177
- {
178
- type: 'core::bool',
179
- },
180
- ],
181
- state_mutability: 'external',
182
- },
183
- ],
184
- },
185
- {
186
- type: 'constructor',
187
- name: 'constructor',
188
- inputs: [
189
- {
190
- name: 'name',
191
- type: 'core::felt252',
192
- },
193
- {
194
- name: 'symbol',
195
- type: 'core::felt252',
196
- },
197
- {
198
- name: 'decimals',
199
- type: 'core::integer::u8',
200
- },
201
- {
202
- name: 'initial_supply',
203
- type: 'core::integer::u256',
204
- },
205
- {
206
- name: 'recipient',
207
- type: 'core::starknet::contract_address::ContractAddress',
208
- },
209
- ],
210
- },
211
- {
212
- type: 'event',
213
- name: 'opus::mock::erc20::erc20::Transfer',
214
- kind: 'struct',
215
- members: [
216
- {
217
- name: 'from',
218
- type: 'core::starknet::contract_address::ContractAddress',
219
- kind: 'key',
220
- },
221
- {
222
- name: 'to',
223
- type: 'core::starknet::contract_address::ContractAddress',
224
- kind: 'key',
225
- },
226
- {
227
- name: 'value',
228
- type: 'core::integer::u256',
229
- kind: 'data',
230
- },
231
- ],
232
- },
233
- {
234
- type: 'event',
235
- name: 'opus::mock::erc20::erc20::Approval',
236
- kind: 'struct',
237
- members: [
238
- {
239
- name: 'owner',
240
- type: 'core::starknet::contract_address::ContractAddress',
241
- kind: 'key',
242
- },
243
- {
244
- name: 'spender',
245
- type: 'core::starknet::contract_address::ContractAddress',
246
- kind: 'key',
247
- },
248
- {
249
- name: 'value',
250
- type: 'core::integer::u256',
251
- kind: 'data',
252
- },
253
- ],
254
- },
255
- {
256
- type: 'event',
257
- name: 'opus::mock::erc20::erc20::Event',
258
- kind: 'enum',
259
- variants: [
260
- {
261
- name: 'Transfer',
262
- type: 'opus::mock::erc20::erc20::Transfer',
263
- kind: 'nested',
264
- },
265
- {
266
- name: 'Approval',
267
- type: 'opus::mock::erc20::erc20::Approval',
268
- kind: 'nested',
269
- },
270
- ],
271
- },
272
- ];
273
- //# sourceMappingURL=erc20Abi.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"erc20Abi.js","sourceRoot":"","sources":["../../../src/lib/abis/erc20Abi.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,QAAQ,GAAG;IACtB;QACE,IAAI,EAAE,MAAM;QACZ,IAAI,EAAE,WAAW;QACjB,cAAc,EAAE,2BAA2B;KAC5C;IACD;QACE,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE,qBAAqB;QAC3B,OAAO,EAAE;YACP;gBACE,IAAI,EAAE,KAAK;gBACX,IAAI,EAAE,qBAAqB;aAC5B;YACD;gBACE,IA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