Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
nebula
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
exchain
nebula
Commits
d49910af
Commit
d49910af
authored
Mar 02, 2023
by
Will Cory
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update cli and missing import
parent
36da4222
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
1 deletion
+13
-1
cli.ts
packages/atst/src/cli.ts
+11
-1
index.ts
packages/atst/src/index.ts
+2
-0
No files found.
packages/atst/src/cli.ts
View file @
d49910af
...
...
@@ -26,6 +26,7 @@ cli
})
.
example
(
()
=>
// note: private key is just the first testing address when running anvil
`atst read --key "optimist.base-uri" --about 0x2335022c740d17c2837f9C884Bfe4fFdbf0A95D5 --creator 0x60c5C9c98bcBd0b0F2fD89B24c16e533BaA8CdA3`
)
.
action
(
async
(
options
:
ReadOptions
)
=>
{
...
...
@@ -72,6 +73,8 @@ cli
`atst write --key "optimist.base-uri" --about 0x2335022c740d17c2837f9C884Bfe4fFdbf0A95D5 --value "my attestation" --private-key 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 --rpc-url http://localhost:8545`
)
.
action
(
async
(
options
:
WriteOptions
)
=>
{
const
spinner
=
logger
.
spinner
()
spinner
.
start
(
'
Writing attestation...
'
)
const
{
write
}
=
await
import
(
'
./commands/write
'
)
// TODO use the native api to do this instead of parsing the raw args
...
...
@@ -86,9 +89,16 @@ cli
:
options
.
contract
await
write
({
...
options
,
about
,
privateKey
,
contract
})
.
then
((
res
)
=>
{
spinner
.
succeed
(
'
Attestation written!
'
)
logger
.
info
(
`Attestation hash:
${
res
}
`
)
})
.
catch
((
e
)
=>
{
logger
.
error
(
e
)
spinner
.
fail
(
'
Attestation failed!
'
)
})
})
cli
.
help
()
cli
.
version
(
packageJson
.
version
)
void
(
async
()
=>
{
...
...
packages/atst/src/index.ts
View file @
d49910af
...
...
@@ -28,3 +28,5 @@ export type { AttestationCreatedEvent } from './types/AttestationCreatedEvent'
export
type
{
AttestationReadParams
}
from
'
./types/AttestationReadParams
'
export
type
{
DataTypeOption
}
from
'
./types/DataTypeOption
'
export
type
{
WagmiBytes
}
from
'
./types/WagmiBytes
'
// react
export
*
from
'
./react
'
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment