Fixes to merge#676
Conversation
* Preparing the ABI package for NPM * Removing the redundant rollup config * Yarn.lock update * Updated package.json definition * Minor edit * Ingoring NPM postinstall scripts * Scaffolding the addresses file * Exporting artifacts with a deprecation warning * Amending the readme using the intended import usage * Prepopulating the upgradeable protocol contracts * Minor edit * Adding the existing PSP addresses (v1.3) * Version edit * Improved readme * Minor edit * Minor edit * Adding PUB_PINATA_JWT to .env.example * add artifacts publish github flow * Adding a placeholder for Pinata JWT in .env.example * add alpha * Removing a non relevant command on contract-tests.yml --------- Co-authored-by: Rekard0 <[email protected]>
* running test against Agung Testnet * fix typo * testing deployment * create standard json * deploy against localhost fork of peaq * uncoment test fork * add batches * add placeholder * add peaq rpc * move place holder to framework * Clean up hardhat configs and networks * keep Root permision for the deployer * add peaq verification api * remove batches used for Agung * remove fork testing * Clean up and comments
* cd: remove subgraph * add empty line * Update yarn lock
* feat: add proposals data folder to gitIgnore * feat: create script to merge the json actions * feat: add update path in the hh config file * feat: create the proposal creation call information to the script * feat: use the actions descriptions as proposal metadatat * feat: add logic to stor the metadata on ipfs and set the cid on the proposal data * feat: add proposal information to the json generated * feat: update the script to get the proposal information properly from the generated json * feat: add direction regarding how to use the script * feat: add format when storing info in json * feat: set the proposal end date in the future * feat: add test to check new deployment proposal is correct * fix typo * fix: un mark generate proposal json as async * fix: revert if something went wrong when generating the jsons * feat: validate json has all the needed info * fix: revert if something when wrong generating the calldata * fix: revert * fix: typo * fix: throw if something went wrong * feat(wip): add function to check all stages after proposal execution * feat: add check for the permission and plugin and framework state after the proposal is executed * feat: store the json to avoid losing the deployed addresses * fix: update ignored folder to the new one * feat: add folder for the script and related files * fix: update script path and test paths, add filter for identifying each plugin index on the array * fix: uncomment function call * fix: revert messages and add check for creating the file * feat: add readme describing how using the script * fix: modify upload to pinata function call to new one * feat: bump sdk version * update copy * update the enddate * Fixing the local test * add conditional skip test * don't require pinata in testing * add comment --------- Co-authored-by: Rekard0 <[email protected]> Co-authored-by: Jør∂¡ <[email protected]>
* ci:update hardhat configs * fix:prettier
* add linea and mode * Update packages/contracts/networks.ts --------- Co-authored-by: Jør∂¡ <[email protected]>
* Adding optimism artifacts * Version
update deploy npm
Adding Avalance and Base Sepolia
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - name: Checkout Repository | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Set up Node.js | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: '18' | ||
| registry-url: 'https://registry.npmjs.org/' | ||
|
|
||
| - name: Configure NPM for Scoped Package | ||
| run: | | ||
| cd packages/artifacts | ||
| SCOPE=$(jq -r '.name' package.json | cut -d'/' -f1) | ||
| echo "$SCOPE:registry=https://registry.npmjs.org/" > ~/.npmrc | ||
| echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" >> ~/.npmrc | ||
|
|
||
| - name: Get Version from package.json | ||
| id: get_version | ||
| run: | | ||
| cd packages/artifacts | ||
| VERSION=$(jq -r '.version' package.json) | ||
| TAG_VERSION="v$VERSION" | ||
| echo "VERSION=$TAG_VERSION" >> $GITHUB_ENV | ||
|
|
||
| - name: Create Git Tag | ||
| run: | | ||
| git config --global user.name "github-actions" | ||
| git config --global user.email "[email protected]" | ||
| git tag $VERSION | ||
| git push origin $VERSION | ||
|
|
||
| - name: Install Dependencies | ||
| run: | | ||
| cd packages/artifacts | ||
| yarn install | ||
|
|
||
| - name: Build Package | ||
| env: | ||
| ALCHEMY_API_KEY: ${{ secrets.ALCHEMY_API_KEY }} | ||
| run: | | ||
| cd packages/artifacts | ||
| yarn build | ||
|
|
||
| - name: Publish to NPM | ||
| env: | ||
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
| run: | | ||
| cd packages/artifacts | ||
| if [[ "$VERSION" == *"-alpha"* ]]; then | ||
| npm publish --tag alpha --access public | ||
| else | ||
| npm publish --tag latest --access public | ||
| fi |
Check warning
Code scanning / CodeQL
Workflow does not contain permissions Medium
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 7 months ago
The workflow must have a top-level permissions key (applies to all jobs) or a job-specific permissions block (applies only to that job), with permissions set only as required. To support git push (as in the "Create Git Tag" step), the job needs contents: write. For publishing to npm, the workflow uses a token provided via secrets.NPM_TOKEN, so that's not affected by GITHUB_TOKEN permissions. A minimal fix is to add permissions: contents: write at the job or workflow level above runs-on. Place this before runs-on in the affected job (publish-artifacts-to-npm).
| @@ -8,6 +8,8 @@ | ||
|
|
||
| jobs: | ||
| publish-artifacts-to-npm: | ||
| permissions: | ||
| contents: write | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: |
Description
Please include a summary of the change and be sure you follow the contributions rules we do provide here
Task ID: OS-?
Type of change
See the framework lifecycle in
packages/contracts/docs/framework-lifecycleto decide what kind of change this pull request is.Checklist:
CHANGELOG.mdfile in the root folder.DEPLOYMENT_CHECKLISTfile in the root folder.UPDATE_CHECKLISTfile in the root folder.