Questions tagged [solidity]
Solidity is a programming language for creating smart contracts, primarily on the Ethereum blockchain
4 questions
0
votes
1
answer
113
views
Recursive function that gives the number of hashes present in a Merkle Mountain Range proof
I have written a function that gives the number of hashes present in a Merkle Mountain Range proof. Using Solidity, this function can be written as:
...
-3
votes
1
answer
88
views
Send token from addressA to addressB through contract [closed]
Hello how can i send a token from the msg.sender to mycontract through a function inside my contract?
i tried to do a transferFrom
"...
4
votes
0
answers
94
views
Optimization of weightedWinner() and random() function
I have written a Lottery contract that picks winner based on the amount they contributed to the pool. I am looking if the code of weightedWinner function can be ...
6
votes
0
answers
174
views
Connect Four implemented via smart contract
I'm learning Solidity development, so I decided that Connect Four would be a fun side-project to work on.
Here's the current flow:
A user creates a new game and sends ether to the contract, then they ...