Skip to content

Instantly share code, notes, and snippets.

@extropyCoder
extropyCoder / h9.move
Created August 12, 2024 11:23
Homework 9 code
module my_addr::h9 {
use aptos_framework::object;
use std::signer;
use std::string::{String};
#[resource_group_member(group = aptos_framework::object::ObjectGroup)]
struct ExampleObject has key {
module 0xcafe::h4 {
struct MyData has key, store {
value: u8
}
fun init_module(sender: &signer) {
// here we can initialise the data
}

Account Abstraction Part 2: From Theory to Execution

Exploring the Power of User Operations with Solidity

Introduction

In Part 1, we talked about the transformative potential of Account Abstraction and ERC-4337 within the Ethereum ecosystem, highlighting its pivotal role in enhancing user experience and security by merging the functionalities of externally owned accounts (EOAs) and contract accounts. As we transition from theory to hands-on practice in Part 2, our journey takes a practical turn, guiding you through setting up your development environment, deploying an EntryPoint contract, and preparing for executing user operations. This tutorial is designed to equip developers with the skills needed to implement Account Abstraction in their Ethereum projects. While we aim to make this guide accessible, a basic familiarity with using the terminal, npm commands, and the Hardhat environment will be beneficial. Such foundational knowledge will help you navigate the setup, deployment, and execution ph

@extropyCoder
extropyCoder / dcg.sol
Created July 5, 2023 14:48
Audit prep
// DogCoinGame is a game where players are added to the contract via the addPlayer function, they need to send 1 ETH to play.
// Once 200 players have entered, the UI will be notified by the startPayout event,
// and will pick 100 winners which will be added to the winners array, the UI will then call the payout function to pay each of the winners.
// The remaining balance will be kept as profit for the developers."
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
contract DogCoinGame is ERC20 {
@extropyCoder
extropyCoder / PuppyCoinGame.sol
Last active June 1, 2024 12:13
Audit example
// PuppyCoinGame is a game where players are added to the contract via the addPlayer function, they need to send 1 ETH to play.
// Once 200 players have entered, the UI will be notified by the startPayout event,
// and will pick 100 winners which will be added to the winners array, the UI will then call the payout function to pay each of the winners.
// The remaining balance will be kept as profit for the developers."
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
contract PuppyCoinGame is ERC20 {
I contributed to the Semaphore Trusted Setup Multi-Party Ceremony.
The following are my contribution signatures:
Circuit: semaphore16
Contributor # 336
Hash: 037aeda8 93ea8b66 25d6c41a 94fde1b3
50f1b25a bd249f2a b7b9c021 00bb1406
41a38822 5b30ffd4 f687d4d7 7bd721be
e088600f 70564e68 a671a861 729a5a9e
@extropyCoder
extropyCoder / Ballot.sol
Created August 26, 2021 05:45
Default Ballot Contract
// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.7.0 <0.9.0;
/**
* @title Ballot
* @dev Implements voting process along with vote delegation
*/
contract Ballot {
@extropyCoder
extropyCoder / gist:1dcc4a785ee6c5536aaaac4c5465868d
Created November 3, 2020 19:37
Example Solidity Contract from Extropy.io
pragma solidity ^0.7.0;
// SPDX-License-Identifier: MIT
contract Score {
struct UserDetails {
string name;
string age;
}
@extropyCoder
extropyCoder / example.sol
Last active September 22, 2020 14:01
Security Examples
//// EXAMPLE. 1
contract Oracle{
uint8 private seed; // Hide seed value!!
constructor (uint8 _seed) public {
seed = _seed;
}
function getRandomNumber() external view returns (uint256){
return block.number % seed;
}
}

Keybase proof

I hereby claim:

  • I am extropycoder on github.
  • I am extropycoder (https://keybase.io/extropycoder) on keybase.
  • I have a public key ASBbazJW5wPk0wrv_uNiZcVYgfLq8S7qAwXJm43GaZzvFAo

To claim this, I am signing this object: