Skip to content
This repository has been archived by the owner on Dec 13, 2018. It is now read-only.

titan-suite/ide-alpha

Repository files navigation

Titan IDE

The complete Smart Contract Development Environment.

Usage

  1. Download IDE server.

  2. Setup

     // with yarn (recommended)
     cd server && yarn && yarn start
     // with npm
     cd server && npm install && npm run start
  3. Visit https://ide.titan-suite.com.

Video Guide

Titan IDE

Unlocking an account

Requirements: Web3 provider url, Account, Password

  1. Start by inputting a web3 provider url.
  2. Once a valid AION node is detected a dropdown will be populated with the list of accounts.
  3. Input password linked to the chosen account.

Deploying a contract

Requirements: Web3 provider url, Account, Password, Contract name

Optional: Gas, Contract arguments

Deploy unlocks the selected the account then compiles and deploy the contract. After successful deployment Contract interaction is enabled at http://localhost:4001/graphql.

  1. Steps listed above
  2. Name of the contract to deploy Note: Deploy automatically handles compile and unlock.
Side note: The fallback value for Gas will be 1500000

Compiling a contract

Requirements: Web3 provider url

  1. Once the contract is ready click the compile button.
  2. A tree view will be populated with the contract information.

Interacting with web3

Requirements: valid Web3 provider url

  1. titan 'any web3 command'

Bash

Interacting with already deployed Contract

Requirements: valid Web3 provider url, ABI, Deployed contract address

Optional: Account, Gas

  1. Input the Abi and Deployed contract address
  2. After the ABI successful parsed Contract interaction will be enabled at http://localhost:4002/graphql.

Interacting with functions

Based on the Example Contract in the screenshot above here is how we can interact with the functions using GraphQL Queries and Mutations:

1. Querying variable num

{
  num {
    uint128_0{
      int
    }
  }
}

Num

2. Adding 5 to num

{
  add(a: 5) {
    uint128_0 {
      int
    }
  }
}

Add

3. Combining Queries together

query {
  num{
    uint128_0{
      int
    }
  }
  add(a:25){
    uint128_0{
      int
    }
  }
}

Combined

4. Setting num to 96

mutation  {
  setA(a: 96){
     blockHash
     blockNumber
  }
}

Set