- how to check an eth address is valid ? #3205
- Comments
- xuzhiping7 commented Oct 26, 2016
- karalabe commented Oct 26, 2016
- karalabe commented Oct 26, 2016
- xuzhiping7 commented Oct 26, 2016
- xuzhiping7 commented Oct 26, 2016
- karalabe commented Oct 26, 2016
- xuzhiping7 commented Oct 26, 2016
- qyvlik commented Jul 21, 2017 •
- TriAnMan commented Nov 10, 2017
- raisty commented Jan 27, 2018
- adyliu commented Aug 3, 2018
- huahuayu commented Aug 29, 2018
- How to find out if an Ethereum address is a contract?
- 6 Answers 6
- How can I check if an Ethereum address is valid?
- 8 Answers 8
- Regular Address
- ICAP Address
- Programmatically
- Rinkeby Faucet: No Ethereum address found to fund #21166
- Comments
- ligi commented Jun 3, 2020
- vdo commented Jun 3, 2020
- ligi commented Jun 3, 2020
- ligi commented Jun 3, 2020
- ZazzyDictionary commented Dec 20, 2020
- Holger-Will commented Dec 22, 2020
- olimdzhon commented Dec 23, 2020
- pramhedadev commented Dec 23, 2020
- ligi commented Dec 23, 2020
- pramhedadev commented Dec 23, 2020
- ligi commented Dec 23, 2020
- pramhedadev commented Dec 23, 2020
- mehulsc commented Dec 23, 2020
- ligi commented Dec 23, 2020
- ktym1 commented Dec 23, 2020
- ligi commented Dec 23, 2020
- ktym1 commented Dec 23, 2020
- ZazzyDictionary commented Dec 23, 2020
- ligi commented Dec 23, 2020
- therealssj commented Dec 23, 2020
- ZazzyDictionary commented Dec 23, 2020
- ligi commented Dec 23, 2020
- Rinkeby Faucet No Ethereum Address Found #22031
- Comments
- anti-seal commented Dec 17, 2020
- ravisriv commented Dec 22, 2020
- sanoyphilippe commented Dec 22, 2020
- bernatfp commented Dec 22, 2020
- reuvenpo commented Dec 23, 2020
- ligi commented Dec 23, 2020
- sanoyphilippe commented Dec 23, 2020
- ligi commented Dec 23, 2020
- sanoyphilippe commented Dec 23, 2020
- ligi commented Dec 23, 2020
- ravisriv commented Dec 23, 2020 •
- ligi commented Dec 23, 2020
- samson9993 commented Dec 23, 2020
- ligi commented Dec 23, 2020
- samson9993 commented Dec 23, 2020
- bernatfp commented Dec 23, 2020
- reuvenpo commented Dec 23, 2020 •
- ligi commented Dec 23, 2020
- Tigo9527 commented Dec 24, 2020
- WuYansong commented Dec 24, 2020 •
- yayahappywork commented Dec 25, 2020
- dr3amboy commented Dec 26, 2020
- CarlGocht commented Dec 27, 2020
- InsureFiX commented Dec 27, 2020
- nilankanayana commented Dec 27, 2020
- dlarchikov commented Dec 27, 2020
- ligi commented Dec 27, 2020
- malbecAr commented Dec 30, 2020
- aloisius82 commented Dec 30, 2020
- SvyatoslavLiven commented Dec 30, 2020 •
- cristocer commented Dec 31, 2020
- thelastjosh commented Dec 31, 2020
- millileakz commented Dec 31, 2020 •
- einfach-edel commented Dec 31, 2020
- ttakumat commented Dec 31, 2020
- lordkayag commented Dec 31, 2020
- noahc66260 commented Jan 1, 2021
- z330789559 commented Jan 1, 2021
- vnavascues commented Jan 1, 2021
- Kronoxis commented Jan 1, 2021
- foravneet commented Jan 2, 2021
- Ezparga commented Jan 3, 2021
- luongs3 commented Jan 3, 2021
- setragk commented Jan 3, 2021
- karalabe commented Jan 5, 2021
- eebit2020 commented Jan 10, 2021
- montalban commented Feb 13, 2021
- UsabilitySpace commented Mar 7, 2021
- knottl commented Mar 20, 2021
- kietfriends commented Apr 4, 2021
how to check an eth address is valid ? #3205
Comments
xuzhiping7 commented Oct 26, 2016
i haven’t found the api to check an eth-address is valid
have the func like bitcoin-core of «bool ValidateAddress(address)» ?
The text was updated successfully, but these errors were encountered:
karalabe commented Oct 26, 2016
Ethereum addresses are plain 20 bytes, anything can be in them. Since it’s hard to reason about them, programs represent them as 40 character long hex strings. So every 0x is a valid Ethereum address.
karalabe commented Oct 26, 2016
In the Geth 1.5 codebase if you create a common.Address form a hex string I’d imagine it would validate it’s length.
xuzhiping7 commented Oct 26, 2016
xuzhiping7 commented Oct 26, 2016
i sent some eth to an address of «0x4961aC1d43B6249bc998D611F33d42B54E31712E»
why it return me the error msg :
karalabe commented Oct 26, 2016
The link you sent contains a space at the end (encoded %20). Perhaps you also inserted a space at the end of the address?
xuzhiping7 commented Oct 26, 2016
i would have a try
qyvlik commented Jul 21, 2017 •
Use this ^0x[a-fA-F0-9]<40>$
TriAnMan commented Nov 10, 2017
raisty commented Jan 27, 2018
adyliu commented Aug 3, 2018
huahuayu commented Aug 29, 2018
hey you guys, do you have golang eip55 implement to check address? in the eip55 readme page, only list python js swift implement, no golang implement been found.
Then I search in go ethereum codebase only find below code which is to generate an eip55 compliant hex address but doesn’t provide the method to verify the address.
Источник
How to find out if an Ethereum address is a contract?
An address in Solidity can be an account or a contract (or other things, such as a transaction). When I have a variable x, holding an address, how can I test if it is a contract or not?
(Yes, I’ve read the chapter on types in the doc)
6 Answers 6
Edit: Solidity has changed since this answer was first written, @manuel-aráoz has the correct answer.
There is no way in solidity to check if an address is a contract. One of the goals of Ethereum is for humans and smart contracts to both be treated equally. This leads into a future where smart contracts interact seamlessly with humans and other contracts. It might change in the future , but for now an arbitrary address is ambiguous.
Yes you can, by using some EVM assembly code to get the address’ code size:
The top-voted answer with the isContract function that uses EXTCODESIZE was discovered to be hackable.
The function will return false if it is invoked from a contract’s constructor (because the contract has not been deployed yet).
The code should be used very carefully, if at all, to avoid security hacks such as:
Do not use the EXTCODESIZE check to prevent smart contracts from calling a function. This is not foolproof, it can be subverted by a constructor call, due to the fact that while the constructor is running, EXTCODESIZE for that address returns 0.
See sample code for a contract that tricks EXTCODESIZE to return 0.
If you want to make sure that an EOA is calling your contract, a simple way is require(msg.sender == tx.origin) . However, preventing a contract is an anti-pattern with security and interoperability considerations.
This will need revisiting when account abstraction is implemented.
Источник
How can I check if an Ethereum address is valid?
I’ve read many times that you should never input an address by hand unless you want to accidentally send Ether into no-mans-land. I’d like to know what those checksums might be. Is there a way to tell a typo is occurred? how, and what are the formatting rules to it? Im asking so I can potentially create a wrapper function that checks for these things before submitting to the network.
8 Answers 8
Regular Address
EIP 55 added a «capitals-based checksum» which was implemented by Geth by May 2016. Here’s Javascript code from Geth:
ICAP Address
ICAP has a checksum which can be verified. You can review Geth’s icap.go and here’s a snippet from it:
50x improvement over ICAP, but not as good as a 4-byte check code.» – eth ♦ May 8 ’16 at 6:29
There is an easier way now with web3 :
using checkSum method is better because you will always deal with data and never have to lowerCase.
The standard 40 character hex addresses now have a checksum in the form of capitalization. If the address has at least one capital letter then it is checksummed and, if inputted on a site that checks the sum, it will return false if it’s not a valid address.
The scheme is as follows:
convert the address to hex, but if the ith digit is a letter (ie. it’s one of abcdef) print it in uppercase if the ith bit of the hash of the address (in binary form) is 1 otherwise print it in lowercase
The python package ‘ethereum’ has a function called ‘check_checksum’ in the utils module:
I build a small project for this which i use programmatically in my apps. It has a ‘micro’ api:
It also has address validation for bitcoin, monero, and ripple.
You can find the documentation here: balidator.io/api-documentation
So far ether addresses have no checksum and are simply the HEX encoding of the address bytes. There is however a proposal for encoding and checksum, see: ICAP: Inter exchange Client Address Protocol.
ICAP has preliminary support merged in some Ethereum client.
Checksums are mechanisms to prevent sending funds to wrong addresses (set by mistake or by a malicious party).
Programmatically
You can use web3 ‘s amazing utils:
The function above works only if you have version 1.0.0 or above.
I created an online tool, check it out here: EthSum.
Another way to check is if you also have the public key of the ethereum address. The Ethereum Foundation’s official eth-keys Python library can be used, and is now part of their Github repo and can be seen here and contains a suite of tools that include ways to check address validity, such as using the PublicKey().checksum_address() method (see below example).
The following method requires the uncompressed public key in bytes format, which means it would have to be only for accounts you have the public-key data for:
Источник
Rinkeby Faucet: No Ethereum address found to fund #21166
Comments
ligi commented Jun 3, 2020
this is the tweet that clearly contains an ethereum address: https://twitter.com/mr_ligi/status/1268171687159357443
Guess there is something off with the twitter connection
The text was updated successfully, but these errors were encountered:
vdo commented Jun 3, 2020
Looks like we have the same issue with the goerli faucet:
https://goerli-faucet.dappnode.net/
ligi commented Jun 3, 2020
also with the https://yolonet.xyz — but this one at least has the fallback to plain addresses
ligi commented Jun 3, 2020
ZazzyDictionary commented Dec 20, 2020
The issue still exist.
Holger-Will commented Dec 22, 2020
same problem with facebook posts, too
olimdzhon commented Dec 23, 2020
same problem on twitter, and facebook says invalid facebook post url
pramhedadev commented Dec 23, 2020
Is there an alternative method of getting ether ?
ligi commented Dec 23, 2020
Please send me your address and how much rinkeby ether you need
pramhedadev commented Dec 23, 2020
Hi @ligi thank you.
I need roughly about 15 ether : 0x151efe3c9612AC77E112a39944Cd119ECC7817C8
ligi commented Dec 23, 2020
pramhedadev commented Dec 23, 2020
Thank you. I received it
mehulsc commented Dec 23, 2020
can I get 15 RETH as well: 0xD37ba182d8528E2EcA85fba497C804EDC84A8324
ty
ligi commented Dec 23, 2020
ktym1 commented Dec 23, 2020
Hi @ligi can I get 18.75 RETH: 0x41f038C12D2A93009a5DA3B99e063235fdf93303
Thank you for your help!
ligi commented Dec 23, 2020
ktym1 commented Dec 23, 2020
ZazzyDictionary commented Dec 23, 2020
@ligi can i get 20 RETH : 0x94EaDfdD92076932c04d8F5D01B379C09212EeF8
ligi commented Dec 23, 2020
@ZazzyDictionary wondering why you need 20 — this is more than you would get from the faucet. Greed or real need?-)
therealssj commented Dec 23, 2020
#21172
seems like the solution of switching over to mobile twitter doesn’t work anymore
doing some quick tests, http.Get returns -> This browser is no longer supported
faking it with a iPhone/Chrome user agent returns -> JavaScript is not available.
not sure what the solution could be here, executing requests with a headless browser api?
ZazzyDictionary commented Dec 23, 2020
@ligi i am not sure when will i get the chance to get more Reth so i guess i will take what i can get haha 🙂
ligi commented Dec 23, 2020
@ZazzyDictionary I send you 4 — LMK when you used them and need more. Then I will check if you used them wisely or just blew it all and send you more depending on this check 😉
@therealssj thanks for looking into this. The problem is that there are now 2 issues at play: the twitter communication and the communication with the network (as also other methods other than twitter do not work)
Источник
Rinkeby Faucet No Ethereum Address Found #22031
Comments
anti-seal commented Dec 17, 2020
So I clearly have a tweet with a valid ethereum address, but it says no ethereum address found.
The text was updated successfully, but these errors were encountered:
ravisriv commented Dec 22, 2020
Same here. I tweeted several times. It can’t read a tweet. Basically, it is not working. It keeps on saying no Ethereum address found. Its not working.
sanoyphilippe commented Dec 22, 2020
same issue for me
bernatfp commented Dec 22, 2020
Same, can’t get it to work with tweets nor with FB posts.
reuvenpo commented Dec 23, 2020
ligi commented Dec 23, 2020
Please let me know your addresses and how much rinkeby ether you need
sanoyphilippe commented Dec 23, 2020
Please let me know your addresses and how much rinkeby ether you need
0xaEa9a49dEd76F9954DCD41E988Ee68EeA550CF47
10 ETH rinkeby
ligi commented Dec 23, 2020
this seems to be a token contract that does not accept ether — please send an EOA
sanoyphilippe commented Dec 23, 2020
this seems to be a token contract that does not accept ether — please send an EOA
what’s EOA? also why doesn’t it accept ether? do I need ether to create NFTs? I am still new to this. thank you
ligi commented Dec 23, 2020
EOA -> Externally Owned Address
Unfortunately I do not see the code of your contract — so I do not know why it does not accept it.
Yes — you need ether to create NFTs
ravisriv commented Dec 23, 2020 •
Please let me know your addresses and how much rinkeby ether you need
About 18 ETH would be great.
ligi commented Dec 23, 2020
@ravisriv you have >18 ETH now in your account
samson9993 commented Dec 23, 2020
@ligi Some ETH (10) to this account would be great. Thank you!
ligi commented Dec 23, 2020
samson9993 commented Dec 23, 2020
bernatfp commented Dec 23, 2020
Please let me know your addresses and how much rinkeby ether you need
Would it be possible to get 20 Rinkeby ETH?
reuvenpo commented Dec 23, 2020 •
My address is 0x60baA9f4ab5FC82B72d06Bc66Da1Eb1e8FDE60E1 , I’d like 10 rinkeby ETH
Thanks @ligi ! 😄
ligi commented Dec 23, 2020
Tigo9527 commented Dec 24, 2020
@ligi Please help me and my team mates: each for 6 eth or 18 eth to me. we runs a new chain and interact with ethereum, need eth to test cross chain operation. Thanks.
0xa1F29a57BD2240aAECABcAfB3Febed914648b64E
0xd76f955ac8FAa0eb9c139A32cBf19d9E678Cd1F9
0x9a5ef76F0e2d03dEDa0e42bA692B36d685C93F2e me
WuYansong commented Dec 24, 2020 •
@ligi Please help me. My address is 0xdA9914E4479C87FBf80c8C2ECe3fe9A97F2f0fba, 10 ETH(Rinkeby) to this account would be great.Thank you
yayahappywork commented Dec 25, 2020
@ligi Please help me, my address is 0x5584A45499d9A19D83173894Bf57986E769E6198,I’d like 10 rinkeby ETH
Thanks
dr3amboy commented Dec 26, 2020
I haven’t been able to get any of the test faucets to work, @ligi if you could possibly send some Rinkeby test ETH to 0x5D79b92efed4Aa3a6a69868ab775A4773b712d4F that would be greatly appreciated!
CarlGocht commented Dec 27, 2020
@ligi same issue as the others, can’t get the rinkeby faucets to work, 10 rinkeby eth to 0xd1015Efa96441d2326F8194E7b1f5FE8425b84f8 would be appreciated. Thank You!
InsureFiX commented Dec 27, 2020
@ligi Same issue as the others, cant get the rinkeby faucets to work, 10 rinkeby eth to 0xdbC2E36941De2a4724EbfD25098c44B8F1ce476D would be awesome. THANK YOU!
nilankanayana commented Dec 27, 2020
same issue, if you could send me 10 eth, it would be great, thanks.
address: 0xDc7026F5a4AEc3001817ed661Ff9B786E9186e28
post: https://twitter.com/nilankanayana/status/1343044369893355522
dlarchikov commented Dec 27, 2020
Same problem
ligi commented Dec 27, 2020
You should all have rinkeby ether now
@Tigo9527 I send 18 to you — please distribute to your mates
@dlarchikov please provide an address here so I can send you some
malbecAr commented Dec 30, 2020
@ligi 10 eth please
0xcC4768Dfaae25224103A4801dED30787b74Ec28d
aloisius82 commented Dec 30, 2020
please send me 20 eth 0xD5fB11a7655D0095fE9E090c205C91a8f0CDef47
thanks
SvyatoslavLiven commented Dec 30, 2020 •
@ligi 5 ETH please)
0x696CC718d80fDd2eC8e2CE0b29cFcEA4c16d9496
cristocer commented Dec 31, 2020
@ligi 15 eth would be nice please
0x66353521A464345BE1AdCd74A25D686981a359c6
thelastjosh commented Dec 31, 2020
@ligi Same issue. 10 ETH please!
0x356bd1169A2b94B5a3C9D9F356FA5D35E584A521
millileakz commented Dec 31, 2020 •
same issues — if anyone has some Rinkeby ETh to spare for test i will appreciate this 🙂
einfach-edel commented Dec 31, 2020
same issue — I created my first account, shared my EOA via Facebook and Twitter. Entered the link on https://faucet.rinkeby.io/ and got the error message «No Eth address found to fund».
Can someone send me 1 Rinkeby Eth to
0xF5aa9a685fCc792C1E616803B57a8c0F1015e0f1
ttakumat commented Dec 31, 2020
Hi. same issue here.
I’d really appreciate if someone can fund 1 eth to
0x348c0a7a93F86E451971DFC89D2A74519bBaEBfd
Thanks.
lordkayag commented Dec 31, 2020
Having same issue.
Please send 5 eth rinkeby to 0x43A0033408C2bCc86102385F1A4FcB37bABFe8f8
noahc66260 commented Jan 1, 2021
Me too.
Please send 3 ETH rinkeby to 0x71849D7a22890f60C6D6BE83E2E48cdB4A24CEA7
Post: https://twitter.com/devilscompiler/status/1344848283626180609
z330789559 commented Jan 1, 2021
@ravisriv you have >18 ETH now in your account
me too
Please send 18ETH rinkeby to 0x896267e34bD86ecc9478333F412705235Fc66E4a
https://twitter.com/al84628047/status/1343894099783372801?s=20
vnavascues commented Jan 1, 2021
Please let me know your addresses and how much rinkeby ether you need
Hi, can I get 18 ETH at 0x5E1e93B6D25690B7A26d70468f81d5b6441885c4? Many thanks
https://twitter.com/vnavascues1/status/1345022515408756745
Kronoxis commented Jan 1, 2021
We’re planning on doing some extensive testing with 4 devs tomorrow, so I could use some more ETH to distribute among my team. Can you send 16-20 ETH to the following address?
0x57b2D27191d80afDb520AD07AD407C2a99B34127
Thanks!
foravneet commented Jan 2, 2021
2-3 ETH at this address will help. Thanks ! — 0x1600431bD009a0EEb62247a429dE609b9E0014B5
Ezparga commented Jan 3, 2021
Just found this thread, we’re urgently needing to carry out some testing and the faucet isn’t working
Please could you send 15 ETH to:
luongs3 commented Jan 3, 2021
Please 15 ETH to 0x91878ec5288E944fD4A357022d60DbE9Ab49c46f
I really need it now to test my product
setragk commented Jan 3, 2021
Can someone please send 10 ether to 0xB3D8C850aD1f50CF5863600b3F49c1AC068400e4
karalabe commented Jan 5, 2021
This was fixed yesterday, needed a new Twitter auth workflow.
eebit2020 commented Jan 10, 2021
Please send me 1 ethe 0x8f6f2f241A993EBE06E7d383ab9D4945BF189138
montalban commented Feb 13, 2021
Could someone please send 10 ETH to 0xf8B17B25032b82CBDDEe3413FDb7E195D6D2752C Thanks!!
UsabilitySpace commented Mar 7, 2021
It’s not working for me too.
So, would someone send some test ether to 0x9413391975190f0413ddc331c41A2F32847D960d
knottl commented Mar 20, 2021
Can someone send me some ether to 0xb89238b93Fb85a99daeb15121DF828F225f467BE thank you @ligi
kietfriends commented Apr 4, 2021
Could someone please send 10 ETH to 0xD3afb233FA3CB3982e59497a269D1de290373b74 Thanks!!
Источник