-
Notifications
You must be signed in to change notification settings - Fork 206
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(vats): add home.registrar and home.moolah
- Loading branch information
1 parent
3af19e3
commit 4b8ce42
Showing
6 changed files
with
64 additions
and
45 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import harden from '@agoric/harden'; | ||
import { makeMint } from '@agoric/ertp/core/mint'; | ||
|
||
// This vat contains the registrar for the demo. | ||
|
||
function build(E, log) { | ||
const sharedMoolahMint = makeMint('moolah'); | ||
|
||
function getSomeMoolah(nickname) { | ||
return sharedMoolahMint.mint(1000, `${nickname}'s moolah purse`); | ||
} | ||
|
||
return harden({ getSomeMoolah }); | ||
} | ||
|
||
export default function setup(syscall, state, helpers) { | ||
return helpers.makeLiveSlots( | ||
syscall, | ||
state, | ||
E => build(E, helpers.log), | ||
helpers.vatID, | ||
); | ||
} |
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,23 @@ | ||
import harden from '@agoric/harden'; | ||
import { makeRegistrar } from '@agoric/ertp/more/registrar/registrar'; | ||
|
||
// This vat contains the registrar for the demo. | ||
|
||
function build(E, log) { | ||
const sharedRegistrar = makeRegistrar(); | ||
|
||
function getSharedRegistrar() { | ||
return sharedRegistrar; | ||
} | ||
|
||
return harden({ getSharedRegistrar }); | ||
} | ||
|
||
export default function setup(syscall, state, helpers) { | ||
return helpers.makeLiveSlots( | ||
syscall, | ||
state, | ||
E => build(E, helpers.log), | ||
helpers.vatID, | ||
); | ||
} |
This file was deleted.
Oops, something went wrong.