Skip to content

Commit

Permalink
chore: update taiko rpc, reduce to single .env file, update packages …
Browse files Browse the repository at this point in the history
…and abis (#27)
  • Loading branch information
dionysuzx authored Apr 13, 2023
1 parent cfc3462 commit 3be1712
Show file tree
Hide file tree
Showing 12 changed files with 1,395 additions and 1,462 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
5. Install packages and copy .env.example files:
`sh setup.sh`
5. Set mnemonic phrase in root `.env` for test accounts ([generate a bip39 mnemonic](https://iancoleman.io/bip39/))
6. Set web3modal project id in `packages/app/.env` ([obtain a project id for web3modal](https://cloud.walletconnect.com/sign-in))
6. Set web3modal project id in `.env` ([obtain a project id for web3modal](https://cloud.walletconnect.com/sign-in))

## Create your dapp manually

Expand All @@ -24,8 +24,8 @@
2. Install packages and copy .env.example files:
`cd dapp-slaps && sh setup.sh`
3. Set mnemonic phrase in root `.env` for test accounts ([generate a bip39 mnemonic](https://iancoleman.io/bip39/))
4. Set web3modal project id in `packages/app/.env` ([obtain a project id for web3modal](https://cloud.walletconnect.com/sign-in))
5. Source environment vars: `source .env && source packages/app/.env`
4. Set web3modal project id in `.env` ([obtain a project id for web3modal](https://cloud.walletconnect.com/sign-in))
5. Source environment vars: `source .env`

## Start the development environment

Expand Down
4 changes: 0 additions & 4 deletions packages/app/.env.example

This file was deleted.

30 changes: 15 additions & 15 deletions packages/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,28 +17,28 @@
},
"devDependencies": {
"@sveltejs/adapter-auto": "^2.0.0",
"@sveltejs/kit": "^1.12.0",
"@typescript-eslint/eslint-plugin": "^5.55.0",
"@typescript-eslint/parser": "^5.55.0",
"@wagmi/cli": "^0.1.13",
"@sveltejs/kit": "^1.15.4",
"@typescript-eslint/eslint-plugin": "^5.58.0",
"@typescript-eslint/parser": "^5.58.0",
"@wagmi/cli": "^0.1.15",
"abitype": "^0.6.8",
"eslint": "^8.36.0",
"eslint-config-prettier": "^8.7.0",
"eslint": "^8.38.0",
"eslint-config-prettier": "^8.8.0",
"eslint-plugin-svelte3": "^4.0.0",
"prettier": "^2.8.4",
"prettier-plugin-svelte": "^2.9.0",
"svelte": "^3.57.0",
"svelte-check": "^3.1.4",
"prettier": "^2.8.7",
"prettier-plugin-svelte": "^2.10.0",
"svelte": "^3.58.0",
"svelte-check": "^3.2.0",
"tslib": "^2.5.0",
"typescript": "^4.9.5",
"vite": "^4.2.0",
"vite": "^4.2.1",
"vite-plugin-node-polyfills": "^0.7.0"
},
"dependencies": {
"@picocss/pico": "^1.5.7",
"@wagmi/core": "0.10.1",
"@web3modal/ethereum": "^2.2.1",
"@web3modal/html": "^2.2.1",
"@picocss/pico": "^1.5.9",
"@wagmi/core": "0.10.2",
"@web3modal/ethereum": "^2.2.2",
"@web3modal/html": "^2.2.2",
"ethers": "^5.7.2"
}
}
152 changes: 76 additions & 76 deletions packages/app/src/abi/SignalService.ts
Original file line number Diff line number Diff line change
@@ -1,117 +1,117 @@
export const signalServiceABI = [
{ inputs: [], name: "B_NULL_APP_ADDR", type: "error" },
{ inputs: [], name: "B_WRONG_CHAIN_ID", type: "error" },
{ inputs: [], name: "B_ZERO_SIGNAL", type: "error" },
{ inputs: [], name: "RESOLVER_DENIED", type: "error" },
{ inputs: [], name: "RESOLVER_INVALID_ADDR", type: "error" },
{
type: "function",
stateMutability: "view",
outputs: [{ type: "address", name: "", internalType: "address" }],
name: "addressManager",
inputs: [],
anonymous: false,
inputs: [{ indexed: false, internalType: "uint8", name: "version", type: "uint8" }],
name: "Initialized",
type: "event",
},
{
type: "function",
stateMutability: "pure",
outputs: [{ type: "bytes32", name: "", internalType: "bytes32" }],
name: "getSignalSlot",
anonymous: false,
inputs: [
{ type: "address", name: "app", internalType: "address" },
{ type: "bytes32", name: "signal", internalType: "bytes32" },
{ indexed: true, internalType: "address", name: "previousOwner", type: "address" },
{ indexed: true, internalType: "address", name: "newOwner", type: "address" },
],
name: "OwnershipTransferred",
type: "event",
},
{
inputs: [],
name: "addressManager",
outputs: [{ internalType: "address", name: "", type: "address" }],
stateMutability: "view",
type: "function",
stateMutability: "nonpayable",
outputs: [],
name: "init",
inputs: [{ type: "address", name: "_addressManager", internalType: "address" }],
},
{
type: "function",
stateMutability: "view",
outputs: [{ type: "bool", name: "", internalType: "bool" }],
name: "isSignalReceived",
inputs: [
{ type: "uint256", name: "srcChainId", internalType: "uint256" },
{ type: "address", name: "app", internalType: "address" },
{ type: "bytes32", name: "signal", internalType: "bytes32" },
{ type: "bytes", name: "proof", internalType: "bytes" },
{ internalType: "address", name: "app", type: "address" },
{ internalType: "bytes32", name: "signal", type: "bytes32" },
],
name: "getSignalSlot",
outputs: [{ internalType: "bytes32", name: "signalSlot", type: "bytes32" }],
stateMutability: "pure",
type: "function",
},
{
inputs: [{ internalType: "address", name: "_addressManager", type: "address" }],
name: "init",
outputs: [],
stateMutability: "nonpayable",
type: "function",
stateMutability: "view",
outputs: [{ type: "bool", name: "", internalType: "bool" }],
name: "isSignalSent",
},
{
inputs: [
{ type: "address", name: "app", internalType: "address" },
{ type: "bytes32", name: "signal", internalType: "bytes32" },
{ internalType: "uint256", name: "srcChainId", type: "uint256" },
{ internalType: "address", name: "app", type: "address" },
{ internalType: "bytes32", name: "signal", type: "bytes32" },
{ internalType: "bytes", name: "proof", type: "bytes" },
],
name: "isSignalReceived",
outputs: [{ internalType: "bool", name: "", type: "bool" }],
stateMutability: "view",
type: "function",
},
{
type: "function",
inputs: [
{ internalType: "address", name: "app", type: "address" },
{ internalType: "bytes32", name: "signal", type: "bytes32" },
],
name: "isSignalSent",
outputs: [{ internalType: "bool", name: "", type: "bool" }],
stateMutability: "view",
outputs: [{ type: "address", name: "", internalType: "address" }],
name: "owner",
inputs: [],
type: "function",
},
{
type: "function",
stateMutability: "nonpayable",
outputs: [],
name: "renounceOwnership",
inputs: [],
name: "owner",
outputs: [{ internalType: "address", name: "", type: "address" }],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "renounceOwnership",
outputs: [],
stateMutability: "nonpayable",
type: "function",
stateMutability: "view",
outputs: [{ type: "address", name: "", internalType: "address payable" }],
name: "resolve",
inputs: [
{ type: "string", name: "name", internalType: "string" },
{ type: "bool", name: "allowZeroAddress", internalType: "bool" },
],
},
{
type: "function",
stateMutability: "view",
outputs: [{ type: "address", name: "", internalType: "address payable" }],
name: "resolve",
inputs: [
{ type: "uint256", name: "chainId", internalType: "uint256" },
{ type: "string", name: "name", internalType: "string" },
{ type: "bool", name: "allowZeroAddress", internalType: "bool" },
{ internalType: "string", name: "name", type: "string" },
{ internalType: "bool", name: "allowZeroAddress", type: "bool" },
],
},
{
name: "resolve",
outputs: [{ internalType: "address payable", name: "", type: "address" }],
stateMutability: "view",
type: "function",
stateMutability: "nonpayable",
outputs: [{ type: "bytes32", name: "storageSlot", internalType: "bytes32" }],
name: "sendSignal",
inputs: [{ type: "bytes32", name: "signal", internalType: "bytes32" }],
},
{
inputs: [
{ internalType: "uint256", name: "chainId", type: "uint256" },
{ internalType: "string", name: "name", type: "string" },
{ internalType: "bool", name: "allowZeroAddress", type: "bool" },
],
name: "resolve",
outputs: [{ internalType: "address payable", name: "", type: "address" }],
stateMutability: "view",
type: "function",
stateMutability: "nonpayable",
outputs: [],
name: "transferOwnership",
inputs: [{ type: "address", name: "newOwner", internalType: "address" }],
},
{
type: "event",
name: "Initialized",
inputs: [{ type: "uint8", name: "version", indexed: false }],
anonymous: false,
inputs: [{ internalType: "bytes32", name: "signal", type: "bytes32" }],
name: "sendSignal",
outputs: [{ internalType: "bytes32", name: "storageSlot", type: "bytes32" }],
stateMutability: "nonpayable",
type: "function",
},
{
type: "event",
name: "OwnershipTransferred",
inputs: [
{ type: "address", name: "previousOwner", indexed: true },
{ type: "address", name: "newOwner", indexed: true },
],
anonymous: false,
inputs: [{ internalType: "address", name: "newOwner", type: "address" }],
name: "transferOwnership",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{ type: "error", name: "B_NULL_APP_ADDR", inputs: [] },
{ type: "error", name: "B_WRONG_CHAIN_ID", inputs: [] },
{ type: "error", name: "B_ZERO_SIGNAL", inputs: [] },
{ type: "error", name: "RESOLVER_DENIED", inputs: [] },
{ type: "error", name: "RESOLVER_INVALID_ADDR", inputs: [] },
];
7 changes: 4 additions & 3 deletions packages/app/src/domain/chain.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,19 @@ export const taiko = {
symbol: "ETH",
decimals: 18,
},
// TODO: this is a duplication to the layout.svelte rpc, make DRY from env vars
rpcUrls: {
public: {
http: ["https://rpc.a2.taiko.xyz"],
http: ["https://l2rpc.hackathon.taiko.xyz"],
},
default: {
http: ["https://rpc.a2.taiko.xyz"],
http: ["https://l2rpc.hackathon.taiko.xyz"],
},
},
blockExplorers: {
default: {
name: "L2 Explorer",
url: "https://explorer.a2.taiko.xyz",
url: "https://l2explorer.hackathon.taiko.xyz",
},
},
testnet: true,
Expand Down
Loading

1 comment on commit 3be1712

@vercel
Copy link

@vercel vercel bot commented on 3be1712 Apr 13, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

dapp-slaps – ./

dapp-slaps.vercel.app
dapp-slaps-d1onys1us.vercel.app
dapp-slaps-git-main-d1onys1us.vercel.app

Please sign in to comment.