Skip to main content

Widgets

Once you have your projects and views set up, it's time to start creating the main feature of SorobanHub: Widgets. A Widget is just an aquare in your view that serves a purpose, this purpose can be from simple widgets that let you extend the rent on a ledger key to a complex function call.

Widget types

SorobanHub currently has different types of widgets (and more to come):

  • Ledger Key Expiration: This widget lets you specify a contract ID, a WASM hash, or a LedgerKey XDR... No matter the input, it will be converted into the XDR equivalent and it will let you both restore a ledger key or extend its rent.
  • Function Call: This is probably the most useful widget, with this widget you can define a contract and a method function you would like to call. Here you structure the parameters you want to send to the contract when calling the function.
  • Install WASM: As the name says, you can import a WASM file and install it on the network.
  • Deploy SAC: By defining the asset code and the asset issuer of your asset, you can deploy the SAC contract for that asset.
  • Deploy Contract: Similar to the Install WASM widget, this one lets you add a WASM file and it will deploy one contract to the network.

Source account

When you create a project you define a default account that will be used as the source of the transaction, but in cases you need to you can also define a source account for a specific widget. This source account won't be used in other widgets.