Skip to content

Commit db0166c

Browse files
committed
feat(publish): set publish reward per trigger to 0
1 parent 44fa6d0 commit db0166c

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,15 +204,15 @@ See also: [Verifier Contract Interface](https://github.com/DelphinusLab/halo2agg
204204

205205
#### Usage
206206
```bash
207-
zkgraph publish <ipfs_hash> <bounty_reward_per_trigger>
207+
zkgraph publish <ipfs_hash> [bounty_reward_per_trigger]
208208
```
209209

210210
#### Arguments
211211

212212
| Arguments | Description |
213213
| ----------------------------- | ---------------------------------------------------------- |
214214
| `<ipfs hash>` | IPFS hash of uploaded zkGraph |
215-
| `<bounty reward per trigger>` | Bounty reward per trigger in ETH |
215+
| `[bounty reward per trigger]` | Bounty reward per trigger in ETH |
216216

217217
### Deposit
218218

packages/zkgraph-cli/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,15 +151,15 @@ See also: [Verifier Contract Interface](https://github.com/DelphinusLab/halo2agg
151151

152152
#### Usage
153153
```bash
154-
zkgraph publish <ipfs_hash> <bounty_reward_per_trigger>
154+
zkgraph publish <ipfs_hash> [bounty_reward_per_trigger]
155155
```
156156

157157
#### Arguments
158158

159159
| Arguments | Description |
160160
| ----------------------------- | ---------------------------------------------------------- |
161161
| `<ipfs hash>` | IPFS hash of uploaded zkGraph |
162-
| `<bounty reward per trigger>` | Bounty reward per trigger in ETH |
162+
| `[bounty reward per trigger]` | Bounty reward per trigger in ETH |
163163

164164
### Deposit
165165

packages/zkgraph-cli/src/cli.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -151,16 +151,16 @@ Usage cases:
151151
})
152152

153153
cli
154-
.command('publish <ipfs_hash> <bounty_reward_per_trigger>', 'Publish and Register zkGraph Onchain')
155-
.example('zkgraph publish 0x00000000000000000000000000000000 0x00000000000000000000000000000000 100')
156-
.usage(`publish <ipfs_hash> <bounty_reward_per_trigger>
154+
.command('publish <ipfs_hash> [bounty_reward_per_trigger]', 'Publish and Register zkGraph Onchain')
155+
.example('zkgraph publish 0x00000000000000000000000000000000 0')
156+
.usage(`publish <ipfs_hash> [bounty_reward_per_trigger]
157157
158158
ipfs_hash: by finishing upload get it
159159
`)
160160
.action((ipfsHash, bountyRewardPerTrigger) => {
161161
publish({
162162
ipfsHash,
163-
bountyRewardPerTrigger,
163+
bountyRewardPerTrigger: bountyRewardPerTrigger || 0,
164164
yamlPath: config.YamlPath,
165165
wasmPath: config.WasmBinPath,
166166
jsonRpcProviderUrl: config.JsonRpcProviderUrl,

packages/zkgraph-cli/src/commands/publish.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@ export interface PublishOptions {
1717
}
1818

1919
export async function publish(options: PublishOptions) {
20-
const { ipfsHash, jsonRpcProviderUrl, userPrivateKey, bountyRewardPerTrigger, yamlPath, wasmPath, zkWasmProviderUrl } = options
20+
const { ipfsHash, jsonRpcProviderUrl, userPrivateKey, bountyRewardPerTrigger = 0, yamlPath, wasmPath, zkWasmProviderUrl } = options
2121
logger.info('>> PUBLISH ZKGRAPH')
2222
if (isNaN(bountyRewardPerTrigger)) {
2323
logger.warn('[-] BOUNTY REWARD IS NOT A VALID NUMBER.')
2424
logDivider()
2525
}
26-
const newBountyRewardPerTrigger = bountyRewardPerTrigger * 10 ** 9
26+
const newBountyRewardPerTrigger = (Number(bountyRewardPerTrigger) || 0) * 10 ** 9
2727

2828
const zkgraphYaml = zkgapi.ZkGraphYaml.fromYamlPath(yamlPath)
2929
if (!zkgraphYaml) {

0 commit comments

Comments
 (0)