-
Notifications
You must be signed in to change notification settings - Fork 88
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: candid assist * add identity and canister * fix * changelog * only load unencrypted identities * clippy * add test * fix install prompts * adjust principals and add test for deploy * fix * fix --------- Co-authored-by: Jason <[email protected]>
- Loading branch information
1 parent
e5c9211
commit df4b628
Showing
18 changed files
with
248 additions
and
29 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,7 @@ | ||
actor class C(p: { x: Nat; y: Int }) { | ||
type Profile = { name: Principal; kind: {#admin; #user; #guest }; age: ?Nat8; }; | ||
type List = (Profile, ?List); | ||
public query func echo(x: List) : async List { | ||
x | ||
} | ||
}; |
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 @@ | ||
jq '.canisters.hello_backend.main="echo.mo"' dfx.json | sponge dfx.json |
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,59 @@ | ||
#!/usr/bin/expect -df | ||
|
||
set timeout 30 | ||
match_max 100000 | ||
|
||
spawn dfx deploy | ||
|
||
send "42\r" | ||
send "42\r" | ||
expect "Sending the following argument:\r | ||
(record { x = 42 : nat; y = 42 : int })\r | ||
\r | ||
Do you want to initialize the canister with this argument? \[y/N\]\r | ||
" | ||
send "y\r" | ||
expect eof | ||
|
||
spawn dfx canister call hello_backend echo | ||
|
||
# principal auto-completion | ||
send "hello " | ||
expect "bkyz2-fmaaa-aaaaa-qaaaq-cai" | ||
send "\r" | ||
# opt nat8 | ||
send "y" | ||
send "20" | ||
send "\r" | ||
# variant down arrow: user | ||
send "\[B" | ||
send "\[B" | ||
send "\r" | ||
send "n" | ||
expect "Sending the following argument:\r | ||
(\r | ||
record {\r | ||
record {\r | ||
id = principal \"bkyz2-fmaaa-aaaaa-qaaaq-cai\";\r | ||
age = opt (20 : nat8);\r | ||
role = variant { user };\r | ||
};\r | ||
null;\r | ||
},\r | ||
)\r | ||
\r | ||
Do you want to send this message? \[y/N\]\r | ||
" | ||
send "y\r" | ||
expect "y\r | ||
(\r | ||
record {\r | ||
record {\r | ||
id = principal \"bkyz2-fmaaa-aaaaa-qaaaq-cai\";\r | ||
age = opt (20 : nat8);\r | ||
role = variant { user };\r | ||
};\r | ||
null;\r | ||
},\r | ||
)\r" | ||
expect eof |
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
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
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
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
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
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
Oops, something went wrong.