-
Notifications
You must be signed in to change notification settings - Fork 217
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: freshen the simple exchange dApp
Refs #646 It should at least compile, deploy, and run.
- Loading branch information
1 parent
d84ee30
commit 82f634f
Showing
14 changed files
with
146 additions
and
312 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
dappConstants.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 |
---|---|---|
@@ -1,8 +1,18 @@ | ||
// Agoric Dapp api deployment script | ||
|
||
export default async function deployApi(homeP, { bundleSource, pathResolve }) { | ||
const { source, moduleFormat } = await bundleSource('./handler.js'); | ||
let overrideInstanceId; | ||
const dc = `${process.cwd()}/dappConstants.js`; | ||
try { | ||
require(dc); | ||
overrideInstanceId = __DAPP_CONSTANTS__.CONTRACT_ID; | ||
} catch (e) { | ||
console.log(`Proceeeding with defaults; cannot load ${dc}:`, e.message); | ||
} | ||
|
||
const { source, moduleFormat } = await bundleSource(pathResolve('./handler.js')); | ||
const handlerInstall = homeP~.spawner~.install(source, moduleFormat); | ||
const handler = handlerInstall~.spawn(); | ||
const [zoe, registrar] = await Promise.all([homeP~.zoe, homeP~.registrar]); | ||
const handler = handlerInstall~.spawn({zoe, registrar, overrideInstanceId}); | ||
await homeP~.http~.registerCommandHandler(handler); | ||
} |
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 was deleted.
Oops, something went wrong.
203 changes: 0 additions & 203 deletions
203
packages/dapp-simple-exchange/contract/deploy-autoswap.js
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.