Skip to content

Commit

Permalink
Merge branch 'develop' into andrew/debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
spacesailor24 authored Feb 5, 2025
2 parents bac092c + e5abb9e commit a2e4b2b
Show file tree
Hide file tree
Showing 16 changed files with 28 additions and 20 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.1.0-18 (2025-02-05)

This was a version bump only, there were no code changes.

## 0.1.0-17 (2025-01-31)

This was a version bump only, there were no code changes.
Expand Down
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Lit Protocol Agent Wallet
# Lit Agent Wallet

Welcome to the **Lit Protocol Agent Wallet** project! This repository provides a secure and trustless solution for managing AI Agent wallets using the Lit SDK. The framework ensures that Agent owners retain full control over their funds, preventing tampering by Agent developers.
Welcome to the **L**it **A**gent **W**allet (LAW) project! This repository provides a secure and trustless solution for managing AI Agent wallets using the Lit SDK. The framework ensures that Agent owners retain full control over their funds, preventing tampering by Agent developers.

In addition to the documentation here, please visit [here](https://developer.litprotocol.com/agent-wallet/intro) for a more detail guide on what LAW is, and how you can get started with it!

## Table of Contents

Expand Down
2 changes: 1 addition & 1 deletion packages/agent-wallet/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@lit-protocol/agent-wallet",
"version": "0.1.0-17",
"version": "0.1.0-18",
"publishConfig": {
"access": "public"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/aw-signer/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@lit-protocol/aw-signer",
"version": "0.1.0-17",
"version": "0.1.0-18",
"publishConfig": {
"access": "public"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/aw-subagent-gaia/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@lit-protocol/aw-subagent-gaia",
"version": "0.1.0-17",
"version": "0.1.0-18",
"publishConfig": {
"access": "public"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/aw-subagent-openai/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@lit-protocol/aw-subagent-openai",
"version": "0.1.0-17",
"version": "0.1.0-18",
"publishConfig": {
"access": "public"
},
Expand Down
4 changes: 2 additions & 2 deletions packages/aw-tool-erc20-transfer/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# AW-Tool Uniswap Swap Documentation
# AW-Tool ERC-20 Transfer Documentation

The `aw-tool-uniswap-swap` folder contains utilities for interacting with Uniswap swaps using Lit Protocol and Ethereum.
The `aw-tool-erc20-transfer` folder contains utilities for interacting with erc20 transfers using Lit Protocol and Ethereum.

---

Expand Down
2 changes: 1 addition & 1 deletion packages/aw-tool-erc20-transfer/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@lit-protocol/aw-tool-erc20-transfer",
"version": "0.1.0-17",
"version": "0.1.0-18",
"publishConfig": {
"access": "public"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/aw-tool-registry/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@lit-protocol/aw-tool-registry",
"version": "0.1.0-17",
"version": "0.1.0-18",
"publishConfig": {
"access": "public"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/aw-tool-sign-ecdsa/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@lit-protocol/aw-tool-sign-ecdsa",
"version": "0.1.0-17",
"version": "0.1.0-18",
"publishConfig": {
"access": "public"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/aw-tool-uniswap-swap/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@lit-protocol/aw-tool-uniswap-swap",
"version": "0.1.0-17",
"version": "0.1.0-18",
"publishConfig": {
"access": "public"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/aw-tool-uniswap-swap/src/lib/lit-actions/tool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,8 @@ declare global {
// Swap Transaction
const swapGasLimit = await estimateGasLimit(
provider,
UNISWAP_V3_ROUTER,
pkp.ethAddress,
UNISWAP_V3_ROUTER,
tokenInfo.tokenIn.contract,
tokenInfo.tokenIn.amount,
false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,23 +48,21 @@ export const estimateGasLimit = async (
pkpEthAddress,
amount,
swapParams.amountOutMin,
0,
0
],
{ from: pkpEthAddress }
);
} else {
throw new Error('Missing swap parameters for gas estimation');
}

// Add 20% buffer
const gasLimit = estimatedGas.mul(120).div(100);
console.log(`Estimated gas limit: ${gasLimit.toString()}`);
return gasLimit;
} catch (error) {
console.error('Error estimating gas:', error);
// Use fallback gas limits
const fallbackGas = isApproval ? '300000' : '500000';
console.log(`Using fallback gas limit: ${fallbackGas}`);
const fallbackGas = isApproval ? '100000' : '300000';
console.log(`Failed to estimate gas. Using fallback gas limit: ${fallbackGas}`);
return ethers.BigNumber.from(fallbackGas);
}
};
2 changes: 1 addition & 1 deletion packages/aw-tool/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@lit-protocol/aw-tool",
"version": "0.1.0-17",
"version": "0.1.0-18",
"publishConfig": {
"access": "public"
},
Expand Down
3 changes: 2 additions & 1 deletion packages/law-cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@lit-protocol/law-cli",
"version": "0.1.0-17",
"version": "0.1.0-18",
"publishConfig": {
"access": "public"
},
Expand Down Expand Up @@ -32,6 +32,7 @@
"zod": "^3.24.1"
},
"devDependencies": {
"@lit-protocol/types": "7.0.2",
"@types/node-localstorage": "^1.3.3",
"@types/prompts": "^2.4.9"
},
Expand Down
3 changes: 3 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit a2e4b2b

Please sign in to comment.