Category "solidity"

not found utils/context.sol when i import from openzepplin

i have copied a contract from openzappline. but when i compile it on remix it gives me the error....that utils/context.sol is not found. here is the import prag

when i try to run solidity-coverage with truffle run coverage then I got this error

I try to run solidity coverage for testing test case and its coverage but when I run coverage command its give error like this : - command used (truffle run cov

Hardhat – What are the strange calls to my smart contract?

I am using Hardhat hackathon boilerplate and calling my smart contract's (address 1c0, addresses shortened for clarity) function MyContract#addProduct from the

How to test smart contract with cross-contract invoke using truffle?

I have two contract, I write in in one file, named Sum.sol. The sum contract invoke Add contract. I just want to test cross-contract invoking. If I didn't put t

How to implement smart contract to add eth address record to refer the specific ENS subdomain name in solidity

I have wrote the smart contract for creating ENS subdomain name. I need to pass the reference ETH address record for that created subdomain name. pragma sol

How to identify Who holds an NFT for how long?

I am developing an NFT collection using ERC721 token. But I would like to know how a particular nft is held by a particular customer? I am sensing there are two

Why my ERC721 contract in Opensea can't work normally (Without any code of openzeppelin github)

I want to know how OpenSea system read contract and call functions. So, I try to write a ERC721 contract without import any other code. // SPDX-License-Identifi

How to add royalty fee to NFT collection

I am currently learning about NFTs and I reached the point where I deployed the contract and I can mint and everything going well. The only missing part is roya

Ethernaut challenge -Lv22 Dex - allowance approval problem

I'm trying to complete the Dex level of ethernaut challenge which is quite easy. In order to use swap I need firstly to approve token allowance, but I don't und

ERC721A smart contract

I'm writing an ERC721A smart contract and getting a warning in the Remix IDE. There is the code: function tokenOfOwnerByIndex(address owner, uint256 index) pub

I can't get "Typechain" folder when I install dependencies using hardhat

When I install all the dependencies but didn't get the "typechain" folder in the typescript hardhat. how to get it? npm init npm install --save-dev hardhat npx

Getting a smart contract, web3 python

How can I access smart contract calls with only the address of the contract? Correctly, I understand that the address will be enough, because with the help of i

Deploying a Smart Contract

If I were to deploy a smart contract for NFT's that I would want to sell which is the best way to do this. And is utilising Injected Web3 on Remix.ethereum.org

Passing a Struct Array to constructor of Solidity Contract

I am building an NFT smart contract with solidity, and I am trying to pass and Array of Structs into the constructor when I deploy the contract. However I am ge

ERROR Brownie Mainnet Fork Testing `brownie.exceptions.VirtualMachineError: revert` problem or other?

When I try to test below project, it gets below error. Any thoughts why test fails, am I missing something? I am following 16 hours Solidity course of 'freecode

Solidity Error: member balance not found or not visible after argument-dependent lookup in contract

I'm getting this error in Solidity for the following code snippet: member balance not found or not visible after argument-dependent lookup in contract functio

ERROR: brownie.exceptions.RPCConnectionError: Able to launch RPC client, but unable to connect

The ganache-cli is unable to connect to the mainnet fork, as a result of which I can't run brownie test --networks mainnet-fork My test.py file looks like this:

can't import module from solidity file to python file in brownie; ImportError: cannot import name 'AdvancedCollectible' from 'brownie'

I'm trying to build out this tutorial, but I keep getting the same error when I try to import from a solidity file to a python script and run it, all in the sam

ParserError: Source file requires different compiler version (current compiler is 0.8.7+commit.e28d00a7.Emscripten.clang)

I was eventually trying to run this code in remix IDE, where I was running this using 0.6.6 version of Solidity and ran into this error. I've tried using some o

Web3 Cannot get value of a public variable from contract

Solidity code: pragma solidity ^0.5.8; contract remainNew{ address public owner = msg.sender; uint public cubeCount = 0; modifier onlyBy(addr