Skip to content

Commit

Permalink
remove get/set paramset from bindings and app
Browse files Browse the repository at this point in the history
  • Loading branch information
kwtalley committed Nov 15, 2024
1 parent d1556f0 commit 13fca2c
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 41 deletions.
10 changes: 0 additions & 10 deletions packages/provwasm-test-tube/src/runner/app.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
use cosmwasm_std::Coin;
use prost::Message;
use test_tube_prov::account::SigningAccount;
use test_tube_prov::runner::result::{RunnerExecuteResult, RunnerResult};
use test_tube_prov::runner::Runner;
Expand Down Expand Up @@ -95,15 +94,6 @@ impl ProvwasmTestApp {
{
self.inner.simulate_tx(msgs, signer)
}

/// Get parameter set for a given subspace.
pub fn get_param_set<P: Message + Default>(
&self,
subspace: &str,
type_url: &str,
) -> RunnerResult<P> {
self.inner.get_param_set(subspace, type_url)
}
}

impl<'a> Runner<'a> for ProvwasmTestApp {
Expand Down
14 changes: 0 additions & 14 deletions packages/test-tube/src/bindings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -239,20 +239,6 @@ extern "C" {
extern "C" {
pub fn Simulate(envId: GoUint64, base64TxBytes: GoString) -> *mut ::std::os::raw::c_char;
}
extern "C" {
pub fn SetParamSet(
envId: GoUint64,
subspaceName: GoString,
base64ParamSetBytes: GoString,
) -> *mut ::std::os::raw::c_char;
}
extern "C" {
pub fn GetParamSet(
envId: GoUint64,
subspaceName: GoString,
typeUrl: GoString,
) -> *mut ::std::os::raw::c_char;
}
extern "C" {
pub fn GetValidatorAddress(envId: GoUint64, n: GoInt32) -> *mut ::std::os::raw::c_char;
}
Expand Down
18 changes: 1 addition & 17 deletions packages/test-tube/src/runner/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use prost::Message;

use crate::account::{Account, FeeSetting, SigningAccount};
use crate::bindings::{
AccountNumber, AccountSequence, FinalizeBlock, GetBlockHeight, GetBlockTime, GetParamSet,
AccountNumber, AccountSequence, FinalizeBlock, GetBlockHeight, GetBlockTime,
GetValidatorAddress, GetValidatorPrivateKey, IncreaseTime, InitAccount, InitTestEnv, Query,
Simulate,
};
Expand Down Expand Up @@ -272,22 +272,6 @@ impl BaseApp {

res
}

/// Get parameter set for a given subspace.
pub fn get_param_set<P: Message + Default>(
&self,
subspace: &str,
type_url: &str,
) -> RunnerResult<P> {
unsafe {
redefine_as_go_string!(subspace);
redefine_as_go_string!(type_url);
let pset = GetParamSet(self.id, subspace, type_url);
let pset = RawResult::from_non_null_ptr(pset).into_result()?;
let pset = P::decode(pset.as_slice()).map_err(DecodeError::ProtoDecodeError)?;
Ok(pset)
}
}
}

impl<'a> Runner<'a> for BaseApp {
Expand Down

0 comments on commit 13fca2c

Please sign in to comment.