New answers tagged

0

I am pretty late to reply. I think remove the view and your problem will be solved. You are obviously making some changes here. View is for read operations only.


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

From the example in the Solidity documentation, we can see that: 0xcdcd77c0: the Method ID. This is derived as the first 4 bytes of the Keccak hash of the ASCII form of the signature baz(uint32,bool) We can verify the hash using this online keccak 256 hash tool by inputing "baz(uint32,bool)": https://emn178.github.io/online-tools/keccak_256.html Also,...


0

Load the abi with json loads function : import json with open('Contract.abi') as json_file: myabi = json.load(json_file)


0

It seems like an problem with compiler or compiller support at myetherwallet. When i used older 0.5.17 instead of 0.6., it generated longer and different abi code and everythinks works on myetherwallet. ABI generated with compiler 0.6.6 that does not work on myetherwallet.com [ { "inputs": [], "stateMutability": "payable", "...


0

Can you change to use Web3? Please refer to my code! var _web3 = new Web3("https://ropsten.infura.io/v3/APIKEY"); var _transactionRpcResult = _web3.Eth.Transactions.GetTransactionByHash.SendRequestAsync("0x02fca948c467b0247030d12f4e1bb6811a626f5b55013d3dbec10cea82f72110"); var blockNumberResult = _web3.Eth.Blocks.GetBlockNumber....


-1

Somethimes the onwner of the contract will publish some information right on etherescan. e.g. https://etherscan.io/token/0x9f8f72aa9304c8b593d555f12ef6589cc3a579a2 then: ctrl+f makerdao.com However it is not required for someone to post data, and a developer can deploy hundreds of contracts to a chain trying to troubleshoot a problem, so it is going to be ...


0

I think the answer's got to be Remix. JavascriptVM is the default simulation environment.


1

Made it work, a piece of code was missing after the methods call. Here the complete call function from the browser console: simpleStorageInstance.methods.setValue(5).send({from: '(address)', gas: 3000000}); This sends the transaction that can be seen in ganache.


2

Looks like the answer to your question is CREATE2. This is an EVM opcode that was created to allow contracts to be created deterministically, (other people use the term 'counterfactually') It's a fairly complicated topic. One link is here: https://hackernoon.com/using-ethereums-create2-nw2137q7 but there are many you could check out. Perhaps most simply ...


1

It seems , your code is not able to connect to metamask, Try changing web3 = new Web3(web3.currentProvider); to web3 = new Web3(window.web3.currentProvider);


1

You are using .call(), it doesn't create a transaction. It is used to query a contract. If you want to modify a contract you need to use .send().


1

If you are using, for example, the httpget adapter, you can place this in EITHER the JSON job spec, OR you can add it to your smart contract code. Here is an example of a smart contract using the req.add feature: // Creates a Chainlink request with the bytes32 job and returns the requestId function requestEthereumLastMarket(bytes32 _jobId) public returns (...


3

You can call eth.getCode to see if there is code at the address. If there is no code, there is no contract. If there is code, there is a contract associated with the address. Using ether.js, you can see how it works below. The first call was after the contract was deployed and the second call was after it was selfdestructed. > kovanEthersProvider....


0

If you use price data and oracles that are on a blockchain, those will be rolled back as well if there is a chain reorganization. If your dApp uses some traditional database and techniques to track the price then you need to roll back your price when the chain tip changes.


0

Install web3.js v1.2.6, and then do something like this: const Web3 = require("web3"); const web3 = new Web3("https://mainnet.infura.io/v3/YourInfuraProjectID"); const FACTORY_ABI = [ { "constant":true, "inputs":[{"name":"","type":"uint256"}], "name":"alladdresses", "outputs":[{"name":"","type":"address"}], "...


Top 50 recent answers are included