forked from Agoric/agoric-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: switch
waitForBlock
with sync tools, WIP
- Loading branch information
1 parent
195dc7b
commit 2f8cfe4
Showing
6 changed files
with
175 additions
and
42 deletions.
There are no files selected for viewing
33 changes: 33 additions & 0 deletions
33
a3p-integration/proposals/z:acceptance/invitation-test-submission/send-script.js
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,33 @@ | ||
/* global E */ | ||
|
||
/// <reference types="@agoric/vats/src/core/core-eval-env"/> | ||
/// <reference types="@agoric/vats/src/core/types-ambient"/> | ||
|
||
/** | ||
* The primary purpose of this script is to access the depositFacet of a given address | ||
* via the namesByAddress and then send a payment to it. | ||
* | ||
* The agoric1ee9hr0jyrxhy999y755mp862ljgycmwyp4pl7q placeholder should be replaced with the desired address before use. | ||
* | ||
* The payment in this case is an invitation to add collateral to the reserve. | ||
* However, the use of the reserve is incidental and simply provides an easy payment to construct. | ||
* | ||
* see a3p-integration/proposals/z:acceptance/wallet.test.js | ||
* | ||
* @param {BootstrapPowers} powers | ||
*/ | ||
const sendIt = async powers => { | ||
const addr = 'agoric1ee9hr0jyrxhy999y755mp862ljgycmwyp4pl7q'; | ||
const { | ||
consume: { namesByAddress, zoe }, | ||
instance: { | ||
consume: { reserve }, | ||
}, | ||
} = powers; | ||
const pf = E(zoe).getPublicFacet(reserve); | ||
const anInvitation = await E(pf).makeAddCollateralInvitation(); | ||
const addressDepositFacet = E(namesByAddress).lookup(addr, 'depositFacet'); | ||
await E(addressDepositFacet).receive(anInvitation); | ||
}; | ||
|
||
sendIt; |
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