Hi, is there any way of knowing which function was called inside which function is a solidity contract.
like for example I want to know which function calls
anInsiderFunction()
in the solidity code
function thisFnCalls(){
...
anInsiderFunction()
...
}
So my result should be thisFnCalls()
as it calls anInsiderFunction()
Nov 1, 2023, 11:55 AM
yup, tracing
https://geth.ethereum.org/docs/developers/evm-tracing
https://geth.ethereum.org/docs/developers/evm-tracing
Nov 1, 2023, 12:17 PM
If you need testnets tokens try these:
https://moralis.io/faucets/
https://faucet.paradigm.xyz/
https://github.com/arddluma/awesome-list-testnet-faucets
https://cointool.app/tools/faucets
https://moralis.io/faucets/
https://faucet.paradigm.xyz/
https://github.com/arddluma/awesome-list-testnet-faucets
https://cointool.app/tools/faucets
Nov 1, 2023, 12:17 PM
https://github.com/zemse/hardhat-tracer
or "forge test -vvvvvv" if you have foundry
Nov 1, 2023, 12:18 PM
so this means the transaction needs to be executed.
Nov 1, 2023, 12:56 PM
executed or simulated locally, yep
fastest way is to write a simple integration test in foundry and add some -vvvvvv
or... not the fastest way if it's already mined
Nov 1, 2023, 12:57 PM
so we need to call every function to see which function executes the other function. don't you think its a little bit slow
Nov 1, 2023, 12:57 PM
cast run --quick --rpc-url RPC 0xTXHASH
should generate traces too
should generate traces too
Nov 1, 2023, 12:58 PM
I'm right now on python, I've found another python tracer
https://github.com/ApeWorX/evm-trace
if you have any alternatives, please provide
Nov 1, 2023, 12:58 PM
depends on what you need to do.
If you have no access to a contract and you want to check who it will call, i think the best way is doing a local fork and start calling it randomly
If you have no access to a contract and you want to check who it will call, i think the best way is doing a local fork and start calling it randomly
with traces
Nov 1, 2023, 12:58 PM
I can get the contract and abi using etherscan api
Nov 1, 2023, 12:59 PM
i still need to try this boi but seems the next best framework in python
for now all i use is Foundry
for now all i use is Foundry
Nov 1, 2023, 12:59 PM
foundry is only in js, right?
Nov 1, 2023, 1:00 PM
nono, foundry is all in solidity
under the hood it's written in rust
hardhat is in JS
Nov 1, 2023, 1:00 PM
oh mixed up. never used foundry; have used hardhat
Nov 1, 2023, 1:02 PM
https://book.getfoundry.sh/
Time to try it
Funny thing, after making this video I tried for the 3rd attempt switching a whole to foundry, the missing piece was the possibility of using JSON files inside script contracts
Nov 1, 2023, 1:35 PM
Are you the guy on video?
Nov 1, 2023, 1:39 PM
btw,do you know any methods to get the modifiers of particular functions? I think with that I can narrow down which functions to use
Nov 1, 2023, 1:42 PM
yes.
Follow me for more motivational messages
Follow me for more motivational messages
i'm not 100% sure but modifiers are not directly inserted in bytecode.
The code before and after the _; is pasted in the functions on deployment
The code before and after the _; is pasted in the functions on deployment
Nov 1, 2023, 1:46 PM
thank you
Nov 1, 2023, 2:13 PM