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

Audit followup refactor #88

Merged
merged 20 commits into from
Jun 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
e171010
fix BridgePermissions.sol
sisyphusSmiling Jun 5, 2024
8ecd0a9
fix FlowEVMBridgeConfig.evmAddressHasTokenHandler
sisyphusSmiling Jun 5, 2024
6c77dc6
add revert on collision in FlowEVMBridgeNFTEscrow.initializeEscrow
sisyphusSmiling Jun 5, 2024
412ecdd
update returned COA entitlement by FlowEVMBridgeUtils.borrowCOA
sisyphusSmiling Jun 5, 2024
d94f085
add input validation in FlowEVMDeploymentRegistry & FlowEVMBridgeConf…
sisyphusSmiling Jun 12, 2024
e6cb803
bump compiler v & lock pragma + update bytecode consts
sisyphusSmiling Jun 13, 2024
0dcfe7c
remove ownership renunciation from FlowBridgeFactory
sisyphusSmiling Jun 13, 2024
aeef4ea
fix FlowEVMBridgeUtils.getEVMOnboardingValues to assert on ERC20
sisyphusSmiling Jun 17, 2024
4481141
add ICrossVM interface, update bridged ERC20/721 template & fix ERC16…
sisyphusSmiling Jun 17, 2024
9dba339
update contract events
sisyphusSmiling Jun 17, 2024
8339633
fix mismatched behavior & documentation in FlowEVMBridgeUtils
sisyphusSmiling Jun 18, 2024
e873aa3
add gasLimit to FlowEVMBridgeConfig in place of hardcoded val
sisyphusSmiling Jun 13, 2024
837063e
add transaction post-conditions where possible
sisyphusSmiling Jun 20, 2024
f631508
fix hardcoded bridged nft name when resolving NFTCollectionDisplay fr…
sisyphusSmiling Jun 18, 2024
efc4256
add type-level pausing via FlowEVMBridgeConfig & add test case
sisyphusSmiling Jun 18, 2024
537e0ef
fix dict & arr serialization + toUpper bug on numbers
sisyphusSmiling Jun 18, 2024
a71a74b
updates for best practice & docs recommendations post-audit
sisyphusSmiling Jun 20, 2024
31f1d2d
update flow-cli pre-release install script URL
sisyphusSmiling Jun 20, 2024
b30db7e
Merge branch 'main' into audit-followup-refactor
sisyphusSmiling Jun 21, 2024
7092bb7
fix FlowEVMBridgeConfig.isTypePaused
sisyphusSmiling Jun 20, 2024
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
2 changes: 1 addition & 1 deletion .github/workflows/cadence_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
restore-keys: |
${{ runner.os }}-go-
- name: Install Flow CLI
run: sh -ci "$(curl -fsSL https://raw.githubusercontent.com/onflow/flow-cli/feature/stable-cadence/install.sh)"
run: sh -ci "$(curl -fsSL https://raw.githubusercontent.com/onflow/flow-cli/master/install.sh)"
- name: Flow CLI Version
run: flow-c1 version
- name: Update PATH
Expand Down
4 changes: 2 additions & 2 deletions cadence/args/bridged-nft-code-chunks-args-crescendo.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions cadence/args/bridged-nft-code-chunks-args-emulator.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions cadence/args/bridged-nft-code-chunks-args-previewnet.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion cadence/args/deploy-deployment-registry-args.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[
{
"type": "String",
"value": "608060405234801561001057600080fd5b50338061003757604051631e4fbdf760e01b81526000600482015260240160405180910390fd5b61004081610058565b50600080546001600160a01b031916331790556100aa565b600380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6108a5806100b96000396000f3fe608060405234801561001057600080fd5b50600436106100a95760003560e01c8063862119ae11610071578063862119ae146101315780638da5cb5b14610144578063a6de610514610155578063b3d5dbdc14610168578063f2fde38b14610188578063faab9d391461019b57600080fd5b806301ffc9a7146100ae57806304433bbc146100d65780632b20e39714610101578063522791d114610114578063715018a614610129575b600080fd5b6100c16100bc36600461051c565b6101ae565b60405190151581526020015b60405180910390f35b6100e96100e43660046105f0565b6101e5565b6040516001600160a01b0390911681526020016100cd565b6000546100e9906001600160a01b031681565b610127610122366004610649565b610216565b005b6101276102b7565b6100c161013f3660046105f0565b6102cb565b6003546001600160a01b03166100e9565b6100c1610163366004610697565b610308565b61017b610176366004610697565b610334565b6040516100cd91906106d6565b610127610196366004610697565b6103e0565b6101276101a9366004610697565b61041e565b60006001600160e01b0319821663976998cb60e01b14806101df57506301ffc9a760e01b6001600160e01b03198316145b92915050565b60006001826040516101f79190610709565b908152604051908190036020019020546001600160a01b031692915050565b6000546001600160a01b031633146102a95760405162461bcd60e51b815260206004820152604560248201527f466c6f774272696467654465706c6f796d656e7452656769737472793a204f6e60448201527f6c79207265676973747261722063616e207265676973746572206173736f636960648201526430ba34b7b760d91b608482015260a4015b60405180910390fd5b6102b38282610444565b5050565b6102bf61049d565b6102c960006104ca565b565b6000806001600160a01b03166001836040516102e79190610709565b908152604051908190036020019020546001600160a01b0316141592915050565b6001600160a01b0381166000908152600260205260408120805461032b90610725565b15159392505050565b6001600160a01b038116600090815260026020526040902080546060919061035b90610725565b80601f016020809104026020016040519081016040528092919081815260200182805461038790610725565b80156103d45780601f106103a9576101008083540402835291602001916103d4565b820191906000526020600020905b8154815290600101906020018083116103b757829003601f168201915b50505050509050919050565b6103e861049d565b6001600160a01b03811661041257604051631e4fbdf760e01b8152600060048201526024016102a0565b61041b816104ca565b50565b61042661049d565b600080546001600160a01b0319166001600160a01b03831617905550565b806001836040516104559190610709565b908152604080516020928190038301902080546001600160a01b0319166001600160a01b03948516179055918316600090815260029091522061049883826107af565b505050565b6003546001600160a01b031633146102c95760405163118cdaa760e01b81523360048201526024016102a0565b600380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60006020828403121561052e57600080fd5b81356001600160e01b03198116811461054657600080fd5b9392505050565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261057457600080fd5b813567ffffffffffffffff8082111561058f5761058f61054d565b604051601f8301601f19908116603f011681019082821181831017156105b7576105b761054d565b816040528381528660208588010111156105d057600080fd5b836020870160208301376000602085830101528094505050505092915050565b60006020828403121561060257600080fd5b813567ffffffffffffffff81111561061957600080fd5b61062584828501610563565b949350505050565b80356001600160a01b038116811461064457600080fd5b919050565b6000806040838503121561065c57600080fd5b823567ffffffffffffffff81111561067357600080fd5b61067f85828601610563565b92505061068e6020840161062d565b90509250929050565b6000602082840312156106a957600080fd5b6105468261062d565b60005b838110156106cd5781810151838201526020016106b5565b50506000910152565b60208152600082518060208401526106f58160408501602087016106b2565b601f01601f19169190910160400192915050565b6000825161071b8184602087016106b2565b9190910192915050565b600181811c9082168061073957607f821691505b60208210810361075957634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115610498576000816000526020600020601f850160051c810160208610156107885750805b601f850160051c820191505b818110156107a757828155600101610794565b505050505050565b815167ffffffffffffffff8111156107c9576107c961054d565b6107dd816107d78454610725565b8461075f565b602080601f83116001811461081257600084156107fa5750858301515b600019600386901b1c1916600185901b1785556107a7565b600085815260208120601f198616915b8281101561084157888601518255948401946001909101908401610822565b508582101561085f5787850151600019600388901b60f8161c191681555b5050505050600190811b0190555056fea2646970667358221220d34e5f07df9f5caeb3f27cc4ae3fb96f631888efc651830b9b596e5eac76484764736f6c63430008170033"
"value": "608060405234801561001057600080fd5b50338061003757604051631e4fbdf760e01b81526000600482015260240160405180910390fd5b61004081610058565b50600080546001600160a01b031916331790556100aa565b600380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b610bbd806100b96000396000f3fe608060405234801561001057600080fd5b50600436106100a95760003560e01c8063862119ae11610071578063862119ae146101315780638da5cb5b14610144578063a6de610514610155578063b3d5dbdc14610168578063f2fde38b14610188578063faab9d391461019b57600080fd5b806301ffc9a7146100ae57806304433bbc146100d65780632b20e39714610101578063522791d114610114578063715018a614610129575b600080fd5b6100c16100bc366004610833565b6101ae565b60405190151581526020015b60405180910390f35b6100e96100e4366004610907565b6101e5565b6040516001600160a01b0390911681526020016100cd565b6000546100e9906001600160a01b031681565b610127610122366004610960565b610216565b005b6101276102b7565b6100c161013f366004610907565b6102cb565b6003546001600160a01b03166100e9565b6100c16101633660046109ae565b610308565b61017b6101763660046109ae565b610334565b6040516100cd91906109ed565b6101276101963660046109ae565b6103e0565b6101276101a93660046109ae565b61041e565b60006001600160e01b0319821663976998cb60e01b14806101df57506301ffc9a760e01b6001600160e01b03198316145b92915050565b60006001826040516101f79190610a20565b908152604051908190036020019020546001600160a01b031692915050565b6000546001600160a01b031633146102a95760405162461bcd60e51b815260206004820152604560248201527f466c6f774272696467654465706c6f796d656e7452656769737472793a204f6e60448201527f6c79207265676973747261722063616e207265676973746572206173736f636960648201526430ba34b7b760d91b608482015260a4015b60405180910390fd5b6102b3828261042f565b5050565b6102bf6106fd565b6102c9600061072a565b565b6000806001600160a01b03166001836040516102e79190610a20565b908152604051908190036020019020546001600160a01b0316141592915050565b6001600160a01b0381166000908152600260205260408120805461032b90610a3c565b15159392505050565b6001600160a01b038116600090815260026020526040902080546060919061035b90610a3c565b80601f016020809104026020016040519081016040528092919081815260200182805461038790610a3c565b80156103d45780601f106103a9576101008083540402835291602001916103d4565b820191906000526020600020905b8154815290600101906020018083116103b757829003601f168201915b50505050509050919050565b6103e86106fd565b6001600160a01b03811661041257604051631e4fbdf760e01b8152600060048201526024016102a0565b61041b8161072a565b50565b6104266106fd565b61041b8161077c565b6001600160a01b0381166104ab5760405162461bcd60e51b815260206004820152603760248201527f466c6f7745564d4465706c6f796d656e7452656769737472793a20436f6e747260448201527f61637420616464726573732063616e6e6f74206265203000000000000000000060648201526084016102a0565b81516000036105225760405162461bcd60e51b815260206004820152603d60248201527f466c6f7745564d4465706c6f796d656e7452656769737472793a20436164656e60448201527f6365206964656e7469666965722063616e6e6f7420626520656d70747900000060648201526084016102a0565b60006001600160a01b031660018360405161053d9190610a20565b908152604051908190036020019020546001600160a01b0316146105cb576040805162461bcd60e51b81526020600482015260248101919091527f466c6f7745564d4465706c6f796d656e7452656769737472793a20436164656e60448201527f6365206964656e74696669657220616c7265616479207265676973746572656460648201526084016102a0565b6001600160a01b038116600090815260026020526040902080546105ee90610a3c565b1590506106635760405162461bcd60e51b815260206004820152603e60248201527f466c6f7745564d4465706c6f796d656e7452656769737472793a20436f6e747260448201527f616374206164647265737320616c72656164792072656769737465726564000060648201526084016102a0565b806001836040516106749190610a20565b908152604080516020928190038301902080546001600160a01b0319166001600160a01b0394851617905591831660009081526002909152206106b78382610ac7565b50806001600160a01b03167f25d7ffc1de7be1c9b0762be63022756c4773f73211c044d668da6bbcba3e7f14836040516106f191906109ed565b60405180910390a25050565b6003546001600160a01b031633146102c95760405163118cdaa760e01b81523360048201526024016102a0565b600380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6001600160a01b0381166107eb5760405162461bcd60e51b815260206004820152603060248201527f466c6f7745564d4465706c6f796d656e7452656769737472793a20526567697360448201526f0747261722063616e6e6f7420626520360841b60648201526084016102a0565b600080546001600160a01b0319166001600160a01b038316908117825560405190917ff90b3304151c89847ba28c08c86e9391dd12ef3a402cba7d3728776a36f29d1191a250565b60006020828403121561084557600080fd5b81356001600160e01b03198116811461085d57600080fd5b9392505050565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261088b57600080fd5b813567ffffffffffffffff808211156108a6576108a6610864565b604051601f8301601f19908116603f011681019082821181831017156108ce576108ce610864565b816040528381528660208588010111156108e757600080fd5b836020870160208301376000602085830101528094505050505092915050565b60006020828403121561091957600080fd5b813567ffffffffffffffff81111561093057600080fd5b61093c8482850161087a565b949350505050565b80356001600160a01b038116811461095b57600080fd5b919050565b6000806040838503121561097357600080fd5b823567ffffffffffffffff81111561098a57600080fd5b6109968582860161087a565b9250506109a560208401610944565b90509250929050565b6000602082840312156109c057600080fd5b61085d82610944565b60005b838110156109e45781810151838201526020016109cc565b50506000910152565b6020815260008251806020840152610a0c8160408501602087016109c9565b601f01601f19169190910160400192915050565b60008251610a328184602087016109c9565b9190910192915050565b600181811c90821680610a5057607f821691505b602082108103610a7057634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115610ac2576000816000526020600020601f850160051c81016020861015610a9f5750805b601f850160051c820191505b81811015610abe57828155600101610aab565b5050505b505050565b815167ffffffffffffffff811115610ae157610ae1610864565b610af581610aef8454610a3c565b84610a76565b602080601f831160018114610b2a5760008415610b125750858301515b600019600386901b1c1916600185901b178555610abe565b600085815260208120601f198616915b82811015610b5957888601518255948401946001909101908401610b3a565b5085821015610b775787850151600019600388901b60f8161c191681555b5050505050600190811b0190555056fea26469706673582212207bc4fe07fbc245f342675c43729c0cf0da0a7b16d24fef9f2aac1a401e334c8964736f6c63430008180033"
},
{
"type": "UInt64",
Expand Down
Loading
Loading