Skip to content

Commit

Permalink
Merge pull request #425 from yvonnezhangc/release_v2_2
Browse files Browse the repository at this point in the history
Fiat Token v2.2
  • Loading branch information
yvonnezhangc authored Nov 9, 2023
2 parents 0d3cab1 + dd6fb33 commit 405efc1
Show file tree
Hide file tree
Showing 168 changed files with 12,050 additions and 6,761 deletions.
18 changes: 18 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
/**
* SPDX-License-Identifier: Apache-2.0
*
* Copyright (c) 2023, Circle Internet Financial, LLC.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

module.exports = {
root: true,
env: {
Expand Down
15 changes: 0 additions & 15 deletions .githooks/pre-commit

This file was deleted.

11 changes: 11 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
## Summary

## Detail

## Testing

## Documentation

---

**Requested Reviewers:** @mention
33 changes: 33 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Continuous Integration
on:
pull_request:

jobs:
run_ci_tests:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v3

- name: Install Node
uses: actions/setup-node@v3
with:
node-version: "16.14.0"

- name: Install Yarn
run: npm install -g [email protected]

- name: Install packages
run: yarn install --frozen-lockfile

- name: Setup local environment
run: cp config.js.example config.js && ./start-ganache.sh

- name: Run static checks
run: yarn static-check

- name: Run size check
run: yarn contract-size

- name: Run tests
run: yarn test
12 changes: 11 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,16 @@ validate/apikey.infura
ganache-blockchain-log.txt
.coverage_artifacts
.coverage_contracts
yarn-error.log
@types/generated/
config.js
blacklist.*.json
!blacklist.test.json
out/
cache/

# Yarn & Node Modules
yarn-error.log
node_modules/

logs/
pids/
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

yarn precommit
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v16.14.0
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ coverage.json
build/
.coverage_contracts/
.coverage_artifacts/
LICENSE
18 changes: 18 additions & 0 deletions .solcover.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
/**
* SPDX-License-Identifier: Apache-2.0
*
* Copyright (c) 2023, Circle Internet Financial, LLC.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

module.exports = {
providerOptions: {
port: 8555,
Expand Down
14 changes: 0 additions & 14 deletions .travis.yml

This file was deleted.

3 changes: 2 additions & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"recommendations": [
"dbaeumer.vscode-eslint",
"esbenp.prettier-vscode",
"juanblanco.solidity"
"juanblanco.solidity",
"ymotongpoo.licenser"
]
}
14 changes: 8 additions & 6 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
{
"files.exclude": {
"**/.DS_Store": true,
"**/node_modules/": true
},
"solidity.packageDefaultDependenciesContractsDirectory": "",
"solidity.packageDefaultDependenciesDirectory": "node_modules",
"solidity.formatter": "none",
Expand All @@ -21,9 +17,15 @@
},
"[solidity]": {
"editor.tabSize": 4,
"editor.formatOnSave": true
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[typescript]": {
"editor.formatOnSave": true
}
},
"typescript.tsdk": "node_modules/typescript/lib",
"licenser.license": "Custom",
"licenser.customHeader": "SPDX-License-Identifier: Apache-2.0\n\nCopyright (c) @YEAR@, Circle Internet Financial, LLC.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.",
"licenser.useSingleLineStyle": false,
"files.autoSave": "onFocusChange"
}
35 changes: 35 additions & 0 deletions @types/AnyFiatTokenV2Instance.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
/**
* SPDX-License-Identifier: Apache-2.0
*
* Copyright (c) 2023, Circle Internet Financial, LLC.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

import {
FiatTokenV2Instance,
FiatTokenV21Instance,
FiatTokenV22Instance,
} from "./generated";

export interface FiatTokenV22InstanceExtended extends FiatTokenV22Instance {
permit?: typeof FiatTokenV2Instance.permit;
transferWithAuthorization?: typeof FiatTokenV2Instance.transferWithAuthorization;
receiveWithAuthorization?: typeof FiatTokenV2Instance.receiveWithAuthorization;
cancelAuthorization?: typeof FiatTokenV2Instance.cancelAuthorization;
}

export type AnyFiatTokenV2Instance =
| FiatTokenV2Instance
| FiatTokenV21Instance
| FiatTokenV22InstanceExtended;
18 changes: 18 additions & 0 deletions @types/TransactionRawLog.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
/**
* SPDX-License-Identifier: Apache-2.0
*
* Copyright (c) 2023, Circle Internet Financial, LLC.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

export interface TransactionRawLog {
logIndex: number;
transactionIndex: number;
Expand Down
47 changes: 47 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Changelog

## 2.2.0 (2023-11-09)

- Add ERC-1271 signature validation support to EIP-2612 and EIP-3009 functions
- Combine the balance state and the blacklist state for an address in a
`balanceAndBlacklistStates` map to reduce gas usage
- Update `DOMAIN_SEPARATOR` to be a dynamic value
- Remove `notBlacklisted` modifiers for `approve`, `increaseAllowance`,
`decreaseAllowance` and `permit`
- Enable bypassing `TIMESTAMP` opcode in `permit` by using `uint256.max`

## 2.1.1 (2021-06-03)

- Add the multi-issuer minter contracts from the `multi-issuer` branch

## 2.1.0 (2021-02-17)

- Move locked USDC to a "lost and found" address and blacklists itself so that
accidental sends will no longer be possible
- Conform to EIP-3009 in FiatToken
- Add `receiveWithAuthorization`
- Remove `approveWithAuthorization`, `increaseAllowanceWithAuthorization` and
`decreaseAllowanceWithAuthorization`

## 2.0.0 (2020-07-30)

- Add support for EIP-2612 in FiatToken
- Add `transferWithAuthorization`, `approveWithAuthorization`,
`increaseAllowanceWithAuthorization`, `decreaseAllowanceWithAuthorization` to
enable ETH-less transactions
- Add `increaseAllowance` and `decreaseAllowance` to mitigate the
multi-withdrawal attack vulnerability in ERC-20 `approve` function
- Update Solidity version to `0.6.12`

## 1.1.0 (2020-05-27)

- Add Rescuable functionalities to FiatToken
- Update Solidity version to `0.6.8`
- Remove `ifAdmin` modifier from admin() and implementation() in FiatTokenProxy

## 1.0.0 (2018-07-24)

- Create ERC-20 compliant FiatToken contract
- Add Ownable, Pausable and Blacklistable functionalities to FiatToken
- Create FiatTokenProxy contracts based on Zeppelinos's Unstructured-Storage
Proxy pattern
6 changes: 0 additions & 6 deletions Dockerfile.ganache

This file was deleted.

8 changes: 0 additions & 8 deletions Dockerfile.truffle

This file was deleted.

Loading

0 comments on commit 405efc1

Please sign in to comment.