Skip to content

Commit

Permalink
standardize precompile addr in hex
Browse files Browse the repository at this point in the history
  • Loading branch information
enitrat committed Sep 3, 2024
1 parent 2873c94 commit f365d87
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions crates/evm/src/precompiles.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -35,43 +35,43 @@ impl PrecompilesImpl of Precompiles {
P256Verify::exec(input)?
} else {
match precompile_address.address {
0 => {
0x00 => {
// we should never reach this branch!
panic!("pre-compile address can't be 0")
},
1 => { EcRecover::exec(input)? },
2 => { Sha256::exec(input)? },
3 => {
0x01 => { EcRecover::exec(input)? },
0x02 => { Sha256::exec(input)? },
0x03 => {
// we should never reach this branch!
panic!(
"pre-compile at address {} isn't implemented yet",
precompile_address.address
)
},
4 => { Identity::exec(input)? },
5 => { ModExp::exec(input)? },
6 => {
0x04 => { Identity::exec(input)? },
0x05 => { ModExp::exec(input)? },
0x06 => {
// we should never reach this branch!
panic!(
"pre-compile at address {} isn't implemented yet",
precompile_address.address
)
},
7 => {
0x07 => {
// we should never reach this branch!
panic!(
"pre-compile at address {} isn't implemented yet",
precompile_address.address
)
},
8 => {
0x08 => {
// we should never reach this branch!
panic!(
"pre-compile at address {} isn't implemented yet",
precompile_address.address
)
},
9 => { Blake2f::exec(input)? },
0x09 => { Blake2f::exec(input)? },
0x0a => {
// Point Evaluation
panic!(
Expand Down

0 comments on commit f365d87

Please sign in to comment.