Questions tagged [addresses]

Addresses are the particulars of names, domains or accounts on the blockchain.

Filter by
Sorted by
Tagged with
0
votes
1answer
109 views

Smart contract balances question

I have a few questions regarding ETH and token storage. Is it a good practice to store ETH on smart contract address in case only owner is authorized to withdraw it? When deploing smart contract, do ...
0
votes
1answer
122 views

Create accounts on ethereum network using programmatically generated key pairs and addresses

Say I have a node application that has user registration feature. Now when a user registers, using node libraries like crypto I generate a cryptographic key pair(private and public). Then also ...
1
vote
1answer
140 views

How to have an address inside a solidity Struct?

My problem Suppose I have this struct: struct TextThatWorks { bytes32 text; uint reads; } How can I add a address variable to it? What I tried I tried simply adding address ...
3
votes
1answer
1k views

Set default address in web3?

I've tried to change the value of defaultAccount on web3.min.js from void to an address, but it didn't seem to work and web3.eth.defaultAccount remained undefined when I called it from the console. ...
0
votes
2answers
36 views

From where this Ether came from?

Let's have a look at this address on Etherscan: https://etherscan.io/address/0xfbe0aFcd7658BA86be41922059dD879C192D4c73 First transaction is a Smart Contract creation, that costs about 15 ETH. Can't ...
1
vote
1answer
23 views

Is attaching a name to an Ethereum address a “faux pas?”

I'm currently working on a DApp right now, and I was curious if it's considered poor design to include a string with the user's name that is mapped to a particular address. A user who has access to ...
4
votes
1answer
219 views

What are 'payable' state variables?

https://solidity.readthedocs.io/en/latest/solidity-by-example.html#simple-open-auction pragma solidity ^0.4.22; contract SimpleAuction { address payable public beneficiary; What exactly does ...
2
votes
2answers
236 views

send() or transfer() functions always fail

