RGB-WG / rgb

RGB smart contracts: command-line tool & wallet runtime library for desktop and mobile integration

Home Page:https://rgb.tech

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

contract state is wrong after a tapret1st transfer

nicbus opened this issue · comments

As a follow-up to #187, using the develop branch, commit d6c4228 I can execute opret1st transfers fine, but I run into an issue with a tapret1st transfer.

At the end of the transfer, the contract state for the sender is not right:

Loading descriptor from wallet wallet_0 ... success
Global:
  spec := (ticker=("USDT"), name=("USD Tether"), details=~, precision=0)
  terms := (text=("demo NIA asset"), media=~)
  issuedSupply := (2000)

Owned:
  assetOwner:
    amount=2000, utxo=bc:tapret1st:91506c2c0a67f925138f938e08f856af04141e0fb33f62aeb5891e3a8db3d62c:0, witness=~ # owner unknown
    amount=1900, utxo=bc:tapret1st:bd16914033f819a43bb1726650790196392f54a50ae2e895ef180bdc054a8a44:0, witness=bc:bd16914033f819a43bb1726650790196392f54a50ae2e895ef180bdc054a8a44 # owner unknown

The recipient seems to be fine:

Loading descriptor from wallet wallet_1 ... success
Global:
  spec := (ticker=("USDT"), name=("USD Tether"), details=~, precision=0)
  terms := (text=("demo NIA asset"), media=~)
  issuedSupply := (2000)

Owned:
  assetOwner:
    amount=100, utxo=bc:tapret1st:3b09d0fb3f90aff7c974ecd8c931be45d915cb147af4390dae11c55aea67933c:1, witness=bc:bd16914033f819a43bb1726650790196392f54a50ae2e895ef180bdc054a8a44 # owned by the wallet
    amount=2000, utxo=bc:tapret1st:91506c2c0a67f925138f938e08f856af04141e0fb33f62aeb5891e3a8db3d62c:0, witness=~ # owner unknown
    amount=1900, utxo=bc:tapret1st:bd16914033f819a43bb1726650790196392f54a50ae2e895ef180bdc054a8a44:0, witness=bc:bd16914033f819a43bb1726650790196392f54a50ae2e895ef180bdc054a8a44 # owner unknown

Re-tested using the latest develop tip (commit 594d7f6) and the transfer now completes successfully.