-
Notifications
You must be signed in to change notification settings - Fork 325
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
166 additions
and
8 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
37 changes: 37 additions & 0 deletions
37
action/protocol/execution/testdata-cancun/blobbasefee.json
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,37 @@ | ||
{ | ||
"initGenesis": { | ||
"isBering" : true, | ||
"isIceland" : true, | ||
"isLondon" : true, | ||
"isShanghai" : true, | ||
"isCancun": true | ||
}, | ||
"initBalances": [{ | ||
"account": "io1mflp9m6hcgm2qcghchsdqj3z3eccrnekx9p0ms", | ||
"rawBalance": "1000000000000000000000000000" | ||
}], | ||
"deployments": [{ | ||
"rawByteCode": "6080604052348015600e575f80fd5b5060b380601a5f395ff3fe6080604052348015600e575f80fd5b50600436106026575f3560e01c80631f6d6ef714602a575b5f80fd5b60306044565b604051603b91906066565b60405180910390f35b5f804a90508091505090565b5f819050919050565b6060816050565b82525050565b5f60208201905060775f8301846059565b9291505056fea264697066735822122079dd036ad97e2152acf9763c0d02695bcda866427a06241bc2440730d30a058c64736f6c634300081a0033", | ||
"rawPrivateKey": "cfa6ef757dee2e50351620dca002d32b9c090cfda55fb81f37f1d26b273743f1", | ||
"rawAmount": "0", | ||
"rawGasLimit": 5000000, | ||
"rawGasPrice": "2000000000000", | ||
"rawExpectedGasConsumed": 66385, | ||
"expectedStatus": 1, | ||
"expectedBalances": [], | ||
"comment": "deploy blobbasefee contract" | ||
}], | ||
"executions": [{ | ||
"rawPrivateKey": "cfa6ef757dee2e50351620dca002d32b9c090cfda55fb81f37f1d26b273743f1", | ||
"rawByteCode": "1f6d6ef7", | ||
"rawAmount": "0", | ||
"rawGasLimit": 1000000, | ||
"rawGasPrice": "2000000000000", | ||
"rawAccessList": [], | ||
"rawExpectedGasConsumed": 10722, | ||
"expectedStatus": 1, | ||
"readOnly": true, | ||
"rawReturnValue": "0000000000000000000000000000000000000000000000000000000000000001", | ||
"comment": "call getBlobBaseFee" | ||
}] | ||
} |
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,12 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.24; | ||
|
||
contract BlobBaseFeeTest { | ||
function getBlobBaseFee() public view returns (uint256) { | ||
uint256 blobBaseFee; | ||
assembly { | ||
blobBaseFee := blobbasefee() | ||
} | ||
return blobBaseFee; | ||
} | ||
} |
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,37 @@ | ||
{ | ||
"initGenesis": { | ||
"isBering" : true, | ||
"isIceland" : true, | ||
"isLondon" : true, | ||
"isShanghai" : true, | ||
"isCancun": true | ||
}, | ||
"initBalances": [{ | ||
"account": "io1mflp9m6hcgm2qcghchsdqj3z3eccrnekx9p0ms", | ||
"rawBalance": "1000000000000000000000000000" | ||
}], | ||
"deployments": [{ | ||
"rawByteCode": "6080604052348015600e575f80fd5b5060b480601a5f395ff3fe6080604052348015600e575f80fd5b50600436106026575f3560e01c806361d76d9714602a575b5f80fd5b60306044565b604051603b91906067565b60405180910390f35b5f805f4990508091505090565b5f819050919050565b6061816051565b82525050565b5f60208201905060785f830184605a565b9291505056fea2646970667358221220eaf046fb891b69fc7cdacb0eccc78223b665af6db2f5303c72524a98e0b1ae0d64736f6c634300081a0033", | ||
"rawPrivateKey": "cfa6ef757dee2e50351620dca002d32b9c090cfda55fb81f37f1d26b273743f1", | ||
"rawAmount": "0", | ||
"rawGasLimit": 5000000, | ||
"rawGasPrice": "2000000000000", | ||
"rawExpectedGasConsumed": 66685, | ||
"expectedStatus": 1, | ||
"expectedBalances": [], | ||
"comment": "deploy blobhash contract" | ||
}], | ||
"executions": [{ | ||
"rawPrivateKey": "cfa6ef757dee2e50351620dca002d32b9c090cfda55fb81f37f1d26b273743f1", | ||
"rawByteCode": "61d76d97", | ||
"rawAmount": "0", | ||
"rawGasLimit": 1000000, | ||
"rawGasPrice": "2000000000000", | ||
"rawAccessList": [], | ||
"rawExpectedGasConsumed": 10725, | ||
"expectedStatus": 1, | ||
"readOnly": true, | ||
"rawReturnValue": "0000000000000000000000000000000000000000000000000000000000000000", | ||
"comment": "call getBlobHash" | ||
}] | ||
} |
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,12 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.24; | ||
|
||
contract BlobHashTest { | ||
function getBlobHash() public view returns (bytes32) { | ||
bytes32 hash; | ||
assembly { | ||
hash := blobhash(0) | ||
} | ||
return hash; | ||
} | ||
} |
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
37 changes: 37 additions & 0 deletions
37
action/protocol/execution/testdata-cancun/point_evaluation.json
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,37 @@ | ||
{ | ||
"initGenesis": { | ||
"isBering" : true, | ||
"isIceland" : true, | ||
"isLondon" : true, | ||
"isShanghai" : true, | ||
"isCancun": true | ||
}, | ||
"initBalances": [{ | ||
"account": "io1mflp9m6hcgm2qcghchsdqj3z3eccrnekx9p0ms", | ||
"rawBalance": "1000000000000000000000000000" | ||
}], | ||
"deployments": [{ | ||
"rawByteCode": "6080604052348015600e575f80fd5b5061025d8061001c5f395ff3fe608060405234801561000f575f80fd5b5060043610610029575f3560e01c80637daa9efc1461002d575b5f80fd5b61003561004b565b604051610042919061018a565b60405180910390f35b60605f60c067ffffffffffffffff811115610069576100686101aa565b5b6040519080825280601f01601f19166020018201604052801561009b5781602001600182028036833780820191505090505b5090505f80600a73ffffffffffffffffffffffffffffffffffffffff16836040516100c69190610211565b5f60405180830381855afa9150503d805f81146100fe576040519150601f19603f3d011682016040523d82523d5f602084013e610103565b606091505b509150915081610111575f80fd5b80935050505090565b5f81519050919050565b5f82825260208201905092915050565b8281835e5f83830152505050565b5f601f19601f8301169050919050565b5f61015c8261011a565b6101668185610124565b9350610176818560208601610134565b61017f81610142565b840191505092915050565b5f6020820190508181035f8301526101a28184610152565b905092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b5f81905092915050565b5f6101eb8261011a565b6101f581856101d7565b9350610205818560208601610134565b80840191505092915050565b5f61021c82846101e1565b91508190509291505056fea2646970667358221220bae9f6bf5b74a7f8794c9df3afe21869f835a733e55871696d2c44bb2d9c357164736f6c634300081a0033", | ||
"rawPrivateKey": "cfa6ef757dee2e50351620dca002d32b9c090cfda55fb81f37f1d26b273743f1", | ||
"rawAmount": "0", | ||
"rawGasLimit": 5000000, | ||
"rawGasPrice": "2000000000000", | ||
"rawExpectedGasConsumed": 194463, | ||
"expectedStatus": 1, | ||
"expectedBalances": [], | ||
"comment": "deploy point_evaluation contract" | ||
}], | ||
"executions": [{ | ||
"rawPrivateKey": "cfa6ef757dee2e50351620dca002d32b9c090cfda55fb81f37f1d26b273743f1", | ||
"rawByteCode": "7daa9efc", | ||
"rawAmount": "0", | ||
"rawGasLimit": 1000000, | ||
"rawGasPrice": "2000000000000", | ||
"rawAccessList": [], | ||
"rawExpectedGasConsumed": 11743, | ||
"expectedStatus": 1, | ||
"readOnly": false, | ||
"rawReturnValue": "", | ||
"comment": "call evaluate" | ||
}] | ||
} |
13 changes: 13 additions & 0 deletions
13
action/protocol/execution/testdata-cancun/point_evaluation.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,13 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.25; | ||
|
||
contract PointEvaluationTest { | ||
|
||
function evaluate() public view returns (bytes memory) { | ||
bytes memory input = new bytes(192); | ||
// call precompile contract | ||
(bool ok, bytes memory out) = address(0x0a).staticcall(abi.encode(input)); | ||
require(ok); | ||
return out; | ||
} | ||
} |
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