Nerif Docs
  • Quickstart
  • Tutorials
    • Lottery Tutorial
      • Step 1. Configure your account
      • Step 2. Add a smart contract
      • Step 3. Create a new automation workflow
      • Step 4. Build your automation workflow
      • Step 5. Test workflow execution
    • Bridge Tutorial
      • Step 1. Configure your account
      • Step 2. Add smart contracts
      • Step 3. Create a new automation workflow
      • Step 4. Build your automation workflow
      • Step 5. Test workflow execution
    • Price Feed Tutorial
      • Step 1. Configure your account
      • Step 2. Add smart contract
      • Step 3. Create a new automation workflow
      • Step 4. Build your automation workflow
  • 1. What is Nerif Network?
    • Our Mission
    • Our Vision
    • Terms
  • 2. Architecture
    • Core components
    • Validators
      • Networking
        • Bootnode
        • Joining the network
        • Leaving the network
        • Slashing
      • Consensus
        • Epoch & Rounds
        • Automation workflow
          • Triggers
          • Actions
          • Condition
    • Contracts
      • System Contracts
      • Operational Contracts
    • Security
      • DKG
      • Threshold ECDSA
      • Security checks
  • 3. How it works
    • Introduction
    • Nerif App
    • Login
    • Account Configuration
      • 1. Deploy a Gateway Contract
        • 1.1 Create a new gateway
        • 1.2. Use existing gateway contract
        • 1.3.What if I want to update my gateway contract?
      • 2. Top up your balance
        • 2.1. Topping up your balance on Polygon Mumbai
        • 2.2. Topping up your balance on Ethereum Goerli
    • Fees
    • User balance
      • 1. Topping up the balance
        • 1.1 Top up your balance via Nerif App
        • 1.2 Top up your balance directly via Registry smart contract
      • 2. Withdraw from balance
        • 2.1 Withdraw via Nerif App
        • 2.2 Withdraw directly via Registry smart contract
    • API
      • Off-chain APIs
      • On-chain APIs
    • SDK
  • 5. Nerif DAO
    • Governance
    • Treasury
    • Proposal process
  • 6. Support
Powered by GitBook
On this page
  • Register Workflow
  • Pause Workflow
  • Resume Workflow
  • Cancel Workflow
  • Fund Balance
  1. 3. How it works
  2. API

On-chain APIs

PreviousOff-chain APIsNextSDK

Last updated 1 year ago

The smart-contract-based interface enables network users to interact with the Nerif Network by executing specific functions of Nerif's smart contracts through transactions.

Register Workflow

To register a new workflow in the Nerif Network, you need to use “registerWorkflow” function. The registration process includes providing workflow metadata such as ID, owner, state, and hash. After the workflow is successfully registered through the Registry contract and created within the Nerif Network, it becomes active and ready to be utilized.

Pause Workflow

To pause a workflow, send a transaction to the registry contract and execute the "pauseWorkflow" function, providing the workflow ID. The network updates the workflow state accordingly. Pausing a workflow temporarily halts its execution without canceling it entirely.

Resume Workflow

To resume a paused workflow, send a transaction to the registry contract and execute the "resumeWorkflow" function, providing the workflow ID. The network updates the workflow state accordingly, allowing the workflow to continue execution from where it was paused.

Cancel Workflow

To cancel a workflow, send a transaction to the registry contract and execute the "cancelWorkflow" function, providing the workflow ID. The network updates the workflow state accordingly, stopping its execution. Canceling a workflow terminates its execution and prevents any further steps from being processed.

Fund Balance

To create an automation workflow, users are required to have a balance associated with their address. By utilizing the "fundBalance" method, users can add funds to their balance, ensuring they have sufficient resources to create and manage workflows within the system.

To learn more about funding your balance, check "".

User Balance