Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Actions for getting uniswap v3 pool contract address, liquidity, slot0 data, and observation data #21

Merged
merged 10 commits into from
Nov 7, 2024

Conversation

rohan-agarwal-coinbase
Copy link
Contributor

@rohan-agarwal-coinbase rohan-agarwal-coinbase commented Nov 7, 2024

4 new actions for reading data for deployed uniswap liquidity pools (pool contract address, liquidity, slot0, observation data based on seconds ago)

Testing

  • Unit tests added
  • Tested E2E to see that we're correctly fetching the pool details for the 4 new read actions

@cb-heimdall
Copy link

cb-heimdall commented Nov 7, 2024

✅ Heimdall Review Status

Requirement Status More Info
Reviews 1/1
Denominator calculation
Show calculation
1 if user is bot 0
1 if user is external 0
From .codeflow.yml 1
Additional review requirements
Show calculation
Max 0
0
From CODEOWNERS 0
Global minimum 0
Max 1
1
1 if commit is unverified 0
Sum 1

@rohan-agarwal-coinbase rohan-agarwal-coinbase changed the title Actions for getting uniswap v3 pool liquidity, slot0 data, and observation data Actions for getting uniswap v3 pool contract address, liquidity, slot0 data, and observation data Nov 7, 2024
)

UNISWAP_V3_GET_POOL_PROMPT = """
This tool will get the pool contract address for Uniswap V3 pools that have been previously created. It takes in the networkId, the two token addresses, with the value 0x4200000000000000000000000000000000000006 for native gas token and a value like 0x1234567890123456789012345678901234567890 for ERC20 token. It also takes in the pool fee, which is denominated in hundredths of a bip (i.e. 1e-6). Acceptable fee values are 100, 500, 3000, and 10000. Supported networks are Base Sepolia, Base Mainnet, Ethereum Mainnet, Polygon Mainnet, and Arbitrum Mainnet.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
This tool will get the pool contract address for Uniswap V3 pools that have been previously created. It takes in the networkId, the two token addresses, with the value 0x4200000000000000000000000000000000000006 for native gas token and a value like 0x1234567890123456789012345678901234567890 for ERC20 token. It also takes in the pool fee, which is denominated in hundredths of a bip (i.e. 1e-6). Acceptable fee values are 100, 500, 3000, and 10000. Supported networks are Base Sepolia, Base Mainnet, Ethereum Mainnet, Polygon Mainnet, and Arbitrum Mainnet.
This tool will get the pool contract address for Uniswap V3 pools that have been previously created. It takes in the network ID, the two token addresses, with the value 0x4200000000000000000000000000000000000006 for native gas token and a value like 0x1234567890123456789012345678901234567890 for ERC20 token. It also takes in the pool fee, which is denominated in hundredths of a bip (i.e. 1e-6). Acceptable fee values are 100, 500, 3000, and 10000. Supported networks are Base Sepolia, Base Mainnet, Ethereum Mainnet, Polygon Mainnet, and Arbitrum Mainnet.

)

UNISWAP_V3_GET_POOL_LIQUIDITY_PROMPT = """
This tool will get the liquidity for Uniswap V3 pools that have been previously created. It takes in the networkId and the pool contract address. Supported networks are Base Sepolia, Base Mainnet, Ethereum Mainnet, Polygon Mainnet, and Arbitrum Mainnet.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
This tool will get the liquidity for Uniswap V3 pools that have been previously created. It takes in the networkId and the pool contract address. Supported networks are Base Sepolia, Base Mainnet, Ethereum Mainnet, Polygon Mainnet, and Arbitrum Mainnet.
This tool will get the liquidity for Uniswap V3 pools that have been previously created. It takes in the network ID and the pool contract address. Supported networks are Base Sepolia, Base Mainnet, Ethereum Mainnet, Polygon Mainnet, and Arbitrum Mainnet.

@rohan-agarwal-coinbase rohan-agarwal-coinbase merged commit fe9e109 into master Nov 7, 2024
11 checks passed
stat pushed a commit that referenced this pull request Nov 7, 2024
stat pushed a commit that referenced this pull request Jan 15, 2025
murrlincoln pushed a commit to murrlincoln/agentkit that referenced this pull request Feb 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants