My public address is 0x4525Ac33F4200b52B1a028Bb5affC2aE88d59Bf2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // SPDX-License-Identifier: MIT | |
| pragma solidity 0.8.19; | |
| //CPMM : Constat product market maker | |
| //This contract implemets CPMM for fix pair of 2 ERC20 Tokens | |
| //Does not account for fees | |
| contract CPMM{ | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // SPDX-License-Identifier: MIT | |
| pragma solidity ^0.8.6; | |
| //This is lottery smart contract | |
| //It will have players and owners | |
| //Players enter the lottery by paying the lottery ticket price | |
| //Owner recieves its cut from the players entry ticket price | |
| //The rest of the amout consist of pot money | |
| //Then Winnner is randomly pick who wins the entire pot money |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // SPDX-License-Identifier: MIT | |
| pragma solidity ^0.8.6; | |
| //This smart contract will take list of owners and the no of signatures needed to confirm the | |
| //the excution of the transcation, which were submitted by one of them only | |
| //Idea is, say in we have 3 onwers and atleast 2 signature are required to execute any transcation. | |
| //One owner will submit the transcation then it will have to wait until atleast one owner of the | |
| //confirm to allow the spending | |
| contract MultisigWallet{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // SPDX-License-Identifier: MIT | |
| pragma solidity ^0.8.6; | |
| //This smart contract escrow for seller and buyer | |
| //Idea is seller will intiate transfer of goods once the buyer has lock the funds in smart contract. | |
| //So first buyer will lock the funds, then wait for goods to arrived, upon finding all well, | |
| //He/she will confirm then the fund will be available to withdraw to seller | |
| //Limitation of the following imlementation is the at a time buyer with particular seller can engage in only in single transaction | |
| //This limitaion can be overcomed by tracking for each transcaton with uinique id through entire journey |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // SPDX-License-Identifier: MIT | |
| pragma solidity ^0.8.6; | |
| //This contract locks users fund for duration of week | |
| contract TimeLock{ | |
| //Mapping to store the amount of money deposited by user | |
| mapping (address => uint) public deposits; | |
| //Mappig to keep track of the time left until the user can withdraw |