Skip to content

Commit

Permalink
100 -> 0x100
Browse files Browse the repository at this point in the history
  • Loading branch information
doutv committed Nov 13, 2024
1 parent fc32372 commit 1b1ea56
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bindings/tester/precompiles.go
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ func CallPrecompiledContracts(address int, lt *LoadTester, opts *bind.TransactOp
log.Trace().Str("method", "TestBlake2f").Msg("Executing contract method")
inputData = GenerateECPairingInput()
return lt.TestBlake2f(opts, inputData)
case 100:
case 0x100:
log.Trace().Str("method", "TestP256Verify").Msg("Executing contract method")
inputData = GenerateP256VerifyInput()
return lt.TestP256Verify(opts, inputData)
Expand All @@ -234,7 +234,7 @@ func GetRandomPrecompiledContractAddress() int {
// 7, // NOTE: ecMul requires a lot of gas and buggy
8,
9,
100,
0x100,
}

return codes[rand.Intn(len(codes))]
Expand Down
1 change: 1 addition & 0 deletions contracts/src/tester/LoadTester.sol
Original file line number Diff line number Diff line change
Expand Up @@ -932,6 +932,7 @@ contract LoadTester {

// RIP-7212 Precompile for secp256r1 Curve Support
// https://github.com/ethereum/RIPs/blob/master/RIPS/rip-7212.md
// Ref: https://github.com/daimo-eth/p256-verifier/blob/607d3ec8377a3f59d65eca60d87dee8485d2ebcc/src/P256.sol
function testP256Verify(bytes memory inputData) public returns (bool) {
address P256VERIFY_PRECOMPILED_CONTRACT = 0x0000000000000000000000000000000000000100;
(bool success, bytes memory ret) = P256VERIFY_PRECOMPILED_CONTRACT.staticcall(inputData);
Expand Down

0 comments on commit 1b1ea56

Please sign in to comment.