-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into feature/optimize-address-array
# Conflicts: # test/contracts/AddressArray.test.ts
- Loading branch information
Showing
65 changed files
with
3,830 additions
and
3,068 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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
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
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
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
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,9 +1,28 @@ | ||
module.exports = { | ||
configureYulOptimizer: true, | ||
solcOptimizerDetails: { | ||
yul: true, | ||
yulDetails: { | ||
optimizerSteps: | ||
'dhfoDgvlfnTUtnIf' + // None of these can make stack problems worse | ||
'[' + | ||
'xa[r]EscLM' + // Turn into SSA and simplify | ||
'cCTUtTOntnfDIl' + // Perform structural simplification | ||
'Lcl' + // Simplify again | ||
'Vcl [j]' + // Reverse SSA | ||
|
||
// should have good 'compilability' property here. | ||
|
||
'Tpel' + // Run functional expression inliner | ||
'xa[rl]' + // Prune a bit more in SSA | ||
'xa[r]cL' + // Turn into SSA again and simplify | ||
'gvf' + // Run full inliner | ||
'CTUca[r]LSsTFOtfDnca[r]Ilc' + // SSA plus simplify | ||
']' + | ||
'jml[jl] VcTOcl jml : fDnTOcm', // Make source short and pretty | ||
}, | ||
}, | ||
skipFiles: [ | ||
'mocks', 'tests', 'interfaces', | ||
], | ||
mocha: { | ||
grep: "@skip-on-coverage", | ||
invert: 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
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,36 @@ | ||
Contributing to 1inch | ||
======= | ||
|
||
Thanks for taking the time to contribute! All types of contributions are encouraged and valued. Please make sure to read the sections below before making your contribution. It will make it a lot easier for maintainers and speeds up the merge of your contribution. | ||
|
||
## Creating Pull Requests (PRs) | ||
|
||
As a contributor, you are expected to fork this repository, work on your own fork and then submit pull requests. The pull requests will be reviewed and eventually merged into the main repo. | ||
|
||
## A typical workflow | ||
|
||
1) Before contributing any changes it is a good practice to open an issue and provide the reasoning for the changes | ||
1) Make sure your fork is up to date with the main repository | ||
2) Update all dependencies to the latest version | ||
``` | ||
yarn | ||
``` | ||
3) Branch out from `master` into `fix/some-bug-#123` | ||
(Postfixing #123 will associate your PR with the issue #123) | ||
4) Make your changes, add your files, commit and push to your fork. | ||
Before pushing the branch ensure that: | ||
* JS and Solidity linting tests pass | ||
``` | ||
yarn lint | ||
``` | ||
* New and/or fixed features are covered with relevant tests and all existing tests pass | ||
``` | ||
yarn test | ||
``` | ||
5) Go to the GitHub repo in your web browser and issue a new pull request. | ||
6) Maintainers will review your code and possibly ask for changes before your code is pulled into the main repository. We'll check that all tests pass, review the coding style, and check for general code correctness. If everything is OK, we'll merge your pull request. | ||
|
||
## All done! | ||
|
||
If you have any questions feel free to post them in the issues section. | ||
Thanks for your time and code! |
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
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
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
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
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,7 +1,6 @@ | ||
// SPDX-License-Identifier: MIT | ||
|
||
pragma solidity ^0.8.0; | ||
pragma abicoder v1; | ||
|
||
import "./EthReceiver.sol"; | ||
|
||
|
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,8 @@ | ||
// SPDX-License-Identifier: MIT | ||
|
||
pragma solidity ^0.8.0; | ||
|
||
interface ICreate3Deployer { | ||
function deploy(bytes32 salt, bytes calldata code) external returns (address); | ||
function addressOf(bytes32 salt) external view returns (address); | ||
} |
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
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
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,40 @@ | ||
// SPDX-License-Identifier: MIT | ||
|
||
pragma solidity ^0.8.0; | ||
|
||
interface IPermit2 { | ||
struct PermitDetails { | ||
// ERC20 token address | ||
address token; | ||
// the maximum amount allowed to spend | ||
uint160 amount; | ||
// timestamp at which a spender's token allowances become invalid | ||
uint48 expiration; | ||
// an incrementing value indexed per owner,token,and spender for each signature | ||
uint48 nonce; | ||
} | ||
/// @notice The permit message signed for a single token allownce | ||
struct PermitSingle { | ||
// the permit data for a single token alownce | ||
PermitDetails details; | ||
// address permissioned on the allowed tokens | ||
address spender; | ||
// deadline on the permit signature | ||
uint256 sigDeadline; | ||
} | ||
/// @notice Packed allowance | ||
struct PackedAllowance { | ||
// amount allowed | ||
uint160 amount; | ||
// permission expiry | ||
uint48 expiration; | ||
// an incrementing value indexed per owner,token,and spender for each signature | ||
uint48 nonce; | ||
} | ||
|
||
function transferFrom(address user, address spender, uint160 amount, address token) external; | ||
|
||
function permit(address owner, PermitSingle memory permitSingle, bytes calldata signature) external; | ||
|
||
function allowance(address user, address token, address spender) external view returns (PackedAllowance memory); | ||
} |
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
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
Oops, something went wrong.