balancer_sdk 0.1.16-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
use ethcontract::errors::MethodError;

pub fn handle_bal_error(e: &MethodError) {
    if e.inner.to_string().contains("BAL#") {
        println!("
      Your call to the ethereum node was successful. However, your inputs reverted with a BAL error. 

      See Balancer Error Codes here: https://dev.balancer.fi/references/error-codes
    ");
    }
}