-
Notifications
You must be signed in to change notification settings - Fork 873
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add eth_getCode support for getting address bytecode (#17215)
This is intended to be used to check if an address is an EOA or a contract You can query ```js const apiProxy = getWalletPanelApiProxy() const jsonRpcService = apiProxy.jsonRpcService console.log('BAT rpc service get code: ', await jsonRpcService.getCode('0x0d8775f648430679a709e98d2b0cb6250d2887ef', BraveWallet.CoinType.ETH, '0x1')) console.log('EOA rpc service get code: ', await jsonRpcService.getCode('0x...', BraveWallet.CoinType.ETH, '0x1')) ``` This would output the bytecode in hex format for the BAT price and the string 0x for the EOA address.
- Loading branch information
Showing
4 changed files
with
108 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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