All Questions

Filter by
Sorted by
Tagged with
0
votes
2answers
28 views

Infura returns strange error: `query returned more than 10000 results`

The purpose of the function below is to track USDT that is transferred to and from Yearn and Fulcrum. When I call search_liquidity(_toBlock), I get an error that says Returned error: query returned ...
2
votes
1answer
750 views

Ipfs. Adding files using http request in meteor

Good day, I've spent some time trying to upload file to ipfs using http request (from meteor). Meteor.startup(() => { // code to run on server at startup Meteor.methods({ ...
0
votes
1answer
455 views

How to setup parity light client?(warp sync is slow)

I have a full node synced using --warp but since I have a hdd, the final bit of the sync never catches up(due to the high transaction IO). How do I switch to a light clent on parity if I already have ...
0
votes
1answer
212 views

Building smart contract

I am trying to build a simple smart contract following the rules on the website below. https://medium.com/crypto-currently/build-your-first-smart-contract-fc36a8ff50ca For some reason after ...
1
vote
1answer
13 views

How to import both VRFConsumerBase and ChainlinkClient in same contract

I would like to use 2 of the functionalities of Chainlink, One is VRF and another is making API requests. So I am importing two libraries together. ChainlinkClient.sol and VRFConsumerBase.sol Which ...
1
vote
1answer
275 views

Metamask connection with private node with rpc

i am trying to connect metamask with private node but its fails to connect geth --rpc --rpcaddr 127.0.0.1 --rpcport 8545 --rpccorsdomain "*" --rpcapi admin,db,eth,debug,miner,net,ssh,tapool,personal,...
17
votes
5answers
3k views

Can I square root in Solidity?

Is it possible to square root 50 or should I use 7.071067. I'm very new in programming and I also understand that it's possible in all other languages, but I'm not able to see where the limitations ...
0
votes
0answers
11 views

How is address comparison done in Vyper?

In solidity, you can do this: address_1 < address_2 But the same code is not possible in vyper. How can I compare which address is larger than the other in vyper?
0
votes
3answers
147 views

i am trying to send ether to a list of addresses from backend

Below are few lines from the contract in which I am basically trying to send some ether to an array of addresses. Now, when can run this code in remix solidity by replacing "value" to "msg.value". But ...
0
votes
1answer
15 views

Does self-destruct() delete contracts data from the storage as well?

Destroying two contracts: (1) contract A with 1 integer variable stored in it and (2) contract B with 100 integer variables stored in it, would result in the same amount of refund: 24000 gas. So does ...
4
votes
0answers
128 views
+50

SushiSwap - Inner workings?

I've been trying out in the past few days SushiSwap and lately SashimiSwap Contracts & Frontend and while I'm still getting familiar with the code. It turned out to be quite a challenge to make it ...
1
vote
1answer
132 views

Geth light keeps showing “Looking for peers”

My Geth server in light mode was running without any issue up to yesterday. But after that, I only receive these messages continuously! INFO [04-19|12:59:22.181] Looking for peers ...
0
votes
0answers
13 views

What are non fungible tokens future, issues and challenges? [closed]

I am willing to do a thesis in the Blockchain. I started to think about different types of application of the non-fungible token technology. I am still very new to both of this technologies, and I ...
1
vote
1answer
38 views

Getting an error when (attempting to) using Web3js

I'm trying to connect a smart contract to a very simply front end that has html/css/js. I keep getting an error when trying to use web3 to connect - I have the code below but the terminal is giving ...
0
votes
0answers
21 views

Can function be invoked in context

I'm writing a contract that does everything in compartmentalized periods. It maps all data to those periods. Currently, I reference every period when accessing data, foo[period]. Is it possible to ...
0
votes
1answer
18 views

Cannot figure out how to set constructors and ABI for a contract

So I've been breaking my head over this for the last 2 days. I cannot seem to figure out how to get the constructors and ABI set up properly. I'm testing smart contracts by copying Sushi contract from ...
0
votes
1answer
767 views

Proper way of using allEvents()

I'm trying to get all events for a contract: let events = token.allEvents({fromBlock: creationBlock, toBlock: 'latest'}, (err, res) => { try { let result = events.get(); ...
0
votes
3answers
1k views

