File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed
Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -14,4 +14,5 @@ serde_json = "1.0.57"
1414reqwest = { version = " 0.10.7" , features = [" blocking" ] }
1515thiserror = " 1.0.20"
1616openssl = { version = " 0.10" , features = [" vendored" ] }
17- anyhow = " 1.0.32"
17+ anyhow = " 1.0.32"
18+ sigma-tree = { git = " https://github.com/ergoplatform/sigma-rust" , branch = " develop" , features = [" with-serde" ] }
Original file line number Diff line number Diff line change 11use crate :: oracle_core:: { get_core_api_port, OracleCore } ;
22use anyhow:: Result ;
3+ use sigma_tree:: ast:: Constant ;
34use std:: env;
45use std:: thread;
56use std:: time:: Duration ;
@@ -35,7 +36,10 @@ impl Connector {
3536 let args: Vec < String > = env:: args ( ) . collect ( ) ;
3637 if args. len ( ) > 1 && & args[ 1 ] == "--bootstrap-value" {
3738 if let Ok ( price) = ( self . get_datapoint ) ( ) {
38- println ! ( "Bootstrap {} Value: {}" , self . title, price) ;
39+ // Convert the price into a sigma `Constant`
40+ let constant: Constant = ( price as i64 ) . into ( ) ;
41+
42+ println ! ( "Bootstrap {} Value: {}" , self . title, constant. base16_str( ) ) ;
3943 std:: process:: exit ( 0 ) ;
4044 } else {
4145 panic ! ( "Failed to fetch Erg/USD from CoinGecko" ) ;
You can’t perform that action at this time.
0 commit comments