Skip to content

This repo is a collection of code samples to showcase how to execute different operations on Balanced.

Notifications You must be signed in to change notification settings

balancednetwork/balanced-examples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Balanced Examples

This repo is a collection of code samples to showcase how to execute different operations on Balanced.

Prerequisites

To be able to run the code samples, first clone the repo and then install the required dependencies:

git clone https://github.com/balancednetwork/balanced-examples.git
cd balanced-examples
npm install

The sample scripts can run in both testnet and mainnet environments. To switch between the two, set the NETWORK environment variable to either testnet or mainnet (default is testnet).

For this create a .env file in the root of the project and add the following line:

NETWORK=testnet

Also setup a PRIVATE_KEY environment variable in the .env file with the private key of the account you want to use to sign transactions.

NETWORK=testnet
PRIVATE_KEY=0x...

If no private key is provided, the scripts that require signing transactions will fail.

Scripts

The following scripts are available:

References

About

This repo is a collection of code samples to showcase how to execute different operations on Balanced.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published