-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #264 from matter-labs/dvush/commit-block-contract-…
…refactor Block commit contract refactor
- Loading branch information
Showing
37 changed files
with
1,072 additions
and
553 deletions.
There are no files selected for viewing
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 |
---|---|---|
|
@@ -5,5 +5,5 @@ set -e | |
|
||
echo contracts-test | ||
cd contracts | ||
yarn test || true # FIXME: after test merges done | ||
yarn unit-test | ||
cd .. |
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
Large diffs are not rendered by default.
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 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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
pragma solidity 0.5.16; | ||
|
||
import "../generated/FranklinTest.sol"; | ||
|
||
|
||
contract ZKSyncUnitTest is FranklinTest { | ||
|
||
constructor( | ||
address _governanceAddress, | ||
address _verifierAddress, | ||
address _genesisAccAddress, | ||
bytes32 _genesisRoot | ||
) FranklinTest(_governanceAddress, _verifierAddress, _genesisAccAddress, _genesisRoot) public{} | ||
|
||
function changePubkeySignatureCheck(bytes calldata _signature, bytes calldata _newPkHash, uint32 _nonce, address _ethAddress) external pure returns (bool) { | ||
return verifyChangePubkeySignature(_signature, _newPkHash, _nonce, _ethAddress); | ||
} | ||
|
||
function setBalanceToWithdraw(address _owner, uint16 _token, uint128 _amount) external { | ||
balancesToWithdraw[_owner][_token] = _amount; | ||
} | ||
|
||
function () payable external{} | ||
|
||
function addPendingWithdrawal(address _to, uint16 _tokenId, uint128 _amount) external { | ||
storeWithdrawalAsPending(_to, _tokenId, _amount); | ||
} | ||
|
||
function testProcessNextOperation( | ||
uint256 _pubdataOffset, | ||
bytes calldata _publicData, | ||
bytes calldata _currentEthWitness, | ||
uint256 _expectedBytesProcessed | ||
) external { | ||
require(processNextOperation(_pubdataOffset, _publicData, _currentEthWitness) == _expectedBytesProcessed, "bytes processed incorrect"); | ||
} | ||
|
||
function testVerifyEthereumSignature(bytes calldata _signature, bytes calldata _message) external pure returns (address) { | ||
return verifyEthereumSignature(_signature, _message); | ||
} | ||
} |
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
Oops, something went wrong.