-
Notifications
You must be signed in to change notification settings - Fork 48
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
Text-Based Transactions #252
Comments
Command ProcessingThe command can be processed by: A. A Lua smart contract running on the user account (similar to composable txns) On the first case, as it is running on the user account it cannot read the token maps, so it must call another contract to read the map of symbol to address Contracts that support text transactions could export a function with common name, like Direct Swap:
Super WalletThe user can have many wallets. The wallet address must be specified on the txn recipient, and displayed on the hardware wallet:
How to use the text transaction with the "super wallet"?
There may be also proposals with:
If the proposal is too long, it can just show the proposal ID. EOA ContractHow the text-processing contract could call the user's account code? Composable Transactions1. Execute a MultiCall script for a given text commandShould it handle Composable Txns? Or use templates for this purpose
Maybe the text commands can replace templates for Composable Transactions. Should it have separate text commands for Composable Transactions? (different txn type?) 2. Many text commands on a transactionBoth these could be supported:
But how would be the interface on the wallet to make multiple transfers? Check also the method to compose transactions |
I think there are additional interesting use-case for text-based transactions
I think both are very interesting side-effects. BTW Small Lanauge Models such as Phi-2 (https://huggingface.co/spaces/plug/phi-offline?model=phi_2_0_q4k) are compact enough to operate even in the browser and some businesses (such as banks) that used to rely on old-styled chatbots found legitimate use-cases for those models. It will be interesting to support plugging-in compact language models on to Aergo. |
Create a new type of transaction (
TEXT
) in which the payload contains a text commandThen the nodes must process the command via the Aergo engine (Go or smart contract or both)
This makes the transaction simpler to understand when signing on a hardware wallet
Examples
Transfer ARC1 tokens
Transfer ARC2 token
The rule to differentiate transfer: if first argument is a number -> ARC1, otherwise -> ARC2
Swap ARC1 tokens
Limit Swap orders
Direct Swap
Create order
Execute order
Cancel order
What if there are many with the same values?
Check NFTs
Amounts
decimals()
from the contract or pass the value (with a dot) to the contractRequirements
Must keep a store of
symbol
->address
For ARC2 it can be
name
->address
Or maybe also use the name system to resolve symbol -> address
Name of swap contracts should also point to an address
May need to get the address of the pair from the swap factory or router
Maybe use a MultiSig contract for that, or DAO
Notes
How to support different languages? (localization)
Is it possible to send a translate request, be processed by many nodes, the result aggregated and signed, but not saved to the blockchain?
Only do compute, not storage write. And store on blockchain only the allowed nodes and the logic.
Like a transaction that does not save to the chain. but the txn itself is saved (nonce. maybe also paid?)
Or just use 3+ diff nodes, each one with known public key, then check the signature of responses
How to handle options, like slippage?
The text was updated successfully, but these errors were encountered: