Skip to content

Commit

Permalink
still needs to do a bunch of stuff to get working
Browse files Browse the repository at this point in the history
  • Loading branch information
bengtlofgren committed Sep 26, 2023
1 parent 279c10d commit e863f4f
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ rand_chacha = "0.3.1"
dotenvy = "0.15.7"
hex = "0.4.3"
# TODO: set back to a specific version of Namada when the PR is merged
namada = { git = "https://github.com/anoma/namada", branch = "grarco/sdk-async-traits-send", default-features = false, features = ["abciplus", "namada-sdk"] }
namada = { git = "https://github.com/anoma/namada", rev = "8635da4f742e983cf5caa00a2825c03660345957", default-features = false, features = ["abciplus", "namada-sdk"] }
borsh = "0.9.4"
orion = "0.17.5"
data-encoding = "2.4.0"
Expand Down
4 changes: 2 additions & 2 deletions scripts/faucet.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from requests import get, post
from hashlib import sha256

URL = "http://0.0.0.0:5000/api/v1/faucet"
URL = "http://0.0.0.0:5001/api/v1/faucet"

def request_challenge():
return get(URL).json()
Expand Down Expand Up @@ -38,7 +38,7 @@ def compute_pow_solution(challenge, difficulty):
'tag': response['tag'],
'challenge': response['challenge'],
'transfer': {
'target': 'atest1v4ehgw36g4rrsw2pxezyzsfjx3zrv3f4gfzrvdf5g3pnydf4gcm5vs3jgfprzs33g9zrgdfsp7hful',
'target': 'atest1d9khqw36x4pr2sfkgv6njv2rxuunjvpsxfzr2w29x5crxvfhxsurwdpn8qm5yd2xgverj3336str0x',
'token': 'atest1v4ehgw36x3prswzxggunzv6pxqmnvdj9xvcyzvpsggeyvs3cg9qnywf589qnwvfsg5erg3fkl09rg5',
'amount': 100
}
Expand Down
4 changes: 2 additions & 2 deletions src/handler/faucet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ pub async fn request_transfer(
drop(locked_sdk);

let transfer_result = match process_tx_response {
namada::ledger::tx::ProcessTxResponse::Applied(r) => r.code.eq(&"0"),
namada::ledger::tx::ProcessTxResponse::Broadcast(r) => r.code.eq(&Code::Ok),
namada::sdk::tx::ProcessTxResponse::Applied(r) => r.code.eq(&"0"),
namada::sdk::tx::ProcessTxResponse::Broadcast(r) => r.code.eq(&Code::Ok),
_ => false,
};

Expand Down
2 changes: 1 addition & 1 deletion src/sdk/masp.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use borsh::{BorshDeserialize, BorshSerialize};
use masp_proofs::prover::LocalTxProver;
use namada::ledger::masp::{ShieldedContext, ShieldedUtils};
use namada::sdk::masp::{ShieldedContext, ShieldedUtils};

#[derive(Default)]
pub struct SdkShieldedCtx {
Expand Down
6 changes: 3 additions & 3 deletions src/sdk/namada.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use std::path::PathBuf;

use namada::{
ledger::{
sdk::{
args::{self, InputAmount},
signing::{self, SigningTxData},
tx::ProcessTxResponse,
Expand Down Expand Up @@ -100,7 +100,7 @@ impl NamadaSdk {
}

pub async fn process_tx(&mut self, tx: Tx, args: &args::Tx) -> ProcessTxResponse {
namada::ledger::tx::process_tx(&self.http_client, &mut self.wallet.wallet, args, tx)
namada::sdk::tx::process_tx(&self.http_client, &mut self.wallet.wallet, args, tx)
.await
.unwrap()
}
Expand Down Expand Up @@ -133,7 +133,7 @@ impl NamadaSdk {
args: args::TxTransfer,
fee_payer: common::PublicKey,
) -> Tx {
let (tx, _) = namada::ledger::tx::build_transfer(
let (tx, _) = namada::sdk::tx::build_transfer(
&self.http_client,
&mut self.wallet.wallet,
&mut self.shielded_ctx.shielded_context,
Expand Down
4 changes: 2 additions & 2 deletions src/sdk/wallet.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use std::path::PathBuf;

use namada::{
ledger::wallet::{
sdk::wallet::{
alias::Alias, ConfirmationResponse, GenRestoreKeyError, Store, StoredKeypair, Wallet,
WalletUtils,
},
Expand Down Expand Up @@ -59,7 +59,7 @@ impl WalletUtils for SdkWalletUtils {
fn show_overwrite_confirmation(
_alias: &Alias,
_alias_for: &str,
) -> namada::ledger::wallet::store::ConfirmationResponse {
) -> namada::sdk::wallet::store::ConfirmationResponse {
// Automatically replace aliases in non-interactive mode
ConfirmationResponse::Replace
}
Expand Down

0 comments on commit e863f4f

Please sign in to comment.