Skip to content

Commit

Permalink
[#79] Fixes after CR
Browse files Browse the repository at this point in the history
  • Loading branch information
Ola Czerepak committed Mar 2, 2018
1 parent 2f20949 commit 506a7f6
Showing 1 changed file with 6 additions and 13 deletions.
19 changes: 6 additions & 13 deletions docs/source/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,18 +84,18 @@ Alice and Bob exchange their wallet addresses.

## 3. Alice is initializing an atomic swap transaction

[**Alice**] has to prepare a transaction input (UTXO's that she wants to spend in this transaction). You can find these information by viewing transaction on block explorer e.g. [link](https://api.blockcypher.com/v1/mona/test3/txs/6ecd66d88b1a976cde70ebbef1909edec5db80cff9b8b97024ea3805dbe28ab8?limit=50&includeHex=true)
[**Alice**] has to prepare a transaction input (UTXO's that she wants to spend in this transaction). You can find these information by viewing transaction on block explorer e.g. [link](https://bchain.info/MONA/tx/9fcc235b4c1830f6eb1c67be807aeda0a3f7290eb05caf948f4b9f1016c8bffd)

from clove.network.bitcoin import Utxo

monacoins_to_swap = 0.11

initial_utxo_list = [
Utxo(
tx_id='6ecd66d88b1a976cde70ebbef1909edec5db80cff9b8b97024ea3805dbe28ab8',
vout=1,
value=2.78956946,
tx_script='76a914812ff3e5afea281eb3dd7fce9b077e4ec6fba08b88ac'
tx_id='9fcc235b4c1830f6eb1c67be807aeda0a3f7290eb05caf948f4b9f1016c8bffd',
vout=0,
value=2.8,
tx_script='76a9142b6a3314e8fcf1f1fd6b4d70b112bd5a1928505788ac'
),
]

Expand Down Expand Up @@ -182,13 +182,6 @@ And also at this point Bob should validate if the data returned in the contract
dogecoins_to_swap,
participate_utxo_list
)
participate_transaction = alice_contract.participate(
'doge',
bob_doge_wallet.address,
alice_doge_address,
dogecoins_to_swap,
participate_utxo_list
)

participate_transaction.add_fee_and_sign(bob_doge_wallet)

Expand Down Expand Up @@ -217,7 +210,7 @@ https://live.blockcypher.com/doge/tx/c3a9474a1bb642e51fc10f14b2af2b5f57bef0858cd

## 7. Communication

[**Bob**] sends his transaction hash `4168d4ac41debc550f6af6f5cb3ab37ab68aff624f562012a120379c026f6b12` and contract to Alice.
[**Bob**] sends his transaction hash `4168d4ac41debc550f6af6f5cb3ab37ab68aff624f562012a120379c026f6b12` and contract `63a8205de2198a39122100c4179933a4d577151445f400383aa6563d7fe2967cb54f8b8876a91462aef49943f16565b7ff9ef170a0d4bc5397763967041027995ab17576a91479364cbefe7c9b926792911b3611628102f9314c6888ac` to Alice.


## 8. Contract audit
Expand Down

0 comments on commit 506a7f6

Please sign in to comment.