Skip to content

Commit

Permalink
add orig_pure_memo in struct hub_trx_info
Browse files Browse the repository at this point in the history
  • Loading branch information
justfortest2 committed Apr 9, 2020
1 parent c582300 commit 66d9770
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
18 changes: 16 additions & 2 deletions docs/mainnet_upgrade/ibc_token_upgrade_v3_to_v4.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Contents
* [EOSIO mainnet ibc.token upgrade process](#1-eosio-mainnet-ibctoken-upgrade-process)
* [BOSCORE mainnet ibc.token upgrade process](#2-boscore-mainnet-ibctoken-upgrade-process)
* [TELOS mainnet ibc.token upgrade process](#3-telos-mainnet-ibctoken-upgrade-process)
* [Test](#test)


**Note: In v3 and v4 versions, the definitions of tables `accepts` and `stats` are different,
Expand Down Expand Up @@ -568,6 +569,7 @@ $cleos_bos push action bosibc.io setglobal '["bos",true]' -p bosibc.io
bash variables
```
cleos_tls='cleos -u http://telos.caleos.io'
cleos_tls='cleos -u https://api.telos.telosgreen.com'
```

set global active false
Expand Down Expand Up @@ -707,10 +709,10 @@ $cleos_tls push action bosibc.io regpegtoken \
'["bos","bosibc.io","10000000000.0000 USDT","0.1000 USDT","1000000.0000 USDT","10000000.0000 USDT",50,"bostkadmin33","0.0100 USDT",true]' -p bosibc.io
$cleos_tls push action bosibc.io regpegtoken \
'["bos","bosibc.io","10000000000.0000 TPT","0.1000 TPT","1000000.0000 TPT","10000000.0000 TPT",50,"bostkadmin33","0.0100 TPT",true]' -p bosibc.io
'["bos","bosibc.io","10000000000.0000 TPT","100.0000 TPT","10000000.0000 TPT","100000000.0000 TPT",50,"bostkadmin33","1.0000 TPT",true]' -p bosibc.io
$cleos_tls push action bosibc.io regpegtoken \
'["bos","unicorntoken","10000000000.0000 UB","0.1000 UB","1000000.0000 UB","10000000.0000 UB",50,"bostkadmin33","0.0100 UB",true]' -p bosibc.io
'["bos","unicorntoken","10000000000.0000 UB","1.0000 UB","50000.0000 UB","10000000.0000 UB",50,"bostkadmin33","0.0100 UB",true]' -p bosibc.io
```

#### step end
Expand All @@ -720,3 +722,15 @@ $cleos_tls push action bosibc.io setglobal '["tlos",true]' -p bosibc.io
```


### Test
```
# transfer EOS from EOS mainnet account bosisgreatvv to TELOS mainnet account telos22acnt1.
$cleos_eos push action eosio.token transfer '[ bosisgreatvv, bosibc.io, "1.2345 EOS", "hub.io@bos >> telos22acnt1@tlos hello world!"]' -p bosisgreatvv
# transfer BOS from EOS mainnet account eos3account1 to TELOS mainnet account telos22acnt1.
$cleos_eos push action bosibc.io transfer '[ eos3account1, bosibc.io, "4.5678 BOS", "hub.io@bos >> telos22acnt1@tlos hello world 2!"]' -p eos3account1
# transfer TLOS from TLOS mainnet account telos22acnt1 to EOS mainnet account bosisgreatvv.
$cleos_tls push action eosio.token transfer '[ telos22acnt1, bosibc.io, "6.7890 TLOS", "hub.io@bos >> bosisgreatvv@eos hello world 3!"]' -p telos22acnt1
```
1 change: 1 addition & 0 deletions ibc.token/include/ibc.token/ibc.token.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -505,6 +505,7 @@ namespace eosio {
capi_checksum256 orig_trx_id;
name to_chain;
name to_account;
string orig_pure_memo;
asset to_quantity;
name fee_receiver;
capi_checksum256 hub_trx_id;
Expand Down
1 change: 1 addition & 0 deletions ibc.token/src/ibc.token.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1474,6 +1474,7 @@ namespace eosio {
r.orig_trx_id = orig_trx_id;
r.to_chain = memo_info.peerchain ;
r.to_account = memo_info.receiver;
r.orig_pure_memo = memo_info.notes;
r.to_quantity = asset{0,quantity.symbol};
r.fee_receiver = name();
r.hub_trx_id = capi_checksum256();
Expand Down

0 comments on commit 66d9770

Please sign in to comment.