22
votes
Accepted
How to generate a vanity address for a smart contract to be deployed on?
Generating a vanity address is a simple process of trial-and-error, and the same process can be used to search for accounts having some other property.
Contract addresses are determined by the ...
14
votes
Accepted
Is an Account in MetaMask the same as an Ethereum Account (EOA)?
MetaMask accounts are EOA accounts. They are not seen in Geth because the keys have not been imported from MetaMask.
Basically, MetaMask creates a hierarchical deterministic wallet hd-wallets from ...
eth♦
- 86.3k
8
votes
Accepted
Solidity: using low level call function on an EOA
(moving my comment to an answer as requested)
Yes, this call should succeed. In general, a call will succeed unless the receiving address reverts. The difference between an EOA and a contract is that ...
6
votes
Accepted
Where does Ethereum store EOAs and public keys?
How is a wallets public key published in the Ethereum network?
It isn't. For an EOA, the address is computed as the last 20 bytes of the keccak256 hash of the public key. The public key itself is not ...
6
votes
Accepted
Can a user impersonate a smart contract address - and use it as an EOA?
If/when the above happens, what if our lucky guesser tries submitting a tx on behalf of the Smart Contract address (say, transferring its ETH balance somewhere), just like they'd do for an EOA public ...
5
votes
Accepted
Is "tx.origin" always an externally owned account (EOA)?
It is, tx.origin is the original sender of the call. In a transaction that results in a chain of calls, tx.origin is the EOA that initiated the transaction in the first place (contracts cant initiate ...
5
votes
Can a Smart Contract write on the blockchain a transaction containing not only value but also data between two EOAs?
The contract will not have access to the events that happen in the network. Therefore, the wake-up call needs to be sent by an EOA.
The answer is then that the smart contract can store information ...
4
votes
Accepted
Why Ethereum addresses contain lowercase and uppercase letters
Ethereum address checksum is encoded in alphabet cases in hexadecimal. This allows to detect copy-paste errors in Ethereum addresses.
This is EIP-55 standard.
3
votes
How to get smart contract information about ABI token balance by web3?
You can find if an address is a contract by fetching its bytecode : web3.eth.get_code(address). If it has any, then it's a smart contract, otherwise it's EOA. (Web3py ref)
You cannot retrieve the ABI ...
3
votes
Where does Ethereum store EOAs and public keys?
Accordingly, any miner will need to verify said transaction's signature using my public key (as stated in the yellow paper in Section 6), which hence needs to be published somehow.
The trick is that ...
2
votes
Accepted
How can I generate EOA address on testnet using JavaScript without access to ETH node?
Unlike bitcoin, ethereum eoa address does not distinguish between mainnet and testnet.
There is no way to verify if an address belongs to a particular network - they are all valid for every ...
2
votes
Accepted
transfer of ERC721 between EOA to contract
The transfer won't collide even the tokenID is the same between two different contracts.
In fact, whenever we talk about "transferring" tokens, this means updating the balance within the ...
2
votes
Accepted
what is the cheapest way for sending ethereum from 10 account addresses to 10 account addresses?
10 transactions from an EOA will cost 210,000 gas.
The most efficient way to do this would be to deploy a contract that accepts funds in the constructor and subsequently distributes the funds to 10 ...
2
votes
Accepted
Locked Ether in EOA Account: Fake Contract Address
Maybe the word "fake" was not the correct one to use in that scenario.
Let's take a look at this way of deploying a contract from another contract taken from solidity-by-example:
...
2
votes
Is there any simple function done in Solidity to check if an address is a contract address or a wallet address?
The best way to check and make sure that an address is not a contract, is by comparing tx.origin with msg.sender. You could do a modifier for that.
modifier onlyEoa() {
require(tx.origin ==...
2
votes
Accepted
Is there any simple function done in Solidity to check if an address is a contract address or a wallet address?
There is a library called Address in openzeppelin-contracts.
You can use isContract function to check whether the address is smart contract address.
Please read more details here. https://docs....
2
votes
Accepted
How to get smart contract information about ABI token balance by web3?
A1: yes you can know if an address is a contract or an EOA. contracts have bytecode stored on the blockchain but EOA doesn't.
getCode(address) will return the bytecode. if it returns 0x0 then it's an ...
2
votes
Accepted
Fetching all ERC1155 tokens of a smart contract ( The smart contract is not the minter )
If you are using Moralis, they have a getWalletNFTs API that can do just that.
Even though the input describes it as a wallet address, the fact is that it doesn't make difference whether you use an ...
2
votes
Who pays the computation fee in account abstraction ERC-4337? in what currency?
You pretty much understand it!
Yes, the bundler has a private key and pays to submit a bundle of transactions (called user operations). You can read more about how bundlers work and an example here. ...
2
votes
If no event is triggered with normal transaction, how do one listen to "transfer activities"?
Since there isn't event for ETH transfer that you can follow, you can enter the block or blocks in the specific period that you want to monitor, then get msg.value from all of transactions and ...
2
votes
Is it 100% guaranteed to check an address that it is a smart contract using eth_getCode?
You're right about calling extcodesize/copy on a contract as it's being deployed, unsure that is a concern if calling off chain.
Though you could also call it on an address where a contract isn't yet ...
1
vote
Could a contract permits ERC20 token to an EOA account?
Yes, the contract can call ERC(token).approve(eEOA, cmount)
exactly the same, yes.
Yes, indeed, this is the classical interaction with a defi protocol, when you approve the defi contract to transfer ...
1
vote
How to distinguish between a contract and wallet address?
The contract have codesize > 0. In solidity code you can check it by:
uint32 size;
assembly {
size := extcodesize(_addr)
}
return (size > 0);
}
Diagrams:
1
vote
How to determine whether an address is an EOA or a contract address?
Unfortunately, I could not find the precise details on the data presented in the dataset. The links from this page did not work for me.
But the only correct way to find whether an account is an EOA is ...
1
vote
Function: null(address) in contract deployment
What you are experiencing is just a bug of bscscan.com, not a rug pull at all.
BSCScan tries to decode the input data using a custom-created ABI that does not correspond to the actual smart contract. (...
1
vote
Accepted
ERC721 approve Smart Contract and send transaction from it
If i understand your question, you want to send a ERC721 transaction from contract to another contract address and you use approve() and safeTransferFrom() methods on the sender contract. So you need ...
1
vote
Transfer ether between two addressrd using call
A contract only has access to its own funds.
(bool success, ) = owner.call.value(100)("");
This code send 100 wei from the contract's balance to owner address.
If no units is given solidity ...
1
vote
Accepted
Gas cost for Ether transfer to Smart Contract from EOA
When transferring ether from an externally-owned account to a smart-contract account, the fallback function of the smart contract is executed (if it doesn't implement one, then the transaction reverts)...
1
vote
Gas cost for Ether transfer to Smart Contract from EOA
Transferring ETH to a smart contract wallet will cost slightly more gas than transferring to an EOA. For example, transferring ETH to an Authereum wallet costs ~21,084 gas. This is because the ...
1
vote
What is meant by a "non one time use EOA"
EOAs are user addresses i.e. not contracts. A "non one time use EOA" would be an address possessed by a user which is used multiple times rather than used and then discarded - such as MetaMask ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
eoa × 48solidity × 8
transactions × 8
smart-contract-wallets × 6
addresses × 5
accounts × 5
contract-development × 4
wallets × 4
evm × 4
transfer × 3
account-abstraction × 3
ether × 2
contract-deployment × 2
contract-invocation × 2
ethereum-wallet-dapp × 2
ropsten × 2
erc-721 × 2
multisignature × 2
opcode × 2
web3js × 1
blockchain × 1
remix × 1
contract-design × 1
erc-20 × 1
metamask × 1