irisnet / irishub

A BPoS blockchain that enables cross-chain interoperability through a unified service model -- built with Cosmos-SDK
Apache License 2.0
304 stars 127 forks source link

[p1] Asset owner should be changed simultaneously with transferring gateway owner #1718

Closed shilei-wang closed 5 years ago

shilei-wang commented 5 years ago

Describe the bug We don't change the "Asset owner" after transfer-gateway-owner , obviously it should be changed at the same time.

To Reproduce step 1: create gateway

iriscli asset create-gateway --moniker=gdex --identity=abc --details=detail --website=website --from=v0 --chain-id=shilei-qa --fee=0.6iris --commit

step 2: create gateway asset

iriscli asset issue-token --family=fungible --source=gateway --gateway=gdex --symbol=btc --symbol-at-source=source --symbol-min-alias=alias --name=name --initial-supply=10000 --from=v0 --chain-id=shilei-qa --fee=0.6iris --commit

step 3: transfer gateway owner

echo 1234567890 | iriscli asset transfer-gateway-owner --moniker=gdex --to=faa1w8upgqacxym9a80a32u28f7rd5z2uf884kxrmr --from=v0 --chain-id=shilei-qa --fee=0.6iris >~/Tx-generate

echo 1234567890 | iriscli tx sign ~/Tx-generate --name=v0 --chain-id=shilei-qa >~/Tx-sign1
echo 1234567890 | iriscli tx sign ~/Tx-sign1 --name=v1 --chain-id=shilei-qa >~/Tx-sign2
echo 1234567890 | iriscli tx broadcast ~/Tx-sign2 --commit

step 4: Notice that the gateway asset owner is not changed at the same time

iriscli asset query-token gdex.btc
FungibleToken gdex.btc:
  Family:            fungible
  Source:            gateway
  Gateway:           gdex
  Name:              name
  Symbol:            btc
  Symbol At Source:  source
  Symbol Min Alias:  alias
  Decimal:           0
  Initial Supply:    10000gdex.btc
  Max Supply:        1000000000000gdex.btc
  Mintable:          false
  Owner:             faa1xvlc75nusyfuang79gqtv5j7cj82dn5vz23sdd
shilei-wang commented 5 years ago

confirm fixed