Category "solidity"

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

failed to deploy solana smart contract (solang compiler)

I run: Solana-keygen new --force solana airdrop 5 I have a solidity smart contract that looks like this: // SPDX-License-Identifier: MIT pragma solidity ^0.7.0;

Uncaught (in promise) Error: This contract object doesn't have address set yet, please set an address first

I would like to know why I get this error, if the contract is declared in CONTRACT_ADDRESS and is called through contract to be used in data: Uncaught (in prom

HardHat Unable to download compiler versions list

So this is my first interaction with hardhat. I created a sample project using npx hardhat but for some reason, when I try to Run: npx hardhat test I get the f

Web3: Cannot read properties of null after new ethers.Contract

I am trying to use a smart contract just after I instantiate it. However, I get an error: Uncaught (in promise) TypeError: Cannot read properties of null (read

Import "brownie" could not be resolved in Pylance

Error is: Import "brownie" could not be resolvedPylance I know there are other SO posts that refer to this, but it seems most of them are talking about booting

How to run an hardhat script on NodeJs so that you can fork multiple evm chains on different ports?

I want to be able to fork more chains (ethereum, bsc, etc.) than just one on my system. Hardhat doc shows, how to fork 1 chain npx hardhat node --fork https://

Solidity storing timestamp/value data thats easily accessible

I have an interesting use case that I can't seem to solve. Problem: Tokens get X points per day. I want to freeze ERC721 tokens (they have IDs) for a certain pe

Truffle Chai Assertion Error with Truffle Unit Cases

Problem: facing an issue with the below Truffle test case while trying to Implement the ERC20 token in my contract. contract("Token Test", async(accounts) =>

How to decode Token Address from a given Pair Address in web3

What I am trying to accomplish is to get the Contract Address 0x1ada8bb610c59aae25d8dd8f354282f5693cefb1 given the LP Pair address 0x0D0b63b32595957ae58D4dD60a

How do I resolve this Hardhat CompilerError? (Stack too deep when compiling inline assembly)

I'm analyzing the Chainrunners smart contracts, so I went on Etherscan and copied the verified contract source code. When I tried to compile without solidity op

How can accept other token in my Smart Contract?

The token is ERC721 by OpenZeppelin I'm trying to add USDC payments to my Smart Contract, but I'm having problems. This is my function to accept token.. but tra

Initialize a Merkle tree of 8 with blank leaves in solidity

I am trying to initialise an empty merkle tree in the constructor my solidity contract I have a merkle tree of 8 leaves, so that means that the flattened out fo

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

solidity newbie here. when I try to read the value of the people array. I'm getting an error: call to SimpleStorage.people errored: Error encoding arguments: E

Getting an error when trying to execute the deploy script

I'm getting a Transaction reverted without a reason string when I try to execute the deploy script. Smart Contract: //SPDX-License-Identifier: MIT pragma solid

Sending Custom Token as Dividend

how can i send a custom Token as Dividend with event SendDividends(uint256 tokenAmount, uint256 bnbAmount); but like token instead of bnbAmount

How to concat two string values in Solidity

Concat two or more string values- pragma solidity 0.8.9; contract StringConcatation{ function AppendString(string memory a, string memory b) public pure re

npx hardhat doesnt creates a new project

I tried creating a new hardhat project. I tried the following commands in terminal. npm init --yes npm install --save-dev hardhat But when I use the following

Solidity - ImportError: cannot import name 'VRFCoordinatorMock' from 'brownie'

Would really appreciate any help on this error. I've tried several things and reviewed the contracts for VRF, but I can't seem to figure it out. All the other t

Turning an ERC721 mint contract to store funds and accept payments

hope all is well. I have been following Dapp University tutorial (https://www.youtube.com/embed/x-6ruqmNS3o?start=2111) to make a mintable NFT pairs game. I am