Skip to content
This repository has been archived by the owner on Jan 22, 2025. It is now read-only.

Commit

Permalink
Merge branch 'cudos-dev' into CUDOS-894
Browse files Browse the repository at this point in the history
  • Loading branch information
ealeksandrov-LimeChain committed May 12, 2022
2 parents 0eac415 + e640ffb commit ab08930
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ By using this tool you can also spin up a local [`Cudos node`](https://github.co
* [Deploying smart contracts, interacting with them and running custom script files](#deploying-smart-contracts-interacting-with-them-and-running-custom-script-files)
* [Available functions in global context](#available-functions-in-global-context)
* [Exposed functions of a contract instance](#exposed-functions-of-a-contract-instance)
* [Additional options](#additional-options)
* [Network](#network)
* [Localhost](#localhost)
* [Testnet](#testnet)
Expand Down Expand Up @@ -283,13 +284,30 @@ You can get an instance of a contract (e.g. with `getContractFactory()`). Here i
| async query(queryMsg, signer = undefined) | Executes a query within the contract with the given message. Optionally you can make a query with a signer other than the deployer. | const count = await contract.query(QUERY_GET_COUNT) |
| getAddress() | Returns the address of a deloyed contract or `null` if the contract is not deployed. | const address = contract.getAddress() |
### Additional options
You can run your scripts on a different node. More information [here](#network). You can set a custom address prefix under `addressPrefix` in `blast.config.js`. Default is `cudos`.
* You can run your scripts on a different node. More information [here](#network)
* You can set a custom address prefix under `addressPrefix` in `blast.config.js`. The default prefix is `cudos`
```bash
blast run scripts/myCustomScript.js -n testnet
```
* You can automatically fund smart contracts with tokens in your scripts
```bash
const { coin } = require('@cosmjs/stargate')
async function main () {
const [alice, bob] = await getSigners()
const contract = await getContractFactory('alpha')
const MSG_INIT = { count: 13 }
const tokens = [coin(321, "acudos")]
const deploy = await contract.deploy(MSG_INIT, bob, 'alpha', tokens)
// ...
```
---
## Network
Expand Down

0 comments on commit ab08930

Please sign in to comment.