Skip to content

Commit 5834f3d

Browse files
committed
chore: update build & remove tee as depn
1 parent 224a142 commit 5834f3d

15 files changed

Lines changed: 22848 additions & 64289 deletions

bun.lock

Lines changed: 182 additions & 180 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js

Lines changed: 22509 additions & 63884 deletions
Large diffs are not rendered by default.

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"dist"
2323
],
2424
"dependencies": {
25-
"@elizaos/plugin-tee": "^1.0.0-beta.38",
25+
"@elizaos/core": "1.0.0-beta.52",
2626
"@lifi/data-types": "5.15.5",
2727
"@lifi/sdk": "3.4.1",
2828
"@lifi/types": "16.3.0"

src/actions/bridge.ts

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export class BridgeAction {
4141
chainName: config.name,
4242
nativeCurrency: config.nativeCurrency,
4343
rpcUrls: [config.rpcUrls.default.http[0]],
44-
blockExplorerUrls: [config.blockExplorers?.default.url],
44+
blockExplorerUrls: [config?.blockExplorers?.default?.url],
4545
},
4646
diamondAddress: "0x0000000000000000000000000000000000000000",
4747
coin: config.nativeCurrency.symbol,
@@ -173,13 +173,15 @@ export const bridgeAction = {
173173
});
174174
}
175175
return true;
176-
} catch (error: unknown) {
177-
const errMsg = error instanceof Error ? error.message : String(error);
178-
console.error("Error in bridge handler:", errMsg);
176+
} catch (error) {
177+
console.error(
178+
'Error in bridge handler:',
179+
error instanceof Error ? error.message : 'Unknown error'
180+
);
179181
if (callback) {
180182
callback({
181-
text: `Error: ${errMsg}`,
182-
content: { error: errMsg },
183+
text: `Error: ${error instanceof Error ? error.message : 'Unknown error'}`,
184+
content: { error: error instanceof Error ? error.message : 'Unknown error' },
183185
});
184186
}
185187
return false;

src/actions/gov-execute.ts

Lines changed: 11 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ export class ExecuteAction {
3131
async execute(params: ExecuteProposalParams): Promise<Transaction> {
3232
const walletClient = this.walletProvider.getWalletClient(params.chain);
3333

34+
if (!walletClient.account) {
35+
throw new Error('Wallet account is not available');
36+
}
37+
3438
const descriptionHash = keccak256(stringToHex(params.description));
3539

3640
const txData = encodeFunctionData({
@@ -51,18 +55,7 @@ export class ExecuteAction {
5155
value: BigInt(0),
5256
data: txData as Hex,
5357
chain: chainConfig,
54-
kzg: {
55-
blobToKzgCommitment: (_blob: ByteArray): ByteArray => {
56-
throw new Error("Function not implemented.");
57-
},
58-
computeBlobKzgProof: (
59-
_blob: ByteArray,
60-
_commitment: ByteArray
61-
): ByteArray => {
62-
throw new Error("Function not implemented.");
63-
},
64-
},
65-
} as any);
58+
});
6659

6760
const receipt = await publicClient.waitForTransactionReceipt({
6861
hash,
@@ -78,9 +71,8 @@ export class ExecuteAction {
7871
logs: receipt.logs,
7972
};
8073
} catch (error: unknown) {
81-
throw new Error(
82-
`Vote failed: ${error instanceof Error ? error.message : String(error)}`
83-
);
74+
const errorMessage = error instanceof Error ? error.message : String(error);
75+
throw new Error(`Vote failed: ${errorMessage}`);
8476
}
8577
}
8678
}
@@ -124,14 +116,11 @@ export const executeAction = {
124116
const walletProvider = new WalletProvider(privateKey, runtime);
125117
const action = new ExecuteAction(walletProvider);
126118
return await action.execute(executeParams);
127-
} catch (error) {
128-
const errMsg = error instanceof Error ? error.message : String(error);
129-
console.error("Error in execute handler:", errMsg);
119+
} catch (error: unknown) {
120+
const errorMessage = error instanceof Error ? error.message : String(error);
121+
console.error('Error in execute handler:', errorMessage);
130122
if (callback) {
131-
callback({
132-
text: `Error: ${errMsg}`,
133-
content: { error: errMsg },
134-
});
123+
callback({ text: `Error: ${errorMessage}` });
135124
}
136125
return false;
137126
}

src/actions/gov-propose.ts

Lines changed: 10 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ export class ProposeAction {
2929
async propose(params: ProposeProposalParams): Promise<Transaction> {
3030
const walletClient = this.walletProvider.getWalletClient(params.chain);
3131

32+
if (!walletClient.account) {
33+
throw new Error('Wallet account is not available');
34+
}
35+
3236
const txData = encodeFunctionData({
3337
abi: governorArtifacts.abi,
3438
functionName: "propose",
@@ -52,18 +56,7 @@ export class ProposeAction {
5256
value: BigInt(0),
5357
data: txData as Hex,
5458
chain: chainConfig,
55-
kzg: {
56-
blobToKzgCommitment: (_blob: ByteArray): ByteArray => {
57-
throw new Error("Function not implemented.");
58-
},
59-
computeBlobKzgProof: (
60-
_blob: ByteArray,
61-
_commitment: ByteArray
62-
): ByteArray => {
63-
throw new Error("Function not implemented.");
64-
},
65-
},
66-
} as any);
59+
});
6760

6861
const receipt = await publicClient.waitForTransactionReceipt({
6962
hash,
@@ -79,9 +72,8 @@ export class ProposeAction {
7972
logs: receipt.logs,
8073
};
8174
} catch (error: unknown) {
82-
throw new Error(
83-
`Vote failed: ${error instanceof Error ? error.message : String(error)}`
84-
);
75+
const errorMessage = error instanceof Error ? error.message : String(error);
76+
throw new Error(`Vote failed: ${errorMessage}`);
8577
}
8678
}
8779
}
@@ -124,14 +116,10 @@ export const proposeAction = {
124116
const action = new ProposeAction(walletProvider);
125117
return await action.propose(proposeParams);
126118
} catch (error: unknown) {
127-
console.error(
128-
"Error in propose handler:",
129-
error instanceof Error ? error.message : String(error)
130-
);
119+
const errorMessage = error instanceof Error ? error.message : String(error);
120+
console.error('Error in propose handler:', errorMessage);
131121
if (callback) {
132-
callback({
133-
text: `Error: ${error instanceof Error ? error.message : String(error)}`,
134-
});
122+
callback({ text: `Error: ${errorMessage}` });
135123
}
136124
return false;
137125
}

src/actions/gov-queue.ts

Lines changed: 12 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ export class QueueAction {
3131
async queue(params: QueueProposalParams): Promise<Transaction> {
3232
const walletClient = this.walletProvider.getWalletClient(params.chain);
3333

34+
if (!walletClient.account) {
35+
throw new Error('Wallet account is not available');
36+
}
37+
3438
const descriptionHash = keccak256(stringToHex(params.description));
3539

3640
const txData = encodeFunctionData({
@@ -51,18 +55,7 @@ export class QueueAction {
5155
value: BigInt(0),
5256
data: txData as Hex,
5357
chain: chainConfig,
54-
kzg: {
55-
blobToKzgCommitment: (_blob: ByteArray): ByteArray => {
56-
throw new Error("Function not implemented.");
57-
},
58-
computeBlobKzgProof: (
59-
_blob: ByteArray,
60-
_commitment: ByteArray
61-
): ByteArray => {
62-
throw new Error("Function not implemented.");
63-
},
64-
},
65-
} as any);
58+
});
6659

6760
const receipt = await publicClient.waitForTransactionReceipt({
6861
hash,
@@ -77,10 +70,9 @@ export class QueueAction {
7770
chainId: this.walletProvider.getChainConfigs(params.chain).id,
7871
logs: receipt.logs,
7972
};
80-
} catch (error) {
81-
throw new Error(
82-
`Vote failed: ${error instanceof Error ? error.message : String(error)}`
83-
);
73+
} catch (error: unknown) {
74+
const errorMessage = error instanceof Error ? error.message : String(error);
75+
throw new Error(`Vote failed: ${errorMessage}`);
8476
}
8577
}
8678
}
@@ -122,15 +114,11 @@ export const queueAction = {
122114
const walletProvider = new WalletProvider(privateKey, runtime);
123115
const action = new QueueAction(walletProvider);
124116
return await action.queue(queueParams);
125-
} catch (error) {
126-
console.error(
127-
"Error in queue handler:",
128-
error instanceof Error ? error.message : String(error)
129-
);
117+
} catch (error: unknown) {
118+
const errorMessage = error instanceof Error ? error.message : String(error);
119+
console.error('Error in queue handler:', errorMessage);
130120
if (callback) {
131-
callback({
132-
text: `Error: ${error instanceof Error ? error.message : String(error)}`,
133-
});
121+
callback({ text: `Error: ${errorMessage}` });
134122
}
135123
return false;
136124
}

src/actions/gov-vote.ts

Lines changed: 12 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ export class VoteAction {
2525
async vote(params: VoteParams): Promise<Transaction> {
2626
const walletClient = this.walletProvider.getWalletClient(params.chain);
2727

28+
if (!walletClient.account) {
29+
throw new Error('Wallet account is not available');
30+
}
31+
2832
const proposalId = BigInt(params.proposalId.toString());
2933
const support = BigInt(params.support.toString());
3034

@@ -46,18 +50,7 @@ export class VoteAction {
4650
value: BigInt(0),
4751
data: txData as Hex,
4852
chain: chainConfig,
49-
kzg: {
50-
blobToKzgCommitment: (_blob: ByteArray): ByteArray => {
51-
throw new Error("Function not implemented.");
52-
},
53-
computeBlobKzgProof: (
54-
_blob: ByteArray,
55-
_commitment: ByteArray
56-
): ByteArray => {
57-
throw new Error("Function not implemented.");
58-
},
59-
},
60-
} as any);
53+
});
6154

6255
const receipt = await publicClient.waitForTransactionReceipt({
6356
hash,
@@ -72,10 +65,9 @@ export class VoteAction {
7265
chainId: this.walletProvider.getChainConfigs(params.chain).id,
7366
logs: receipt.logs,
7467
};
75-
} catch (error) {
76-
throw new Error(
77-
`Vote failed: ${error instanceof Error ? error.message : String(error)}`
78-
);
68+
} catch (error: unknown) {
69+
const errorMessage = error instanceof Error ? error.message : String(error);
70+
throw new Error(`Vote failed: ${errorMessage}`);
7971
}
8072
}
8173
}
@@ -113,15 +105,11 @@ export const voteAction = {
113105
const walletProvider = new WalletProvider(privateKey, runtime);
114106
const action = new VoteAction(walletProvider);
115107
return await action.vote(voteParams);
116-
} catch (error) {
117-
console.error(
118-
"Error in vote handler:",
119-
error instanceof Error ? error.message : String(error)
120-
);
108+
} catch (error: unknown) {
109+
const errorMessage = error instanceof Error ? error.message : String(error);
110+
console.error('Error in vote handler:', errorMessage);
121111
if (callback) {
122-
callback({
123-
text: `Error: ${error instanceof Error ? error.message : String(error)}`,
124-
});
112+
callback({ text: `Error: ${errorMessage}` });
125113
}
126114
return false;
127115
}

0 commit comments

Comments
 (0)