-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use solc internally to resolve inputs
- Loading branch information
Showing
11 changed files
with
2,403 additions
and
1,848 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,39 @@ | ||
name: checks | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
push: | ||
branches: [main] | ||
|
||
env: | ||
CI: true | ||
CI: true | ||
|
||
jobs: | ||
checks: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 22 | ||
checks: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 22 | ||
|
||
- name: Get yarn cache directory path | ||
id: yarn-cache-dir-path | ||
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT | ||
- name: Use cached node_modules | ||
uses: actions/cache@v4 | ||
id: yarn-cache | ||
with: | ||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | ||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-yarn- | ||
- name: Get yarn cache directory path | ||
id: yarn-cache-dir-path | ||
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT | ||
- name: Use cached node_modules | ||
uses: actions/cache@v4 | ||
id: yarn-cache | ||
with: | ||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | ||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-yarn- | ||
- name: Install | ||
run: yarn install --immutable | ||
- name: Install | ||
run: yarn install --immutable | ||
|
||
- name: Lint | ||
run: yarn lint | ||
- name: Lint | ||
run: yarn lint | ||
|
||
- name: Test | ||
run: yarn test | ||
- name: Test | ||
run: yarn test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,46 +1,46 @@ | ||
name: NPM Release | ||
|
||
on: | ||
release: | ||
types: [released] | ||
release: | ||
types: [released] | ||
|
||
env: | ||
CI: true | ||
CI: true | ||
|
||
jobs: | ||
publish: | ||
name: Build & Publish to NPM | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 22.x | ||
|
||
- name: Install | ||
run: yarn install --immutable | ||
|
||
- name: Build | ||
run: yarn build | ||
|
||
- name: Set version | ||
run: npm version --no-git-tag-version ${{github.event.release.tag_name}} | ||
|
||
- name: npm pack | ||
run: npm pack | ||
|
||
- uses: actions/upload-artifact@v3 | ||
with: | ||
name: package | ||
path: "parity-revive-*.tgz" | ||
|
||
- uses: octokit/[email protected] | ||
with: | ||
route: POST /repos/paritytech/npm_publish_automation/actions/workflows/publish.yml/dispatches | ||
ref: main | ||
inputs: '${{ format(''{{ "repo": "{0}", "run_id": "{1}" }}'', github.repository, github.run_id) }}' | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.NPM_PUBLISH_AUTOMATION_TOKEN }} | ||
publish: | ||
name: Build & Publish to NPM | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 22.x | ||
|
||
- name: Install | ||
run: yarn install --immutable | ||
|
||
- name: Build | ||
run: yarn build | ||
|
||
- name: Set version | ||
run: npm version --no-git-tag-version ${{github.event.release.tag_name}} | ||
|
||
- name: npm pack | ||
run: npm pack | ||
|
||
- uses: actions/upload-artifact@v3 | ||
with: | ||
name: package | ||
path: 'parity-revive-*.tgz' | ||
|
||
- uses: octokit/[email protected] | ||
with: | ||
route: POST /repos/paritytech/npm_publish_automation/actions/workflows/publish.yml/dispatches | ||
ref: main | ||
inputs: '${{ format(''{{ "repo": "{0}", "run_id": "{1}" }}'', github.repository, github.run_id) }}' | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.NPM_PUBLISH_AUTOMATION_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"trailingComma": "es5", | ||
"tabWidth": 4, | ||
"semi": false, | ||
"singleQuote": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// SPDX-License-Identifier: MIT | ||
// Compatible with OpenZeppelin Contracts ^5.0.0 | ||
pragma solidity ^0.8.22; | ||
|
||
import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; | ||
import "@openzeppelin/contracts/access/Ownable.sol"; | ||
import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol"; | ||
|
||
contract MyToken is ERC20, Ownable, ERC20Permit { | ||
constructor(address initialOwner) | ||
ERC20("MyToken", "MTK") | ||
Ownable(initialOwner) | ||
ERC20Permit("MyToken") | ||
{ | ||
_mint(msg.sender, 100 * 10 ** decimals()); | ||
} | ||
|
||
function mint(address to, uint256 amount) public onlyOwner { | ||
_mint(to, amount); | ||
} | ||
} | ||
|
Oops, something went wrong.