There are currently no (that we know of) implementations of filecoin address to eth equivalent converters. To aid in the deployment of payouts from Filecoin addresses this PR:
Adds corresponding doc string tests that can be run with cargo test --doc
Example usage:
use cli::utils::filecoin_to_eth_address;
// test ID type addresses
let addr = "t01";
assert_eq!(filecoin_to_eth_address(addr).unwrap(), "0xff00000000000000000000000000000000000001");
let addr = "t0100";
assert_eq!(filecoin_to_eth_address(addr).unwrap(), "0xff00000000000000000000000000000000000064");
let addr = "t05088";
assert_eq!(filecoin_to_eth_address(addr).unwrap(), "0xff000000000000000000000000000000000013e0");
// test delegated addresses
let addr = "t410fkkld55ioe7qg24wvt7fu6pbknb56ht7pt4zamxa";
assert_eq!(filecoin_to_eth_address(addr).unwrap(), "0x52963ef50e27e06d72d59fcb4f3c2a687be3cfef");
There are currently no (that we know of) implementations of filecoin address to eth equivalent converters. To aid in the deployment of payouts from Filecoin addresses this PR:
cargo test --doc
Example usage: