Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SC-932][SC-936][SC-937][SC-960] Fusion as extension to LOP #128

Merged
merged 33 commits into from
Nov 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
06a4c8f
first impl
ZumZoom Sep 21, 2023
600fbf4
add measure gas test
ZumZoom Sep 21, 2023
3f1ef67
cleanup
ZumZoom Sep 21, 2023
2febf59
simplify
ZumZoom Sep 21, 2023
7c4cc0e
bump limit-order version
ZumZoom Oct 4, 2023
240b13c
Merge branch 'master' into feature/remove-settlement-contract
ZumZoom Oct 6, 2023
25f2a2f
linter
ZumZoom Oct 6, 2023
8a13cbd
use ceilDiv
ZumZoom Oct 6, 2023
3c76442
reorder internal functions
ZumZoom Oct 6, 2023
53abdbb
round resolver fee down
ZumZoom Oct 6, 2023
1fbefae
Fix some tests w/o Settlement and WhitelistChecker
zZoMROT Oct 10, 2023
c2d4ded
Add ResolverMock
zZoMROT Oct 24, 2023
606b68d
Patch buildCalldataForOrder method in tests for SettlementExt
zZoMROT Oct 24, 2023
a7fa656
Fix some tests (permits and integrationFee)
zZoMROT Oct 24, 2023
9986097
Fix Settlement tests except auction point tests
zZoMROT Oct 25, 2023
78e2106
Fix linter
zZoMROT Oct 25, 2023
6006484
Fix WhitelistChecker tests
zZoMROT Oct 25, 2023
d040914
Refactor tests
zZoMROT Oct 25, 2023
ab9f152
Add measure gas tests
zZoMROT Oct 25, 2023
16ebdd2
Remove deprecated todo
zZoMROT Oct 25, 2023
dafd979
Refactored tests
zZoMROT Oct 26, 2023
9587d91
Fix getrateBump
zZoMROT Oct 26, 2023
4496885
Fix and add test with points
zZoMROT Oct 27, 2023
66eeb67
Try to fix CI tests
zZoMROT Oct 27, 2023
636f07d
Refactor
zZoMROT Oct 27, 2023
277137a
Refactor ResolverMock
zZoMROT Oct 27, 2023
8027e26
simplify
ZumZoom Nov 1, 2023
224b225
linter
ZumZoom Nov 1, 2023
7d6f426
fix comment
ZumZoom Nov 1, 2023
c37572d
better revert handling
ZumZoom Nov 1, 2023
84567ad
linter
ZumZoom Nov 1, 2023
74c51ce
update settlement-v1-tag
ZumZoom Nov 1, 2023
5661888
rollback order flow in tests
ZumZoom Nov 1, 2023
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
1,573 changes: 1,573 additions & 0 deletions artifacts-v1/LimitOrderProtocolV3.json

Large diffs are not rendered by default.

