Skip to content

Commit

Permalink
Readme
Browse files Browse the repository at this point in the history
  • Loading branch information
MorenaBarboni committed Jan 20, 2024
1 parent 8cb8d48 commit f066db3
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,48 @@ cd ./test-network
```
./network.sh down
```

# Interacting with the application

## Option 1 - Web-App

- Move inside the *application* folder:
```
cd ./application
```

- Open up *application/index.html* and add your codespace address at line 107 :
```
xhr.open("POST", "https://your-codespace-ID-3000.app.github.dev/submitTX", true)
```

- Install the dependencies:
```
npm install
```

- Start the server:
```
npm start
```

The web form for executing the functions will be available at:
```
https://your-codespace-ID-3000.app.github.dev/home.html
```

## Option 2 - CLI

- Simply invoke the commands.js submit script:
```
node commands.js submit <organization> <channel> <chaincode> <transactionName> [transactionParams..]
```


- For example, to invoke a transaction with parameters:
```
node commands.js submit agency.quotation.com q1channel quotation requestQuotation quotation2 item 20
```
```
node commands.js submit suppliera.quotation.com q1channel quotation getQuotation quotation2
```

0 comments on commit f066db3

Please sign in to comment.