1

How Could I pull out smart contract bytecode using web3 and contract address?

1

Using Web3.js you can easily extract the bytecode for a contract at a certain address using the getCode() function:

getCode

web3.eth.getCode(address [, defaultBlock] [, callback])
web3.eth.getCode("0xd5677cf67b5aa051bb40496e68ad359eb97cfbf8")
.then(console.log);
> "0x600160008035811a818181146012578301005b601b6001356025565b8060005260206000f25b600060078202905091905056"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.