Category "solidity"

Trying to run a Brownie Dapp in Docker

I'm trying to run my brownie dapp in a docker container, but i always have the same error and can't seem to fix it: FileNotFoundError: [Errno 2] No such file or

How do I set Royalty on OpenSea from my DApp?

The project we are supposed to make is a minting page that can set royalty fee on opensea testnet from the dapp itself (i.e. you cannot set it from open sea's i

totalsupply() is not a function openzeppelin contracts

I'm trying to import some contract files from open zeppelin so my solidity smart contracts can inherit their functionality, when trying to write chai tests that

eth-brownie - No module named <Users.someuser>

Getting this error while trying to run a eth-brownie script on MacOS ModuleNotFoundError: No module named 'Users.xyz' Run command: brownie run scripts/mainne

Getting error while deploying smart contract using truffle

2_deploy_contracts.js ===================== Replacing 'SimpleStorage' ------------------------- Error [ERR_UNHANDLED_ERROR]: Unhandled error. ({ code:

ParserError: Expected identifier but got 'payable'

This is the code thats giving the error, the line is set to bold. //SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.13; contract CrowdFunding{ mapp

Source "@openzeppelin/contracts/token/ERC721/ERC721.sol" not found: File import callback not supported

I've imported the Open Zeppelin ERC721 token standard into my VS Code with the Solidity extension, but see the following warnings on all my OZ import statements

Decode constructor arguments in solidity

I playing Ethernaut Level 8. The goal is to get access to the private password state variable and unlock the contract. I know one could use await contract.unloc

Compilation failed Internal Compiler Error: Stack too deep, try using fewer variables

I am trying to compile the bellow contract and i am getting the error. If i remove the mapping i dont get an error: Compiling using default compiler, solidity v

Sender account not recognized on private ethereum network

I'm currently developing a dApp in Solidity and am working on a web3 library to handle communication with it. I struggle with the process of new account creati

Can you call a Solidity contract method with only Metamask?

I’m wanting to use Metamask in my app to let users pay a fixed ETH fee (plus gas) to call a method from my Solidity contract. I looked at the Metamask doc

Problem while compiling smart contract in VScode ( No response in temrinal )

I have a problem while compiling my first smart contract: Structure of my folder: in Inbox.sol pragma solidity ^0.8.9; contract Inbox { string public mess

How to extract ethereum from the smart contract

I am a newbie in the blockchain technology and I have question. I just deployed an Ethereum smart contract to the Rinkeby testnet network and minted a few NFTs.

When compiling my solana code , I am getting "TypeError: Named argument "username" does not match function declaration."

pragma solidity ^0.8.4; import "hardhat/console.sol"; contract Ewitter{ struct User{ address wallet; string name; string username;

I wrote a solidity that pays ERC-20 tokens for ERC-721 NFT transaction, but it doesn't work

I wrote a solidity that pays ERC-20 tokens for ERC-721 NFT transactions, but it doesn't work. On purchase, you trigger the purchaseToken method. But I get an un

Error obtain data with React and Solidity

When call in my front (React) My code: const checkAllowance = await contract.GetAllowance.call({ from: account }).catch((e

Standard Common Practice Method in Solidity to perfrom any type of division?

I am trying to do the following calculation with solidity: 3,000 / 45,000,000 = 0.000067 with the following method: // SPDX-License-Identifier: MIT pragma solid

Adding Liquidity to Pancakeswap in Testnet

I need help with my code. I want to create a simple Smart Contract with adding Liquidity to Pancakeswap. I tried many different things, but the transaction alwa

Discrepancy between the getAmountsOut function and the prices on the exchange

I am making an app to get live prices of tokens from the different exchanges. To do this I'm using web3.py to access to the DEX smart contract and call the getA

Fail with error 'PancakeLibrary: INSUFFICIENT_AMOUNT'

I'm trying to fork PANCAKESWAP, everything seem to work well, I can add liquidity, but whenever I decided to add a liquidity that has to do with BNB (i.e callin