https://github.com/wb-ts/aptos-escrow-contract
Escrow Contract which users can swap their tokens where one person deposits the token in the escrow and when the other person transfer successfully, the tokens in the escrow get transferred to the other user.
https://github.com/wb-ts/aptos-escrow-contract
aptos blockchain escrow-contract move
Last synced: 6 months ago
JSON representation
Escrow Contract which users can swap their tokens where one person deposits the token in the escrow and when the other person transfer successfully, the tokens in the escrow get transferred to the other user.
- Host: GitHub
- URL: https://github.com/wb-ts/aptos-escrow-contract
- Owner: wb-ts
- Created: 2022-10-26T21:42:56.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2022-10-26T21:45:09.000Z (almost 3 years ago)
- Last Synced: 2025-02-03T13:19:15.452Z (8 months ago)
- Topics: aptos, blockchain, escrow-contract, move
- Language: Move
- Homepage:
- Size: 1.95 KB
- Stars: 5
- Watchers: 1
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# aptos-escrow
This a module where users can swap their tokens where one person deposits the token in the escrow and when the other person transfer successfully, the tokens in the escrow get transferred to the other user.Consider there are two people having Token A and Token B. They want to swap their token without a middlemen. They can do this using an escrow where tokens of
one person would be stored and get transfered to other person when they successfully do the transfer.Consider Alice (with token A) and Bob (with token B)
- Intialize: Alice Transfers token A to the escrow account
- Cancel: This is called when Bob fails to transfer the tokens or alice changes his mind of swapping the tokens. The tokens in the escrow account would be
transfered back to alice, thus canceling the exchange.
- Exchange: Bob transfers token B to the Alice and once this is done, the token A in escrow gets transfered to Bob. Thus completing the exchange.**wb-ts*