Skip to main content

Questions tagged [solidity]

Solidity is a programming language for creating smart contracts, primarily on the Ethereum blockchain

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: ...
Tristan Nemoz's user avatar
-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 "...
Amnesia420's user avatar
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 ...
Iftifar Taz's user avatar
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 ...
Daniel M.'s user avatar
  • 235