-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add readme * update readme
- Loading branch information
Showing
4 changed files
with
56 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# Local Money Testsuite | ||
The Testsuite is a set of tests that are used to verify the proper functioning of the protocol. It involves instantiating the protocol and running integration tests. | ||
### Commands | ||
|
||
To run all tests: | ||
```bash | ||
yarn test | ||
``` | ||
|
||
To only instantiate the protocol: | ||
```bash | ||
yarn test -t 'setup protocol' | ||
``` | ||
|
||
To setup fees configurations: | ||
```bash | ||
yarn test -t 'fees' | ||
``` | ||
|
||
To pre-populate the price contract, you can run this code: | ||
```bash | ||
yarn test -t 'price test' | ||
``` | ||
|
||
You can also combine all this tests using `|` between each code, example: | ||
```bash | ||
yarn test -t 'setup protocol|fees|price test' | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,15 @@ | ||
# Local Money Smart Contracts | ||
All the contracts from the LocalMoney protocol. | ||
|
||
### Commands | ||
|
||
To build the protocol, you will need to use a specific version of cargo: `cargo 1.67.0-nightly (16b097879 2022-11-14)`. This version of cargo is necessary to ensure that the protocol is built correctly. | ||
```bash | ||
cargo +nightly build | ||
``` | ||
|
||
To compile the protocol, you will need to have Docker installed on your computer. Once Docker is installed, you can use the script in the `/contracts` directory to generate `.wasm` files in the `/contracts/artifacts` path. | ||
```bash | ||
sh optimize.sh | ||
``` | ||
|
||
CosmWasm Smart Contracts for Local Money P2P Marketplace. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,19 @@ | ||
# Local Money Protocol Integration Tests | ||
# Local Money Deploy | ||
|
||
Integration tests that calls Contracts using LCD. | ||
These scripts allow you to upload the `.wasm` files after they have been compiled. | ||
|
||
# Instructions | ||
|
||
Run `yarn install` and then `node index.js` with the desired env vars as described below. | ||
|
||
On the 1st run, you must run it with `DEPLOY=all` to upload all the contracts to the chain and generate the code ids for the contracts. | ||
|
||
# ENV Variables | ||
|
||
**DEPLOY**: name of contract (name of the wasm file without the extension) or `all` to upload all the contracts. | ||
|
||
**CONTRACTS**: the folder with the optmized wasm files. | ||
|
||
**FACTORY**: factory address, if Factory is already instantiated you can pass its address on this parameter to skip the deployment process. | ||
|
||
# Examples | ||
### Commands | ||
|
||
To upload all wasm compiled you can run: | ||
```bash | ||
npm run bombay:all | ||
yarn deploy:all | ||
|
||
# expands to | ||
#expands | ||
|
||
DEPLOY=all CONTRACTS=../localterra-contracts/artifacts ./node_modules/node/bin/node index.js | ||
DEPLOY=all CONTRACTS=../contracts/artifacts ./node_modules/node/bin/node index.js | ||
``` | ||
|
||
To upload only one wasm compiled you can run: | ||
```bash | ||
npm run terrarium:all | ||
|
||
# expands to | ||
|
||
DEPLOY=all NETWORK=localterra CW20ID=1 CONTRACTS=../localterra-contracts/artifacts ./node_modules/node/bin/node index.js | ||
``` | ||
DEPLOY={CONTRACT_NAME} CONTRACTS=../contracts/artifacts ./node_modules/node/bin/node index.js | ||
``` |