You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, agoric deploy runs dapp deploy scripts using standardthings/esm. This is the only remaining vestige of #527, which migrated all Agoric code off of this legacy emulation of ESM. This leaves us in a working state, but with a complication that may perplex ecosystem developers as they encounter differences in how module imports work between normal code and deployment code.
Description of the Design
With #3686, it will be possible to deploy with Node.js ESM (NESM) instead of node -r esm (RESM).
With Agoric/dapp-fungible-faucet#26, it will be possible to use agoric init --dapp-branch nesm to create new dapps based on Node.js ESM. This may eventually become the default, though making it the default now would break deployments of agoric-cli that predate #3686. It may be more convenient in the short term to change the default branch of dapp-fungible-faucet to nesm.
Once #3686 lands though, there will be little reason to continue using RESM for Agoric’s own dapps. This issue tracks the conversion of our existing collection of dapps.
dapp-fungible-faucet
dapp-card-store
dapp-otc
dapp-oracle
dapp-pegasus
dapp-autoswap (errors on sendBroadcast)
dapp-simple-exchange (errors on sendBroadcast)
dapp-svelte-wallet (in agoric-sdk)
dapp-treasury
documentation
Security Considerations
Deploy scripts are run without containment and have all of the authority of the user running agoric deploy. This is currently expected and we have not made other designs.
Test Plan
yarn integration-test in agoric-sdk/packages/agoric-cli verifies that dapp-fungible-faucet is a viable template with a working deploy script. Manually changing the default branch to nesm verifies that the Node.js ESM branch is also suitable. Each dapp should have its own integration test that runs a similar workflow.
The text was updated successfully, but these errors were encountered:
What is the Problem Being Solved?
Currently,
agoric deploy
runs dapp deploy scripts usingstandardthings/esm
. This is the only remaining vestige of #527, which migrated all Agoric code off of this legacy emulation of ESM. This leaves us in a working state, but with a complication that may perplex ecosystem developers as they encounter differences in how module imports work between normal code and deployment code.Description of the Design
With #3686, it will be possible to deploy with Node.js ESM (NESM) instead of
node -r esm
(RESM).With Agoric/dapp-fungible-faucet#26, it will be possible to use
agoric init --dapp-branch nesm
to create new dapps based on Node.js ESM. This may eventually become the default, though making it the default now would break deployments ofagoric-cli
that predate #3686. It may be more convenient in the short term to change the default branch ofdapp-fungible-faucet
tonesm
.Once #3686 lands though, there will be little reason to continue using RESM for Agoric’s own dapps. This issue tracks the conversion of our existing collection of dapps.
Security Considerations
Deploy scripts are run without containment and have all of the authority of the user running
agoric deploy
. This is currently expected and we have not made other designs.Test Plan
yarn integration-test
inagoric-sdk/packages/agoric-cli
verifies thatdapp-fungible-faucet
is a viable template with a working deploy script. Manually changing the default branch tonesm
verifies that the Node.js ESM branch is also suitable. Each dapp should have its own integration test that runs a similar workflow.The text was updated successfully, but these errors were encountered: