Skip to main content

Extrinsic

Extrinsic is a term for executing transactions or operations on the network that are mutable, meaning that operations will affect state/data on the network.

There are two ways to access extrinsic:

Using Dashboard#

The easiest way is to use Nuchain dashboard. This method is usually used for testing or exploration only. The practical way is the programmatic way, see the section Programmatic.

You can access extrinsic functions via Nuchain dashboard > Extrinsic: menu

Extrinsic Menu

On the Extrinsic page you will find an interface that makes it easy for you to call function based on the modules available in Nuchain.

Extrinsic Submission

The above image is an example of transferring an ARA to another account via an extrinsic function using the balances module with the function name transfer.

Programmatic#

Nuchain provides a javascript library to make it easier to access extrinsic programmatically.

Example of doing transfer programmatically:

const api = await ApiPromise.create({  provider: new WsProvider(NUCHAIN_NODE_ADDRESS),});
// make extrinsic function calls// in the `balances` module of the `transfer` function.api.tx.balances.transfer(recipient, 100).signAndSend(sender, ({ status, events }) => {  if (status.isInBlock || status.isFinalized) {    console.log("Transfer successful!");  }});