Skip to content

Commit

Permalink
Merge pull request #146 from balancer/v3-canary
Browse files Browse the repository at this point in the history
V3 canary
  • Loading branch information
franzns authored Feb 14, 2024
2 parents 6510337 + d55bb1b commit fd63cf4
Show file tree
Hide file tree
Showing 30 changed files with 1,259 additions and 85 deletions.
4 changes: 3 additions & 1 deletion modules/network/gnosis.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,9 @@ const gnosisNetworkData: NetworkData = {
excludedTokenAddresses: [],
},
rpcUrl:
(env.DEPLOYMENT_ENV as DeploymentEnv) === 'main' ? `https://rpc.gnosis.gateway.fm` : 'https://gnosis.drpc.org',
(env.DEPLOYMENT_ENV as DeploymentEnv) === 'main'
? `https://rpc.eu-central-2.gateway.fm/v4/gnosis/non-archival/mainnet`
: 'https://gnosis.drpc.org',
rpcMaxBlockRange: 2000,
protocolToken: 'bal',
bal: {
Expand Down
11 changes: 11 additions & 0 deletions modules/network/mainnet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,17 @@ export const data: NetworkData = {
path: 'value',
isIbYield: true,
},
sDOLA: {
tokenAddress: '0xb45ad160634c528cc3d2926d9807104fa3157305',
sourceUrl: 'https://www.inverse.finance/api/dola-staking',
path: 'apr',
isIbYield: true,
},
rswETH: {
tokenAddress: '0xfae103dc9cf190ed75350761e95403b7b8afa6c0',
sourceUrl: 'https://v3-lrt.svc.swellnetwork.io/api/tokens/rsweth/apr',
isIbYield: true,
},
},
},
beefy: {
Expand Down
309 changes: 309 additions & 0 deletions modules/pool/abi/BalancerQueries.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,309 @@
[
{
"inputs": [
{
"internalType": "contract IVault",
"name": "_vault",
"type": "address"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"inputs": [
{
"internalType": "enum IVault.SwapKind",
"name": "kind",
"type": "uint8"
},
{
"components": [
{
"internalType": "bytes32",
"name": "poolId",
"type": "bytes32"
},
{
"internalType": "uint256",
"name": "assetInIndex",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "assetOutIndex",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
},
{
"internalType": "bytes",
"name": "userData",
"type": "bytes"
}
],
"internalType": "struct IVault.BatchSwapStep[]",
"name": "swaps",
"type": "tuple[]"
},
{
"internalType": "contract IAsset[]",
"name": "assets",
"type": "address[]"
},
{
"components": [
{
"internalType": "address",
"name": "sender",
"type": "address"
},
{
"internalType": "bool",
"name": "fromInternalBalance",
"type": "bool"
},
{
"internalType": "address payable",
"name": "recipient",
"type": "address"
},
{
"internalType": "bool",
"name": "toInternalBalance",
"type": "bool"
}
],
"internalType": "struct IVault.FundManagement",
"name": "funds",
"type": "tuple"
}
],
"name": "queryBatchSwap",
"outputs": [
{
"internalType": "int256[]",
"name": "assetDeltas",
"type": "int256[]"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "poolId",
"type": "bytes32"
},
{
"internalType": "address",
"name": "sender",
"type": "address"
},
{
"internalType": "address",
"name": "recipient",
"type": "address"
},
{
"components": [
{
"internalType": "contract IAsset[]",
"name": "assets",
"type": "address[]"
},
{
"internalType": "uint256[]",
"name": "minAmountsOut",
"type": "uint256[]"
},
{
"internalType": "bytes",
"name": "userData",
"type": "bytes"
},
{
"internalType": "bool",
"name": "toInternalBalance",
"type": "bool"
}
],
"internalType": "struct IVault.ExitPoolRequest",
"name": "request",
"type": "tuple"
}
],
"name": "queryExit",
"outputs": [
{
"internalType": "uint256",
"name": "bptIn",
"type": "uint256"
},
{
"internalType": "uint256[]",
"name": "amountsOut",
"type": "uint256[]"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "poolId",
"type": "bytes32"
},
{
"internalType": "address",
"name": "sender",
"type": "address"
},
{
"internalType": "address",
"name": "recipient",
"type": "address"
},
{
"components": [
{
"internalType": "contract IAsset[]",
"name": "assets",
"type": "address[]"
},
{
"internalType": "uint256[]",
"name": "maxAmountsIn",
"type": "uint256[]"
},
{
"internalType": "bytes",
"name": "userData",
"type": "bytes"
},
{
"internalType": "bool",
"name": "fromInternalBalance",
"type": "bool"
}
],
"internalType": "struct IVault.JoinPoolRequest",
"name": "request",
"type": "tuple"
}
],
"name": "queryJoin",
"outputs": [
{
"internalType": "uint256",
"name": "bptOut",
"type": "uint256"
},
{
"internalType": "uint256[]",
"name": "amountsIn",
"type": "uint256[]"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"components": [
{
"internalType": "bytes32",
"name": "poolId",
"type": "bytes32"
},
{
"internalType": "enum IVault.SwapKind",
"name": "kind",
"type": "uint8"
},
{
"internalType": "contract IAsset",
"name": "assetIn",
"type": "address"
},
{
"internalType": "contract IAsset",
"name": "assetOut",
"type": "address"
},
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
},
{
"internalType": "bytes",
"name": "userData",
"type": "bytes"
}
],
"internalType": "struct IVault.SingleSwap",
"name": "singleSwap",
"type": "tuple"
},
{
"components": [
{
"internalType": "address",
"name": "sender",
"type": "address"
},
{
"internalType": "bool",
"name": "fromInternalBalance",
"type": "bool"
},
{
"internalType": "address payable",
"name": "recipient",
"type": "address"
},
{
"internalType": "bool",
"name": "toInternalBalance",
"type": "bool"
}
],
"internalType": "struct IVault.FundManagement",
"name": "funds",
"type": "tuple"
}
],
"name": "querySwap",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "vault",
"outputs": [
{
"internalType": "contract IVault",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
}
]
3 changes: 1 addition & 2 deletions modules/pool/lib/pool-gql-loader.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,9 @@ import { networkContext } from '../../network/network-context.service';
import { fixedNumber } from '../../view-helpers/fixed-number';
import { parseUnits } from 'ethers/lib/utils';
import { formatFixed } from '@ethersproject/bignumber';
import { BalancerChainIds, BeethovenChainIds, chainIdToChain, chainToIdMap } from '../../network/network-config';
import { BeethovenChainIds, chainToIdMap } from '../../network/network-config';
import { GithubContentService } from '../../content/github-content.service';
import { SanityContentService } from '../../content/sanity-content.service';
import { FeaturedPool } from '../../content/content-types';
import { ElementData, FxData, GyroData, LinearData, StableData } from '../subgraph-mapper';

export class PoolGqlLoaderService {
Expand Down
Loading

0 comments on commit fd63cf4

Please sign in to comment.