You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Add dry run deposit query to inflow vault contract
Add a DryRunDeposit query that calculates how many vault shares would be
minted for a given deposit amount without executing the deposit. This
allows users and frontends to preview share amounts before committing.
Closes#407
* Update changelog entry to reference PR #408
* Document that DryRunDeposit does not enforce the deposit cap
- Add "dry run deposit" query to the inflow vault contract that calculates how many shares would be minted for a given deposit amount without executing the deposit. ([\#408](https://github.com/informalsystems/hydro/pull/408))
Copy file name to clipboardExpand all lines: contracts/inflow/vault/schema/raw/query.json
+22Lines changed: 22 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -269,6 +269,28 @@
269
269
}
270
270
},
271
271
"additionalProperties": false
272
+
},
273
+
{
274
+
"description": "Simulates a deposit and returns the number of vault shares that would be minted for the given amount of the deposit token, without executing it.",
"description": "A thin wrapper around u128 that is using strings for JSON encoding/decoding, such that the full u128 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u128` to get the value out:\n\n``` # use cosmwasm_std::Uint128; let a = Uint128::from(123u128); assert_eq!(a.u128(), 123);\n\nlet b = Uint128::from(42u64); assert_eq!(b.u128(), 42);\n\nlet c = Uint128::from(70u32); assert_eq!(c.u128(), 70); ```",
Copy file name to clipboardExpand all lines: contracts/inflow/vault/schema/vault.json
+28Lines changed: 28 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -927,6 +927,28 @@
927
927
}
928
928
},
929
929
"additionalProperties": false
930
+
},
931
+
{
932
+
"description": "Simulates a deposit and returns the number of vault shares that would be minted for the given amount of the deposit token, without executing it.",
"description": "A thin wrapper around u128 that is using strings for JSON encoding/decoding, such that the full u128 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u128` to get the value out:\n\n``` # use cosmwasm_std::Uint128; let a = Uint128::from(123u128); assert_eq!(a.u128(), 123);\n\nlet b = Uint128::from(42u64); assert_eq!(b.u128(), 42);\n\nlet c = Uint128::from(70u32); assert_eq!(c.u128(), 70); ```",
0 commit comments