Code Monkey home page Code Monkey logo

alliance-protocol's Introduction

Benchmark

The smart contract has been deployed to pisco-1 testnet and it has been benchmarked with the following data:

Size Chains Alliances Data Size (kB) Tx Cost (Luna) Gas Used
XSmall 8 16 5,5 0.406522 354,576
Small 16 32 11 0.667318 574,760
Medium 32 64 21,9 1.188321 1,008,969
Large 64 124 43,7 2.230764 1,877,682
XLarge 124 248 87,4 4.319313 3,615,282

Take in consideration that the XLarge dataset almost reach the limit of data we can submit on chain since the maximum gas for queries is 3 000 000 and the size of the data is quiet large.

Development

Considering the Rust is installed in your system you have to use the wasm32 compiler and install cargo-make.

$ rustup default stable
$ rustup target add wasm32-unknown-unknown
$ cargo install --force cargo-make

There are few available commands to run on development:

Validate the code has been formatted correctly:

$ cargo make fmt

Run the tests written for the smart contracts

$ cargo make test

Lint the code

$ cargo make lint

Generate json Schemas for each smart contract

$ cargo make schema

Build the code

$ cargo make build

Optimize the built code

$ cargo make optimize

Deployment

Before executing the following scripts, navigate to the scripts folder and execute yarn command to install the dependencies for the set of scripts. Also remember to set the following environment variables:

# Mnemonic of the account to deploy the contract with
MNEMONIC=
# Chain id where to deploy the contract
CHAIN_ID=
# Prefix of the acccounts where to deploy the smart contract 
ACC_PREFIX=

To deploy oracle and alliance hub smart contract:

$ cargo make deploy-oracle
$ cargo make deploy-hub

alliance-protocol's People

Contributors

emidev98 avatar javiersuweijie 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.