How to send Ether programatically everyday? (Centralized)

I am new in the Ethereum programming. I am not trying to create a smart contract. I am trying to write a script on a centralized platform (Nodejs or Python or Php server or even Windows task scheduler)...
2
votes
5answers
2k views

Send all Tokens and Eth to a Address automatically

I have few child wallets and a parent wallet. Whenever these child wallets get incoming ERC20 tokens or ETH. I want to send them automatically to the parent wallet. I know I can do below to send the ...
1
vote
6answers
4k views

API for ERC20 token balance - EtherScan

Is there any API for ERC20 token balance of an address for a particular contract?
25
votes
5answers
32k views

How to send ERC20 token using Web3 API?

I created some custom token in Ropsten testnet using this guide: https://steemit.com/ethereum/@maxnachamkin/how-to-create-your-own-ethereum-token-in-an-hour-erc20-verified I can send it to other ...
3
votes
3answers
3k views

Send erc20 tokens using the json-rpc api

I need to send ERC20 tokens (golem to be precise) in an automated manner, so I set up a geth json-rpc server with ./geth --fast --rpc So I can call the api just fine. The documentation for ...
0
votes
4answers
2k views

Automatic ERC20 Token Payment System - How to

Before starting to detail my problem, I must say that I am new to ERC20 Tokens and I write this question in ask for guidance. Is it possible that I can forge a payment system on an ERC20 token? What ...
0
votes
1answer
11 views

Trying to send a transaction with ethers.js

I'm trying to send this transaction using etthers.js and getting transaction details as output but when I try to put the txnhash on etherscan it shows nothing, I tried rinkeby and kovan. [private key ...
0
votes
1answer
269 views

testrpc --account private key length is invalid even though its my account

I tried to initiate a testrpc account and passing my account with value to test the transactions but when I keyed in my key 0x94fd019eeb92780477b01ce5555513d3755b5193 it says that the key is invalid. ...
0
votes
1answer
26 views

ethers.js Why aren't logs filtering? (query returned more than 10000 results)

I'm building an API to scrape events from a contract suite deployed to Rinkeby. Here's an example function with some context: const network = getNetwork(parseInt(`${process.env.CHAIN_ID}`)); const ...
0
votes
1answer
16 views

How Private Ethereum network store my input data in mined block

I'm trying to understand how a private ethereum blockchain store data. I connect to a node through web3j API in java and send a transaction like: EthSendTransaction sendTrans = ...
1
vote
1answer
27 views

listening to contract events using ethers.js?

I am using ethers.js to communicate with ethereum blockchain. I need to listen to the specific contract events and do some task once the event is emitted. I didn't find proper docs on ethers.js ...
3
votes
2answers
107 views

Why does a mining reward exist?

I understand that there needs to be an incentive for the nodes to be keeping the blockchain up and running by validating blocks, and mining rewards is that incentive. I fail to understand why does ...
0
votes
1answer
31 views

Can we decrypt a message by using private key through Metamask

