A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/second-state/SewUp/wiki/Deploy-Guide below:

Deploy Guide · second-state/SewUp Wiki · GitHub

Building and deploying for sewup projects is easier by cargo sewup cli tool, however you still can get the ewasm binary and deploy with web3js or other client. Also cargo sewup cli tool provide the abi.json generator, you can use web3js to interact with ERC token contracts made with sewup.

In following sections, I will describe that how sewup project deploy on the block chain network, this method is easier and the build will automatically done be fore deployment.

Providing deployment information

Following deploy configure should provide in sewup.toml. Besides, you may optionally change the gas and the gas_price as you need.

[deploy]
url = "http://localhost:8545"
private = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
address = "0xXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
# gas = 5000000  # optional
# gas_price = 1  # optional
Install sewup tool and deploy

Install deploy tool

  1. Install cargo-sewup cargo install cargo-sewup
  2. Provide deploy section in the Cargo.toml of the contract
  3. Deploy cargo sewup
Build with cargo sewup and deploy with other clients

cargo-sewup can build a deployable ewasm without deploy with --build-onlyor -b option . The deployable ewasm will be built as ./target/wasm32-unknown-unknown/release/{contract_name}.deploy.wasm You can read it as binary and deploy with tool you want. Following is the building flow of deployable ewasm.

graph TD

A[cargo sewup --build-only] -->|compile| B(Constructor wasm)
A -->|compile| C(Runtime wasm)
B --> |modified| D(Constructor ewasm)
C --> |modified| E(Runtime ewasm)
D --> |as body part| F[deployable wasm]
E --> |as return part| F
Loading

View build flow

It is not required to use sewup be complied with web3.js, and the token apis of sewup are complied with web3.js. You may use following command to generate the abi.json for web.js client. cargo sewup -g or cargo sewup --generate-abi.

Following is the flow for generating the abi.json

graph TD

A[cargo sewup --generate-abi] -->|compile| B(Runtime wasm)
B --> |expand macro and parse handlers in use| C[generator.rs]
C --> |run and print| D[abi.json]
Loading

View abi generating flow


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4