Skip to content

Commit

Permalink
rename bridge
Browse files Browse the repository at this point in the history
  • Loading branch information
invocamanman committed Dec 20, 2022
1 parent db9d22d commit e5038c6
Show file tree
Hide file tree
Showing 49 changed files with 1,890 additions and 1,071 deletions.
4 changes: 2 additions & 2 deletions .githooks/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ if npm run lint; then
npx hardhat compile --force
npm run docgen
git add docs
cp artifacts/contracts/Bridge.sol/Bridge.json compiled-contracts/
cp artifacts/contracts/PolygonZKEVMBridge.sol/PolygonZKEVMBridge.json compiled-contracts/
cp artifacts/contracts/GlobalExitRootManager.sol/GlobalExitRootManager.json compiled-contracts/
cp artifacts/contracts/GlobalExitRootManagerL2.sol/GlobalExitRootManagerL2.json compiled-contracts/
cp artifacts/contracts/lib/TokenWrapped.sol/TokenWrapped.json compiled-contracts/
cp artifacts/contracts/mocks/BridgeMock.sol/BridgeMock.json compiled-contracts/
cp artifacts/contracts/mocks/PolygonZKEVMBridgeMock.sol/PolygonZKEVMBridgeMock.json compiled-contracts/
cp artifacts/contracts/mocks/ERC20PermitMock.sol/ERC20PermitMock.json compiled-contracts/
cp artifacts/contracts/mocks/GlobalExitRootManagerL2Mock.sol/GlobalExitRootManagerL2Mock.json compiled-contracts/
cp artifacts/contracts/mocks/GlobalExitRootManagerMock.sol/GlobalExitRootManagerMock.json compiled-contracts/
Expand Down
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"editor.formatOnSave": true,
"editor.formatOnSave": false,
"solidity.linter": "solhint",
"solidity.compileUsingRemoteVersion": "v0.8.15+commit.e14f2714"
}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Private keys and mnemonics contained in this repository are used for internal te
## Repository structure

- `contracts`: zkevm contracts
- `Bridge.sol`: transfer assets between chains
- `PolygonZKEVMBridge.sol`: transfer assets between chains
- `GlobalExitRootManager.sol`: manage global exit root in L1
- `GlobalExitRootManagerL2.sol`: manage global exit root in L2
- `PolygonZKEVM.sol`: consensus algorithm used by polyhon hermez zkevm
Expand Down
4 changes: 2 additions & 2 deletions compiled-contracts/Bridge.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"_format": "hh-sol-artifact-1",
"contractName": "Bridge",
"sourceName": "contracts/Bridge.sol",
"contractName": "PolygonZKEVMBridge",
"sourceName": "contracts/PolygonZKEVMBridge.sol",
"abi": [
{
"anonymous": false,
Expand Down
10 changes: 5 additions & 5 deletions compiled-contracts/BridgeMock.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"_format": "hh-sol-artifact-1",
"contractName": "BridgeMock",
"sourceName": "contracts/mocks/BridgeMock.sol",
"contractName": "PolygonZKEVMBridgeMock",
"sourceName": "contracts/mocks/PolygonZKEVMBridgeMock.sol",
"abi": [
{
"anonymous": false,
Expand Down Expand Up @@ -577,7 +577,7 @@
},
{
"inputs": [],
"name": "maxEtherBridge",
"name": "maxEtherPolygonZKEVMBridge",
"outputs": [
{
"internalType": "uint256",
Expand Down Expand Up @@ -677,11 +677,11 @@
"inputs": [
{
"internalType": "uint256",
"name": "_maxEtherBridge",
"name": "_maxEtherPolygonZKEVMBridge",
"type": "uint256"
}
],
"name": "setMaxEtherBridge",
"name": "setMaxEtherPolygonZKEVMBridge",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
Expand Down
4 changes: 2 additions & 2 deletions compiled-contracts/GlobalExitRootManager.json
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,8 @@
"type": "function"
}
],
"bytecode": "0x608060405234801561001057600080fd5b506104a6806100206000396000f3fe608060405234801561001057600080fd5b50600436106100885760003560e01c80633ed691ef1161005b5780633ed691ef146100e7578063485cc955146101205780635ec6a8df14610133578063a3c573eb1461015e57600080fd5b806301fd90441461008d578063257b3632146100a9578063319cf735146100c957806333d6247d146100d2575b600080fd5b61009660015481565b6040519081526020015b60405180910390f35b6100966100b7366004610408565b60036020526000908152604090205481565b61009660025481565b6100e56100e0366004610408565b610171565b005b61009660025460015460408051602081019390935282015260009060600160405160208183030381529060405280519060200120905090565b6100e561012e36600461043d565b6102cd565b600554610146906001600160a01b031681565b6040516001600160a01b0390911681526020016100a0565b600454610146906001600160a01b031681565b6005546001600160a01b031633148061019457506004546001600160a01b031633145b61020b5760405162461bcd60e51b815260206004820152603d60248201527f476c6f62616c45786974526f6f744d616e616765723a3a75706461746545786960448201527f74526f6f743a204f4e4c595f414c4c4f5745445f434f4e54524143545300000060648201526084015b60405180910390fd5b6005546001600160a01b031633036102235760018190555b6004546001600160a01b0316330361023b5760028190555b60025460015460408051602081019390935282015260009060600160405160208183030381529060405280519060200120905060036000828152602001908152602001600020546000036102c957600081815260036020526040808220429055600154600254915190927f61014378f82a0d809aefaf87a8ac9505b89c321808287a6e7810f29304c1fce391a35b5050565b600054610100900460ff16158080156102ed5750600054600160ff909116105b806103075750303b158015610307575060005460ff166001145b61036a5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610202565b6000805460ff19166001179055801561038d576000805461ff0019166101001790555b600580546001600160a01b038086166001600160a01b03199283161790925560048054928516929091169190911790558015610403576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b505050565b60006020828403121561041a57600080fd5b5035919050565b80356001600160a01b038116811461043857600080fd5b919050565b6000806040838503121561045057600080fd5b61045983610421565b915061046760208401610421565b9050925092905056fea26469706673582212201172b33a2ed168bc54fb42fa55e7d7a9943fd75b837c8fdd495e92b81e07498564736f6c634300080f0033",
"deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100885760003560e01c80633ed691ef1161005b5780633ed691ef146100e7578063485cc955146101205780635ec6a8df14610133578063a3c573eb1461015e57600080fd5b806301fd90441461008d578063257b3632146100a9578063319cf735146100c957806333d6247d146100d2575b600080fd5b61009660015481565b6040519081526020015b60405180910390f35b6100966100b7366004610408565b60036020526000908152604090205481565b61009660025481565b6100e56100e0366004610408565b610171565b005b61009660025460015460408051602081019390935282015260009060600160405160208183030381529060405280519060200120905090565b6100e561012e36600461043d565b6102cd565b600554610146906001600160a01b031681565b6040516001600160a01b0390911681526020016100a0565b600454610146906001600160a01b031681565b6005546001600160a01b031633148061019457506004546001600160a01b031633145b61020b5760405162461bcd60e51b815260206004820152603d60248201527f476c6f62616c45786974526f6f744d616e616765723a3a75706461746545786960448201527f74526f6f743a204f4e4c595f414c4c4f5745445f434f4e54524143545300000060648201526084015b60405180910390fd5b6005546001600160a01b031633036102235760018190555b6004546001600160a01b0316330361023b5760028190555b60025460015460408051602081019390935282015260009060600160405160208183030381529060405280519060200120905060036000828152602001908152602001600020546000036102c957600081815260036020526040808220429055600154600254915190927f61014378f82a0d809aefaf87a8ac9505b89c321808287a6e7810f29304c1fce391a35b5050565b600054610100900460ff16158080156102ed5750600054600160ff909116105b806103075750303b158015610307575060005460ff166001145b61036a5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610202565b6000805460ff19166001179055801561038d576000805461ff0019166101001790555b600580546001600160a01b038086166001600160a01b03199283161790925560048054928516929091169190911790558015610403576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b505050565b60006020828403121561041a57600080fd5b5035919050565b80356001600160a01b038116811461043857600080fd5b919050565b6000806040838503121561045057600080fd5b61045983610421565b915061046760208401610421565b9050925092905056fea26469706673582212201172b33a2ed168bc54fb42fa55e7d7a9943fd75b837c8fdd495e92b81e07498564736f6c634300080f0033",
"bytecode": "0x608060405234801561001057600080fd5b506104a6806100206000396000f3fe608060405234801561001057600080fd5b50600436106100885760003560e01c80633ed691ef1161005b5780633ed691ef146100e7578063485cc955146101205780635ec6a8df14610133578063a3c573eb1461015e57600080fd5b806301fd90441461008d578063257b3632146100a9578063319cf735146100c957806333d6247d146100d2575b600080fd5b61009660015481565b6040519081526020015b60405180910390f35b6100966100b7366004610408565b60036020526000908152604090205481565b61009660025481565b6100e56100e0366004610408565b610171565b005b61009660025460015460408051602081019390935282015260009060600160405160208183030381529060405280519060200120905090565b6100e561012e36600461043d565b6102cd565b600554610146906001600160a01b031681565b6040516001600160a01b0390911681526020016100a0565b600454610146906001600160a01b031681565b6005546001600160a01b031633148061019457506004546001600160a01b031633145b61020b5760405162461bcd60e51b815260206004820152603d60248201527f476c6f62616c45786974526f6f744d616e616765723a3a75706461746545786960448201527f74526f6f743a204f4e4c595f414c4c4f5745445f434f4e54524143545300000060648201526084015b60405180910390fd5b6005546001600160a01b031633036102235760018190555b6004546001600160a01b0316330361023b5760028190555b60025460015460408051602081019390935282015260009060600160405160208183030381529060405280519060200120905060036000828152602001908152602001600020546000036102c957600081815260036020526040808220429055600154600254915190927f61014378f82a0d809aefaf87a8ac9505b89c321808287a6e7810f29304c1fce391a35b5050565b600054610100900460ff16158080156102ed5750600054600160ff909116105b806103075750303b158015610307575060005460ff166001145b61036a5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610202565b6000805460ff19166001179055801561038d576000805461ff0019166101001790555b600580546001600160a01b038086166001600160a01b03199283161790925560048054928516929091169190911790558015610403576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b505050565b60006020828403121561041a57600080fd5b5035919050565b80356001600160a01b038116811461043857600080fd5b919050565b6000806040838503121561045057600080fd5b61045983610421565b915061046760208401610421565b9050925092905056fea2646970667358221220e0c9f543d7ca227ec6586a5cb83adb5f68d8cd8e59ad65bc59d711392bc13c1d64736f6c634300080f0033",
"deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100885760003560e01c80633ed691ef1161005b5780633ed691ef146100e7578063485cc955146101205780635ec6a8df14610133578063a3c573eb1461015e57600080fd5b806301fd90441461008d578063257b3632146100a9578063319cf735146100c957806333d6247d146100d2575b600080fd5b61009660015481565b6040519081526020015b60405180910390f35b6100966100b7366004610408565b60036020526000908152604090205481565b61009660025481565b6100e56100e0366004610408565b610171565b005b61009660025460015460408051602081019390935282015260009060600160405160208183030381529060405280519060200120905090565b6100e561012e36600461043d565b6102cd565b600554610146906001600160a01b031681565b6040516001600160a01b0390911681526020016100a0565b600454610146906001600160a01b031681565b6005546001600160a01b031633148061019457506004546001600160a01b031633145b61020b5760405162461bcd60e51b815260206004820152603d60248201527f476c6f62616c45786974526f6f744d616e616765723a3a75706461746545786960448201527f74526f6f743a204f4e4c595f414c4c4f5745445f434f4e54524143545300000060648201526084015b60405180910390fd5b6005546001600160a01b031633036102235760018190555b6004546001600160a01b0316330361023b5760028190555b60025460015460408051602081019390935282015260009060600160405160208183030381529060405280519060200120905060036000828152602001908152602001600020546000036102c957600081815260036020526040808220429055600154600254915190927f61014378f82a0d809aefaf87a8ac9505b89c321808287a6e7810f29304c1fce391a35b5050565b600054610100900460ff16158080156102ed5750600054600160ff909116105b806103075750303b158015610307575060005460ff166001145b61036a5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610202565b6000805460ff19166001179055801561038d576000805461ff0019166101001790555b600580546001600160a01b038086166001600160a01b03199283161790925560048054928516929091169190911790558015610403576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b505050565b60006020828403121561041a57600080fd5b5035919050565b80356001600160a01b038116811461043857600080fd5b919050565b6000806040838503121561045057600080fd5b61045983610421565b915061046760208401610421565b9050925092905056fea2646970667358221220e0c9f543d7ca227ec6586a5cb83adb5f68d8cd8e59ad65bc59d711392bc13c1d64736f6c634300080f0033",
"linkReferences": {},
"deployedLinkReferences": {}
}
4 changes: 2 additions & 2 deletions compiled-contracts/GlobalExitRootManagerL2.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@
"type": "function"
}
],
"bytecode": "0x608060405234801561001057600080fd5b5060405161022f38038061022f83398101604081905261002f91610054565b600280546001600160a01b0319166001600160a01b0392909216919091179055610084565b60006020828403121561006657600080fd5b81516001600160a01b038116811461007d57600080fd5b9392505050565b61019c806100936000396000f3fe608060405234801561001057600080fd5b506004361061004c5760003560e01c806301fd904414610051578063257b36321461006d57806333d6247d1461008d578063a3c573eb146100a2575b600080fd5b61005a60015481565b6040519081526020015b60405180910390f35b61005a61007b36600461014d565b60006020819052908152604090205481565b6100a061009b36600461014d565b6100cd565b005b6002546100b5906001600160a01b031681565b6040516001600160a01b039091168152602001610064565b6002546001600160a01b031633146101485760405162461bcd60e51b815260206004820152603460248201527f476c6f62616c45786974526f6f744d616e616765724c323a3a75706461746545604482015273786974526f6f743a204f4e4c595f42524944474560601b606482015260840160405180910390fd5b600155565b60006020828403121561015f57600080fd5b503591905056fea2646970667358221220c3d468a91666aebe6b0b1c0d82e7915c70f7879e38ddb928138328ccd71d725164736f6c634300080f0033",
"deployedBytecode": "0x608060405234801561001057600080fd5b506004361061004c5760003560e01c806301fd904414610051578063257b36321461006d57806333d6247d1461008d578063a3c573eb146100a2575b600080fd5b61005a60015481565b6040519081526020015b60405180910390f35b61005a61007b36600461014d565b60006020819052908152604090205481565b6100a061009b36600461014d565b6100cd565b005b6002546100b5906001600160a01b031681565b6040516001600160a01b039091168152602001610064565b6002546001600160a01b031633146101485760405162461bcd60e51b815260206004820152603460248201527f476c6f62616c45786974526f6f744d616e616765724c323a3a75706461746545604482015273786974526f6f743a204f4e4c595f42524944474560601b606482015260840160405180910390fd5b600155565b60006020828403121561015f57600080fd5b503591905056fea2646970667358221220c3d468a91666aebe6b0b1c0d82e7915c70f7879e38ddb928138328ccd71d725164736f6c634300080f0033",
"bytecode": "0x608060405234801561001057600080fd5b5060405161022f38038061022f83398101604081905261002f91610054565b600280546001600160a01b0319166001600160a01b0392909216919091179055610084565b60006020828403121561006657600080fd5b81516001600160a01b038116811461007d57600080fd5b9392505050565b61019c806100936000396000f3fe608060405234801561001057600080fd5b506004361061004c5760003560e01c806301fd904414610051578063257b36321461006d57806333d6247d1461008d578063a3c573eb146100a2575b600080fd5b61005a60015481565b6040519081526020015b60405180910390f35b61005a61007b36600461014d565b60006020819052908152604090205481565b6100a061009b36600461014d565b6100cd565b005b6002546100b5906001600160a01b031681565b6040516001600160a01b039091168152602001610064565b6002546001600160a01b031633146101485760405162461bcd60e51b815260206004820152603460248201527f476c6f62616c45786974526f6f744d616e616765724c323a3a75706461746545604482015273786974526f6f743a204f4e4c595f42524944474560601b606482015260840160405180910390fd5b600155565b60006020828403121561015f57600080fd5b503591905056fea2646970667358221220b7ed0b6d80ce4ea297aff7a1977d5133c10cfbcd483b6a53c8660630270fa3dc64736f6c634300080f0033",
"deployedBytecode": "0x608060405234801561001057600080fd5b506004361061004c5760003560e01c806301fd904414610051578063257b36321461006d57806333d6247d1461008d578063a3c573eb146100a2575b600080fd5b61005a60015481565b6040519081526020015b60405180910390f35b61005a61007b36600461014d565b60006020819052908152604090205481565b6100a061009b36600461014d565b6100cd565b005b6002546100b5906001600160a01b031681565b6040516001600160a01b039091168152602001610064565b6002546001600160a01b031633146101485760405162461bcd60e51b815260206004820152603460248201527f476c6f62616c45786974526f6f744d616e616765724c323a3a75706461746545604482015273786974526f6f743a204f4e4c595f42524944474560601b606482015260840160405180910390fd5b600155565b60006020828403121561015f57600080fd5b503591905056fea2646970667358221220b7ed0b6d80ce4ea297aff7a1977d5133c10cfbcd483b6a53c8660630270fa3dc64736f6c634300080f0033",
"linkReferences": {},
"deployedLinkReferences": {}
}
Loading

0 comments on commit e5038c6

Please sign in to comment.