From 8c4806e0251c67d8746316c2d8578e40b087abe6 Mon Sep 17 00:00:00 2001 From: Khaled Al-Hassanieh Date: Tue, 17 Apr 2018 15:57:05 -0400 Subject: [PATCH] Deleted inlinetransfer and inlineissue --- contracts/eosio.system/delegate_bandwidth.hpp | 4 +-- contracts/eosio.system/eosio.system.hpp | 2 +- contracts/eosio.system/voting.hpp | 6 ++--- contracts/eosio.token/eosio.token.cpp | 27 +------------------ contracts/eosio.token/eosio.token.hpp | 7 ----- 5 files changed, 6 insertions(+), 40 deletions(-) diff --git a/contracts/eosio.system/delegate_bandwidth.hpp b/contracts/eosio.system/delegate_bandwidth.hpp index bcbe0fe25..d4aa07db5 100644 --- a/contracts/eosio.system/delegate_bandwidth.hpp +++ b/contracts/eosio.system/delegate_bandwidth.hpp @@ -184,7 +184,7 @@ namespace eosiosystem { //set_resource_limits( tot_itr->owner, tot_itr->storage_bytes, tot_itr->net_weight.quantity, tot_itr->cpu_weight.quantity ); - eosio::action act( eosio::permission_level{del.from,N(active)}, N(eosio.token), N(inlinetransfer), + eosio::action act( eosio::permission_level{del.from,N(active)}, N(eosio.token), N(transfer), std::make_tuple( del.from, N(eosio), total_stake, std::string("stake bandwidth") ) ); act.send(); @@ -284,7 +284,7 @@ namespace eosiosystem { // consecutive missed blocks. { - eosio::action act( eosio::permission_level{N(eosio),N(active)}, N(eosio.token), N(inlinetransfer), + eosio::action act( eosio::permission_level{N(eosio),N(active)}, N(eosio.token), N(transfer), std::make_tuple( N(eosio), req->owner, req->amount, std::string("unstake") ) ); act.send(); } diff --git a/contracts/eosio.system/eosio.system.hpp b/contracts/eosio.system/eosio.system.hpp index f2e07ca9e..541e91736 100644 --- a/contracts/eosio.system/eosio.system.hpp +++ b/contracts/eosio.system/eosio.system.hpp @@ -165,7 +165,7 @@ namespace eosiosystem { }); { - eosio::action act( eosio::permission_level{N(eosio),N(active)}, N(eosio.token), N(inlinetransfer), + eosio::action act( eosio::permission_level{N(eosio),N(active)}, N(eosio.token), N(transfer), std::make_tuple( N(eosio), cr.owner, rewards, std::string("producer claiming rewards") ) ); act.send(); } diff --git a/contracts/eosio.system/voting.hpp b/contracts/eosio.system/voting.hpp index eca27e6b4..3e074a09c 100644 --- a/contracts/eosio.system/voting.hpp +++ b/contracts/eosio.system/voting.hpp @@ -374,11 +374,9 @@ namespace eosiosystem { } auto issue_quantity = parameters.blocks_per_cycle * (parameters.payment_per_block + parameters.payment_to_eos_bucket); - // currency::inline_issue(SystemAccount, issue_quantity); -#warning "FIX THIS!" { - eosio::action act( eosio::permission_level{N(eosio),N(active)}, N(eosio.token), N(inlineissue), - std::make_tuple( issue_quantity, std::string("producer pay") ) ); + eosio::action act( eosio::permission_level{N(eosio),N(active)}, N(eosio.token), N(issue), + std::make_tuple( N(eosio), issue_quantity, std::string("producer pay") ) ); act.send(); } set_blockchain_parameters(parameters); diff --git a/contracts/eosio.token/eosio.token.cpp b/contracts/eosio.token/eosio.token.cpp index 2b73ec8ef..6ca727173 100644 --- a/contracts/eosio.token/eosio.token.cpp +++ b/contracts/eosio.token/eosio.token.cpp @@ -59,19 +59,6 @@ void token::issue( account_name to, asset quantity, string memo ) } } -void token::inlineissue( asset quantity, string memo ) -{ - auto sym = quantity.symbol.name(); - stats statstable( _self, sym ); - const auto& st = statstable.get( sym ); - - require_auth( st.issuer ); - eosio_assert( quantity.is_valid(), "invalid quantity" ); - eosio_assert( quantity.amount > 0, "must issue positive quantity" ); - - dispatch_inline( permission_level{st.issuer,N(active)}, _self, N(issue), &token::issue, { st.issuer, quantity, memo } ); -} - void token::transfer( account_name from, account_name to, asset quantity, @@ -93,18 +80,6 @@ void token::transfer( account_name from, add_balance( to, quantity, st, from ); } -void token::inlinetransfer( account_name from, - account_name to, - asset quantity, - string memo) -{ - require_auth( from ); - require_recipient( from ); - require_recipient( to ); - - dispatch_inline( permission_level{from,N(active)}, _self, N(transfer), &token::transfer, { from, to, quantity, memo } ); -} - asset token::get_total_supply( const symbol_type& symbol ) { auto symbol_name = symbol.name(); @@ -153,4 +128,4 @@ void token::add_balance( account_name owner, asset value, const currency_stats& } /// namespace eosio -EOSIO_ABI( eosio::token, (create)(issue)(inlineissue)(transfer)(inlinetransfer) ) +EOSIO_ABI( eosio::token, (create)(issue)(transfer) ) diff --git a/contracts/eosio.token/eosio.token.hpp b/contracts/eosio.token/eosio.token.hpp index bb2be13a2..46c2b57c0 100644 --- a/contracts/eosio.token/eosio.token.hpp +++ b/contracts/eosio.token/eosio.token.hpp @@ -34,18 +34,11 @@ namespace eosio { void issue( account_name to, asset quantity, string memo ); - void inlineissue( asset quantity, string memo ); - void transfer( account_name from, account_name to, asset quantity, string memo ); - void inlinetransfer( account_name from, - account_name to, - asset quantity, - string memo ); - asset get_total_supply( const symbol_type& symbol ); private: -- GitLab