All Questions

Filter by
Sorted by
Tagged with
0
votes
1answer
34 views

What is the best way to verify the comments in the contract code?

I have a contract that I want to be legally binding in traditional courts. It assigns rights, and for this I need legalese in the comments to describe the process. What is the best way to make sure ...
0
votes
1answer
22 views

Retrieve EOS LINK tokens sent by mistake to Ledger Nano S [closed]

How to retrieve my LINK Tokens sent by mistake to my Ledger Nano S and transfer them to My Ether Wallet. I cannot see them in my Ledger Live, but I found the transaction in my Etherscan.io Thank you.
1
vote
1answer
47 views

How get private key in private network?

I launched a private RPC Blockchain network and connected through another computer to this network. The connection is successful. How can I get a private key(through Python) if the file is on another ...
0
votes
1answer
49 views

Sending money through a smart contract

I'm trying to create a smart contract that would send funds from one wallet to another by taking values ​​from an array that I fill. But it does not send values ​​unless I specify them in msg.value. ...
0
votes
0answers
12 views

TypeError: “send” and “transfer” are only available for objects of type “address payable”, not “address”. owner.transfer(msg.value); ^------------^ [duplicate]

pragma solidity ^0.5.0; /** * The Hotel contract does this and that... */ contract Hotel { struct Room { uint id; string name; string hotel_name; uint price; ...
0
votes
1answer
35 views

Own private key of smart contract to sign a line of text

For my project it is necessary for smart contract to sign a message (for example, EC-signature) I have not found a way to generate a pair of public and private keys inside the contract so that the ...
3
votes
0answers
11 views

How does eth2 Random Election Work?

In eth2 validators will be randomly selected. What is the formula for how this random selection works?
0
votes
1answer
38 views

Transaction hash is 'undefined' when running web3 code from command prompt

I wrote this java script code to send test ether to my other account: var Tx = require('ethereumjs-tx').Transaction var Web3 = require('web3') web3 = new Web3('https://ropsten.infura.io/...
1
vote
1answer
24 views

Bytes memory as a function parameter increase gas cost

I've a smartcontract compiled with pragma solidity ^0.4.0; version and one function receives a bytes parameters which contain a long string. In these version it doesnt need to set the parameters as "...
0
votes
2answers
21 views

What is meant by a Ether Wallet?

Somebody please tell me what is a Ether Wallet? I got the following answer: A blockchain wallet is a digital wallet that allows users to manage bitcoin and ether. Is it like a account? Zulfi.
0
votes
1answer
15 views

Does an online crypto wallet actually store crypto currency?

I have done some code with web3 and smart contracts and I've realised that you don't have to store your currency anywhere, because it is already there; it can be read from anywhere. That made me ...
1
vote
1answer
14 views

Why do we have to put 'hex' at the end of this function? Buffer.from('key' , 'hex')

I know that this line of code: Buffer.from('key', 'hex') Converts a string into its binary representation. My question is: what does adding the 'hex' at the end do? I am confused, since the key is ...
0
votes
0answers
16 views

Problem with understanding the solution for Transaction Ordeing Vulnerability

For the following paper, I can’t understand the text written below: https://arxiv.org/pdf/1806.01143.pdf Our violation pattern checks that the amount of the call instruction is determined by a ...
0
votes
1answer
13 views

Compliance and Violation patterns

I have downloaded the slides from the site: Compliance and Security patterns It says "No writes after calls." I can understand this concept. It’s a remedy for reentrancy problem. But it shows ...
0
votes
0answers
15 views

Why does Infura Ropsten websocket filtering event timeout?

When listening events via Infura Ropsten websocket, web3.py implementation timeout while web3.js succeeds. The demo can be cloned from -- https://github.com/jerryji/ropsten_wss_timeout_demo After ...
1
vote
1answer
21 views

Error: invalid address in solidity constructor

I get a huge error message (~1MB) starting with Error: invalid address (arg="_readAccess", coderType="address", value={"constructor":{"contractName":"SenderAccess","abi":[... when executing a test ...
0
votes
0answers
19 views

How to repair a Corrupted Chain-state Database due to geth bad shutdown by user?

What is the repair command and format of command to repair or fix my geth --syncmode fast --datadir D:\folder\EthereumGethChain? The error I am receiving is: Bad Block , Corrupted Chain-state ...
2
votes
1answer
15 views

What does it mean to serialize a transaction?

In tx library there is a function: serialize() that "serializes" your transaction object. You can then convert that serialization into hexa decimal string, and use it to send the transaction with the ...
0
votes
0answers
8 views

Errors generating certificates in fabricsamples 2.0

When I am generating certificates in Fabricsamples 2.0 it's showing errors like: panic: Error reading configuration: While parsing config: yaml: line 217: mapping values are not allowed in this ...
0
votes
2answers
16 views

Function does not return value on ropsten [duplicate]

This code returns the address perfectly when i run it on ganache local chain but when i run this on ropsten it just returns a "-" Any idea on what the problem is? function newMatch(uint _matchId,...
0
votes
1answer
17 views

invalid implicit conversion from contract to address requested contract

I am using this function to create a new contract instance of Match contract which takes 4 parameters. However i am getting this error message "invalid implicit conversion from contract to address ...
1
vote
1answer
22 views

In a clique consensus private network, what happens when a sealer (signer) stops mining

I create a private network with two sealers running on two separate nodes. I found that if one node stops signing by miner.stop(), the other one start to wait for it and stoped signing blocks too. The ...
1
vote
1answer
21 views

My private ethereum block gas limit decrease when mining

I set 'genesis.json' like this. ... "gasLimit":"0x30479e80", ... It's 810,000,000 at decimal. But when I run the blockchain and start mining, the block gas limit decrease. I'm using Geth/v1.9.7-...
0
votes
1answer
18 views

Upgrade a fully synced node to archive node?

Is it possible to upgrade a fully synced node to archive node ? means can i download older states by changing gcmode to archive ? or i will have to start from scratch ?
1
vote
1answer
9 views

How do I send funds from a contract to an account using bytecode?

The instruction CREATE will send funds to a new account. Is there another instruction for sending funds to an account that already exists? Or I just have to use CREATE as if the account doesn't exist?
2
votes
2answers
41 views

Calling function on ERC20 contract through staticcall gives wrong result

I've made two functions to interact with a local ERC20 token. Here they are: pragma solidity ^0.5.0; contract GardenTestContract { function getBalanceOf(address _address) public view returns (...
2
votes
1answer
33 views

Modifying simple function with inline assembly

I'm trying to write a super simple contract that's gas efficient utilizing inline assembly in solidity. All this function needs to do is create a child smart contract with one function, self destruct....
0
votes
1answer
26 views

Truffle. Test .call() args . Error: invalid string value (…) at PromiEvent

I have a js truffle test: it("should add an exam to the exams list", async () => { // This should test the complete functionality let hash_test = "fB03aA5E2E71De1470ae2"; let instance =...
0
votes
1answer
38 views

Send funds locally

Can someone tell me how to send eth to the address locally? I tried to create an account, but I don’t know how to send funds to it locally Web3 = require('web3'); web3 = new Web3(new Web3.providers....
1
vote
1answer
19 views

Solidity. Truffle test not passing “expected { _events: {},…” to equal

I can't get a test to pass, for me it is very clear but I am missing something obvious: This is the smart contract: function getContractOwner() public pure returns (string memory ...
0
votes
0answers
10 views

Web3J Java Android SendAsync Error

I am trying to interact with a method in my smart contract. The method is a simple method where you send a string value to a global variable. I end up using a SendAsync which appears to initially work,...
0
votes
0answers
13 views

Assertion error running truffle test

I cant seem to understand where this error comes from. Maybe someone can help My token solidity file : pragma solidity >=0.4.2 <0.6.0; contract LairToken { //Name string public name = "Lair ...
0
votes
0answers
15 views

Truffle test passing when it should not

I have this test, it clearly shouldn't pass: contract("Exams", function(accounts) { it("should keep the contract owner", function() { // var expectedValue = "...
1
vote
3answers
26 views

Why Does web3py Need Provider to Initialize Contract?

The two steps to create a contract instance in web3.py are -- w3 = web3.Web3(WebsocketProvider('https://ropsten.infura.io/v3/...')) contract = w3.eth.contract(address=address, abi=abi) Why must I ...
1
vote
0answers
43 views

Reentrancy attack not working on mainnet, but working on ropsten and remix VM

I was fullfilling a reentrancy attack on a contract. I tested it in remix VM first and later on with deployed contract on ropsten testnet. Both worked well without any errors. On the mainnet it turned ...
0
votes
1answer
15 views

Could not deploy contract through sendTransaction

I am trying to deploy contract (available at Etherscan.io ). I proceed following steps: copy its contract creation code and save them in crCode variable. Then i tried to to run following code; async ...
1
vote
1answer
27 views

Autocomplete for vim?

I have recently switched from vs-code to vim, and while I really like the workflow I do miss autocomplete. Is there a plug-in anywhere?
0
votes
0answers
15 views

Dataset of simple contracts with getter setters

Are there any repositories/datasets which provide smart contract with simple logic like having some getters and setter functions. So, that I could give some values to getter and setter functions, ...
0
votes
1answer
37 views

Ganache VM Exception while processing transaction: out of gas

I am deploying my contract using web3 by taking values (just copy paste) from Etherscan (i.e. abi, contract creation code, etc.) and then deploy my contract on Ganache (gui). When i run the my code ...
0
votes
1answer
25 views

How does the reentrancy attack work?

Consider the following contracts contract Victim{ //... function donate() public payable { credit[msg.sender] += msg.value; } function withdraw(uint amount) public { if (credit[...
0
votes
1answer
15 views

Nothing happens whe I run truffle test

I am new to solidity. Maybe I am missing something obvious in the setup. But when I run truffle test, I get nothing, the terminal just stays there forever. $ truffle test ... and I don't know why, ...
0
votes
0answers
8 views

Where to find Court Decisions where Etherum Blockchain was used to determine a verdict

Where can I find actual cases where Blockchain (particularly Etheru Blockchain) was used in a case, or better yet, decided the verdict of a case. So far, I searched findlaw.com, and I get articles on ...
0
votes
0answers
14 views

Reference library in external contract

Say contract A {} uses function from library Math {}, can it reference the library from an external contract, and if yes how?
0
votes
1answer
14 views

What is the client version?

I am using Infura and web3.py. When I connect to Infura the web3 object has a clientVersion property that reads this from JSON RPC "Geth/v1.8.15-omnibus-255989da/linux-amd64/go1.10.1" Can someone ...
2
votes
1answer
32 views

Error trying to get events in web3.py via Infura

I was trying to get all events from my smart contract (in Ropsten) via Infura node. The problem is that I know that Infura does no support creating filters, but I don't know how to get events by ...
0
votes
1answer
13 views

What's the best way to get gas price in next block

our wallet project is requried some update about gas price 1 not set gasprice by user 2 auto choose the best gas price Current, I am using rpc method eth_gasPrice in my wallet's code to get gas ...
0
votes
1answer
34 views

Unable to deploy contract (2 lines of code) to chain (ETC)

Anyone know what causes this contract to not deploy on Ethereum Classic? contract A{ function b() public returns(uint) {return 4;} uint public c = b(); } Deploying the contract on ...
0
votes
0answers
39 views

Address not appending to array

I'm new to Ethereum and I communicate with my Solidity using Go language. I have a contract that allows user to join the lottery by adding the user's address to the array of addresses, but it's only ...
0
votes
1answer
28 views

The method eth_sendTransaction does not exist/is not available - web3.py

I am trying to send data to the contract, but I am getting the following error: The method eth_sendTransaction does not exist/is not available This is the code: from web3 import Web3 web3 = Web3(...
0
votes
2answers
34 views

Is this function prone to underflow hacking?

So I want to write as simple as possible withdrawal function in a token contract which also doesn't use Safemath for one very simple reason: I admit I don't understand well enough data types in EVM so ...

15 30 50 per page