Scope: On-chain MASM code for the AggLayer bridge integration on Miden.
Focus: Asset minting/theft vulnerabilities, griefing attack vectors.
Date: 2026-03-24
Follow the instructions here: https://book.getfoundry.sh/getting-started/installation
Or run the foundryup install command:
curl -L https://foundry.paradigm.xyz | bash
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
| Hey, I'm partylikeits1983-77119221 and I have contributed to the Semaphore V4 Ceremony. | |
| The following are my contribution signatures: | |
| Circuit # 1 (semaphorev4-1) | |
| Contributor # 150 | |
| Contribution Hash: 756fc24b 2b924f79 dbf8ee7d 607359da | |
| 9dd1d569 de715387 a9b4952f 7f29c495 | |
| dd6681a8 6e8cef1b 7a6a65d8 4ec65cef | |
| 607e47df 9b00b213 a04e077d d28496d6 |
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 | |
| /* | |
| _____ _ ______ _ _ | |
| / ____| | | ____(_) | | | |
| | | | |__ ___ ___ ___| |__ _ ___| |__ | |
| | | | '_ \ / _ \/ __/ __| __| | / __| '_ \ | |
| | |____| | | | __/\__ \__ \ | | \__ \ | | | | |
| \_____|_| |_|\___||___/___/_| |_|___/_| |_| | |
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
| // Generating a new deterministic wallet based upon the | |
| // gameAddress and the hash of the user signature of the gameAddress | |
| export const generateWallet = async ( | |
| chainId: number, | |
| gaslessGameAddress: string, | |
| gameAddress: string, | |
| ): Promise<ethers.Signer> => { | |
| const provider = new ethers.providers.Web3Provider(window.ethereum); | |
| let signer = provider.getSigner(); |
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.22; | |
| import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; | |
| contract DelegatedSignature { | |
| // gameAddress => uint16 moves | |
| mapping(address => uint16[]) public userData; // on chain data |
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.22; | |
| import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; | |
| contract DelegatedSignature { | |
| // gameAddress => uint16 moves | |
| mapping(address => uint16[]) public userData; // on chain data |
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: BSD-3-Clause | |
| pragma solidity ^0.8.19; | |
| import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; | |
| import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; | |
| contract Token is ERC20 { | |
| uint constant _initial_supply = 100 * 1e18 * 1e6; // 100 million |
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
| def GLSpi(x): | |
| odd = [] | |
| pi_div_4 = [] | |
| for i in range(x): | |
| if i % 2 == 1: | |
| odd.append(i) | |
| for i in range(len(odd)): |
NewerOlder