-
Notifications
You must be signed in to change notification settings - Fork 92
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #464 from balancer/develop
Release v1.1.1
- Loading branch information
Showing
178 changed files
with
7,701 additions
and
19,166 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
node_modules | ||
dist | ||
examples | ||
**/generated |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,22 @@ | ||
import { BalancerSDK } from '../../src/modules/sdk.module'; | ||
import { Network } from '../../src'; | ||
import dotenv from 'dotenv'; | ||
/** | ||
* This example shows how to the adjusted veBAL balance from the active boost delegation contract | ||
* | ||
* How to run: | ||
* yarn run example examples/contracts/veBAL-proxy.ts | ||
*/ | ||
import { BalancerSDK, Network } from '@balancer-labs/sdk'; | ||
|
||
dotenv.config(); | ||
|
||
const sdk = new BalancerSDK( | ||
{ | ||
network: Network.GOERLI, | ||
rpcUrl: `https://goerli.infura.io/v3/${process.env.INFURA}` | ||
const sdk = new BalancerSDK({ | ||
network: Network.GOERLI, | ||
rpcUrl: 'https://rpc.ankr.com/eth_goerli' | ||
}); | ||
|
||
const { veBalProxy } = sdk.contracts; | ||
|
||
async function main() { | ||
|
||
const USER = "0x91F450602455564A64207414c7Fbd1F1F0EbB425"; | ||
|
||
console.log("User's veBAL adjusted balance", await veBalProxy?.getAdjustedBalance(USER)); | ||
const USER = "0x91F450602455564A64207414c7Fbd1F1F0EbB425"; | ||
const balance = await veBalProxy?.getAdjustedBalance(USER); | ||
console.log("User's veBAL adjusted balance", balance); | ||
} | ||
|
||
main(); | ||
|
||
// npm run examples:run -- ./examples/contracts/veBAL-proxy.ts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,25 @@ | ||
import { BalancerSDK } from '../../src/modules/sdk.module'; | ||
import { Network } from '../../src'; | ||
import dotenv from 'dotenv'; | ||
|
||
dotenv.config(); | ||
|
||
const sdk = new BalancerSDK( | ||
{ | ||
network: Network.GOERLI, | ||
rpcUrl: `https://goerli.infura.io/v3/${process.env.INFURA}` | ||
/** | ||
* Shows how to interact with the veBAL contract | ||
* | ||
* How to run: | ||
* yarn run example examples/contracts/veBAL.ts | ||
*/ | ||
import { BalancerSDK, Network } from '@balancer-labs/sdk'; | ||
|
||
const sdk = new BalancerSDK({ | ||
network: Network.GOERLI, | ||
rpcUrl: 'https://rpc.ankr.com/eth_goerli' | ||
}); | ||
|
||
const { veBal } = sdk.contracts; | ||
|
||
async function main() { | ||
if (!veBal) throw new Error('veBal address must be defined'); | ||
|
||
if (!veBal) throw new Error('veBal address must be defined'); | ||
const USER = "0x91F450602455564A64207414c7Fbd1F1F0EbB425"; | ||
|
||
const USER = "0x91F450602455564A64207414c7Fbd1F1F0EbB425"; | ||
|
||
const lockInfo = await veBal.getLockInfo(USER); | ||
console.log("veBAL lock info for user", lockInfo); | ||
const lockInfo = await veBal.getLockInfo(USER); | ||
console.log("veBAL lock info for user", lockInfo); | ||
} | ||
|
||
main(); | ||
|
||
// npm run examples:run -- ./examples/contracts/veBAL.ts |
Oops, something went wrong.