One solution appears to be to install @truffle/contract package like so:
npm install @truffle/contract
Then in the migration file you will need to grab the full contract JSON (not just the bytecode as mentioned in the question) and use the @truffle/contract to create a contract instance from the JSON. You will also need to set the provider manually, and set ...
Why there are some contract addresses that do not have contract source code?
Because the source code of a deployed contract becomes available on etherscan only after its author has verified it on etherscan.
Let's see what happens here.
In solidity v0.5.11, the end of the bytecode includes the following :
627a7a7231 => "bzzr1" in hex
<32 bytes swarm hash>
736f6c63 -> "solc" in hex
<3 byte version encoding>
That's exactly what you have.
In your two bytecodes ...
I think what you're looking for is something that will create an intermediate representation (IR) between Solidity and EVM bytecode, and which will act as a high-level assembly equivalent which you can instrument, rather than instrumenting the EVM bytecode itself. (There are a few common tools for doing this in the wider world, such as LLVM which is used in ...
Contracts are compiled to opcodes before they are deployed on the network. You can't deploy Solidity code to the network directly. The different clients only run the code, they don't compile it.
The gas cost for each opcode is defined in the Ethereum Yellowpaper (see Appendix G), so the gas cost is the same for the different clients (assuming they are ...
Short answer: No.
Long Answer: If you know the code of the function you want to call (e.g. in case of a ERC20 token) you can compile it again to get its signature / part of the ABI.
Then just call the function as you normally would.