smartcontracts

Why is sign_transaction giving me this Error?

Why is sign_transaction giving me this Error? Question: So the problem with my code is when i execute the signed_tx, it starts giving me errors, everything else works fine before that because i have printed everything and it is how it should be, so that is why i do not understand why does it suddenly …

Total answers: 1

Hedera-sdk-py Smart Contract Deployment and Querying

Hedera-sdk-py Smart Contract Deployment and Querying Question: I am creating a DApp on the Hedera Blockchain using Hedera-sdk-py, a python wrapper of Hedera SDK in Java. I want to create a smart contract, deploy and query it, but I can not seem to understand the stateful.json file in the documentation (https://github.com/wensheng/hedera-sdk-py). Is the stateful.json a …

Total answers: 2

Can't call smart contract from Python

Can't call smart contract from Python Question: I’m trying to call an Algorand smart contract from with python. I can’t get my private key using mnemonic why that? I’m using Python and I’m trying this command: private_key = algosdk.mnemonic.to_private_key(‘word1, word2, word3, etc…) it does not work. would really appreciate some help here. Asked By: Web …

Total answers: 1

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

How to get the price of BSC token directly the token pool contract in web3.py Question: 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 is off because when I checked on https://pancakeswap.finance/swap …

Total answers: 1

smart contract with brownie gives VirtualMachineError

smart contract with brownie gives VirtualMachineError Question: I encontered a problem when I test my project, any help would be greatly appreciated. All my code can be found in here: https://github.com/Karlus44/smartcontract-lottery When I type the command brownie test my script tests/test_lottery_unit.py is exectuted, and my different tests are submitted. Here some quotes of my logout: …

Total answers: 3

Brownie: CompilerError: File outside of allowed directories

Brownie: CompilerError: File outside of allowed directories Question: I’m trying to import "@chainlink/contracts/src/v0.6/interfaces/AggregatorV3Interface.sol" to my contract but i encountered this error. CompilerError: solc returned the following errors: contracts/Lottery.sol:4:1: ParserError: Source "C:/Users/Алексей/.brownie/packages/smartcontractkit/chainlink-brownie [email protected]/contracts/src/v0.6/interfaces/AggregatorV3Interface.sol" not found: File outside of allowed directories. import "@chainlink/contracts/src/v0.6/interfaces/AggregatorV3Interface.sol"; ^————————————————————————–^ This is my contract (Lottery.sol): // SPDX-License-Identifier: MIT pragma solidity ^0.6.6; import "@chainlink/contracts/src/v0.6/interfaces/AggregatorV3Interface.sol"; …

Total answers: 2

The transaction declared chain ID 5777, but the connected node is on 1337

The transaction declared chain ID 5777, but the connected node is on 1337 Question: I am trying to deploy my SimpleStorage.sol contract to a ganache local chain by making a transaction using python. It seems to have trouble connecting to the chain. from solcx import compile_standard from web3 import Web3 import json import os from …

Total answers: 6

ParserError: Source file requires different compiler version

ParserError: Source file requires different compiler version Question: I tried all that you mentioned in the discussion here (in other questions) and at https://github.com/smartcontractkit/full-blockchain-solidity-course-py/discussions/522 , however it is not solving the issue for me, I also noticed that the current compiler version remains (current compiler is 0.6.12+commit.27d51765.Windows.msvc). But when I right click and select Solidty:Compiler …

Total answers: 5

'code': -32603, 'message': 'Error: Transaction reverted without a reason string' while i'm trying to use swapExactTokensForTokens UNISWAP

'code': -32603, 'message': 'Error: Transaction reverted without a reason string' while i'm trying to use swapExactTokensForTokens UNISWAP Question: I have read documentation on this function. I’m using Hardhat to visualize Blockchain at a particular moment. I deposit() ETH to WETH, then I approve() WETH to router. Everything looks fine. But when i try to call …

Total answers: 2