Category "solidity"

How much would cost Ethereum transaction sending ERC20 token to N recepients?

I want to make an ERC20 token that supports virtual mining. That means that in my Smart Contract I want to make the rule that every K seconds, it sends X amount

How much would cost Ethereum transaction sending ERC20 token to N recepients?

I want to make an ERC20 token that supports virtual mining. That means that in my Smart Contract I want to make the rule that every K seconds, it sends X amount

How do I develop an auto-staker for an NFT game with solidity?

I'm relatively new to solidity development and coding in general, but I'd really like to try and write a program that stakes and un-stakes an NFT after 24 hours

H88 Error: Invalid account: #0 for network: mumbai - Expected string, received undefined

This is my hardhat.config.js file code module.exports = { solidity: "0.8.4", networks: { hardhat: { chainId: 1337 }, mumbai: { url:

Solidity view returns an error of 'out of gas'

When running a public view function that I deployed to etherscan testnet, I get the following error: Returned error: out of gas I have a forloop that loops 50

How to get right msg.sender calling from contract instance a.foo() and have all secure from 3rd parties

I got stucked in thoughts guys and I need bit of clarification to move it forward. (Description is about real problem, code is for best (I hope so..) understand

Can not deploy my contract on ganache-cli using ETH mainnet fork

I used ganache-cli in combination with my Infura key to fork ETH mainnet so I could use the Uniswap router in my development environment: ganache-cli --fork htt

loops in my smart contract that I cant find

I'm testing my contract and I got the following error: Gas costs: Gas requirement of function vjkNFT.safeMint is infinite: If the gas requirement of a function

How to convert string to bytes8 in solidity?

I get string parameter in the function, and the length of the parameter is less than 8. and I want to convert this parameter to bytes8 for saving in the array.

Finding distance between 2 coordinates in solidity

It is said that distance is equal to the following formula: distance = sqrt( (x2 - x1)**2 + (y2 - y1)**2 ) I do this exact formula in the function below. Howev

React page gives back 404 page after refresh

I have a decentralized app with a React frontend. If I go to the homepage (https://app.valerianprotocol.com/), everything works fine and I can refresh the page

Compiling AggregatorV2V3Interface leads to TypeError: Interfaces cannot inherit. interface

SOlidity course: Brownie Fund Me Lesson 6: https://github.com/PatrickAlphaC/brownie_fund_me Compiling AggregatorV2V3Interface leads to TypeError: Interfaces can

I am getting "AssertionError: Expected transaction to be reverted with Username " when I am testing my solidity code

When I am running npx hardhat test on the below smartcontract I am getting AssertionError: Expected transaction to be reverted with Username is taken please try

Is there an efficient way to join an array of strings into a single string in Solidity?

My goal is to write a function that takes an array of strings, and returns a single string containing all of the input strings combined. For example, in Python

How can i create a function to validate if an user can mint?

i used to use for erc720 this function isValidSignatureNow, but now i am working with erc1155 i need a function like that. i am trying to mint but before i need

Solidity - Invalid BigNumber string (argument="value" value="" code=INVALID_ARGUMENT version=bignumber/5.4.2) Error

Smart Marketplace Contract: allow user to list the erc20 tokens to sell at what price in matic the buyers need to provide permission to the contract to interac

Solidity dynamic arrays in memory: overflow bug

I was trying to create a lottery smart contract that stores every tickets (ticket = address) that someone buys into into an array to later on select winners fro

Hardhat is not compiling

I have been trying to test out hardhat. I follow the guide on https://hardhat.org/getting-started/#quick-start. I use the sample project as mentioned. When I tr

Hardhat: ProviderError: The execution failed due to an exception

I'm deploying contracts with hardhat, but cannot use address type in contracts ProviderError: The execution failed due to an exception. at HttpProvider.requ

What is the Oracle.sol equivalent of V0.6 in V0.8?

Chainlink V0.8 no longer includes the Oracle.sol class that I used in V0.6 to register the chainlink node. It seems Operator.sol replaced that in V0.7 (which I