94 Commits

Author SHA1 Message Date
Dmitry Holodov
bd1e502cec go version 1.21, libp2p and other updates, linter update (#507) 2023-12-13 21:18:08 -07:00
Dmitry Holodov
f7c6a1dd0f maintenance updates (#503) 2023-08-16 19:28:51 -05:00
Dmitry Holodov
67e7728c59 doc updates (#489) 2023-06-20 18:57:32 -05:00
Dmitry Holodov
7619b9a6af updates for cross-chain bootnodes (#486) 2023-06-19 14:47:27 -05:00
Dmitry Holodov
8941163c00 USDT compatibility (#484) 2023-06-17 04:30:20 -05:00
Dmitry Holodov
b5a83d5ee5 stagenet bootnode and docker updates (#473) 2023-05-20 21:59:49 -05:00
Dmitry Holodov
0abc9e6139 fix: bootnode version RPC call (#467) 2023-05-08 21:19:19 -04:00
Dmitry Holodov
2143df291b makefile targets for release binaries (#454) 2023-05-03 13:26:51 -05:00
Dmitry Holodov
e3c24b5e4a eth endpoint defaults and error handling (#451) 2023-05-02 23:12:45 -05:00
noot
fb95751dda feat: update SwapCreater.sol claimRelayer to no longer use forwarder (#449)
Co-authored-by: Dmitry Holodov <dimalinux@protonmail.com>
2023-05-01 19:23:17 -04:00
Dmitry Holodov
330a231aa4 multi-arch build script and version fixes (#435) 2023-04-27 15:39:11 -05:00
noot
83d4cee884 release: mainnet contract address, set env defaults to mainnet (#417) 2023-04-25 19:18:29 +02:00
noot
9cc39e84da solc optimize contract bytecode (#414) 2023-04-25 08:02:56 -04:00
Dmitry Holodov
c91b9bb82a dockerized bootnode fixes (#409) 2023-04-24 09:01:08 -05:00
Dmitry Holodov
df97eebcae feat: dockerized bootnode (#405)
Co-authored-by: noot <36753753+noot@users.noreply.github.com>
2023-04-23 14:01:08 -04:00
noot
ea8bae1416 feat: add dockerfile (#387)
Co-authored-by: Dmitry Holodov <dimalinux@protonmail.com>
2023-04-21 15:37:10 -05:00
noot
c0c87e8ecb contract updates and cleanup (#382)
Co-authored-by: Dmitry Holodov <dimalinux@protonmail.com>
2023-04-17 13:49:53 -04:00
Dmitry Holodov
15b8378c76 ERC20 balance support (#380)
* Added --token flag to swapcli's balances request allowing the user to query their token balance
* --eth-asset flag on swapcli make changed to --token
* Added TokenInfo RPC API method to retrieve an ERC20 token's metadata
* Added an end-to-end ERC20 unit test to the daemon package
* Fixed ERC20 token approval amount to SwapCreator contract to use the minimum value required (instead of approving the entire user's balance for transfer by the contract)
* Fixed a race condition between concurrent contract calls to approve/new_swap in ERC20 token swaps
* Removed hard coded assumptions that all tokens have 18 decimals
* Maked the decimal places in our test ERC20 token configurable
* Fixed token exchange rate calculations
* Updated ongoing and past swap queries to correctly support ERC20 tokens
* Initial unit tests in swapcli's main package
2023-04-17 11:59:47 -05:00
Dmitry Holodov
a17f95d414 SwapFactory to SwapCreator rename, upgrade to solc 0.8.19 (#372) 2023-04-09 03:08:17 -05:00
Dmitry Holodov
7fef2d7b76 XMR taker is relayer of last resort for the maker (#366)
Co-authored-by: noot <36753753+noot@users.noreply.github.com>
2023-04-05 20:16:41 -05:00
noot
bf0443c5bc xmrmaker: check if swap was completed already when restarting swap (#361) 2023-04-01 18:04:28 -04:00
noot
b83f57e60c move stagenet from goerli to sepolia (#363)
Co-authored-by: Dmitry Holodov <dimalinux@protonmail.com>
2023-03-30 23:53:13 -04:00
Dmitry Holodov
528715b602 swapd daemon setup/start decoupled from CLI parsing (#354) 2023-03-25 19:18:51 -05:00
Dmitry Holodov
0e80eee4dc integrated relayer into swapd (#342) 2023-03-17 14:22:16 -05:00
Dmitry Holodov
250a041703 switch to codecov-action@v3 for uploading code coverage (#334) 2023-02-28 08:22:45 -06:00
Dmitry Holodov
a537be03cf fixed the TestAbort_ERC20_XMRMakerCancels issue (#333) 2023-02-27 18:16:19 -06:00
Dmitry Holodov
93b8a9dacf simplify per-swap deposit address overrides (#328) 2023-02-25 17:01:52 -06:00
Dmitry Holodov
1d7c00a8ed dedicated monero address type (#327)
Adds custom type for monero addresses with better validations.
2023-02-25 11:18:16 -06:00
Dmitry Holodov
812ba9d6b6 harmonize offer deletion behavior (#312) 2023-02-20 14:35:10 -06:00
Dmitry Holodov
bb9a50dd7f upgrade linter (#297)
Upgraded linter to 1.50.1 and improved protocol documentation.
2023-02-07 22:31:06 -06:00
noot
17ab2f11ff feat: add relayer discovery and transaction submission via network (#291)
Co-authored-by: Dmitry Holodov <dimalinux@protonmail.com>
2023-02-03 19:01:32 -05:00
noot
ea43b6a86c feat: implement swap relayer cmd package (#282) 2023-01-25 01:17:55 -05:00
Janaka-Steph
d13521daef Modify scripts to run on MacOS (#233)
Updates scripts/docs to support macOS as well as Linux/aarch64 (arm64)
2023-01-16 14:05:35 -06:00
noot
8e1db226fd implement suggested exchange rate (#262)
Pulls chainlink's ETH and XMR price feeds to create suggested exchange rates.
Co-authored-by: Dmitry Holodov <dimalinux@protonmail.com>
2023-01-12 22:50:52 -06:00
Dmitry Holodov
ed15ed9c82 libp2p QUIC and NAT traversal features (#251)
Enables additional libp2p NAT traversal features and enables nodes to communicate using UDP/QUIC in addition to TCP. Switches to using libp2p's "routed host". Most commands that previously accepted multiaddress values now accept a Peer IDs instead.
2022-12-19 18:25:24 -06:00
noot
6cdffdbebf add go-dleq; remove all rust dependencies (#242) 2022-11-28 19:31:41 -05:00
Dmitry Holodov
ec89cd684a misc fixes (#232)
* Relayer now runs as a dedicated binary in integration tests
* Binaries are now in `bin/` folder
* Removed warnings in our github actions
* Libp2p libs updated
* Signal handling improvements
* xmrmaker instance locking fix added
2022-11-18 16:47:16 -06:00
noot
7e44d6e7b9 add FakeDLEq; add pure go + darwin build commands (#225) 2022-11-14 16:14:10 -05:00
Dmitry Holodov
cdcd4db15d monero transaction checks (#207)
* Bob now waits for his XMR transfer to the A+B wallet to have 10 confirmations before notifying Alice that the XMR is locked.
* Alice now rejects the locked Monero if there is more than one block left before she can spend the funds (1 block freedom is in case of network latency on Alice's side). This eliminates Bob's ability to double spend and allows Alice to sweep funds to her primary wallet from the A+B wallet in a reasonable time frame.
* Sweeping received XMR to the primary wallet is now the default behavior.
* A+B swap wallets are created with a restore height set for quick wallet creation in production where the blockchain is big.
* Fixes SleepWithContext moving it into the common package and having it return an error when the sleep is interrupted by the context being canceled.
* Fixed timeout and context handling in integration tests
* Added new GetChainHeight method that queries monerod instead of monero-wallet-rpc
2022-10-31 00:26:25 -05:00
noot
0bdb6f6f2a add relayer support for claim contract function (#204) 2022-10-26 23:39:20 -04:00
noot
a51ea4e731 implement database; persist offers to disk and reload on startup (#200) 2022-10-11 15:44:37 -04:00
noot
5ed5b9271b implement ERC20 integration tests (#197) 2022-10-08 11:43:58 -04:00
Dmitry Holodov
ecd91f624c monero-wallet-rpc now embedded (#192)
* Embeds monero-wallet-rpc instead of having the user start it separately.
* Location of all the files standardized and documented in docs/default-file-locations.md.
* Ethereum and Monero wallets will be created if they do not exist.
* New RPC API  personal_balances added including swapcli support.
2022-10-07 22:18:46 -05:00
noot
87357180f5 remove hardhat dependency from ethereum/ dir (#196) 2022-10-03 18:13:38 -04:00
noot
fefd270424 update cgo-dleq submodule commit, fix test errors (#195) 2022-10-03 11:14:02 -04:00
Dmitry Holodov
6fcd1b8e26 match folders to exec names (#189) 2022-09-12 20:27:56 -04:00
Dmitry Holodov
5698e25239 RPC and WS endpoints share the same port (#187)
Combine our HTTP RPC and Websocket services into a single HTTP server, eliminating the --ws-port flag to swapd and using --swapd-port flag for swapcli.
2022-09-10 14:54:43 -05:00
Dmitry Holodov
476bc69b82 CLI cleanups (#185)
* Switches to current v2 version of urfave CLI
* Fixes incorrect port values in the help
* Provides defaults directly to urfave for clear `--help` messaging
* `--base-path` flag renamed to `--data-dir`. This matches `monerod`'s' `--data-dir` and almost matches the `geth` flag `--datadir`
* Bootnodes and contract address are provided for stagenet testing
* Bootnodes can be provided individually by repeating the `--bootnodes`/`--bn` flag, or as a comma separated block (original behavior), or even a combination of both. (Makes adding/removing bootnodes a lot easier.)
* More precise error messaging when XMR maker/taker values are off
* Fixes bug in the peer finder where XMR was hardcoded as the provides coin
* `cleanup-test-processes.sh` displays which processes are being killed
2022-09-07 19:45:01 -05:00
doonte
067b12f584 add direct ERC-20 swap support (#158)
Co-authored-by: noot <elizabethjbinks@gmail.com>
Co-authored-by: noot <36753753+noot@users.noreply.github.com>
2022-09-05 14:12:22 -04:00
Dmitry Holodov
007162b929 New bash library, and well as bash linting and formatting (#170)
* Allows unit and integration tests to share the same bash code via a utility library named testlib.sh.
* Linting and formatting of bash scripts was added to the Makefile targets lint and format.
* Updated the docker image and Go used by git actions
2022-08-25 13:24:13 -05:00