Say I have a hash of a file which is stored on IPFS.I want to encrypt the hash with public keys of few people. How can I do the encryption of the hash (encrypted hash should be stored on smart ...
0
votes
1answer
14 views

Call method of another contract from one contract in upgradable smartcontract

I have two contracts Vase and Box contract Vase { uint256 public vase1; event VaseValueChanged(uint256 newValue); function createVase(uint256 newValue) public { vase1 = newValue; ...
0
votes
1answer
137 views

This contract may be abstract, not implement an abstract parent's methods completely or not invoke an inherited contract's constructor correctly

I'm trying to test out Ampleforth on Rinkbey using Remix. Here are all the files that I copy into remix. https://github.com/cryptoghoulz/based-contracts/tree/master/contracts/v4 They compile fine, but ...
0
votes
1answer
19 views

Ethereum is not transferred on Ropsten network

Here's my code for signing nd sending a transaction on Ropsten testnet which is working properly. However, the value that is set to '1' eth is not transferred to the target address. var Tx = require('...
1
vote
0answers
22 views

Is there any alternative to string[]?

I need to store a number 4D security hashes. For example: CCHdU3mFEYPpa-CYeDSooeZtYSG-CD9czobepa4a9-CRmVpX3Tegakr I am storing number of these hashes in array of string i.e. string[] using pragma ...
0
votes
1answer
434 views

How ERC20 Token balance are recovered during Ethereum chain rolling-back

My Answer: Ok, the problem is really with Ganache ... If I use geth, everything is alright. ... ... sorry for your time ... ---------------- The Original Question -------------------- My ...
0
votes
1answer
269 views

How to access storage areas when libraries are used?

I am testing storage areas to see exactly the efficiency aspects of this and I have trouble finding the storage on the disk for the contract/library combination. Here is the code - pragma solidity ^...
0
votes
1answer
419 views

Geth says it's synced, but is about 50 blocks behind everyone else

So I run a small eth mining pool and the eth node says it's synced, but when I compare the block to the ones on other pools we are about 50-100 blocks behind. When I check in geth it says it's fully ...
0
votes
1answer
92 views

# issue: Gas estimation errored with the following message (see below). The transaction execution will likely fail. Do you want to force sending?

issue: Gas estimation errored with the following message (see below). The transaction execution will likely fail. Do you want to force sending? gas required exceeds allowance or always failing ...
3
votes
2answers
365 views

what does `wad`stand for

in many token contracts the amount parameter is called wad I was not able to make sense what this means or where it comes from. Does someone have a clue?
0
votes
1answer
239 views

Ethereum Wallet cannot complie “msg.sender.send”

I have been using Ethereum Wallet to compile and deploy contracts. Now I got this error when trying to test the code in CryptoKittyCore. It failed to compile with this message Failure condition of '...
1
vote
1answer
241 views

How can I disconnect a Metamask wallet from Uniswap?

As soon as I go in Uniswap, it already loads the Metamask wallet that was used previously... but I do not want to use that Metamask wallet, I want to use a different Metamask wallet. How my I do this, ...
2
votes
2answers
806 views

Decoding ethereum leveldb keys and values

I've created a simple script to read ethereum data from the leveldb using C++. Basically this testing program would print all keys in leveldb to the console. #include <cassert> #include <...
0
votes
0answers
12 views

Update token information social network at etherscan help [closed]

good morning I requested and verified the smart contract address to update the token information on etherscan.io Updated social media and icon icons I do as etherscan.io asks me to do 1 white paper ...
1
vote
1answer
232 views

Ethereum crowdsale example - Stuck tokens (how to save)

I deployed a crowdsale contract using the source from ethereum.org and loaded it with some tokens. It works as expected, except that it has no code to return the unsold tokens to the beneficiary. Is ...
0
votes
0answers
15 views

How to obtain the price for Uniswap v2?

I am using Uniswap v2 from my DApp. How to obtain suitable prices: amountOutMin and the "expected" amountOut having amountIn (both for ETH -> token and for token -> token swaps) and ...
0
votes
1answer
271 views

Are there any public APIs for ENS lookup?

I want to add ENS support to an app I am building, and I am looking for a lightweight API which supports ENS to Ethereum address conversion. All the documentation shows how you can do this on the ...
1
vote
3answers
2k views

ParserError: Expected identifier, got 'LParen'

I am following the truffle tutorial for creating a token. I get this error when trying to compile the contract. ParserError: Expected identifier, got 'LParen' constructor () public { ...
0
votes
2answers
56 views

Subscribing to multiple Transfer events of various ERC20s

I need to suscribe to Transfer events of couple of different ERC20s in order to catch transfers to my contract. And here is the question: to catch all those events I need to create instance of each ...
0
votes
2answers
33 views

how to check if bytes32 begins with certain bytes?

how do i gas-efficiently check if a bytes32 begins with certain bytes? the user gives me a bytes32 input, and i want to check if it start with 4 zero bytes. thank you
1
vote
1answer
255 views

Convert future date to UTC

Is there an easy way to convert a set time to UTC and stored in a smart contract? I know we can set dates relative to the current timestamp such as "now + 5 days". Though if we wanted to set a ...

15 30 50 per page