-
Notifications
You must be signed in to change notification settings - Fork 60
feat(Solv): add APYs to Solv strategies #740
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
Changes from all commits
f2621dd
79128ff
702db62
fa71cca
1d7e531
18977ea
c4f797f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
import { Token } from './types'; | ||
import { Address, isAddress } from 'viem'; | ||
import { bob, bobSepolia, optimism } from 'viem/chains'; | ||
import { bob, bobSepolia, mainnet, optimism } from 'viem/chains'; | ||
|
||
// TODO: re-write to use superchain tokenlist | ||
const bobTokens = [ | ||
|
@@ -166,6 +166,20 @@ const optimismTokens = [ | |
}, | ||
]; | ||
|
||
const ethereumTokens = [ | ||
{ | ||
name: 'Solv', | ||
symbol: 'SOLV', | ||
decimals: 18, | ||
tokens: { | ||
ethereum: { | ||
address: '0x04830a96a23ea718faa695a5aae74695aae3a23f', | ||
}, | ||
}, | ||
logoURI: 'https://raw.githubusercontent.com/bob-collective/bob/master/assets/SOLV.svg', | ||
}, | ||
]; | ||
Comment on lines
+169
to
+181
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Verification agent 🧩 Analysis chainVerify SOLV mainnet address/decimals before merge Please confirm 🌐 Web query:
💡 Result: The Solv Protocol SOLV token on Ethereum (as listed on Etherscan) is: 0xD1D8c3f9a5609027A1c7cEF070aB9c51b99DCFf7 — decimals: 18. [1] Note: there are other unrelated contracts named "SOLV" on Etherscan (e.g. 0xeb6b6...); Solv's docs state SOLV governance operates on BNB Chain (so please confirm which chain/token you mean if you need official project confirmation). [2] Incorrect SOLV token address on Ethereum mainnet The address configured in 🤖 Prompt for AI Agents
|
||
|
||
const shoebillTokens = [ | ||
{ | ||
name: 'sb tBTC v2', | ||
|
@@ -341,12 +355,16 @@ const TOKENS: Array<{ | |
optimism?: { | ||
address: string; | ||
}; | ||
ethereum?: { | ||
address: string; | ||
}; | ||
}; | ||
logoURI: string; | ||
}> = [ | ||
...bobTokens, | ||
...bobSepoliaTokens, | ||
...optimismTokens, | ||
...ethereumTokens, | ||
...shoebillTokens, | ||
...segmentTokens, | ||
...avalonTokens, | ||
|
@@ -361,10 +379,12 @@ export const ADDRESS_LOOKUP: { [key in number]: { [key in string]: Token } } = { | |
SYMBOL_LOOKUP[bob.id] = {}; | ||
SYMBOL_LOOKUP[bobSepolia.id] = {}; | ||
SYMBOL_LOOKUP[optimism.id] = {}; | ||
SYMBOL_LOOKUP[mainnet.id] = {}; | ||
|
||
ADDRESS_LOOKUP[bob.id] = {}; | ||
ADDRESS_LOOKUP[bobSepolia.id] = {}; | ||
ADDRESS_LOOKUP[optimism.id] = {}; | ||
ADDRESS_LOOKUP[mainnet.id] = {}; | ||
|
||
function addToken(address: string, token: (typeof TOKENS)[number], chainId: number) { | ||
const lowerAddress = address.toLowerCase(); | ||
|
@@ -393,6 +413,10 @@ for (const token of TOKENS) { | |
if (token.tokens.optimism) { | ||
addToken(token.tokens.optimism.address, token, optimism.id); | ||
} | ||
|
||
if (token.tokens.ethereum) { | ||
addToken(token.tokens.ethereum.address, token, mainnet.id); | ||
} | ||
Comment on lines
+417
to
+419
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Verification agent 🧩 Analysis chainMainnet registration path: LGTM. Ensure strategy wiring covers SOLV The registration works. Please verify the new Solv strategy map consumes these mainnet entries. 🏁 Script executed: #!/bin/bash
# Verify any strategy maps include the SOLV mainnet address.
rg -nC2 -i "0x04830a96a23ea718faa695a5aae74695aae3a23f|tokenToSolvStrategyMap|solv" --type ts Length of output: 42793 Add SOLV mapping to tokenToSolvStrategyMap tokenToSolvStrategyMap in sdk/src/gateway/strategy.ts currently only includes SolvBTC+ and Jupiter. It’s missing the SOLV mainnet address ( 🤖 Prompt for AI Agents
|
||
} | ||
|
||
export const tokenToStrategyTypeMap = new Map([ | ||
|
Uh oh!
There was an error while loading. Please reload this page.