Aqua-sc package is meant to be single source of truth when it comes to contracts versioning and their deployed addresses. It also contains typechain typings so in theory rest of aqua-* projects doesn't have to generate them by themselves.
The heart of this PR is bundle.ts file. It:
gathers addresses of deployed contracts from deployments folder and builds ts interface to use them on FE,
copies selected artifacts from build folder and runs typechain on them,
run tsc to create js files
Everything is put to aqua-sc folder which has it's own package.json with publishing config. So far, package is published from my personal npm account. For now only I am able to publish it.
When it comes to versioning I suggest following pattern (used by react team):
development builds will be released as prereleases on v0.0.0-dev. This way on any dev branch of aqua-* projects aqua-sc can be set as dependency in package.json as follows:
"aqua-sc": ">=0.0.0-dev.0 <0.0.0"
This way after npm/yarn install newest dev version of aqua-sc should be installed.
production builds will follow regular semversioning aad it's subject for further discussion
Next steps:
discussing how we're gonna version prod builds,
getting access to @dxdao namespace and publish aqua-sc there and make sure that aqua team has permissions to publish on this workspace
integrating aqua-sc package with the rest of aqua projects
making sure that all required addresses/artifacts/typings are included in the package
considering changing next branch of SC repo to dev so we are consistent with rest of the projects and with npm versioning
considering connecting SC repo tags/releases with npm tags/releases
Types of changes
[ ] Bug fix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)
Checklist:
[x] My code follows the code style of this project.
[x] My change requires a change to the documentation.
Description
Aqua-sc package is meant to be single source of truth when it comes to contracts versioning and their deployed addresses. It also contains
typechain
typings so in theory rest of aqua-* projects doesn't have to generate them by themselves.The heart of this PR is
bundle.ts
file. It:deployments
folder and builds ts interface to use them on FE,build
folder and runstypechain
on them,tsc
to createjs
filesEverything is put to
aqua-sc
folder which has it's ownpackage.json
with publishing config. So far, package is published from my personal npm account. For now only I am able to publish it.When it comes to versioning I suggest following pattern (used by react team):
aqua-sc
can be set as dependency inpackage.json
as follows:This way after
npm/yarn install
newest dev version ofaqua-sc
should be installed.Next steps:
@dxdao
namespace and publishaqua-sc
there and make sure that aqua team has permissions to publish on this workspaceaqua-sc
package with the rest of aqua projectsnext
branch of SC repo todev
so we are consistent with rest of the projects and with npm versioningTypes of changes
Checklist: