-
Notifications
You must be signed in to change notification settings - Fork 120
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
feat: human focus transfer domain #2679
base: master
Are you sure you want to change the base?
Conversation
26eb8f0
to
4bb94d0
Compare
Are we inferring the domains ? |
was removed.. as just found out the domain can be justified via |
Shouldn't we add an additional optional domain to be future proof, i.e. for when we add support to UTXO ? |
a6f5b8a
to
58af08c
Compare
hmm.. yea.. finishing up the basic first.. now impl the utox stuff 😬 |
65857b6
to
3e38246
Compare
src/dfi/rpc_accounts.cpp
Outdated
RPCHelpMan{ | ||
|
||
if (!request.params[0].isArray()) { | ||
RPCHelpMan{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Help params need to be outside of the if branch and with both help messages in the same unit.
Only the final Check
call inside.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure i'm doing it correctly
refined 9e23c23
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
custom made RPCHelpMan 480b080
transferdomain
Creates (and submits to local node and network) a tx to transfer assets across domains. DVM to EVM/EVM to DVM, etc.
Arguments:
1. array | string (json array | string, required) A json array of src and dst json objects
[
{ (json object)
"src": { (json object) Source arguments
"address": "str", (string, required) Source address
"amount": "str", (string, required) Amount transfered, the value is amount in amount@token format
"domain": n, (numeric, required) Domain of source: 2 - DVM, 3 - EVM
},
"dst": { (json object) Destination arguments
"address": "str", (string, required) Destination address
"amount": "str", (string, required) Amount transfered, the value is amount in amount@token format
"domain": n, (numeric, required) Domain of source: 2 - DVM, 3 - EVM
},
"nonce": n, (numeric) Optional parameter to specify the transaction nonce
},
...
]
from (string, required) the source address of sender
2. to (string, required) the destination address of sender
3. tokenAmount (string, required) in amount@token format
4. nonce
Result:
"hash" (string) The hex-encoded hash of broadcasted transaction
Examples:
> defi-cli transferdomain '[{"src":{"address":"<DFI_address>", "amount":"1.0@DFI", "domain": 2}, "dst":{"address":"<ETH_address>", "amount":"1.0@DFI", "domain": 3}}]'
> defi-cli transferdomain '[{"src":{"address":"<ETH_address>", "amount":"1.0@DFI", "domain": 3}, "dst":{"address":"<DFI_address>", "amount":"1.0@DFI", "domain": 2}}]'
> defi-cli transferdomain "from" "to" "100@DFI"
> defi-cli transferdomain "from", "to", 100@BTC 2"
58af08c
to
ef1e6f7
Compare
ef1e6f7
to
71595dd
Compare
removed utxo support |
|
Summary
Requirement
Simplifiy transfer domain command line form
from
transferdomain [{"src":{"address":src,"amount":"1@DFI","domain":3},"dst":{"address":dst,"amount":"1@DFI","domain": 2}}]
to
transferdomain src dst tokenAmount(eg: 1@DFI) domain(0 - auto, 1 - utxo, 2 - dvm, 3 - evm) nonce(optional)transferdomain src dst tokenAmount domain(eg: 1@DFI) nonce(optional)
RPCs