Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update makeMint.rho #284

Merged
merged 1 commit into from
Apr 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 27 additions & 21 deletions src/actions/makeMint.rho
Original file line number Diff line number Diff line change
@@ -1,25 +1,31 @@
match ["myTokenMint", "inbox"] {
[name, lockerTag] => {
new
return,
lookup(`rho:registry:lookup`),
deployerId(`rho:rchain:deployerId`),
deployId(`rho:rchain:deployId`),
ch
in {
for (@{"read": *MCA, ..._} <<- @[*deployerId, "dictionary"]) {
trace!({"MCA": MCA}) |
MCA("MakeMint", ch)
} |
for (@(nonce, *MakeMint) <- ch) {
MakeMint!(*ch) |
for (aMint <- ch) {
for (@{"inbox": *inbox, ..._} <<- @{[*deployerId, lockerTag]}) {
// send the mint to my inbox for safe keeping.
inbox!(["Mint", name, *aMint], *deployId)
[name, lockerTag] => {
new
return,
rl(`rho:registry:lookup`),
deployerId(`rho:rchain:deployerId`),
deployId(`rho:rchain:deployId`),
//MakeMint(`rho:rchain:makeMint`),
ch
in {
for (@{"read": *MCA, ..._} <<- @[*deployerId, "dictionary"]) {
deployId!({"MCA": *MCA}) |
rl!(`rho:rchain:makeMint`, *ch)
} |
// for (MakeMint <- ch) {deployId!([*MakeMint, "MakeMint"] ) |
for (@(nonce, *MakeMint) <- ch) {
deployId!(["MakeMint", *MakeMint]) |
MakeMint!(*ch) |
for (aMint <- ch) {
deployId! (["aMint", *aMint]) |
for (@{"inbox": *inbox, ..._} <<- @{[*deployerId, lockerTag]}) {
//send the mint to my inbox for safe keeping.//inbox!(["issue", name, {"admin": *admin, "tally": *tally}], *return)
//inbox!(["issue", name, {"admin": *admin, "tally": *tally}], *return)
inbox!(["Mint", name, {"admin": *aMint}], *deployId) |
deployId!("Received to inbox")
}
}
}
}
}
}

}} // end of match
// end of match
Loading