New answers tagged

1

As noted by Richard: Roadmap says "2020 Q2 - Egretia Public Chain 1.0 Release". (egretia.io) This means that its own blockchain will be launched then and its own coin released. This does not, however, say anything about when the token will be migrated into the new blockchain. But it's quite probable that the migration happens immediately when the new ...


0

Etherscan knows the transaction input begin with 0xa9059cbb (which is the signature of calling ERC20 transfer function). They also know the target address is an ERC20 token. So the assume the user wanted to make a token transfer. For an ERC20 token transfer to be successful it should generate an Transfer event (Transfer event have topic id ...


2

For 1 you may use web3.eth.getCode(address) function of Web3 API. For contract addresses it returns contract byte code, while for non-contract addresses it returns something like "0x". For 3 it depends on what "public" means for you. If you mean whether smart contract has verified source code published at Etherscan.io, then you may use either API call to ...


2

It is unclear what layer you want to find out this information on (on-chain or off-chain). In general: Is an address a smart contract? This can be checked by seeing if there is associated code at the address. Is this smart contract ERC20 or ERC721 token? Off-chain, you can check this by observing the contract on Etherscan. There are also interfaces ...


0

You can provide your token smart contract-extensibility by 'wrapping your token' by something that can interact with the contracts, i.e., ERC-20 tokens. Here is a detailed article on how to go about it. The sample Weth interface provided: contract IWETH is ERC20 { event Deposit(address indexed sender, uint256 amount); event Withdrawal(address indexed ...


0

Once Eth 2.0 moves to having what they call execution environments (i.e. the ability to run smart contracts - phase 2?), I've seen talk of making Eth 1.x an execution environment on one of Eth 2.0 shards. This is not a great answer, but there seems to be interest in the question, and I thought I'd point others to a starting point to investigate and report ...


0

i'm guessing you want to check if the transaction was successful? rpc: eth_getTransactionReceipt https://wiki.parity.io/JSONRPC-eth-module#eth_gettransactionreceipt web3: web3.eth.getTransactionReceipt('tx-hash-here') https://web3js.readthedocs.io/en/v1.2.0/web3-eth.html#gettransactionreceipt


2

Simply put, the answer is no - there is no standard way to do this, as how tokens are created isn't defined in ERC20. Additionally, you can't easily find out the holders of tokens directly from the blockchain, as the way storage data is encoded means that, even if you're looking at the raw data, you'll only be seeing the hashes of the token holder's ...


3

An ERC20 contract must exactly implement the specification described here: https://eips.ethereum.org/EIPS/eip-20. This makes the critical behavior predictable so it will be compatible with wallets and exchanges. A contract may implement additional behaviour provided it doesn't interfere with the minimum functionality. It's worth noting that exchanges and ...


2

Decentralized Finance (DeFi) is the movement that leverages decentralized networks to transform old financial products into trustless and transparent protocols that run without intermediaries. Some may prefer to call DeFi as Open Finance, Distributed Finance, or EthFi(referring to the fact that at the moment most of existing DeFi products built on Ethereum....


0

Smart Contract pragma solidity 0.5.1; contract Uniswap { event Triggered(address indexed user); function addLiquidity() external { emit Triggered(msg.sender); } } Javascript Event Filtering var sha3HashOfTheEvent = web3.sha3("event Triggered(address)"); var filterOptions = { fromBlock: 0, toBlock: 'latest', topics:[...


2

In web3.js v0.x: The expression contractInstance.totalSupply.getData() would get you the encoded ABI data (byte-code) of a call to function totalSupply. In order to actually call the function and retrieve the return-value asynchronously, you should use: contractInstance.totalSupply.call().then(total_supply => { console.log(total_supply); }); In ...


1

Report scam domains and addresses to https://cryptoscamdb.org/ If a scam is impersonating another project, let that project know.


4

The output you receive is in hex format. You need to conver hex to an int. Here is the full code you need to use: const contractInstance = web3.eth.contract(contractAbi).at(contractAddress); const total_supply = parseInt(contractInstance.totalSupply.getData()); console.log(total_supply); I added parseInt() to convert your hex number into a human readable ...


2

This topic is kindof interesting. There are a few things you can do: Report the token on etherscan: In my opinion this is probably the most effective thing you can do. Go to etherscan.io/dapp/0xScamTokenAddress On the bottom of the left sidebar you will find a "Report Button". Write a blog post: If you don't have a blog this solution is probably not the ...


2

You need to send the tokens at least once first. Otherwise this will not work. Etherscan only recognises a contract as an token after its first Transfer event. After sending the tokens once it should work perfectly!


4

Etherscan will recognize your contract once it will log its first Transfer event. This is how it works. Though, even before the first Transfer event was logged, you may view your contract in token tracker: https://rinkeby.etherscan.io/tokens?q=0x5238fFeAEdfc9481bd635B6E0e5eF3b05b19762a


3

There's no way for you to get them back, tokens sent to that particular contract that you're referring to, are stuck there forever. The contract that you link to has no way to withdraw tokens mistakenly sent to it. Perhaps your best chance is to reach out to the MWAT team and explain your situation, perhaps they can try to resolve it in someway.


2

pragma solidity ^0.5.0; //import ERC20 functionality ... contract Example { ERC20 public token; //@param _token the address of the DAI smart contract constructor(ERC20 _token) public { token = ERC20(_token); } function () external payable {} ...


1

If it's an ERC20 compliant token, then you cannot freeze the holdings of another token holder.To be able to freeze the holdings of another token holder, then you would have to implement custom freezing/pausing functionality to the token before deploying to the main net.


0

you should create fake abi include some common func of erc21 [ { "constant": false, "inputs": [ { "name": "to", "type": "address" }, { "name": "tokenId", "type": "uint256" } ], "name": "approve", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, ...


3

Just don't use BN. You need to convert ETH to WEI. This is a very simple proccess. Web3 has some buildt in functions for this: const val = 0.15; // this guy var weiAmount = web3.toWei(val);


Top 50 recent answers are included