In v4, the definitions of tables accept
and stats
have been modified,
so we need to delete these two tables first, then deploy ibc.token v4 contract and set the corresponding values of the tables.
$cleos get table <ibc_token_contract> <ibc_token_contract> accepts
$cleos get table <ibc_token_contract> <ibc_token_contract> stats
check out branch upgrade_v3_to_v4
, compile and set code to ibc.token contract.
this branch add a new action:
void token::deltokentbl( ){
while ( _accepts.begin() != _accepts.end() ){ _accepts.erase(_accepts.begin()); }
while ( _stats.begin() != _stats.end() ){ _stats.erase(_stats.begin()); }
}
cleos push action <ibc_token_contract> deltokentbl '[]' -p <some_account>
register accepts and pegtokens again use the data obtained previously
cleos push action <ibc_token_contract> regacpttoken '[....]' ...
cleos push action <ibc_token_contract> regpegtoken '[....]' ...
This article give a detail and directive steps to upgrade EOS & BOS & TELOS.