Skip to content

Instantly share code, notes, and snippets.

View TABASCOatw's full-sized avatar
💜
At Particle, we're building Modular Chain Abstraction Infrastructure.

TABASCO TABASCOatw

💜
At Particle, we're building Modular Chain Abstraction Infrastructure.
  • Particle Network
  • Denver, CO
  • 13:16 (UTC -06:00)
  • X @TABASCOweb3
View GitHub Profile
@TABASCOatw
TABASCOatw / App.tsx
Created October 25, 2023 07:10
Avalanche Mainnet Biconomy smart account implementation with Smart WaaS (modular SA update)
import React, { useState, useEffect } from 'react';
import { ParticleNetwork } from '@particle-network/auth';
import { ParticleProvider } from '@particle-network/provider';
import { Avalanche } 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 / App.tsx
Created October 25, 2023 05:17
Mantle Mainnet Simple smart account implementation with Smart WaaS (modular SA update)
import React, { useState, useEffect } from 'react';
import { ParticleNetwork } from '@particle-network/auth';
import { ParticleProvider } from '@particle-network/provider';
import { Mantle } from '@particle-network/chains';
import { AAWrapProvider, SmartAccount } 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 / App.tsx
Created October 25, 2023 04:28
Taiko Jolnir Simple smart account implementation with Smart WaaS (modular SA update)
import React, { useState, useEffect } from 'react';
import { ParticleNetwork } from '@particle-network/auth';
import { ParticleProvider } from '@particle-network/provider';
import { TaikoJolnir } from '@particle-network/chains';
import { AAWrapProvider, SmartAccount } 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 / App.ts
Created October 24, 2023 08:37
Particle Native SmartAccount implementation (v1, pre-SA upgrade)
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,
appId: process.env.REACT_APP_APP_ID,
@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,
@TABASCOatw
TABASCOatw / App.tsx
Last active October 13, 2023 05:28
AA demo leveraging Particle WaaS for account management and using Pimlico as the bundler + paymaster
import React, { useState, useEffect } from 'react';
import axios from 'axios';
import { ethers } from 'ethers';
import { ParticleNetwork } from '@particle-network/auth';
import { ParticleProvider } from '@particle-network/provider';
import { EthereumGoerli } from '@particle-network/chains';
import { createPublicClient, createClient, http } from 'viem';
import { pimlicoBundlerActions, pimlicoPaymasterActions } from 'permissionless/actions/pimlico';
import { getAccountNonce, getUserOperationHash, bundlerActions } from 'permissionless';
import { goerli } from 'viem/chains';
@TABASCOatw
TABASCOatw / App.tsx
Created October 10, 2023 22:41
Building a user operation with Particle (+ Biconomy for paymaster) and sending to Pimlico's bundler
import React, { useState, useEffect } from 'react';
import Web3 from 'web3';
import { ParticleNetwork } from '@particle-network/auth';
import { AvalancheTestnet } from "@particle-network/chains";
import { ParticleProvider } from "@particle-network/provider";
import { SmartAccount } from '@particle-network/aa';
import './App.css';
const config = {
projectId: process.env.REACT_APP_PROJECT_ID,
@TABASCOatw
TABASCOatw / App.tsx
Last active October 13, 2023 05:29
Sending user operations through ethers.js provider wrapper (via. Particle & Biconomy)
import React, { useState, useEffect } from 'react';
import { ParticleNetwork } from '@particle-network/auth';
import { EthereumGoerli } from "@particle-network/chains";
import { ParticleProvider } from "@particle-network/provider";
import { AAWrapProvider, SmartAccount, SendTransactionMode } from '@particle-network/aa';
import { ethers } from 'ethers';
import './App.css';
const App = () => {
const [userInfo, setUserInfo] = useState(null);
@TABASCOatw
TABASCOatw / App.tsx
Last active October 13, 2023 05:29
Sample application for constructing and sending userops with Particle & Biconomy
import React, { useState, useEffect } from 'react';
import Web3 from 'web3';
import { ParticleNetwork } from '@particle-network/auth';
import { AvalancheTestnet } from "@particle-network/chains";
import { ParticleProvider } from "@particle-network/provider";
import { SmartAccount } from '@particle-network/aa';
import './App.css';
const App = () => {
const [userInfo, setUserInfo] = useState(null);