Victory
  • Member for 5 years, 7 months
  • Last seen more than a month ago
How to Compile and Deploy a Smart Contract without running a full node?
11 votes

Install https://metamask.io/ and Navigate to https://remix.ethereum.org/ Click on settings -> choose your compiler (e.g. 0.4.19+commit.c4cbbb05). Note that optimization is unchecked. Login to metmask ...

View answer
Can an ENS name point to a contract address?
Accepted answer
6 votes

Yes a contract can have an ENS address. A well known example is the Ethereum Foundation donation contract, which you can look up with ethereumfoundation.eth. You can see it at: https://etherscan.io/...

View answer
msg.value instead of this.balance
Accepted answer
6 votes

msg.value is the amount of ETH sent to a payable public method in a contract. this.balance is the amount of ETH stored in the contract.

View answer
Costs for sending ERC20 token
Accepted answer
6 votes

To send ERC20 tokens you must sign a transaction. A transaction will use a certain amount of gas. Gas is sold at a per unit price. The formula is TransactionCost = gasUsed * gasPrice; The gasUsed ...

View answer
Estimation of blocks time generation programmatically
5 votes

Because we know block times do not overlap the easiest approach (taking only 3 queries). Just grab the current block and a block X blocks before the current block, subtract the time of the old block ...

View answer
What are providers in the Ethereum?
3 votes

A provider links to a running node. For instance parity or geth. A node has the ability to view and interact with the blockchain.

View answer
Where to store an array of addresses?
2 votes

Constant functions don't require creating a transaction. Here is a simple getter/setter pattern: pragma solidity 0.4.15; contract Bought { address[] bought; // set the sender of the ...

View answer
Wallet for ERC-20 Tokens
2 votes

You do not need to set up a BAT specific wallet. The key to a wallet is its ability to sign transactions in the ethereum database. You can ruffly think of an ERC20 token as a "bank" that ...

View answer
transaction failed - out of gas (when receiving REAL tokens)
2 votes

You set a gas limit of 60000 which is very low for a token transaction. On the Send Ether and Tokens there is an input for Gas limit set it to something high like 200,000 so the transaction goes ...

View answer
MyEther Wallet storing ICO tokens
1 votes

With a MEW you have full control over your private key. You can think of your private key as a mathemagical stamp that can be used to sign virtual "checks" written on the ERC20 contract's token. ...

View answer
Truffle testcases with msg.value
1 votes

This is currently not supported. In the near future it should be via the following syntax See pull request #94 You can use the payable and value options. instance.methods['deposit()'] or instance....

View answer
Is gas consumed per contract call or during contract creation?
1 votes

Every transaction on the Ethereum network costs ETH (except for mined blocks of course). Placing the contract on the network requires storage and calls to the contract that change state also cost eth....

View answer
Skipping blocks when using testing with Mocha on Truffle and testrpc?
1 votes

To skip blocks create a simple contract that has a function that requires a transaction. pragma solidity ^0.4.0; // file: BlockMinder.sol // used to "waste" blocks for truffle tests contract ...

View answer
Does bool take less storage than uint8 (or the rest of integer types)?
Accepted answer
1 votes

Under the hood as of pragma solidity 0.4.19 both are stored as uint256. The following two contracts use the same amount of gas when calling add. As uint8: pragma solidity 0.4.19; contract AsUint8 ...

View answer
What is the length of an empty fixed sized array?
Accepted answer
1 votes

This is something that can be quickly and easily tested via remix. If you haven't tried it you should give it a try pragma solidity 0.4.15; contract FixedLength { uint[10] public fixed_array; ...

View answer
Deploying contract with web3 returning all zeros transaction hash
Accepted answer
1 votes

In order to publish you need to unlock the account to send the gas. Use parity --testnet -j -w \ --jsonrpc-interface 127.0.0.1 \ --unlock 0x123... --password password-file.txt

View answer
How to withdraw Ether from a contract?
0 votes

If you are not writing a web3 interface you only have one real option and that is the default function of your contract. You would tell the user to send 0 ETH (sending 1 wei might also make sense) to ...

View answer
ENS function startAuctionsAndBid
0 votes

You have need to quote addresses as must be strings. The Javascript VM will not support such large numbers natively. ethRegistrar.startAuctionsAndBid("...

View answer
Query events for a topic's max value
Accepted answer
0 votes

Unless you store the value in the contract, you will have to loop over all events. That being said you would have to have a pretty full node to keep a log of all events ever (normally logs are pruned ...

View answer
Accidentally sent ETH to VEN Wallet
0 votes

Seeing as the transaction was successful, its a matter of knowing what entity controls the private key of 0xfd3a4db33e79b4b788805700d69568ffcb1ca079. That is where the ETH is stored and to whom the ...

View answer
when participating in an ICO do i need to download a specific wallet for that new coin
Accepted answer
0 votes

You need to use a wallet for which you and only you have full control of the private key. A "wallet" is not a great name for an ethereum address, it is a hold over from when there was only one coin, ...

View answer
eth sent to non address due to 2 missing digits off the end of address, can it be retrieved?
0 votes

At the current time it is not possible to retrieve eth sent to invalid addresses. It is possible in the future that there will be an EIP to address such issues.

View answer
Remix reverting when passing ether value
0 votes

You must first deploy EtherTransferTo and note its address lets say it is 0x123.... Then when you new up your _instance you pass in that address. function EtherTransferFrom() public { _instance = ...

View answer
Error in simple example code?
Accepted answer
0 votes

If you get invalid opcode error, you most likely have tried to access the EVM via or in a state that is not consistent. For instance calling getTestBool with an address that hasn't been set via ...

View answer