All Questions

Filter by
Sorted by
Tagged with
0 votes
0 answers
7 views

How to decrease computation time of generating addresses

I tried to create a mass wallet generator for a vanity address but it only checks 33 wallets a second. Is there any optimizations or bad practices you see? const cluster = require("node:cluster&...
user avatar
2 votes
1 answer
16 views

External Function as Function argument

I am trying to figure out how the calldata looks, when I pass a function as a function argument. For example, function foo(function(uint) external callback) external {} I assume it is the methodId of ...
user avatar
0 votes
1 answer
12 views

Geth client: Transaction object has no from field

I am using the ethClient to receive all transactions of a block. client, _ := ethclient.Dial(PROVIDER_URL) blockNumber := big.NewInt(15000000) block, err := client.BlockByNumber(context....
user avatar
0 votes
1 answer
24 views

Calling a function with multiple arguments in ethers returns Error: missing argument

I'm changing a part of front-end for my dApp from using Moralis to using ethers.js. For some reason I cannot get my head around on how to provide multiple arguments for the function call in a correct ...
user avatar
0 votes
0 answers
17 views

How to cause a .call to revert in hardhat test

I am trying to cover all of my lines in my smart contract unit tests with hardhat, and I am not sure how to test the Raffle__TransferFailed() error. Is there some way to force this transaction to fail?...
user avatar
0 votes
1 answer
27 views

TypeError: Cannot read properties 'toString')

I'm trying to auto update my front-end repo with the contract address, but I keep getting TypeError: Cannot read properties 'toString'), I tried removing the toString and it prompted me to convert ...
user avatar
  • 3
1 vote
0 answers
16 views

What is the best practice for memory allocation in EVM assembly?

As far as I know, this is the standard way of the memory allocation in assembly: assembly { let firstFreeMemoryPointer := mload(0x40) mstore(0x40, add(firstFreeMemoryPointer, ...
user avatar
1 vote
1 answer
25 views

catch errors for getting an instance of a smart contracts using address`in solidity

I tried to use the try / catch expression in order to catch errors while getting an instance of a running smart contract but it can only be used for external functions calls and contract creation ...
user avatar
  • 83
0 votes
1 answer
13 views

How to differenciated between ERC20 transactions and normal transaqctions when getting raw transactions using web3

When looking at etherscan transactions are divided as normal transactions or ERC20 transactions. When using web3 and getting the transaction, correct me if Im not wrong, but all of them are bundled ...
user avatar
0 votes
0 answers
7 views

Can i create pending transaction that get execute once there is enough gas fees in my wallet?

I have a permession for a scam smart contract that steal every eth that transfer to my wallet I also have some other tokens like USTD I can't transfer the usdt out because I don't have enough gas fees ...
user avatar
0 votes
0 answers
8 views

Storage design for a social network

I want to create a social network app using Solidity, but I am having a hard time thinking of the storage design. Using this link: Are there well-solved and simple storage patterns for Solidity? as a ...
user avatar
  • 101
0 votes
0 answers
6 views

Metamask, rarible moralis plugin value

Guys, when I use the Rarible plugin from Moralis and perform lazy mint, I'm getting a sign notification from Metamask. May I know what does value mean here?
user avatar
0 votes
2 answers
35 views

How do you set max amount of NFTs a wallet can mint?

contract xyz is ERC721, ERC721Enumerable, ERC721URIStorage, Ownable { using Counters for Counters.Counter; Counters.Counter private _tokenIdCounter; uint256 public constant maxSupply ...
user avatar
0 votes
0 answers
5 views

How To deposit erc20 tokens into AAVE v3 protocol using solidity and remix?

I was trying to deposit some funds from my metamask wallet into AAVE V3 protocol using solidity and remix? plz anyone post the code
user avatar
1 vote
1 answer
14 views

How many items can array in solidity return

uint16[] ALLITEMS; function _get() public view returns(uint16[] memory){ uint16[] memory _list = ALLITEMS; return _list; } should I use "memory" or "storage" to call ...
user avatar
0 votes
0 answers
12 views

Issue with abi.decode on output from reverted functions

I am struggling to figure out the abi.decode function when using it to decode the bytes coming as output from a reverted low level call to another contract. The way I am using it is by calling the ...
user avatar
0 votes
1 answer
13 views

SwapExactTokensForTokens returns too many arguments

I'm making a automation for my farms and am using Netswap (Metis Andromeda Chain) to swap my yield into some other token. In this example I'm swapping Metis into USDC. When I'm using ...
user avatar
0 votes
2 answers
27 views

How to "see" the refund of SELFDESTRUCT?

I am trying with hardhat to simulate and see the gas refund. Here is my 2 smart contracts for testing purpose: pragma solidity ^0.8.9; contract DaughterContract{ function destruct()public { ...
user avatar
0 votes
0 answers
5 views

Contract Deployment Stops without any error - Nethereum

I'm trying to deploy and interact with the smart contract using Nethereum. But code execution stops at below line, without any error. var transactionReceipt = await deploymentHandler....
user avatar
  • 341
0 votes
0 answers
9 views

Hello please give me answer in my questi [closed]

How to connect web3 in react native App, How to get balance web3 in react-native
user avatar
0 votes
0 answers
8 views

How does one go about Approving another ERC721 contract inside my ERC721 contract?

I'm trying to allow the user to go through my contract to approve their own tokens for ERC721. I have created a function that allows them to approve my contract so then my contract can interact with ...
user avatar
1 vote
2 answers
19 views

Off-chain Bank Payments & oracles

hey fellow solidity devs ! i am working on a DAO right now and one of the requirements is that members pay the DAO with fiat money off-chain (using traditional banks). i obviously want to log that ...
user avatar
  • 13
0 votes
2 answers
16 views

How do blocks signal whether it supports classic Ethereum or any other soft fork on the Ethereum blockchain?

Is there a “bit signal” in the soft fork activation mechanism in the Ethereum blockchain, like in Bitcoin, if not, how does it work in Ethereum? (https://www.visualcapitalist.com/mapping-major-...
user avatar
  • 3
1 vote
1 answer
18 views

Is it possible to create a function in solidity that accepts any number of arguments of any type? Like abi.encodePacked does

If it's possible how can they be used later in this function
user avatar
0 votes
0 answers
9 views

NFT whitelist merkletree

I hope you are all well. I am trying to make a frontend for an NFT minting DAPP. I use this code for the mint function: async function mint() { if(typeof window.ethereum !== 'undefined') { ...
user avatar
  • 53
0 votes
1 answer
21 views

Ethereum Undecodable logs

I have encountered this transaction where all of its logs were undecodable. If you see the value of topic0 in events logs, it is function signature but ideally it should be the event signature. From ...
user avatar
  • 25
0 votes
0 answers
27 views

NFT Ticketing system architecture best pratices

I would like to develop a Dapp where users can mint a NFT ticket in order to redeem item in the future. My question is: How can I implement a secure way to ensure different rarity to these tickets? In ...
user avatar
0 votes
0 answers
7 views

archive geth not working as expected

i am running geth with archive and syncmode full, still when trying to run debug_traceTransaction on a tx older then 128 blocks i get the "required historical state unavailable (reexec=128)" ...
user avatar
1 vote
0 answers
37 views

Make all transactions gas-less for an EOA

As a service provider, I would like to pay for any transaction a user makes from my app. I've read about meta transactions and contracts that implement EIP-3009, which allow the delegation of gas ...
user avatar
  • 11
0 votes
0 answers
7 views

Setting an array useState([]) variable in React.js returns undefined

I have been trying to create a Web3 dApp using React.js. My first step was to connect the browser to a MetaMask wallet. So I first started by initializing a useState array variable named "wallets&...
user avatar
0 votes
0 answers
25 views

Gas required exceeds allowance when I deploy a smart contract in Remix

The blockchain is new to me. My goal is to create a private blockchain network. A network with two nodes and a boot node has previously been established by me. My local Ethereum account was then ...
user avatar
1 vote
1 answer
12 views

Why is VRFConsumerBaseV2(vrfCoordinator) in the constructor declaration?

I am new to Solidity and going through Patrick Collins' online course. In the following code, I was wondering why VRFConsumerBaseV2(vrfCoordinator) is included in the constructor declaration. I ...
user avatar
  • 29
0 votes
0 answers
4 views

ethers providers instance "on("accountsChanged") is not firing

const instance = await web3Modal.connect(); this._provider = new ethers.providers.Web3Provider(instance); instance.on("accountsChanged", async([newAddress]) => { console.log("...
user avatar
0 votes
1 answer
20 views

If it Safe to Expose Geth RPC to Public Internet

I just spun up a geth node on my home server with flags --http.addr=0.0.0.0 --http.vhosts=* --http.corsdomain=* --ws --ws.origins=* --ws.addr=0.0.0.0. I am using a nginx reverse proxy to make it ...
user avatar
0 votes
1 answer
24 views

What is the most efficient way of coding a compounding inflationary function for an ERC-20 token?

I'm programming an inflate() function for an inflationary token. Currently using a very inefficient for loop. What is a better way? Should I assembly or maybe exponents? Code & links to relevant ...
user avatar
0 votes
1 answer
15 views

Why am I getting incorrect WBTC when swapping it with DAI using Uniswap?

Hi I created a smart contract but when I am swaping 1 Million DAI with WBTC tokens I am getting only ~3379786784 WEI (~34 WBTC) but when I am checking its value on UNISWAP website it is showing 43 ...
user avatar
0 votes
0 answers
8 views

Speeding up transactions sent via send_raw_transaction() in web3py

I am trying to mint from multiple wallet addresses and private keys, so I made use of send_raw_transaction() method. Now if I had sent too low gas, how would I drop and replace these? ...
user avatar
0 votes
1 answer
12 views

setApproval - nft marketplace operator rights

Does giving approval to a marketplace allow the marketplace contract deployer to move assets if they so wished?
user avatar
2 votes
1 answer
52 views

How future resilient is a chainlink price feed?

Obviously, someone is paying for updating the feed that we are retrieving for free, in fact I found this discussion where is explained that it’s not really economical or fair for those backers who are ...
user avatar
  • 21
0 votes
1 answer
22 views

Data from smart contract not properly showing JavaScript code

async function viewmyactivedeposits() { const result = await myLoanContract.methods .viewMyActiveDeposits() .call() .then(function (result) { let data = Array.from(result); $(...
user avatar
  • 1
1 vote
0 answers
17 views

Unit Testing Safe Apps with Safe Context

I'm writing some unit tests for a react safe app. The cra-template-safe-app comes with one test out of the box: test('renders learn loading screen', () => { render(<App />) const ...
user avatar
0 votes
2 answers
36 views

how to connect Remix IDE version 1.3.4 to Metamask

I'm a newbie to solidity i'm watching this amazing tutorial on youtube https://www.youtube.com/watch?v=M576WGiDBdQ&ab_channel=freeCodeCamp.org (2:04:15) and I'm trying to connect Remix IDE version ...
user avatar
  • 101
1 vote
0 answers
111 views
+50

Update HashMap within onERC721Received with Vyper

When a contract receives an NFT by calling safeTransferFrom, onERC721Received is automatically called on the receiving contract. I want to be able to update a Hashmap to record the address of the ...
user avatar
  • 35
0 votes
1 answer
26 views

What's the recommended way to allow users to mint random ERC-721 tokens, reveal metadata, and offer full transparency in 2022?

I'm writing an ERC-721 contract to launch a collection of paintings and I'm considering a few semi-generative variations to make the total supply about 1,000 tokens with multiple rarities. I'd like to ...
user avatar
  • 101
0 votes
2 answers
40 views

How to call a contract within smart contract?

I need solidity analog of web3 command: const contract = new web3.eth.Contract(contractJSON.abi, deployedAddress) The context is: Contract A call contract B Contract B receives an address of ...
user avatar
  • 259
0 votes
0 answers
37 views

Error starting protocol stack: listen tcp 127.0.0.1:8551

i had problem to trying to connect two nodes with one bootnode. when run this code in terminal geth --networkid 2400 --datadir ./data --bootnodes enode://{hash}@127.0.0.1:0?discport=30301 --port 30304 ...
user avatar
0 votes
0 answers
12 views

Complex multi-receiver royalties

I have a complex ERC721, where each token could contain references to another contract's NFTs. Goal: to split royalties thru each referenced NFTs owner in the token from my contact when it sold. ...
user avatar
0 votes
1 answer
6 views

abi encoding with selector and additional variable

I am trying to abi encode a function abc(address, string) the encoding looks like this Address.delegateCall(abi.encodeWithSignature("abc(address,string)", _address, _string)) but I actually ...
user avatar
1 vote
0 answers
19 views

How to add logo to a web3 personal signature message?

I have generated a signature message from my react js app for the users. But in mobile metamask the message displays a letter D, the first letter of my url, at the top of the message. But I want to ...
user avatar
0 votes
0 answers
22 views

Buy on amazon using Crypto

so I'm not sure if this is the best place to ask this question but I searched around and found no solution. I have USDC on the polygon network in my metamask wallet, and I need to spend some of it on ...
user avatar

15 30 50 per page
1
3 4
5
6 7
936