10
10
#include < silkworm/core/execution/address.hpp>
11
11
#include < silkworm/core/common/util.hpp>
12
12
13
- // avoid solidity compiler generating emtpy bytecodes
13
+ // avoid solidity compiler generating empty bytecode
14
14
static_assert (sizeof (solidity::erc20::bytecode) >= 16);
15
15
static_assert (sizeof (solidity::proxy::bytecode) >= 16);
16
16
static_assert (sizeof (solidity::evm2native::bytecode) >= 16);
@@ -106,9 +106,7 @@ uint64_t erc20::get_next_nonce() {
106
106
void erc20::upgrade () {
107
107
require_auth (get_self ());
108
108
109
- uint64_t id = 0 ;
110
109
impl_contract_table_t contract_table (_self, _self.value );
111
- check (contract_table.find (id) == contract_table.end (), " implementation contract already deployed" );
112
110
113
111
bytes call_data;
114
112
@@ -141,7 +139,6 @@ void erc20::upgradeto(std::string impl_address) {
141
139
eosio::check (!!address_bytes, " implementation address must be valid 0x EVM address" );
142
140
eosio::check (address_bytes->size () == kAddressLength , " invalid length of implementation address" );
143
141
144
- uint64_t id = 0 ;
145
142
impl_contract_table_t contract_table (_self, _self.value );
146
143
147
144
contract_table.emplace (_self, [&](auto &v) {
@@ -154,9 +151,7 @@ void erc20::upgradeto(std::string impl_address) {
154
151
void erc20::upgdevm2nat () {
155
152
require_auth (get_self ());
156
153
157
- uint64_t id = 0 ;
158
154
evm2native_impl_table_t contract_table (_self, _self.value );
159
- check (contract_table.find (id) == contract_table.end (), " evm2native implementation contract already deployed" );
160
155
161
156
bytes call_data;
162
157
0 commit comments