-
Notifications
You must be signed in to change notification settings - Fork 98
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
Create AIP for Aptos Script/Intent Builder #448
Conversation
In order to differentiate between (legacy) scripts and newly introduced batched execution, could you force these transactions to emit an event that also has information on what entry functions and arguments are being batched |
aips/aip-x.md
Outdated
|
||
## Summary | ||
|
||
Right now the users can interact with a Move contract via entry point function or script. Script can be a nice way of chaining multiple smart contract calls yet require users to compile scripts on their own end, which would be a problem for a light weight client setup. |
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.
We should build on the motivation here.
The existing paradigm for developing on Aptos requires end developers to contemplate all the ways in which a user may interact with their application. This has many implications such that an application cannot introduce support for new asset classes without being updated and that interactions between libraries must be defined completely on-chain. For example, objects allow for ungated transfers and transfers with TransferRef
; however, a developer cannot seamlessly introduce asset specific transfers with TransferRef
without support from applications. Applications then need to tailor their support around these assets. FungibleAsset addressed this by introducing dispatchable function, but this does not lend itself to a general solution. Secondly, as a user, an Entry
function is opaque and there is no way to be explicit from the user about the intent of their transaction, such that, I want to extract 5 apt
from my account to acquire Aptomingo X
. Instead a user must review simulation of the transaction and hope that the simulation outcome is reasonably deterministic.
This AIP introduces mechanisms that push interactions on the blockchain to be a transaction generation time decision to address these concerns and make user and developer lives on Aptos better by making it easier to build applications and safely determine what operations will be performed.
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.
can you add a bit more about the motivation with respect to onchain vs dynamic composability, to address the David's comment
After that this looks good to land, and iterate.
aips/aip-x.md
Outdated
let return_2 = await builder.add_batched_calls({ | ||
function: `0x1::coin::coin_to_fungible_asset`, | ||
/* Pass the withdrawed Coin<AptosCoin> to the coin_to_fungible_asset */ | ||
functionArguments: [return_1[0]], |
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.
it seems a bit odd to assume tuple is returned, and require [0] always.
would it be better to have return_1 by default, and if it is tuple you can specify return_1.tuple_index(0) or something?
No description provided.