I created a few code below pragma solidity ^0.4.19; contract SendAndTransferExample { function SimpleSendToAccount() public returns(bool) { return msg.sender.send(10000000000000000000); ...
0
votes
2answers
636 views

How to test contract with multiple accounts / addresses in truffle?

I want to test my truffle contract with multiple msg.sender addresses. Like "the first user sell token, the second user buys this token". For one address I simply write something like contract.buy....
2
votes
1answer
98 views

How does a contract know which library to query or know the library address?

How does a contract know which library to query? For Example in the code below (The code is from solidity docs: https://solidity.readthedocs.io/en/v0.4.24/contracts.html?highlight=library#libraries ...
5
votes
2answers
343 views

Updated: Is it possible to hide the sender or receiver of transactions by “zk-SNARK” or “Bulletproofs”?

To support the user privacy, is it possible to hide the sender address or receiver address of transactions by "zk-SNARK" or "Bulletproofs" ? Or we’ll be able only to hide the value that is mapped to ...
1
vote
1answer
43 views

What does the logger's address mean in Ethereum yellow paper?

In the Ethereum yellow paper Page 5 says that the log entry O consists of (O_a,(O_{t0}, O_{t1},...),O_d). And O_a means the logger's address. What's the meaning of logger's address? Does it mean the ...
1
vote
1answer
188 views

How to retrieve holdings by address by token? [duplicate]

One can find on etherscan, for any token, the list of holdings by address. I would like to retrieve this info programmatically. Does the etherscan API enable us to do this? If not, what is a good ...
1
vote
1answer
41 views

Can't withdraw from Crowdsale multiple times

I'm using a crowdsale contract (listed below) and on Ropsten network I just set founding goal to 1ETH send it to crowdsale address and then I can withdraw to beneficiary address but when I send ETH a ...
1
vote
1answer
277 views

How to get the address of a contract deployed by another contract?

// deploy a new purchase contract function newPurchase() public payable returns(address newContract) { Purchase c = (new Purchase).value(msg.value)(address(msg.sender)); contracts....
2
votes
1answer
271 views

Do all Ethereum addresses have a specific format?

I know all ethereum addresses start with 0x, but is there a common letter/number after the 0x to represent an address? Because I get confused on how to tell if its an Eth address or if its a ...
2
votes
1answer
52 views

Working on my first smart contract for college…Need help with one error!

pragma solidity ^0.4.0; contract ZaPartnere { address[] partneri = [0x118531D9C6C9114c8B999Ac1197778d1669Fc6c6, 0x029c2D637e193716246A55c62F2302a61FaC81dC, 0x36FFE679f923BdADd17E79Ce159DE80f779b512C,...
8
votes
1answer
1k views

Why are Ethereum addresses hashes of public keys?

I understand how Ethereum addresses are generated. This thread has a great explanation: How are ethereum addresses generated? However, what this explanation is missing is why a hash is used. There ...
2
votes
1answer
63 views

how to create a smart contract that receives funds, displays addresses that sent the funds?

function safeWithdrawal() public afterDeadline { if (!fundingGoalReached) { uint amount = balanceOf[msg.sender]; balanceOf[msg.sender] = 0; if (amount > 0) { ...
0
votes
1answer
220 views

Solidity: msg.data vs bytes

This is a simple contract that has a function input_data(bytes data) and a simple fallback function that passes msg.data to function input_data. contract test_input_data{ address owner; event ...
0
votes
1answer
30 views

discover if a binary data contains Ethereum address in it?

Is there a way to guess, with some level of probability , that a 20 byte array is an Ethereum address, besides doing a query against the current StateDB and its history ? I want to discover hidden ...
0
votes
1answer
538 views

How to see Smart contract address and it’s transactions, and have multiple addresses in a smart contract

How can I see a smart contract address & know which addresses sent ether to my smart contract? And Can a smart contract have multiple receiving addresses.... like for example if I am selling e-...
2
votes
1answer
122 views

Is it possible to tell that two addresses were derived from the same private key?

As we know, a single private key or seed phrase generates many addresses. Is it possible for someone to determine that two addresses were derived from the same private key?
6
votes
1answer
286 views

Why are the last 20 bytes of the public key used as the address?

According to this post regarding how to derive the Ethereum address from a public key: Take the last 40 characters / 20 bytes of this public key (Keccak-256). Or, in other words, drop the first ...
2
votes
1answer
134 views

Communicating between a Sidechain and a Mainchain

Side chains (see linked question ) can be seen as a blockchain attached to a "parent" blockchain using a "two way" peg. Smart contract addresses are generated deterministically(HD wallet style), but ...
0
votes
1answer
349 views

How to generate ERC-20/xxx token addresses?

How to generate ERC-20/xxx token addresses, from which I can receive/send corresponding tokens? How can I do this using web3j?
0
votes
1answer
50 views

Why the amount of private key is more than that of public address? [duplicate]

See:the amount of private key is 16^64,the amount of public address is 16^40,so the amount of private key is way more than that of public address. But one private key can only generate one public ...
2
votes
1answer
40 views

How payments to multiple ethereum public address can be routed to single private keys? [closed]

I'm using coinbase commerce for accepting ethereum payments. Each time the user opens the link (for example this), they are asked for payment with different ethereum address. I made a mock payment of ...
2
votes
1answer
47 views

Is there dumpprivkey analogue in geth?

I'm creating new address with web3.py with this code: from web3 import Web3 w3 = Web3(Web3.HTTPProvider('http://localhost:8545')) w3.personal.newAccount('the-passphrase') And have few questions: ...
0
votes
1answer
210 views

How are addresses generated for Smart Contracts? [duplicate]

How does ethereum generate Smart Contract addresses? It is any different from Ethereum generating addresses for accounts, (which uses rightmost 160 bits of the keccak256(Elliptic curve pub key) - ...
1
vote
1answer
190 views

How to get transactions on only one Ethereum address?

Imagine this scenario: ACME company is selling a service for 1 AcmeToken to their users. When a user wants to buy the service, ACME company generates a new Eth address for the user, so there is an ...
1
vote
1answer
551 views

How get Ethereum address using phrase only in Android

I want to get Etherum address and private key by adding Phrase (or Password) everytime. I tried by following many gihub code.It gives different private key everytime. In Web3j, I found it is based on ...
1
vote
1answer
66 views

Where the contract code located physically and how it can be accessed?

After deployed where the contract code physically is located at? Storage or ROM of each node? And how it can be accessed for execution? By contract address? Then, Does contract address act like a ...
0
votes
0answers
31 views

What happens if the “balance” of the address which sends “address.transfer(amount) is ” zero "?

Consider the balance of the address that sends address.transfer(amount); to receive the amount is zero. For example we have following address with balance of zero: web3.eth.getBalance('0x123').then(...
0
votes
1answer
410 views

How can I transfer ownership to another contract?

I have a contract which inherits from contract Claimable by OpenZeppelin (see here): pragma solidity ^0.4.24; import "./Claimable.sol"; contract MyTestContract is Claimable { uint256 public id; ...
1
vote
1answer
458 views

ERC20 tokens transactions' history from Ethereum node

I have a parity node. I developed a web3.js interface on top of it. I have APIs whose job is to fetch addresses' balances and transactions. Example response of transaction API: { tx_hash: '...
1
vote
1answer
1k views

How to get the balance of a contract using web3.js?

I have deployed a contract as follows and determined its balance to be 5000 wei (value: 5000): const thisContract = new web3.eth.Contract(abi); thisContract.deploy({ data: bytecode, ...
2
votes
1answer
568 views

Get the public address & key associated with one of the Ganache accounts using Web3.js?

How do I get the public address & key (not address or account) for one of the accounts that Ganache displays on startup using Web3.js? I need it for a unit test I'm creating that tests transaction ...
0
votes
1answer
32 views

Deploy contract from browser but ensure details saved to server

I'm very new to blockchain/Ethereum development and would like to allow users to directly deploy contracts from a site using MetaMask, however, I want to make sure that I can keep a record of contract ...
4
votes
1answer
2k views

Error: Operator == not compatible with types address and bytes32

How can I change the last line in the following code to make it work? contract University { address public owner; address public student; bytes32 fName; bytes32 lName; ...
0
votes
0answers
100 views

UPDATE: (I need to run testrpc before running the code) Problem with signing a message with “web3.eth.personal.sign” or “web3.eth.sign”

I use exactly the example of web3js (here) to sign a text. So, I generated a .js file asfollows : Web3 = require("web3") web3 = new Web3(new Web3.providers.HttpProvider("http://localhost:8545")); ...
2
votes
2answers
2k views

Listen to ethereum transactions on a specific address

Is it possible to listen to transactions on a specific ethereum address? For example, if someone sends a certain amount of ETH to that address, the callback function would be triggered. I read this: ...
0
votes
1answer
227 views

How can I create a wallet and display the address, public and private key using web3js?

I am using this as my source for web3js: <script src="http://raw.githubusercontent.com/ethereum/web3.js/0.16.0/dist/web3.min.js"> </script> In my HTML I want to display the account's ...
0
votes
1answer
143 views

Contract creation not storing address as mixed-case. using web3 1.0

I'm working with web3 1.0.0-beta.33, truffle-contract 3.0.5 and have noticed that when obtaining the list of accounts from my current web3 provider, addresses are in mixed-case as per the web3 1.0 ...
0
votes
1answer
133 views

How can I provide an ethereum public address to each user registering on my website.?

is it possible to do using web3.js for a dapp that is going to be run on mainnet.? I have a requirement to assign valid ethereum address to each user who are registering on my website. I want this ...
0
votes
0answers
68 views

how to check if a block has a transaction to an address only by using the block header

Question is self explanatory. How can I check if a block has a transaction to or from an address only by using the block header? Question is prompted by this comment - How to explore all ...
3
votes
2answers
176 views

How to pop from (decrease the length of) a memory array in Solidity

I have a function that gets an address array from another contract, conditionally deletes the msg.sender from the array, then saves the new array back to that contract. Because the array backerList ...
2
votes
2answers
249 views

Account created using web3 is not showing in geth console

I have created a new address using web3.eth.accounts.create() and it responds with { address: '0x9AA2767207d0aC9cCdD2e3B244210f630588F3E3', privateKey: '...
0
votes
1answer
237 views

Need to know exact public address the user used to make a Metamask payment with?

I need to know how to do do the following tasks, after I triggered a Metamask payment with Web3 and the user paid: how to get the exact public address the user used to make that payment? I need that ...
1
vote
3answers
151 views

Transaction receiving ether from a contract address

Are transactions sending ether from contract addresses to normal addresses listed in block.transactions or are they not trivial to detect? If not in block.transactions than how to detect?