Skip to content

Commit 602919c

Browse files
giaghdx better snapshot, treasury account for gigahdx liquidations
1 parent 3670a47 commit 602919c

8 files changed

Lines changed: 285 additions & 65 deletions

File tree

Cargo.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

integration-tests/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "runtime-integration-tests"
3-
version = "1.100.0"
3+
version = "1.101.0"
44
description = "Integration tests"
55
authors = ["GalacticCouncil"]
66
edition = "2021"
-77.8 KB
Binary file not shown.

integration-tests/src/gigahdx.rs

Lines changed: 278 additions & 47 deletions
Large diffs are not rendered by default.

integration-tests/src/liquidation.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ pub fn get_user_account_data(mm_pool: EvmAddress, user: EvmAddress) -> Option<Us
106106
let mut data = Into::<u32>::into(Function::GetUserAccountData).to_be_bytes().to_vec();
107107
data.extend_from_slice(H256::from(user).as_bytes());
108108

109-
let call_result = Executor::<Runtime>::call(context, data, U256::zero(), 500_000);
109+
let call_result = Executor::<Runtime>::call(context, data, U256::zero(), 4_000_000);
110110
assert_eq!(
111111
call_result.exit_reason,
112112
Succeed(Returned),

runtime/hydradx/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "hydradx-runtime"
3-
version = "427.0.0"
3+
version = "428.0.0"
44
authors = ["GalacticCouncil"]
55
edition = "2021"
66
license = "Apache 2.0"

runtime/hydradx/src/gigahdx.rs

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -210,17 +210,6 @@ impl pallet_gigahdx::traits::ExternalClaims<AccountId> for HdxExternalClaims {
210210
}
211211
}
212212

213-
/// Derived sub-account that holds seized GIGAHDX (aToken) + the matching
214-
/// HDX after a gigahdx-collateral liquidation. Governance disposes later.
215-
pub struct GigaHdxLiquidationAccount;
216-
217-
impl sp_core::Get<AccountId> for GigaHdxLiquidationAccount {
218-
fn get() -> AccountId {
219-
use frame_support::sp_runtime::traits::AccountIdConversion;
220-
frame_support::PalletId(*b"gigaliq!").into_account_truncating()
221-
}
222-
}
223-
224213
/// Selective force-removal of gigahdx-rewards votes that would otherwise pin
225214
/// HDX the protocol is about to seize. Delegated to by
226215
/// `GigaHdxLiquidationSupport`; also used directly by integration tests.
@@ -363,7 +352,7 @@ impl pallet_liquidation::traits::GigaHdxSupport<AccountId> for GigaHdxLiquidatio
363352
}
364353

365354
fn liquidation_account() -> AccountId {
366-
<GigaHdxLiquidationAccount as sp_core::Get<AccountId>>::get()
355+
<crate::TreasuryAccount as sp_core::Get<AccountId>>::get()
367356
}
368357

369358
fn pool_contract() -> Option<EvmAddress> {

runtime/hydradx/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
129129
spec_name: Cow::Borrowed("hydradx"),
130130
impl_name: Cow::Borrowed("hydradx"),
131131
authoring_version: 1,
132-
spec_version: 427,
132+
spec_version: 428,
133133
impl_version: 0,
134134
apis: RUNTIME_API_VERSIONS,
135135
transaction_version: 1,

0 commit comments

Comments
 (0)