All Questions

Filter by
Sorted by
Tagged with
10 votes
2 answers
873 views

Error: "message":"function \"Ballot\" arguments must include \"proposalNames\""}

I am trying below code to write Voting Contract referring to Solidity documentation pdf. Code compiles without error but I am getting below error while deploying. writing Ballot to app\meta\Ballot\...
0 votes
0 answers
5 views

Public key to ethereum address in javascript without (or minified sha3 library)

I am trying to get rid of the web3js library and this is the last hurdle. Before i used web3.utils.keccak256(eth_public key) How can i do this with minimal amount of code in javascript. I tried https:/...
0 votes
0 answers
2 views

Extract transaction details from uniswap eth_call event

I am attempting to programmatically infer information about transactions being submitted by uniswap. Say I go to uniswap and try to exchange 0.1 ETH for WBTC. I then inspect the network tab of my ...
0 votes
0 answers
4 views

How can you tell when Eth 2.0 Test-net will be finished

is there a way to tell when the test net will be completed? Feel free to call me ignorant in ur response ahahahah
0 votes
1 answer
12 views

Transaction replication from testnet to mainnet

Gonna try to elaborate the situation: Say I have my address fully empty in both ropsten and mainnet, both with nonce equal to zero. Now I manage to get 1 ETH in both networks for that address. I send ...
0 votes
0 answers
5 views

What testnet has the most test Ethereum/base currency for use?

I'm looking for an EVM testnet that has a lot of the base currency available to use from a faucet or other place, where is the best testnet to go?
0 votes
1 answer
262 views

SendSignedTransaction TIMEOUT

I'm trying to sign data offline and then send signed transaction via web3.js Here's my code snippet: const {sign} = require('@warren-bank/ethereumjs-tx-sign'); const {Loader} = require("loader-in-...
0 votes
0 answers
33 views
+50

Update HashMap on ERC721 received with Vyper

When a contract receives an NFT by calling safeTransferFrom, onERC721Received is called on the receiving contract and I want to be able to update a Hashmap to record the address of the sender and the ...
0 votes
1 answer
5 views

how long takes to pass erc20 token to another chain in stargate

How long takes to pass erc20 token to another chain in stargate on mainnet. example: 1 usdt from bsc to fantom(how long takes to start transaction on destination chain?)
0 votes
2 answers
361 views

Intializing ERC20 token using payable constructor from another function of different contract

I have an ERC20 contract which is deployed from another contract as following: function createDao(string _tokenName) public payable returns (address tokenAddress) { tokenNumberIndex = safeAdd(...
0 votes
1 answer
23 views

Chainlink Keepers not Upkeeping after i enterLottery. Can you spot issue that would be causing this?

I've spent many weeks on this project trying to figure out why "Chainlink Keepers" is not working. I can successfully deploy and verify the contract on Rinkeby. Then i do the following... 1.)...
1 vote
2 answers
10 views

How to instantiate contract instances with ethers.js and alchemy-sdk

(Found this from the public Alchemy discord, and wanted to ask the question here so it can get indexed online 💙) I'm trying to instantiate contracts in my javascript code so that I can call ABI ...
0 votes
1 answer
289 views

my metamask account on rinkeby freeze forever

I got this problem since yesterday and it never succeeded. I tried to investigate the transaction on etherscan and it said "Sorry, We are unable to locate this TxnHash" URL => https://...
0 votes
0 answers
3 views

Is the `indexed` keyword for a Solidity event no longer necessary because of subgraphs?

Context: The indexed keyword is used for Event fields when we want them to be easily searchable using the JSON-RPC method eth_newFilter. This was the best way to offchain index the interactions with ...
0 votes
0 answers
3 views

Foundry remapping error VS Code: foundry config error: stream did not contain valid UTF-8 in Remapping Provider

Im trying to use Foundry with VS Code. -I removed both the default contract and default test and replaced them with my own .sol file -I copied over my remapping file into the root directory using the &...
1 vote
1 answer
11 views

Does setting the deadline for a swap using `block.timestamp` inside the contract actually do anything?

I saw this in a codebase I'm working on and was wondered if this even does anything, because it doesn't seem like it does. Wouldn't block.timestamp be set when it's included in a block? Or maybe there ...
0 votes
1 answer
476 views

what type of encoding is used by the abi specification in solidity

the abi specification of solidity which provides functions like abi.encodePacked() using a certain type of encoding (eg: for functions, a 4 byte function signature hash followed by encoding of ...
2 votes
1 answer
441 views

Truffle Deploy gas limit exhausted

I kept on getting this error. 9/10 of my deployment will fail. But out of the sudden it will be success without any reason. I have checked the transaction receipt and indeed it had reaches the gas ...
0 votes
0 answers
6 views

Swapping stablecoins on a CFMM

Let's say I want to swap stablecoins, let's say USDC with DAI, in a CFMM where the function is the usual xy=k. Let's say that the liquidity is now fixed to be 1000USDC and 1000DAI, equals as they ...
30 votes
10 answers
40k views

How can I return struct when function is called?

I'd like to return struct type User. However, when I tried the following getUser function, it returns an error. Is there any way that struct data would be returned from a function? Contract struct ...
5 votes
2 answers
3k views

Etherscan api for Ropsten testnet

I found this endpoint is to obtain the token balance from Ethereum blockchain, however, I noticed that this function doesn't work on Rospten network. Please advise https://api.etherscan.io/api?module=...
0 votes
0 answers
6 views

How are multiple account addresses derived from a single public key?

The following is an except from Mastering Ethereum, but how you can you have multiple accounts in a wallet like MetaMask that manages a single key pair? Private key k: k = ...
1 vote
2 answers
8 views

Question about whitelist with mapping(solidity)

Was trying to hard code a whitelist array of addresses using mapping got this error: my code: contract IntelliContract { string public constant name = "CustomEnergyToken"; // solidity ...
0 votes
0 answers
4 views

Work out Eth price from getAmountsIn method

I am attempting to create a test arbitrage bot using Uniswap & SushiSwap. I can successfully get the amount of X tokens I would get for 1 WETH on both dexes. For example: ​ Uniswap: WETH / USDT ...
1 vote
2 answers
23 views

What is the right way to track a uint256 to struct mapping?

the smart contract below is a market place where users can sell items. The struct Offer, holds all the info of a specific item. To track the offers, I used a mapping with a uint256 key and created a ...
0 votes
1 answer
1k views

Getter and Setter Functions in Solidity not showing any output

I have written a smart contract with the Getter and Setter functions but it is not showing any output in IDE-Remix. My code is ''' pragma solidity ^0.4.21; contract GetandSet{ string name; ...
0 votes
1 answer
281 views

getPastEvents undefined(please help)

I had asked this question before. I looked carefully at the exchange section, which I advised, and I think there is no problem with the exchange section. At least in my opinion there is no problem and ...
0 votes
0 answers
7 views

Cannot invoke contract function from console using truffle

I am working my through the book Ethereum for Dummies, and have created a contract HelloWorld, deployed to the blockchain and all is good until I try to invoke the function of the contract. My ...
0 votes
1 answer
26 views

Error on Safe Deploy: Cannot read properties of undefined (reading 'getChainId')

I am trying to implement Gnosis into a react Webapp with using metamask as provider. Upon following the Setup Tutorial i stumbled on this error: Safe.ts:164 Uncaught (in promise) TypeError: Cannot ...
0 votes
0 answers
5 views

Hello how do I turn the "_shares" into ERC20 Tokens in this contract?

I was tinkering a bit with the following Vault contract. The contract works like that: Deposit Token X and receive minted shares. Withdraw Token X for the amount of shares you are holding and the ...
0 votes
4 answers
193 views

Why does create2 predicted address not equal actual address?

For some reason the predicted/pre-computed address is not equal to the actual address when the created contract accepts address for it's constructor parameters, however it's fine when the constructor ...
0 votes
1 answer
755 views

Best practice for Single or Multiple instances of Provider for different types of block chain requests #

What the best practice is in terms of using the ethers provider as either a singleton (or persistent instance) in a module or to create a new instance every time a request is made. For example, for a ...
1 vote
2 answers
30 views

Run a single hardhat test file

I have a few test files: ./test/ContractA.test.js const { expect } = require("chai"); describe("ContractA tests", function () { it("does function one", async function (...
0 votes
1 answer
41 views

Where to find Uniswap contract addresses on Goerli testnet

I am attempting to create a nodejs arbitrage bot. I can get my bot to fetch pairs from the mainnet but cannot fetch Uniswap pairs using the Goerli testnet. For example, on the mainnet to get the WETH/...
0 votes
1 answer
466 views

web3 Uncaught TypeError: Cannot read property 'createBox' of undefined

i'm trying to create simple application by using solidity 5.0.0 , Truffle v5.0.0 and web3 web3@1.0.0-beta.34. but i've gotten Uncaught TypeError: Cannot read property 'createBox' of undefined. ...
0 votes
0 answers
9 views

Using WalletConnect via Gnosis Safe iOS throws an error when signing a message

I'm working on an authentication feature for my app and using wagmi for the ethersjs interactions. I have two-step authentication flow: connect wallet and SIWE. This entire process works fine with ...
0 votes
0 answers
5 views

Alchemy Mined Txs Webhooks appearing as "ADDRESS_ACTIVITY" type instead of "MINED_TRANSACTION"

I've created a new MINED_TRANSACTIONS webhook on Alchemy. I can see it classified as a mined transactions webhook as well in the alchemy dashboard, yet when I get notifications for a contract (e.g ...
1 vote
2 answers
1k views

Code review: smart contracts to pay beneficiaries on usage of asset

I wrote two smart contracts to create a "smart asset". The idea is that beneficiaries involved in the asset are payed the usage price of the asset once it is used. So for example, four parties (...
2 votes
3 answers
3k views

How to airdrop tokens successfully

I have the script for airdropping tokens, all I need is to know what and how to input these value on the drop section of remix script:token,recipient,values. Assuming I want to send to 5 addresses, ...
2 votes
0 answers
31 views

Error - "Multisend should only be called via delegatecall" while calling gnosis multisend function?

I am using https://github.com/gnosis/ethers-multisend to encode batch transactions into Meta transactions. And following https://docs.gnosis-safe.io/tutorials/tutorial_tx_service_initiate_sign to send ...
0 votes
0 answers
21 views

Declaration in .sol (grammar question)

Perhaps the hardest thing for a beginner is grammar (how to read and understand the way in which it's written). When creating a enum: enum = State {waiting, ready, active} State public state; ...
0 votes
0 answers
13 views

Storing USDC in secure inaccessible place

Im creating 2 erc20 tokens, one (A) that replaces the amount it is bought for with USDC, and another (B) that stores this USDC. So the second one is an INDEX of the USDC, and the first B is the one ...
0 votes
0 answers
3 views

refreshe metadata on opensea on polygon Network

I see some methods how to refresh collection metadata on opensea. one method was this https://api.opensea.io/api/v1/asset/[contract-address]/[token-id]/?force_update=true but it doesn't work on ...
1 vote
1 answer
751 views

Does Exporting tokens from a metamask account with private key to a wallet, export the ethereum too?

Wanting to know if I’m exporting with my private key from metamask to a wallet will all contents of the MM account be exported? iE will the ethereum be exported along with my Theta token? Or would ...
1 vote
3 answers
49 views
+50

NFT on polygon community mint or directly list to secondary market

Guys I am about to release an NFT art collection project with one influencer and his community. I am planning to mint all the 10000 items and list them on opensea (polygon). It will be easier for me ...
0 votes
0 answers
4 views

Generation of derived addresses BIP39

I use Ian Coleman's tool to generate derived addresses containing a public and private key for each address. With Bitcoin I can get the first address and integrate it with my Ledger key to receive ...
0 votes
2 answers
295 views

Get market cap or current total supply of a specific coin (BTC, ETH, BNB etc)

I want to get a market cap of some specific coin (BTC, ETH, DOT, BNB etc) from an Ethereum smart contract written in Solidity. Market cap is obviously = price * current supply I can use an oracle like ...
0 votes
0 answers
5 views

Missing blocks in archive node (Geth)

I am running a full archival node for Ethereum using Go Ethereum on a ubuntu machine. The node is almost fully synced to the latest blocks however I've noticed that a few blocks seem to be completely ...
0 votes
0 answers
5 views

Block header hash calculation in Eth2

Context: I am very curious about what kind of block information we can get from a smartcontract in Ethe2.0. In this question, I will just ask just about "blockhash". I will go directly to ...
0 votes
1 answer
2k views

How to connect to Rinkeby without using Geth / Parity?

First let me explain my development environment. I am using Jupyter Notebook to play around with the Web3.py front-end code and Remix for the Solidity smart contract code. I am using the Metamask ...

15 30 50 per page
1
2 3 4 5
934