We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
impl Ics20RateLimiter for ConstantAny { fn allow( msg: &pallet_ibc::ics20::Ics20TransferMsg, _flow_type: pallet_ibc::ics20::FlowType, ) -> Result<(), ()> { let pica_denom = <::IbcDenomToAssetIdConversion as DenomToAssetId< Runtime, >>::from_asset_id_to_denom(CurrencyId::PICA);
let limit = match msg.token.denom.to_string().as_str() { denom if Some(denom) == pica_denom.as_deref() => 500_000, _ => 10_000, }; if msg.token.amount.as_u256() <= ::ibc::bigint::U256::from(limit * 10_u64.pow(12)) { return Ok(()) } Err(()) }
}
The text was updated successfully, but these errors were encountered:
rate limiter does not work as advertised
for USDT it is 10^9 . for DOT it is 10^6.
cc @josietyleung @kkast
Sorry, something went wrong.
fixed in #3620
No branches or pull requests
impl Ics20RateLimiter for ConstantAny {
fn allow(
msg: &pallet_ibc::ics20::Ics20TransferMsg,
_flow_type: pallet_ibc::ics20::FlowType,
) -> Result<(), ()> {
let pica_denom =
<::IbcDenomToAssetIdConversion as DenomToAssetId<
Runtime,
>>::from_asset_id_to_denom(CurrencyId::PICA);
}
The text was updated successfully, but these errors were encountered: