Skip to content
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

Implement easier Sui call on CLI + "Suibase registry"? #100

Open
mario4tier opened this issue May 28, 2024 · 0 comments
Open

Implement easier Sui call on CLI + "Suibase registry"? #100

mario4tier opened this issue May 28, 2024 · 0 comments

Comments

@mario4tier
Copy link
Member

mario4tier commented May 28, 2024

(For now, nobody is working on this. Just an open-discussion to collect feedback from the community)

Suibase is in position to implement the followings:

  • Specify a call with a single string "as-if" Move code. Example:
    testnet call mypackage::myfunc(params1,params2)

  • Auto-resolve package name (e.g. mypackage is replaced with the last known published ID).

  • A new general purpose "Suibase Registry" module. This is an optional Key/value storage, with special handling for Sui objects. One storage per package instance. The registry can then be used both online/offline as follow:
    devnet call mypackage::myfunc([myvar], some_params, [myobj.myfield])

    where:
        [myvar] is blindly replaced with the value stored in the registry.
        [myobj.myfield] is replaced with an object field value (myobj is an address in registry)
    
  • Lookup and use object "by-type" created in init() of mypackage:
    mainnet call mypackage::myfunc(init[UpgradeCap])

  • Display the return value on CLI. Related discussion:
    https://discord.com/channels/916379725201563759/1006322742620069898/1244660145599025183

  • Have response be "HTML interactive" in a "Sui Calls" panel in VSCode (e.g. collapsible JSON viewer, click to open explorer on address etc...).

  • Add display + on-chain edit of the registry in the VSCode extension (and through CLI).

Note: The registry can be modified only by its package code and package creator.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 📋 Backlog
Development

No branches or pull requests

1 participant