New answers tagged

0

I had the same problem and I solved it setting the Solidity compiler version to 0.6.8 (the latest at the current moment). This can be done on Remix in the Compiler section, or in Truffle editing the file truffle-config.js.


0

They wont be able to sell them immediately. The "real" actual price of any token is how much someone is actually willing to pay for it. It might be "worth" $1B in that exchange's eyes but that only means that exchange values it at $1B. No other third party has to buy it back from you at the $1B valuation.


1

The ERC-20 is a public standard which means contracts all have to support the identical ABI. You'll find the ERC-20 ABI on many places online, e.g., https://github.com/ethereum/wiki/wiki/Contract-ERC20-ABI. As a general rule, if you want to communicate with a contract that does not follow any standards, you will need the ABI from the creator of the contract ...


0

I have the same issue. I saw in my contract that the function transfer(addres, value) is available. You must use this function. Hope it helps!


0

Solved it using this: https://github.com/ethereum/web3.js/issues/2077#issuecomment-468530879 const dec = window.web3.utils.toBN(this.props.decimals) const price_ = window.web3.utils.toBN(this.Object.value*(100)) const price ="0x"+ price_.mul(window.web3.utils.toBN(10).pow(dec)).toString("hex")


1

You cannot use floating point numbers to interact with cryptocurrency, or any monetary units. You need to use a special helper class called BigNumber.js to do the math. Then you convert those numbers to strings before passing them to functions that go to JSON-RPC interface.


1

The native word size of Ethereum virtual machine is uint256. There is no really need to use smaller words, like u128 or u64 for accounting purposes, as there are no real gas efficiency gains. Thus, it is practical to use the uint256 EVM wise. Note that arguments are RLP packed when communicated to the EVM, so any leading zeroes do not increase the cost, as ...


0

Is the token already deployed on main Ethereum Network? try searching https://etherscan.io using the token address if you have it. have a look at this Steemit post.


0

The function you need to make this is transfer(address, value). You have to be the owner of the contract to call this function. You can make this changes locally using ganache and calling the method transfer(address, value) from your contract. If you want to make this directly in the EVM you need to use Infura that would give you the link to the network you ...


0

General Info A good starting point would be to learn the basics of Smart Contracts. https://ethereum.org/developers/ Solidity Banking example This blog post covers the basics of handling ETH with a solidity smart contract: https://programtheblockchain.com/posts/2018/01/05/writing-a-banking-contract/ Non-Fungible Tokens And finally, you mentioned ...


1

Contracts can't detect when tokens are being transferred to them. Contracts can only check a token balance but they have no idea when they have received tokens unless someone tells them so. So you can't make this automatic inside the blockchain. So what you need to do is monitor the token transfers outside the blockchain and when you notice that tokens are ...


3

Most (if not all) of the wallets you mentioned are non-custodial, meaning that they do not control your funds. If a service were to go down, you can simply go to another and use your private key there. Funds are stored on the blockchain directly, not on the service itself. This is different from custodial wallets or services (e.g. Coinbase). Those services ...


1

You have basically three options. 1. Truffle-flattener You can use truffle-flattener to create a file that contains all the imported contract's source codes. The result can be used to easily verify a contract on Etherscan. 2. truffle-plugin-verify You may also try truffle-plugin-verify if you are using Truffle. You'll need an API key from Etherscan for ...


0

Just to supplement @Thiago's valid answer. Transactions can't be directly cancelled or upgraded. The only thing you can do is send a new transaction with the same nonce but with higher gas price. If your new transaction get mined first (as it probably will as it has higher gas price) then the old transaction becomes obsolete as it has the same nonce. ...


0

to cancel just make another txn but configure the nonce = the txn you wanna cancel's nonce, but make sure not to pay the minimun Gwei price


0

Yes, i’m pretty sure it comes from the fact that my Crowdsale contract have no supply has you said. I was expecting to do the transfer from the Token.sol Smartcontract, but in fact, i need to do it in the Test script ? So i can’t make it an automatism ? I will need to transfer manually the supply from the token to the crowdsale after their deployments ? ...


0

I did a search and assume this is your token: https://ropsten.etherscan.io/token/0xEFdb43c081eeE890A03AD7E78bbA98397A6B8528 If you are creating ERC20 tokens you may want to look at the OpenZeppelin Contracts implementation to see if this meets your needs. See the documentation for details: https://docs.openzeppelin.com/contracts/3.x/erc20 If you have ...


0

I gave Tirtha credit, because his answer is correct and the one that helped me. I'd just like to piggyback on his answer to elaborate a bit more. The reason why Metamask wasn't presenting me with an "approve" transaction is because Owner is the one invoking approve, not my selected Remix account. I'm only calling Owner.transfer, which then tells Owner to ...


1

I'm calling it from an address with 10000 ERC20 tokens You need to have the tokens in the Owner contract. As the owner contract is the one that is calling approve. The failure is happening because there aren't enough ERC20 tokens in the Owner contract. Transfer 50 to that from your user wallet and then call the function.


0

Your crowdsale contract has no tokens to transfer to the buyer. You transfer ownership of the Token Contract in your test file, but the total supply is still in control of the Token Contract deployer address . From the looks of it should be your account[0]. After both your contract have been instantiated, you will need to do something like: await this....


1

You are right that the main disadvantage, however, instead of replacing the ERC20 functionality with something else, you can add the functionality on top of your token. Think of it as a ERC20+. Instead of replacing balanceOf(address) with balanceOf(string), you could add namedBalance(string) and leave balanceOf(address) to operate with the rest of the ...


0

The primary designation of the decimals function is off-chain display (it doesn't mean that it should not be used on-chain, but you should consider it very carefully before being tempted to do so). This function can be used in order to avoid the need for displaying very low significant digits. For example, instead of displaying 1234567890000000000 wei, you ...


1

There's some leads in the transaction receipt 'gasUsed': 24300, 'status': 0, When status is set to 0 it means the transaction has failed. The base transaction cost is 21000 which is close to 24300 gas used, so the contract didn't avanced very much, for example it didn't write to storage yet. You will have to check the conditions used by requires early in ...


0

...and just like that, came across this: https://medium.com/axionable-ai-and-blockchain/token-ercs-in-ethereum-erc-20-erc-223-erc-777-and-erc-721-8176c0f11c18


1

Your code seems to be correct. The Ethereum network is asynchronous. The new state may have not propagated fully through network in the point you are doing read immediately after read. Also there might be minor blockchain reorganisations making transactions hop between blocks. However none of thus should be a concern for a local chain with a single miner, ...


Top 50 recent answers are included