smartcontracts Questions

2

Solved

I have a project with multiple smart contracts locally and I want to generate the ABI of my sc.sol smart contract. I do wish to perform this locally using forge or foundry. I know it is possible to...
Ankle asked 21/9, 2023 at 10:39

3

Solved

I am trying to create a smart contract using Solidity 0.4.4. I was wondering if there is a way to set a mapping with some values already entered to an empty one? For example: This initailises a new...
Graphite asked 31/12, 2017 at 21:31

8

When I type this in the command prompt: solana airdrop 2 -k ./Wallet/.config/solana/Seller.json I get this error Requesting airdrop of 2 SOL Error: airdrop request failed. This can happen when the...
Doi asked 18/2, 2022 at 1:15

5

Solved

I'm attempting to use the private key I generated using the Solana command-line to create a wallet in JavaScript / Node. I want to use the web3.Keypair.fromSeed() method. Here are the steps I've ta...
Heathcote asked 24/10, 2021 at 23:39

3

I had an issue with a solidity contract in which the error demanded I write my code as an abstract. Abstract means my code will be non-deployable. This is a contract that aims to transfer assets an...
Holocaine asked 31/5, 2023 at 8:23

4

Solved

In Solidity we have four types of access. Two of them are private and internal. What is the difference if both of them can be used inside smart contract and both of them are not visible after deplo...
Grapher asked 18/11, 2021 at 12:38

5

If a smart contract has the compiled bytecode for a contract can the first deploy a subsequent contract? According to Ethereum.org: "To deploy a smart contract, you merely send an Ethereum tra...
Pless asked 3/12, 2021 at 3:13

2

I have a local hardhat node spawned simply as: npx hardhat node I have a smart contract code that I want to test that mints 100 NFTs with a simple loop. The code basically adds the address to a map...
Monogamy asked 4/6, 2022 at 6:27

4

Solved

I had do some transaction in Binance Smart Chain in Binance-Peg BUSD-T and it worked successfully. But after 5 transactions. I face to a problem that said Returned error: transaction underpriced ! ...
Danadanae asked 14/6, 2021 at 15:1

5

Solved

I'm currently building a ERC721 compliant contract and have published the contract here: https://ropsten.etherscan.io/address/0xa513bc0a0d3af384fefcd8bbc1cc0c9763307c39 - I'm now attempting to veri...

11

I have a couple of keccaks, which could be reduced to one if I would find a cheap way to get parts of the created uint. pragma solidity ^0.4.19; contract test { function test() { } function su...
Vintner asked 18/2, 2018 at 6:3

1

In the process of studying Ethereum smart contracts, the question arose of how to store large structures inside a contract (array or map). There is a contract pragma solidity ^ 0.8.6; contract Use...
Schear asked 10/8, 2021 at 15:34

3

Solved

I'm dealing with a strange issue with the safeTransferETH helper function in Uniswap V2's router contract. I'm trying to swap tokens held by the contract to Uniswap for Ether, using the swapExactTo...
Clackmannan asked 21/12, 2021 at 20:48

4

Solved

I was trying to get keys of a mapping to star name and address of particular contract (not exactly) in solidity contract mapping(string=>address) nameOfAccounts; What i am expecting is a method...
Chopper asked 1/1, 2021 at 12:28

7

I am getting error with both latest solc (0.5.2 version) and 0.4.25 too while I am writing Simple contract I have tried following steps uninstalled Solc: npm uninstall solc Installed targeted v...
Steradian asked 27/12, 2018 at 7:36

2

Solved

I have just jumped in Solana on-chain program. I am going to make coin game which judge frontside or backside. I tried to use std:: rand and get_random crate but they don't work. If you have experi...
Unfriendly asked 13/1, 2022 at 8:30

5

Error: Truffle is currently using solc 0.5.16, but one or more of your contracts specify “pragma solidity ^0.8.0” Here is a photo of the error - https://gyazo.com/2f5ea2f50cc1d4ef5eea2f21d0e04fe7 A...
Reconvert asked 21/6, 2021 at 15:1

2

Solved

I'm trying to access the ethers provider like this in Nextjs 13.0.1: import { ethers } from "ethers"; export const signMessage = () => { const provider = new ethers.providers.Web3P...
Commitment asked 5/2, 2023 at 11:6

2

Solved

I ran anchor test --skip-deploy and all it should do is initialize my program, but all I get is this error, that I cannot resolve. I checked the tsconfig.json settings they should be fine. This is ...
Berlyn asked 15/2, 2022 at 0:13

4

currently, I'm practicing solidity. However, I'm a little confused about accessing a private variable in a contract. For example here; address private a; address private b; mapping (bytes32 =>...
Stoush asked 23/5, 2018 at 16:23

4

Solved

I am creating a smart contract in solidity ^0.5.1 in which I get the following error: data location must be a memory for the return parameter in the function, but none was given. In the below func...
Displode asked 25/3, 2019 at 19:23

2

I would like to make a word generation function based on the letters of the alphabet, but I don't know how to proceed. I would like to generate 12 words string letters public = "abcdefghijklmn...
Danica asked 31/8, 2022 at 11:12

6

I see this error in the Terminal while building a Rust application (which happens to be about NEAR Protocol, if you're curious): error[E0463]: can't find crate for core note: the "wasm32-unkn...
Paulitapaulk asked 18/2, 2021 at 1:43

1

Solved

I'm trying to generate a random number with Chainlink VRF for a raffle system. This number should have a maximum value of ticketOwners.length and a minimum of 0, as I'll be getting the index of the...
Rodger asked 11/12, 2022 at 2:8

8

I have been running into the specified in the title. I have developed a smart contract and have successfully compiled and deployed it to the network as follows: 1. Run testrpc 2. truffle compile...
Chemotropism asked 8/2, 2018 at 20:24

© 2022 - 2024 — McMap. All rights reserved.