Smart contracts also known as a smart property are computer protocols that facilitate, verify, or enforce the negotiation or performance of a contract, or that make a contractual clause unnecessary.
Questions tagged [smartcontracts]
3050 questions
0
votes
2 answers
Type key value as variant number typescript
I have a problem to type an abi key "5777" in typescript.
When i get a netwotkId and then set in networks key, the linter show me the next error
i need to type "networkId" and that it is not a always a fixed value as like "5777"
let networkId =…

geradeluxer
- 3
- 2
0
votes
1 answer
Can you return multiple arrays in a single solidity getter function?
The reason I'm asking this is because I came across two answers, one of which saying that you can return multiple arrays in a function
and another answer saying you cannot.
The answer saying it's possible to return two arrays in a single…

DIRTY DAVE
- 2,523
- 2
- 20
- 83
0
votes
1 answer
Hyperledger Fabric multiple transactions with chaincode
I have created chaincode in which I want to do multiple transactions. But only one transaction occur.
This is my code:
const { Contract } = require("fabric-contract-api");
const crypto = require("crypto");
class KVContract extends Contract {
…

DIGITAL JEDI
- 1,672
- 3
- 24
- 52
0
votes
1 answer
How to derive the parent public key from a child public key
I am writing a smart contract. This smart contract has declared a mapping(address=>boolean) whitelist. The admin can register users' addresses on this whitelist, and then those users are able to call the functions defined in the smart…

shapeare
- 4,133
- 7
- 28
- 39
0
votes
1 answer
Identifier not found or not unique
I made a contract with the below code, but get an error Identifier not found or not unique at IPancakeSwapV2Router02 in the constructor. What I am missing here?
Here is a snippet from my code:
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;…

Hakikat41
- 172
- 3
- 9
0
votes
1 answer
ERC20 increaseAllowance exploit?
I have my own smart contract. Users on my webpage needs to first approve (increaseAllowance) and then they call "donate" function and part of the assets are sent to my vault and the other part goes to the address of another user.
Strange thing is…

PoorMillionaire
- 347
- 1
- 2
- 8
0
votes
0 answers
How to define Sub-Paths in remappings.txt in foundry?
I want the following import in src:
// SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.16;
pragma abicoder v2;
import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import…

azvast
- 337
- 4
- 10
0
votes
1 answer
Uniswap SwapRouter V3 Error: cannot estimate gas; transaction may fail or may require manual gas limit
I am trying to add liquidity to uniswap pool using SwapRouter but I get a gas error. I am working on hardhat fork.
const { ethers } = require('ethers');
const dotenv = require('dotenv').config();
const { IpcProvider } =…

jayyyo
- 109
- 4
0
votes
1 answer
Deploy a Sponsor Contract
I'm trying to deploy a sponsor_contract that will pay transactions fee for Wallet A, to claim token and transfer it to other wallet.
Here is my code:
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
contract SponsorContract {
address…
0
votes
0 answers
Error: DeclarationError: Undeclared identifier
I have a deployed contract. Now I want to make changes through the Remix, but there was some kind of error. please help me to solve this error. thanks.
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.10;
import…

Gencho
- 1
0
votes
1 answer
Remix Ethereum IDE Injected Provider - Not Finding Polygon Mumbai Testnet Metamask Wallet
I'm attempting to deploy my smart contract to the polygon mumbai testnet through the Remix Ethereum IDE.
I was able to have it detect my wallet when deploying to the Ethereum Goerli testnet.
Now that I'm trying to launch it to mumbai it's not…

IAF
- 51
- 1
- 7
0
votes
0 answers
how to get unique holders of Volt Inu token?
I want to get unique holder's addresses displayed in this smart contract: https://etherscan.io/token/0x7db5af2B9624e1b3B4Bb69D6DeBd9aD1016A58Ac#balances
Like, fetch these 21450 holder wallet addresses into my database. I have searched all over the…

Algorithm Unlock
- 77
- 7
0
votes
0 answers
Error: call revert exception ,when trying to access method from Ethereum contract
The sendTransaction is the function I call when trying to send a GoETH from one metaMask account to the other .
The problem is that when I try to acces the getTransactionCount it gives me the error Error: Call revert exception.
My contract is…

User G Amsterdam
- 47
- 9
0
votes
1 answer
Hardhat smart contract deployment script using multiple wallets
In hardhat config file I am able to provide multiple wallets via an array in the account field. How do I access the 2nd signer? I would like to have a single run deploy script to deploy two contracts each with a different signer.
I know I can just…

iluvAS
- 513
- 4
- 9
0
votes
1 answer
Hedera - Token Service - Smart Contract ERC721 NFT - How do I get my contract to show in token associations?
I am trying to understand a bit more about the use of ERC721 contracts on Hedera and how they work with the Hedera Token Service (HTS).
If I use this contract ERC721Mock.sol, would the tokens I created show up in the Token Associations…

EmmBee
- 114
- 5