Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Murisi/strategy constructors #2259

Merged
merged 17 commits into from
Dec 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- Fee amounts in transaction wrappers are now denominated to facilitate hardware
wallet support. ([\#2245](https://github.com/anoma/namada/pull/2245))
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- Made test vector generation easier and reduced the difficulty of maintaining
the generation code. ([\#2259](https://github.com/anoma/namada/pull/2259))
12 changes: 12 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ members = [
"vp_prelude",
"encoding_spec",
"sdk",
"examples",
]

# wasm packages have to be built separately
Expand Down
5 changes: 1 addition & 4 deletions apps/src/lib/bench_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -821,10 +821,7 @@ impl BenchShieldedCtx {
source: TransferSource,
target: TransferTarget,
) -> (Self, Tx) {
let denominated_amount = DenominatedAmount {
amount,
denom: 0.into(),
};
let denominated_amount = DenominatedAmount::native(amount);
let async_runtime = tokio::runtime::Runtime::new().unwrap();
let spending_key = self
.wallet
Expand Down
22 changes: 13 additions & 9 deletions apps/src/lib/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2996,9 +2996,11 @@ pub mod args {
pub const BRIDGE_POOL_GAS_AMOUNT: ArgDefault<token::DenominatedAmount> =
arg_default(
"pool-gas-amount",
DefaultFn(|| token::DenominatedAmount {
amount: token::Amount::zero(),
denom: NATIVE_MAX_DECIMAL_PLACES.into(),
DefaultFn(|| {
token::DenominatedAmount::new(
token::Amount::zero(),
NATIVE_MAX_DECIMAL_PLACES.into(),
)
}),
);
pub const BRIDGE_POOL_GAS_PAYER: ArgOpt<WalletAddress> =
Expand Down Expand Up @@ -3068,9 +3070,11 @@ pub mod args {
pub const FEE_PAYER: Arg<WalletAddress> = arg("fee-payer");
pub const FEE_AMOUNT: ArgDefault<token::DenominatedAmount> = arg_default(
"fee-amount",
DefaultFn(|| token::DenominatedAmount {
amount: token::Amount::default(),
denom: NATIVE_MAX_DECIMAL_PLACES.into(),
DefaultFn(|| {
token::DenominatedAmount::new(
token::Amount::default(),
NATIVE_MAX_DECIMAL_PLACES.into(),
)
}),
);
pub const GENESIS_BOND_SOURCE: ArgOpt<GenesisAddress> = arg_opt("source");
Expand Down Expand Up @@ -4500,7 +4504,7 @@ pub mod args {
println!("Could not parse bond amount: {:?}", e);
safe_exit(1);
})
.amount;
.amount();
let source = SOURCE_OPT.parse(matches);
let tx_code_path = PathBuf::from(TX_BOND_WASM);
Self {
Expand Down Expand Up @@ -4550,7 +4554,7 @@ pub mod args {
println!("Could not parse bond amount: {:?}", e);
safe_exit(1);
})
.amount;
.amount();
let source = SOURCE_OPT.parse(matches);
let tx_code_path = PathBuf::from(TX_UNBOND_WASM);
Self {
Expand Down Expand Up @@ -4676,7 +4680,7 @@ pub mod args {
println!("Could not parse bond amount: {:?}", e);
safe_exit(1);
})
.amount;
.amount();
let tx_code_path = PathBuf::from(TX_REDELEGATE_WASM);
Self {
tx,
Expand Down
Loading
Loading