Git Product home page Git Product logo

warfle's Introduction

Overview

Warfle is an easy-to-use command-line interface for deploying smart contracts without any deep configurations.

Important Note

In the current version, Warfle does not supports the public mainnet or testnet deployment but in the further versions, We will add this feature.

Installation

Option 1 (recommended):

Install from PYPI via pip:

>>> pip install warfle-deploy-cli
Option 2:

Install from the with the setup file of the project:

>>> git clone https://www.github.com/egesabanci/warfle
>>> cd warfle/
>>> pip install .

Example Usage

Let's say, we have a following smart contract:

// Test.sol

pragma solidity >=5.0.1;

contract Test {
  string public greet;

  function setGreet(string memory text) public returns (bool) {
    greet = text;
    return true;
  }

  function greet() public view returns (string) {
    return greet;
  } 
}
Step 1:

Now, We want to deploy that contract with Warfle. Firstly we need to initialize Warfle to the current working folder:

>>> warfle init

This command will create a .warfle configuration file to the current path. .warfle file contains:

{
	"rpc": "http://127.0.0.1:7545",
	"public": <YOUR WALLET PUBLIC KEY>
}
Step 2 (Optional):

If we want to update the configurations, We can simple use the warfle update command.

Example usage:

>>> warfle update KEY

key argument must be rpc or public. You can not add any other argument to the .warfle configuration file.

Step 3:

Then, We need to compile our smart contract with the warfle compile command. This command will create a new source folder to the current path. ./source will contains 2 files: ABI of the contract (*.abi) and Bytecode of the contract (*.bin). In our case, ./source will contains: Test.abi and Test.bin:

Example:

>>> warfle compile Test.sol
Step 4:

Now, We are ready to deploy our contract with the warfle deploy command:

>>> warfle deploy <PATH TO ABI> <PATH TO BIN>

In our case:

>>> warfle deploy source/Test.abi source/Test.bin

License

MIT © Ege Sabanci [email protected]

warfle's People

Contributors

egesabanci avatar

Stargazers

Mehmet Berat Öztürk avatar

Watchers

James Cloos avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.