Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions .github/workflows/npm-dist-tag.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Set npm dist-tag

on:
workflow_dispatch:
inputs:
version:
description: 'Version to tag (e.g. 5.6.0-rc.1)'
required: true
type: string
tag:
description: 'dist-tag to set'
required: true
default: latest
type: string

jobs:
dist-tag:
name: Tag ${{ inputs.version }} as ${{ inputs.tag }}
environment: npm
runs-on: ubuntu-latest
steps:
- name: Authenticate to npm
# Intentionally escape $ to avoid interpolation and writing the token to disk
run: echo "//registry.npmjs.org/:_authToken=\${NPM_TOKEN}" > .npmrc
- name: Set dist-tag on both packages
run: |
npm dist-tag add "@openzeppelin/tron-contracts@$VERSION" "$TAG"
npm dist-tag add "@openzeppelin/tron-contracts-upgradeable@$VERSION" "$TAG"
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
VERSION: ${{ inputs.version }}
TAG: ${{ inputs.tag }}
156 changes: 45 additions & 111 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion test/utils/cryptography/MerkleProof.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,10 @@ describe('MerkleProof', function () {
const root = nodeHash(leave, ethers.ZeroHash);

// Now we can pass any **malicious** fake leaves as valid!
const maliciousLeaves = ['malicious', 'leaves'].map(ethers.id).map(ethers.toBeArray).sort(Buffer.compare);
const maliciousLeaves = ['malicious', 'leaves']
.map(ethers.id)
.map(id => ethers.toBeArray(id))
.sort(Buffer.compare);
const maliciousProof = [leave, leave];
const maliciousProofFlags = [true, true, false];

Expand Down
Loading