76 changes: 76 additions & 0 deletions artifacts-v1/ResolverV1Mock.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
{
"_format": "hh-sol-artifact-1",
"contractName": "ResolverV1Mock",
"sourceName": "ResolverV1Mock.sol",
"abi": [
{
"inputs": [
{
"internalType": "address",
"name": "settlement",
"type": "address"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "index",
"type": "uint256"
},
{
"internalType": "bytes",
"name": "reason",
"type": "bytes"
}
],
"name": "FailedExternalCall",
"type": "error"
},
{
"inputs": [],
"name": "OnlyOwner",
"type": "error"
},
{
"inputs": [],
"name": "OnlySettlement",
"type": "error"
},
{
"inputs": [],
"name": "SafeTransferFailed",
"type": "error"
},
{
"inputs": [
{
"internalType": "address",
"name": "resolver",
"type": "address"
},
{
"internalType": "bytes",
"name": "tokensAndAmounts",
"type": "bytes"
},
{
"internalType": "bytes",
"name": "data",
"type": "bytes"
}
],
"name": "resolveOrders",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
}
],
"bytecode": "0x60c060405234801561001057600080fd5b506040516109dd3803806109dd83398101604081905261002f91610044565b6001600160a01b03166080523360a052610074565b60006020828403121561005657600080fd5b81516001600160a01b038116811461006d57600080fd5b9392505050565b60805160a051610946610097600039600060b601526000605d01526109466000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c80631944799f14610030575b600080fd5b61004361003e366004610485565b610045565b005b3373ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016146100b4576040517f15b3197600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614610139576040517f5fc483c500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006101458284610521565b9050602082111561027f57600080610160846020818861055e565b81019061016d9190610731565b9150915060005b825181101561027b576000806101a0858481518110610195576101956107ea565b602002602001015190565b73ffffffffffffffffffffffffffffffffffffffff168484815181106101c8576101c86107ea565b60200260200101516040516101dd919061083d565b6000604051808303816000865af19150503d806000811461021a576040519150601f19603f3d011682016040523d82523d6000602084013e61021f565b606091505b5091509150816102685782816040517ffac829a000000000000000000000000000000000000000000000000000000000815260040161025f929190610859565b60405180910390fd5b505080610274906108b1565b9050610174565b5050505b846040850460005b8181101561037657600081818682602081106102a5576102a56107ea565b1a905060ff8114610368575b8585838181106102c3576102c36107ea565b9050604002016020013583019250600382901b60ff60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916901c87179650809150868160208110610318576103186107ea565b1a905060008290036102b157610368338461034b89898981811061033e5761033e6107ea565b9050604002016000013590565b73ffffffffffffffffffffffffffffffffffffffff169190610381565b505050806001019050610287565b505050505050505050565b6103ad837fa9059cbb0000000000000000000000000000000000000000000000000000000084846103e8565b6103e3576040517ffb7f507900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505050565b60006040518481528360048201528260248201526020600060448360008a5af19150508015610434573d801561042a57600160005114601f3d11169150610432565b6000863b1191505b505b949350505050565b60008083601f84011261044e57600080fd5b50813567ffffffffffffffff81111561046657600080fd5b60208301915083602082850101111561047e57600080fd5b9250929050565b60008060008060006060868803121561049d57600080fd5b853573ffffffffffffffffffffffffffffffffffffffff811681146104c157600080fd5b9450602086013567ffffffffffffffff808211156104de57600080fd5b6104ea89838a0161043c565b9096509450604088013591508082111561050357600080fd5b506105108882890161043c565b969995985093965092949392505050565b80356020831015610558577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff602084900360031b1b165b92915050565b6000808585111561056e57600080fd5b8386111561057b57600080fd5b5050820193919092039150565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff811182821017156105fe576105fe610588565b604052919050565b600067ffffffffffffffff82111561062057610620610588565b5060051b60200190565b6000601f838184011261063c57600080fd5b8235602061065161064c83610606565b6105b7565b82815260059290921b8501810191818101908784111561067057600080fd5b8287015b8481101561072557803567ffffffffffffffff808211156106955760008081fd5b818a0191508a603f8301126106aa5760008081fd5b858201356040828211156106c0576106c0610588565b6106ef887fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08c850116016105b7565b92508183528c818386010111156107065760008081fd5b8181850189850137506000908201870152845250918301918301610674565b50979650505050505050565b6000806040838503121561074457600080fd5b823567ffffffffffffffff8082111561075c57600080fd5b818501915085601f83011261077057600080fd5b8135602061078061064c83610606565b82815260059290921b8401810191818101908984111561079f57600080fd5b948201945b838610156107bd578535825294820194908201906107a4565b965050860135925050808211156107d357600080fd5b506107e08582860161062a565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60005b8381101561083457818101518382015260200161081c565b50506000910152565b6000825161084f818460208701610819565b9190910192915050565b828152604060208201526000825180604084015261087e816060850160208701610819565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016060019392505050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203610909577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b506001019056fea26469706673582212200cf9ff8d83a00e9966440e7c8238ff27a6d8500339bc248abbc678bd061a67c564736f6c63430008110033",
"deployedBytecode": "0x608060405234801561001057600080fd5b506004361061002b5760003560e01c80631944799f14610030575b600080fd5b61004361003e366004610485565b610045565b005b3373ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016146100b4576040517f15b3197600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614610139576040517f5fc483c500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006101458284610521565b9050602082111561027f57600080610160846020818861055e565b81019061016d9190610731565b9150915060005b825181101561027b576000806101a0858481518110610195576101956107ea565b602002602001015190565b73ffffffffffffffffffffffffffffffffffffffff168484815181106101c8576101c86107ea565b60200260200101516040516101dd919061083d565b6000604051808303816000865af19150503d806000811461021a576040519150601f19603f3d011682016040523d82523d6000602084013e61021f565b606091505b5091509150816102685782816040517ffac829a000000000000000000000000000000000000000000000000000000000815260040161025f929190610859565b60405180910390fd5b505080610274906108b1565b9050610174565b5050505b846040850460005b8181101561037657600081818682602081106102a5576102a56107ea565b1a905060ff8114610368575b8585838181106102c3576102c36107ea565b9050604002016020013583019250600382901b60ff60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916901c87179650809150868160208110610318576103186107ea565b1a905060008290036102b157610368338461034b89898981811061033e5761033e6107ea565b9050604002016000013590565b73ffffffffffffffffffffffffffffffffffffffff169190610381565b505050806001019050610287565b505050505050505050565b6103ad837fa9059cbb0000000000000000000000000000000000000000000000000000000084846103e8565b6103e3576040517ffb7f507900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505050565b60006040518481528360048201528260248201526020600060448360008a5af19150508015610434573d801561042a57600160005114601f3d11169150610432565b6000863b1191505b505b949350505050565b60008083601f84011261044e57600080fd5b50813567ffffffffffffffff81111561046657600080fd5b60208301915083602082850101111561047e57600080fd5b9250929050565b60008060008060006060868803121561049d57600080fd5b853573ffffffffffffffffffffffffffffffffffffffff811681146104c157600080fd5b9450602086013567ffffffffffffffff808211156104de57600080fd5b6104ea89838a0161043c565b9096509450604088013591508082111561050357600080fd5b506105108882890161043c565b969995985093965092949392505050565b80356020831015610558577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff602084900360031b1b165b92915050565b6000808585111561056e57600080fd5b8386111561057b57600080fd5b5050820193919092039150565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff811182821017156105fe576105fe610588565b604052919050565b600067ffffffffffffffff82111561062057610620610588565b5060051b60200190565b6000601f838184011261063c57600080fd5b8235602061065161064c83610606565b6105b7565b82815260059290921b8501810191818101908784111561067057600080fd5b8287015b8481101561072557803567ffffffffffffffff808211156106955760008081fd5b818a0191508a603f8301126106aa5760008081fd5b858201356040828211156106c0576106c0610588565b6106ef887fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08c850116016105b7565b92508183528c818386010111156107065760008081fd5b8181850189850137506000908201870152845250918301918301610674565b50979650505050505050565b6000806040838503121561074457600080fd5b823567ffffffffffffffff8082111561075c57600080fd5b818501915085601f83011261077057600080fd5b8135602061078061064c83610606565b82815260059290921b8401810191818101908984111561079f57600080fd5b948201945b838610156107bd578535825294820194908201906107a4565b965050860135925050808211156107d357600080fd5b506107e08582860161062a565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60005b8381101561083457818101518382015260200161081c565b50506000910152565b6000825161084f818460208701610819565b9190910192915050565b828152604060208201526000825180604084015261087e816060850160208701610819565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016060019392505050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203610909577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b506001019056fea26469706673582212200cf9ff8d83a00e9966440e7c8238ff27a6d8500339bc248abbc678bd061a67c564736f6c63430008110033",
"linkReferences": {},
"deployedLinkReferences": {}
}
199 changes: 199 additions & 0 deletions artifacts-v1/SettlementV1.json

Large diffs are not rendered by default.

Loading
Loading