Category "solidity"

How to get the price of BSC token directly the token pool contract in web3.py

I'm trying to get the price of some BSC token directly from the contract. Doing some searches, I found a mix of ideas with the snippet below. I'm sure the code

Solidity-Type address not convertible to type uint256

I created an array of structures and then tried to get the values of each account of an array. But I failed with an array while passing the address variable whi

How to handle user login in Ethereum DApps?

I have locally created a DApp in Solidity for Ethereum framework. I have a smart contract, a js file (using web3 API) and html file. What I want to achieve is t

Solidity - Solidity code to Input JSON Description

I want to compile my ethereum HelloWorld.sol smart contract. In all the tutorials is that you do it like this: var solc = require('solc'); var compiledContract

from field must match key's x, but it was y

I write the code below. It seems it has a problem with the "signed_txn = w3.eth.account.sign_transaction(transaction, private_key=private_key" part. I face to t

return nested array solidity

Is it possible to return an array in solidity? // SPDX-License-Identifier: MIT pragma solidity >=0.8.0 <0.9.0; pragma experimental ABIEncoderV2; contract

deploy solidity contract with c#

I am developing an application on Ethereum blockchain. I use Solidity for contract and Nethereum c# library to connect to the contract. I am somehow new in Ethe

What's the difference between .deploy() vs. .deployed()

I am writing a script for a smart contract that I'll deploy using hardhat. I'm confused on the difference between .deploy() and .deployed(), what does each one

Trouble using python/brownie in WSL

I'm trying to complete the simple collectible NFT tutorial from this freeCodeCamp video. (I'm getting stuck on the script that starts exactly where the link is

How to create a custodial wallet per user on a plateform with Solidity?

I'm new in the blockchain community, and i have to realize a web 3.0 project. In this project, we have an ERC20, and for each user who sign up on our platform,

Eth, how to call a deposit function from a smart contract

I am working on a project where I need to send ether from an user to a smart contract and from the smart contract to the user. The smart contract is code in Sol

NaCl support in the Everscale compiler api

I wonder if there is NaCl support in smart contracts? It doesn't matter which compiler, Solidity, cpp and etc.

Pass contract's code and data to another contract via CLI

Working on contract fabric, starting with the sample. TvmCell stateInit = tvm.buildStateInit(templateCode, templateData); code and data are TvmCells of a templ

Reverted transaction on Chainlink Node while fulfilling request

I am getting reverted transactions on my Chainlink node, and I am looking for some tips on how to debug it. The node picks up the Oracle request and the job run

How to call run-local function from debot?

How to call run-local (without sending a message) function of another contract from debot? For example, for getting a public variable.

How to return mapping in ton-solidity contracts?

Can I return a mapping in a function of ton-solidity contracts? I need something like this. function func() public returns((address=>someStruct) myMapping)

tondev "Error: Param params (tuple) expect name at ..." when with payload param

I am using tondev and trying to call the function with payload param: tondev contract run Wallet sendTransaction --input "dest: 0x5074b87aa1ece77b28f652ccd43db0

EtherScan access needed on Test net

We are developing application on VS code with Ganache. So everything will be local as it is Ganache. As explained in following link, we cannot use etherScan fun

How to find out if an Ethereum address is a contract?

An address in Solidity can be an account or a contract (or other things, such as a transaction). When I have a variable x, holding an address, how can I test if

Timed Advertisements Solidity Contract

Basically, I'm trying to make the smart contract be able to take exactly 0.05 eth ONLY when the cooldown timer is set to 0. The Dapp I'm creating is a first com