Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes for elements 21 and 22 #6

Merged

Conversation

andreabonel
Copy link
Contributor

Fixes for elements 21:

  • wallet creation
  • createrawtransation (new format)

Fix for elements 22:

  • decoderawtransaction (new format)

Fixes: #4 and #5

@wintercooled
Copy link

Tested ACK:

git clone https://github.com/andreabonel/liquid-swap.git
cd liquid-swap

git checkout fixes-for-elements-21-and-22 

pip install .[GUI,CLI]

. ./tools/set_env.sh $HOME/elements-0.22.0.2/bin

./tools/start_liquid_instances.sh

$ e1c getnewaddress
el1qqt6y5eywtaxchr8gx2g3xau7my8dvytvze50cnx6e82mwd86g6cmchaluvgp048nrvs9276m8slyel4zl52kwzwlqd70ec0va

$ e1c generatetoaddress 1 el1qqt6y5eywtaxchr8gx2g3xau7my8dvytvze50cnx6e82mwd86g6cmchaluvgp048nrvs9276m8slyel4zl52kwzwlqd70ec0va
[
  "9464f6f6d8f22634f2c75c7d4515ff357175c177fa5f5f7b0d9d1fd1e876bfbe"
]

$ e1c getbalance
{
  "bitcoin": 21000000.00000000
}

. ./tools/createassets.sh

$ e1c generatetoaddress 1 el1qqt6y5eywtaxchr8gx2g3xau7my8dvytvze50cnx6e82mwd86g6cmchaluvgp048nrvs9276m8slyel4zl52kwzwlqd70ec0va
[
  "9464f6f6d8f22634f2c75c7d4515ff357175c177fa5f5f7b0d9d1fd1e876bfbe"
]

$ e1c getbalance
{
  "bitcoin": 20999899.99999371,
  "0ea147786fc5e3db56af56306fbf8acae4c91ba7828a68a352a8723b326152cd": 10.00000000
}

$ e2c getbalance
{
  "bitcoin": 99.99999636,
  "7e67ff31e4d26f88fed62525442d35d343f6cbb715a19208a4b0d7e2437eb646": 20.00000000
}

liquidswap-cli --regtest -c $C1 propose $ASSET1 1 $ASSET2 2 --output proposal.txt
liquidswap-cli --regtest -c $C2 info proposal.txt
liquidswap-cli --regtest -c $C2 accept proposal.txt --output accepted.txt
liquidswap-cli --regtest -c $C1 info accepted.txt
liquidswap-cli --regtest -c $C1 finalize accepted.txt --send

e1c generatetoaddress 1 el1qqt6y5eywtaxchr8gx2g3xau7my8dvytvze50cnx6e82mwd86g6cmchaluvgp048nrvs9276m8slyel4zl52kwzwlqd70ec0va
[
  "13f8eeadcf05834e374c81d8d8754a5e5c334f90779bf3bdeb7067b5fb2352e6"
]

e1c getbalance
{
  "bitcoin": 20999899.99998995,
  "7e67ff31e4d26f88fed62525442d35d343f6cbb715a19208a4b0d7e2437eb646": 2.00000000,
  "0ea147786fc5e3db56af56306fbf8acae4c91ba7828a68a352a8723b326152cd": 9.00000000
}

e2c getbalance
{
  "bitcoin": 99.99999260,
  "7e67ff31e4d26f88fed62525442d35d343f6cbb715a19208a4b0d7e2437eb646": 18.00000000,
  "0ea147786fc5e3db56af56306fbf8acae4c91ba7828a68a352a8723b326152cd": 1.00000000
}

./tools/stop_liquid_instances.sh

liquidswap/swap.py Outdated Show resolved Hide resolved
liquidswap/swap.py Outdated Show resolved Hide resolved
liquidswap/swap.py Outdated Show resolved Hide resolved
liquidswap/swap.py Outdated Show resolved Hide resolved
@LeoComandini
Copy link
Contributor

utACK 47e9941, with comments

@LeoComandini
Copy link
Contributor

utACK 14d459a

@LeoComandini LeoComandini merged commit 14d459a into Blockstream:master Dec 2, 2022
@LeoComandini
Copy link
Contributor

Thanks @andreabonel !

@andreabonel andreabonel deleted the fixes-for-elements-21-and-22 branch December 2, 2022 19:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Needs to create default wallet and createrawtransaction arguments have changed
3 participants