-
-
Save cooldev1337/6279dddc52731515d52855b593fa988b to your computer and use it in GitHub Desktop.
This file contains hidden or 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
6015600D60003960156000F360105F5260205FF3 |
This file contains hidden or 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
// Header | |
6038600D60003960386000F3 | |
// Code | |
5F357F0DBE671F0000000000000000000000000000000000000000000000000000000014602F5760055F5260205FF35B60045F5260205FF3 |
This file contains hidden or 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
// SPDX-License-Identifier: MIT | |
pragma solidity ^0.8.20; | |
interface IRawContract { | |
function a() external pure returns (uint256); | |
function b() external pure returns (uint256); | |
} |
This file contains hidden or 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
63 23B872DD // Push signature | |
7C 0100000000000000000000000000000000000000000000000000000000 | |
02 // Mul to shift right | |
5F // Start in memory 0 | |
52 | |
7f 000000000000000000000000707e55a12557E89915D121932F83dEeEf09E5d70 // From | |
60 04 | |
52 // Store param1 | |
7f 000000000000000000000000bef34f2FCAe62dC3404c3d01AF65a7784c9c4A19 // To | |
60 24 | |
52 // Store param2 | |
7f 0000000000000000000000000000000000000000000000487A9A304539440000 // Amount | |
60 44 | |
52 // Store param3 | |
60 20 // Return size 32 bytes | |
61 1000 // Return offset, put in whatever | |
61 0064 // Args size (signature + from + to + amount) push(100 bytes) | |
5F // Args offset push(0) | |
5F // Value push(0) | |
73 E7ceD894c7F7c2923Eb0186D9d97F909289a09f5 // Smart contract push(address) | |
62 135168 // Gas push(21000) | |
F1 | |
gas: amount of gas to send to the sub context to execute. The gas that is not used by the sub context is returned to this one. | |
address: the account which context to execute. | |
value: value in wei to send to the account. | |
argsOffset: byte offset in the memory in bytes, the calldata of the sub context. | |
argsSize: byte size to copy (size of the calldata). | |
retOffset: byte offset in the memory in bytes, where to store the return data of the sub context. | |
retSize: byte size to copy (size of the return data). | |
61016C600F60003961016C6000F3 | |
6323B872DD7C0100000000000000000000000000000000000000000000000000000000025F527f000000000000000000000000707e55a12557E89915D121932F83dEeEf09E5d706004527f000000000000000000000000bef34f2FCAe62dC3404c3d01AF65a7784c9c4A196024527f0000000000000000000000000000000000000000000000487A9A30453944000060445260206110006102565F5F73E7ceD894c7F7c2923Eb0186D9d97F909289a09f562135168F1 |
This file contains hidden or 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
* FE no es necesario (investigar?) | |
No necesario, el compilador de Solidity añade metadata. | |
El FE allí era remanente de hacer ingeniería inversa a smart contracts hechos con Solidity. | |
* En el contrato 1 usar push1 en vez de push32 para ahorrar gas en el deploy [Done] | |
* En el contrato 3 en vez de 0256 usar 0064, y también usar entonces push1 en vez de push2 [Done] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment