Hot answers tagged

3

Token transfers may be detected by looking at events logged by the transaction, though your transaction didn't log any, so there probably were no tokens transferred. Ether transfers are harder to detect when ether is transferred by a smart contract, though your transaction trasferred ether from one externally owned address to another, i.e. neither transfer ...


2

This is due to two different "token amounts" being used. One is for display purposes and one is for implementation purposes and they don't match each other unless you use decimals=0. Edit: forgot to specifically answer your question, thanks @Rob for pointing it out :) so the decimals: Needs to be 8,000,000 x 10^^18. You can read more for example here: ...


1

When you say that you want to connect users' Metamask account to your service, you are actually referring to be able to make Metamask send the transactions(basically sign them using the user's private key and then submit to the network) for the user. This is achieved using the window.web3 object's provider. The object is injected into the browser window by ...


1

The cost of executing a smart contract is measured in Gas. The units of Gas consumed during an execution is paid for using ether by multiplying units consumed with GAS_PRICE. GAS_PRICE is set in the transaction. Suppose an execution costed 1000 units of GAS and the account that submitted the transaction had set 1 Wei as the GAS_PRICE, then the total cost ...


1

I'm not familiar with the implementation details, but yes. An off-chain service generates the images from the 32-byte "DNA" held in the token contract. The image is subjective in that it is an interpretation of the DNA. I find myself frequently citing this example of architecture that nicely separates on-chain and off-chain concerns. The on-chain footprint ...


1

The code you posted looks similar to an ERC20 token transfer, not an ether transfer. These two types of transfers are handled differently in solidity. To transfer ETH, you need to use the send() transfer() function (see smarx's comment for strikethrough clarification). When using this function, the appropriate amount of ETH must already live in the contract ...


1

The ether didn't go anywhere, it's still in that account. Any real Ethereum wallet should handle that and show the correct balance. Are you seeing an incorrect balance?


1

Yes, the gas will be paid for by you, the sender of the transaction. The gas will not be taken from the contract.


Only top voted, non community-wiki answers of a minimum length are eligible