Category : blockchain

I am trying to build a simple blockchain application by referring to https://medium.com/@vanflymen/learn-blockchains-by-building-one-117428612f46 I have Successfully built the app and have tested it using different ports on the same machine, but I want to run the same with different devices on the network, as explained here I tried doing this by running the same application ..

Read more

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 the error below every time I deploy: "Traceback (most recent call last): File "E:Blockchain-Developingdeploy.py", line 81, in signed_txn = w3.eth.account.sign_transaction(transaction, private_key=private_key) File "C:UsersRezliAppDataLocalProgramsPythonPython310libsite-packageseth_utilsdecorators.py", line 18, in _wrapper return self.method(obj, *args, **kwargs) File "C:UsersRezliAppDataLocalProgramsPythonPython310libsite-packageseth_accountaccount.py", line ..

Read more

I’m working from brownie/python trying to do a smart contract When I try to swap from PancakeSwap on BNB testnet (https://pancake.kiemtienonline360.com) calling the function swapExactTokensForTokens from a interface it returns me "Gas estimation failed: ‘execution reverted’. This transaction will likely revert." but I know probably it’s nothing related to gas Here it’s my approve function: ..

Read more

I’m working from brownie/python trying to do a smart contract When I try to swap from PancakeSwap on BNB testnet (https://pancake.kiemtienonline360.com) calling the function swapExactTokensForTokens from a interface it returns me "Gas estimation failed: ‘execution reverted’. This transaction will likely revert." but I know probably it’s nothing related to gas Here it’s my approve function ..

Read more

am following Solidity, Blockchain, and Smart Contract Course – Beginner to Expert Python Tutorial on youtube https://www.youtube.com/watch?v=M576WGiDBdQ i got this error while trying to deploy my ERC20 token, I tried changing the version of OpenZappelin on my brownie-config.yaml file but still did not. Please how can i fix this issue? web Source: Python..

Read more

I’m wondering if there is a formatter for Vyper for vsCode. Given that the blockchain is relatively new and other contract oriented languages besides Solidity aren’t widely adopted yet I can understand the lack of certain features like this minor one. I haven’t found any formatter but nevertheless still worth asking. Thanks in advance. Source: ..

Read more

I write the contract, pragma solidity >=0.7.0 <0.9.0; contract voteEXample{ event getVoterAndVoted(address voter,bytes32 voted); mapping(bytes32 => uint8) public receivedVotes; function vote(bytes32 toVote) public{ require(check(toVote)); receivedVotes[toVote] += 1; emit getVoterAndVoted(msg.sender,toVote); } } And through web3.py, I deployed the contract successfully. But, I failed in using the createFilter method. greeter = w3.eth.contract(address=address,abi = abi) transfer_filter = greeter.events.getVoterAndVoted.createFilter(fromBlock="0x0") ..

Read more

I am new to Brownie. When I followed the video https://www.youtube.com/watch?v=M576WGiDBdQ to study how to use Brownie to deploy blockchain contracts, it gave me an error. RPCConnectionError: Able to launch RPC client, but unable to connect. It seems like the Brownie launched ganache-cli and used "http://127.0.0.1:8545" as the URI of the local testing blockchain network, ..

Read more

I am adapting (for a POA chain) the "stateful event scanner" in the web3.py documentation, which removes "the default JSON-RPC retry middleware as it correctly cannot handle eth_getLogs block range throttle down." However, after clearing default middlewares (provider.middlewares.clear()), I use geth_poa_middleware to connect to the POA chain. Have I reintroduced a middleware that cannot handle ..

Read more