Skip to content

Instantly share code, notes, and snippets.

View Sintayew4's full-sized avatar

sintayew gashaw Sintayew4

  • sintayew
  • ethiopia
  • 08:26 (UTC -12:00)
View GitHub Profile
@TABASCOatw
TABASCOatw / App.tsx
Created October 28, 2023 15:44
Ethereum Goerli Particle Smart WaaS SimpleAccount
import React, { useState, useEffect } from 'react';
import { ParticleNetwork } from '@particle-network/auth';
import { ParticleProvider } from '@particle-network/provider';
import { EthereumGoerli } from '@particle-network/chains';
import { AAWrapProvider, SmartAccount, SendTransactionMode } from '@particle-network/aa';
import { ethers } from 'ethers';
const config = {
projectId: process.env.REACT_APP_PROJECT_ID,
clientKey: process.env.REACT_APP_CLIENT_KEY,
@TABASCOatw
TABASCOatw / accountkit-example.ts
Created October 13, 2023 05:25
Leveraging Particle WaaS as a signer within Alchemy's Account Kit
import { ParticleNetwork } from '@particle-network/auth';
import { ParticleProvider } from '@particle-network/provider';
import { AlchemyProvider } from "@alchemy/aa-alchemy";
import { LightSmartContractAccount } from "@alchemy/aa-accounts";
import { polygonMumbai } from "viem/chains";
import { createWalletClient, custom } from "viem";
import { WalletClientSigner, SmartAccountSigner } from "@alchemy/aa-core";
const particle = new ParticleNetwork({
projectId: process.env.REACT_APP_PROJECT_ID as string,
@vukcevich
vukcevich / endian-conversion-cheat-sheet.swift
Created December 21, 2016 21:33 — forked from DevAndArtist/endian-conversion-cheat-sheet.swift
A cheat sheet for byte conversion of number types in Swift 3.0
func _convertToBytes<T>(_ value: T, withCapacity capacity: Int) -> [UInt8] {
var mutableValue = value
return withUnsafePointer(to: &mutableValue) {
return $0.withMemoryRebound(to: UInt8.self, capacity: capacity) {
return Array(UnsafeBufferPointer(start: $0, count: capacity))
}
}
@DevAndArtist
DevAndArtist / endian-conversion-cheat-sheet.swift
Last active April 4, 2024 03:48
A cheat sheet for byte conversion of number types in Swift 3.0
func _convertToBytes<T>(_ value: T, withCapacity capacity: Int) -> [UInt8] {
var mutableValue = value
return withUnsafePointer(to: &mutableValue) {
return $0.withMemoryRebound(to: UInt8.self, capacity: capacity) {
return Array(UnsafeBufferPointer(start: $0, count: capacity))
}
}