Commit graph

3,143 commits

Author SHA1 Message Date
c452db345c
ui.keypress_confirm(): add do_exit, exit_msg params 2025-03-25 09:46:01 +00:00
62475d39e9
proto.eth.contract: new create_token_data() method 2025-03-25 09:46:01 +00:00
5c5086fcb6
proto.eth.contract: methods relocate, whitespace 2025-03-25 09:46:01 +00:00
9652e3e3da
minor fixes, cleanups, whitespace 2025-03-25 09:46:01 +00:00
0a72cc83f7
nix: add solc source build derivation 2025-03-25 09:46:01 +00:00
ef2e7789b5
scripts/create-token.py: move Solidity code template to external file 2025-03-25 09:46:01 +00:00
f0563031de
Ethereum THORChain swaps
Only native ETH supported for now.  Work on ERC20 token swaps is underway.

Sample create-sign-send workflow for a BTC->ETH swap (assumes offline
autosigning is set up):

    $ mmgen-swaptxcreate --autosign BTC 0.12345 ETH

    remove device - insert - wait for signing - remove - insert

    $ mmgen-txsend --autosign

Create step for ETH->BTC swap:

    $ mmgen-swaptxcreate --autosign ETH 5.4321 BTC

For more information, see:

    $ mmgen-swaptxcreate --help

Testing:

    $ test/cmdtest.py ethswap
2025-03-23 10:14:32 +00:00
287107ce73
Memo.is_partial_memo(): match bytes instead of str 2025-03-23 10:14:32 +00:00
f6aa4bad33
minor fixes and cleanups 2025-03-23 10:14:32 +00:00
324d17deb5
proto.btc.tx.completed: move check_swap_memo() to parent class 2025-03-23 10:14:32 +00:00
ed77c9661e
tx.new_swap: add network-estimated fee display; related cleanups 2025-03-23 10:14:32 +00:00
8cd4487e64
tx.swap: self.send_proto -> self.proto 2025-03-23 10:14:32 +00:00
1769b100b5
fixes and cleanups throughout 2025-03-23 10:14:32 +00:00
f739f96f79
proto.eth.tx.base: remove start_gas attribute 2025-03-23 10:14:32 +00:00
b6c285c02a
proto.eth.contract: relocate methods 2025-03-23 10:14:32 +00:00
5ecf9a18d4
proto.eth.contract: TokenCommon -> Contract 2025-03-23 10:14:32 +00:00
bf6af7273b
tx.new_swap: add get_swap_proto_mod(), init_proto_from_coin() 2025-03-23 10:14:31 +00:00
2807c30a60
tx.new_swap: whitespace 2025-03-23 10:14:31 +00:00
73210a3932
tx.new_swap: new check_addr_is_wallet_addr() method 2025-03-23 10:14:31 +00:00
95cf6fb3d2
tx.new_swap: relocate cmdline parsing methods from proto.btc.tx.new_swap 2025-03-23 10:14:31 +00:00
4d7aaa9d88
minor cleanups 2025-03-23 10:14:31 +00:00
5273b2dc5e
cmdtest.py: minor cleanups 2025-03-23 10:14:31 +00:00
11e648f4c9
cmdtest.py swap: new CmdTestSwapMethods mixin class 2025-03-23 10:14:31 +00:00
699b21f313
CmdTestBase: add cfg attr 2025-03-23 10:14:31 +00:00
bb7deefdc5
cmdtest.py: modularize CmdTestRunner, CmdGroupMgr 2025-03-23 10:14:31 +00:00
eb80abaaee
amt.py: new UniAmt type, equivalent to BTCAmt 2025-03-23 10:14:31 +00:00
8b504c895a
modtest.py, daemontest.py: remove prefixes from test files 2025-03-23 10:14:31 +00:00
3faef52096
mmgen-txsend: unrecognize the --coin and --token options 2025-03-17 10:16:18 +00:00
215eb43e29
mmgen-txsign: unrecognize the --coin and --token options 2025-03-17 10:16:18 +00:00
816781ec7a
minor changes, whitespace 2025-03-17 10:16:18 +00:00
6a369f79d7
test suite: replace invalid transaction file 2025-03-17 10:16:18 +00:00
14b2eb48ab
nix/shell.nix: add PYTHONPYCACHEPREFIX to environment 2025-03-17 10:16:18 +00:00
fe9664412d
cmdtest.py: reimplement etherscan server using WSGI framework 2025-03-17 10:16:18 +00:00
90544d677c
cmdtest.py: reimplement thornode server using WSGI framework 2025-03-17 10:16:18 +00:00
88f204a0bd
cmdtest.py: new WSGI http server framework 2025-03-17 10:16:18 +00:00
79e008ce43
cmdtest.spawn_wrapper(): make cmd a keyword arg 2025-03-17 10:16:13 +00:00
76a34a05b5
proto.eth.tx: add mmid to output; check addrs, amt before signing 2025-03-16 10:46:37 +00:00
ef640d10a9
proto.eth.tx: minor cleanups, fixes 2025-03-16 10:46:32 +00:00
1eb0de7938
ETH: transaction sending via Etherscan
- the HTML transaction broadcast form is used, so no API key is required
- the request can be proxied through Tor
- availability of the service can be checked with the --test option

Example:

    # check availability:
    $ mmgen-txsend --autosign --coin=eth --tx-proxy=etherscan --proxy=localhost:9050 --test

    # send:
    $ mmgen-txsend --autosign --coin=eth --tx-proxy=etherscan --proxy=localhost:9050

Testing:

    $ test/cmdtest.py --coin=eth -e -X txsend_etherscan ethdev
2025-03-15 18:24:54 +00:00
7e5ee50d0b
tx.new: minor fixes 2025-03-15 18:24:53 +00:00
56f730ef7c
proto.eth.rpc: remove Reth mainnet warning 2025-03-15 18:24:53 +00:00
1f166ce458
mmgen-txsend: add --test option
Test whether a transaction is sendable without sending it

- for BTC and friends, uses the ‘testmempoolaccept’ RPC call
- not implemented for ETH
2025-03-15 18:24:53 +00:00
1cab2f9d6d
tx.new: support relative fees < 1 unit; add test 2025-03-15 18:24:53 +00:00
c7b2626d6e
amt.py: reimplement CoinAmt.to_unit(), add test 2025-03-15 18:24:53 +00:00
2c3fa1c49a
minor cleanups 2025-03-15 18:24:53 +00:00
6967456f8f
mmgen-txsend: add --dump-hex and --mark-sent options
Use --dump-hex to dump the serialized transaction hex to file or standard
output instead of sending the transaction.

With --autosign, use --mark-sent to mark the transaction as sent on the
removable device after a successful out-of-band send.
2025-03-15 18:24:53 +00:00
886f8e3029
make --daemon-id a coin-specific cfg file option 2025-03-15 18:24:53 +00:00
e972e4f93e
add --list-daemon-ids global config opt 2025-03-15 18:24:53 +00:00
81e9889766
add --test-suite global config opt 2025-03-15 18:24:53 +00:00
8ad00b5053
main_txsend.py: cleanups 2025-03-15 18:24:53 +00:00