⚠️ ALPHA: This is an ALPHA release. Deployed addresses will change for the upcoming BETA. The on-chain API will be finalized by BETA; future updates will avoid breaking changes by introducing new plugin versions only.
An on-chain plugin-driven store for publishing and distributing application builds.
- BSC Testnet (chainId 97)
- RPC:
https://bsc-testnet.publicnode.com
- RPC:
| Contract | Address |
|---|---|
| Multicall | 0x3f7AdDD276bC5c1a2Fffb329DD718f1fa0625D84 |
| ContractStorage | 0x66E4Ae87d237A7630CF1acf9EA32E027bF2096c2 |
| PublisherAccountFactory | 0x7bf2b3901E3198268ec071F43A08dBD365017354 |
| AssetlinksOracle | 0xCA21F6ab7D9Cf14444028394016066778Cbe1B4B |
| OpenStoreRequestHandlerV0 | 0x5f56DccEfe191f1FBf1ca12600D71D1aCABf1298 |
| OpenStoreV0 | 0x4dc802c0E64Eb0C9d9b278F70b6a7d6e21908a46 |
| AppOwnerPluginV1 | 0xD2dfb8a2D0f2b90f3F912566F4c4Fb0a3e9Bc336 |
| AppBuildsPluginV1 | 0xe00e09e2028046DE01C9aEc7C683cF0ce08016B1 |
| AppDistributionPluginV1 | 0x76F7A70d7eCf4483Fa08D10511F997c97b247737 |
| PublisherAccountAppsPluginV1 | 0x374DA7507CB00FAEc54fa4226eF6c45eC99bA2E4 |
| PublisherGreenfieldPluginV1 | 0xaE3f8bD0a3112aE5860a72DE494A238997210756 |
- Node.js 18+
- Yarn 1.x
yarn installCreate a .env file in the project root.
DEPLOY_PK=
DEPLOY_ADDRESS=
TEST_PK=
TEST_ADDRESS=
BSCSCAN_API=
# Optional for gas report
REPORT_GAS=true
CMC_API=
# Optional for ABI export
CONTRACT_TS_DIRS=
CONTRACTS_JSON_DIRS=
# Required for graph.ts
PUBLISHER_FACTORY=For simplicity the multicall address is hardcoded. Update it to match your deployment:
- In
contracts/multicall/Trustable.sol, changeaddress private constant MULTICALL = 0x3f7AdDD276bC5c1a2Fffb329DD718f1fa0625D84;to yourTrustedMulticalladdress. - In
test/utils/multicall.ts, changeEXPECTED_MULTICALL_PROD_ADDRESSandEXPECTED_MULTICAST_TEST_ADDRESSto your addresses.
❗️ Important: If these are not updated, authorization checks will fail and calls restricted by
onlyMulticallwill revert.
- Local Hardhat node
yarn lh- Compile contracts
yarn compile- Run tests
yarn test:main
yarn test:lh- Coverage and size reports
yarn coverage
yarn size- Generate ABIs
Exports contract ABIs based on directories specified in environment variables:
CONTRACT_TS_DIRS: colon-separated directories to export ABIs as TypeScript modulesCONTRACTS_JSON_DIRS: colon-separated directories to export ABIs as JSON files
yarn abi- Insert SPDX licenses into all .sol files
yarn license:spdx- Deploy
Requires DEPLOY_PK and DEPLOY_ADDRESS. Optionally set BSCSCAN_API to enable source verification.
yarn deploy:lh
yarn deploy:bsctest
yarn deploy:bsc- Verify on BscScan
Requires BSCSCAN_API.
yarn verify:lh
yarn verify:bsctest
yarn verify:bsc- Developer tools
yarn dev:lh
yarn dev:bsctest- Interact via CLI
Requires TEST_PK and TEST_ADDRESS.
yarn cli:lh
yarn cli:bsctest- abi.ts: export ABIs
CONTRACT_TS_DIRS: directories split by:for TS outputsCONTRACTS_JSON_DIRS: directories split by:for JSON outputs
- spdx.ts: insert licenses into all
.solfiles - manager.ts: helpers to interact with contracts
- dev.ts: internal tool to interact/test contracts
- deployer.ts: helper class to deploy contracts in local or any env
- deploy.ts: deploy contracts to Testnet/Mainnet
DEPLOY_PK: deploy PK URLDEPLOY_ADDRESS: should be retrieved fromDEPLOY_PKfor safetyBSCSCAN_API: set to enable contract verification (upload sources)
- defaults.ts: default data for testing
- cli.ts: localhost/testnet deploy tool; uses
TEST_PKandTEST_ADDRESS
Hardhat network configuration is defined in hardhat.config.ts.
bsctestuses chainId 97 and readsDEPLOY_PKfrom the environment.
- ABIs are exported to
reports/abiafter runningyarn abi. - Typechain types are generated under
typechain-typesduring compile.
See LICENSE.