Skip to content

Commit

Permalink
update ramtransfer tests
Browse files Browse the repository at this point in the history
  • Loading branch information
DenisCarriere committed Jan 6, 2024
1 parent 1f2a274 commit 1d8a12c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1428,6 +1428,7 @@ namespace eosiosystem {
using buyram_action = eosio::action_wrapper<"buyram"_n, &system_contract::buyram>;
using buyrambytes_action = eosio::action_wrapper<"buyrambytes"_n, &system_contract::buyrambytes>;
using sellram_action = eosio::action_wrapper<"sellram"_n, &system_contract::sellram>;
using ramtransfer_action = eosio::action_wrapper<"ramtransfer"_n, &system_contract::ramtransfer>;
using refund_action = eosio::action_wrapper<"refund"_n, &system_contract::refund>;
using regproducer_action = eosio::action_wrapper<"regproducer"_n, &system_contract::regproducer>;
using regproducer2_action = eosio::action_wrapper<"regproducer2"_n, &system_contract::regproducer2>;
Expand Down
9 changes: 8 additions & 1 deletion tests/eosio.system_tester.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,13 @@ class eosio_system_tester : public TESTER {
return buyram( account_name(payer), account_name(receiver), eosin );
}

action_result ramtransfer( const account_name& from, const account_name& to, uint32_t bytes ) {
return push_action( payer, "ramtransfer"_n, mvo()( "from",from)("to",to)("bytes",bytes) );
}
action_result ramtransfer( std::string_view from, std::string_view to, uint32_t bytes ) {
return push_action( payer, "ramtransfer"_n, mvo()( "from",from)("to",to)("bytes",bytes) );
}

action_result buyrambytes( const account_name& payer, account_name receiver, uint32_t numbytes ) {
return push_action( payer, "buyrambytes"_n, mvo()( "payer",payer)("receiver",receiver)("bytes",numbytes) );
}
Expand Down Expand Up @@ -707,7 +714,7 @@ class eosio_system_tester : public TESTER {
memcpy( data.data(), itr->value.data(), data.size() );
return data.empty() ? fc::variant() : abi_ser.binary_to_variant( "rex_return_buckets", data, abi_serializer::create_yield_function(abi_serializer_max_time) );
}

void setup_rex_accounts( const std::vector<account_name>& accounts,
const asset& init_balance,
const asset& net = core_sym::from_string("80.0000"),
Expand Down

0 comments on commit 1d8a12c

Please sign in to comment.