balancer_sdk 0.1.6-alpha

A Rust SDK which provides commonly used utilties for interacting with Balancer Protocol V2
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use dotenv;

pub mod errors;
pub mod tokens;

pub use tokens::*;

use crate::Web3;

pub fn build_web3(rpc_endpoint: &str) -> Web3 {
    let transport = ethcontract::web3::transports::Http::new(rpc_endpoint).unwrap();
    Web3::new(transport)
}

pub fn get_env_var(key: &str) -> String {
    dotenv::dotenv().ok();
    dotenv::var(key).unwrap()
}