From 867fa2cc19052f641c17ac42e3d11e71b563bea7 Mon Sep 17 00:00:00 2001 From: yarkin Date: Mon, 7 Aug 2023 15:02:38 +0800 Subject: [PATCH] Add missing const. --- include/evm_runtime/evm_contract.hpp | 6 +++--- src/actions.cpp | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/include/evm_runtime/evm_contract.hpp b/include/evm_runtime/evm_contract.hpp index c3a96583..cd737d10 100644 --- a/include/evm_runtime/evm_contract.hpp +++ b/include/evm_runtime/evm_contract.hpp @@ -85,8 +85,8 @@ class [[eosio::contract]] evm_contract : public contract [[eosio::action]] bool gc(uint32_t max); - [[eosio::action]] void call(eosio::name from, const bytes& to, uint128_t value, bytes& data, uint64_t gas_limit); - [[eosio::action]] void admincall(const bytes& from, const bytes& to, uint128_t value, bytes& data, uint64_t gas_limit); + [[eosio::action]] void call(eosio::name from, const bytes& to, uint128_t value, const bytes& data, uint64_t gas_limit); + [[eosio::action]] void admincall(const bytes& from, const bytes& to, uint128_t value, const bytes& data, uint64_t gas_limit); #ifdef WITH_TEST_ACTIONS [[eosio::action]] void testtx(const std::optional& orlptx, const evm_runtime::test::block_info& bi); @@ -144,7 +144,7 @@ class [[eosio::contract]] evm_contract : public contract void handle_account_transfer(const eosio::asset& quantity, const std::string& memo); void handle_evm_transfer(eosio::asset quantity, const std::string& memo); - void call_(intx::uint256 s, const bytes& to, intx::uint256 value, bytes& data, uint64_t gas_limit, uint64_t nonce); + void call_(intx::uint256 s, const bytes& to, intx::uint256 value, const bytes& data, uint64_t gas_limit, uint64_t nonce); // to allow sending through a Bytes (basic_string) w/o copying over to a std::vector void pushtx_bytes(eosio::name miner, const std::basic_string& rlptx); diff --git a/src/actions.cpp b/src/actions.cpp index d939034b..898d0602 100644 --- a/src/actions.cpp +++ b/src/actions.cpp @@ -563,7 +563,7 @@ bool evm_contract::gc(uint32_t max) { return state.gc(max); } -void evm_contract::call_(intx::uint256 s, const bytes& to, intx::uint256 value, bytes& data, uint64_t gas_limit, uint64_t nonce) { +void evm_contract::call_(intx::uint256 s, const bytes& to, intx::uint256 value, const bytes& data, uint64_t gas_limit, uint64_t nonce) { const auto& current_config = _config.get(); Transaction txn; @@ -589,14 +589,14 @@ void evm_contract::call_(intx::uint256 s, const bytes& to, intx::uint256 value, pushtx_act.send(get_self(), rlp); } -void evm_contract::call(eosio::name from, const bytes& to, uint128_t value, bytes& data, uint64_t gas_limit) { +void evm_contract::call(eosio::name from, const bytes& to, uint128_t value, const bytes& data, uint64_t gas_limit) { assert_unfrozen(); require_auth(from); call_(from.value, to, intx::uint256(value), data, gas_limit, get_and_increment_nonce(from)); } -void evm_contract::admincall(const bytes& from, const bytes& to, uint128_t value, bytes& data, uint64_t gas_limit) { +void evm_contract::admincall(const bytes& from, const bytes& to, uint128_t value, const bytes& data, uint64_t gas_limit) { assert_unfrozen(); require_auth(get_self());