Skip to content
Snippets Groups Projects
Unverified Commit e915cad4 authored by PG Herveou's avatar PG Herveou Committed by GitHub
Browse files

[pallet-revive] Remove js examples (#7660)


Remove JS examples, they now belongs to the evm-test-suite repo

---------

Co-authored-by: default avatarcmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
parent b65c0a3d
No related merge requests found
Pipeline #516388 waiting for manual action with stages
in 1 hour, 35 minutes, and 23 seconds
Showing
with 9 additions and 614 deletions
...@@ -6664,23 +6664,6 @@ dependencies = [ ...@@ -6664,23 +6664,6 @@ dependencies = [
"windows-sys 0.48.0", "windows-sys 0.48.0",
] ]
   
[[package]]
name = "ethabi"
version = "18.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7413c5f74cc903ea37386a8965a936cbeb334bd270862fdece542c1b2dcbc898"
dependencies = [
"ethereum-types 0.14.1",
"hex",
"once_cell",
"regex",
"serde",
"serde_json",
"sha3 0.10.8",
"thiserror 1.0.65",
"uint 0.9.5",
]
[[package]] [[package]]
name = "ethabi-decode" name = "ethabi-decode"
version = "1.0.0" version = "1.0.0"
...@@ -15170,7 +15153,6 @@ dependencies = [ ...@@ -15170,7 +15153,6 @@ dependencies = [
"anyhow", "anyhow",
"clap 4.5.13", "clap 4.5.13",
"env_logger 0.11.3", "env_logger 0.11.3",
"ethabi",
"futures", "futures",
"git2", "git2",
"hex", "hex",
......
title: '[pallet-revive] Remove js examples'
doc:
- audience: Runtime Dev
description: |-
Remove JS examples, they now belongs to the evm-test-suite repo
crates:
- name: pallet-revive-eth-rpc
bump: minor
...@@ -17,26 +17,6 @@ path = "src/main.rs" ...@@ -17,26 +17,6 @@ path = "src/main.rs"
name = "eth-rpc-tester" name = "eth-rpc-tester"
path = "src/eth-rpc-tester.rs" path = "src/eth-rpc-tester.rs"
[[example]]
name = "deploy"
path = "examples/rust/deploy.rs"
[[example]]
name = "transfer"
path = "examples/rust/transfer.rs"
[[example]]
name = "rpc-playground"
path = "examples/rust/rpc-playground.rs"
[[example]]
name = "extrinsic"
path = "examples/rust/extrinsic.rs"
[[example]]
name = "remark-extrinsic"
path = "examples/rust/remark-extrinsic.rs"
[dependencies] [dependencies]
anyhow = { workspace = true } anyhow = { workspace = true }
clap = { workspace = true, features = ["derive", "env"] } clap = { workspace = true, features = ["derive", "env"] }
...@@ -70,7 +50,6 @@ tokio = { workspace = true, features = ["full"] } ...@@ -70,7 +50,6 @@ tokio = { workspace = true, features = ["full"] }
[dev-dependencies] [dev-dependencies]
env_logger = { workspace = true } env_logger = { workspace = true }
ethabi = { version = "18.0.0" }
pretty_assertions = { workspace = true } pretty_assertions = { workspace = true }
static_init = { workspace = true } static_init = { workspace = true }
substrate-cli-test-utils = { workspace = true } substrate-cli-test-utils = { workspace = true }
......
...@@ -47,21 +47,7 @@ RUST_LOG="info,eth-rpc=debug" cargo run -p pallet-revive-eth-rpc --example deplo ...@@ -47,21 +47,7 @@ RUST_LOG="info,eth-rpc=debug" cargo run -p pallet-revive-eth-rpc --example deplo
## JS examples ## JS examples
Interact with the node using MetaMask & Ether.js, by starting the example web app: JS examples have been moved to the [evm-test-suite](https://github.com/paritytech/evm-test-suite) repository.
```bash
cd substrate/frame/revive/rpc/examples/js
bun install
bun run dev
```
Alternatively, you can run the example script directly:
```bash
cd substrate/frame/revive/rpc/examples/js
bun src/script.ts
```
### Configure MetaMask ### Configure MetaMask
......
File deleted
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*
node_modules
dist
dist-ssr
*.local
# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
{
"trailingComma": "es5",
"tabWidth": 4,
"semi": false,
"singleQuote": true
}
{
"extends": "solhint:recommended",
"rules": {
"compiler-version": ["error", "^0.8.0"],
"gas-custom-errors": "off",
"one-contract-per-file": "off",
"no-empty-blocks": "off"
}
}
[
{
"inputs": [
{
"internalType": "string",
"name": "message",
"type": "string"
}
],
"name": "CustomError",
"type": "error"
},
{
"inputs": [
{
"internalType": "bool",
"name": "newState",
"type": "bool"
}
],
"name": "setState",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "state",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "triggerAssertError",
"outputs": [],
"stateMutability": "pure",
"type": "function"
},
{
"inputs": [],
"name": "triggerCustomError",
"outputs": [],
"stateMutability": "pure",
"type": "function"
},
{
"inputs": [],
"name": "triggerDivisionByZero",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "pure",
"type": "function"
},
{
"inputs": [],
"name": "triggerOutOfBoundsError",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "pure",
"type": "function"
},
{
"inputs": [],
"name": "triggerRequireError",
"outputs": [],
"stateMutability": "pure",
"type": "function"
},
{
"inputs": [],
"name": "triggerRevertError",
"outputs": [],
"stateMutability": "pure",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "value",
"type": "uint256"
}
],
"name": "valueMatch",
"outputs": [],
"stateMutability": "payable",
"type": "function"
}
]
\ No newline at end of file
export const ErrorsAbi = [
{
inputs: [
{
internalType: "string",
name: "message",
type: "string",
},
],
name: "CustomError",
type: "error",
},
{
inputs: [
{
internalType: "bool",
name: "newState",
type: "bool",
},
],
name: "setState",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [],
name: "state",
outputs: [
{
internalType: "bool",
name: "",
type: "bool",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "triggerAssertError",
outputs: [],
stateMutability: "pure",
type: "function",
},
{
inputs: [],
name: "triggerCustomError",
outputs: [],
stateMutability: "pure",
type: "function",
},
{
inputs: [],
name: "triggerDivisionByZero",
outputs: [
{
internalType: "uint256",
name: "",
type: "uint256",
},
],
stateMutability: "pure",
type: "function",
},
{
inputs: [],
name: "triggerOutOfBoundsError",
outputs: [
{
internalType: "uint256",
name: "",
type: "uint256",
},
],
stateMutability: "pure",
type: "function",
},
{
inputs: [],
name: "triggerRequireError",
outputs: [],
stateMutability: "pure",
type: "function",
},
{
inputs: [],
name: "triggerRevertError",
outputs: [],
stateMutability: "pure",
type: "function",
},
{
inputs: [
{
internalType: "uint256",
name: "value",
type: "uint256",
},
],
name: "valueMatch",
outputs: [],
stateMutability: "payable",
type: "function",
},
] as const;
[
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "sender",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "value",
"type": "uint256"
},
{
"indexed": false,
"internalType": "string",
"name": "message",
"type": "string"
}
],
"name": "ExampleEvent",
"type": "event"
},
{
"inputs": [],
"name": "triggerEvent",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
}
]
\ No newline at end of file
export const EventExampleAbi = [
{
anonymous: false,
inputs: [
{
indexed: true,
internalType: "address",
name: "sender",
type: "address",
},
{
indexed: false,
internalType: "uint256",
name: "value",
type: "uint256",
},
{
indexed: false,
internalType: "string",
name: "message",
type: "string",
},
],
name: "ExampleEvent",
type: "event",
},
{
inputs: [],
name: "triggerEvent",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
] as const;
[
{
"inputs": [],
"name": "flip",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "getValue",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "value",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
}
]
\ No newline at end of file
export const FlipperAbi = [
{
inputs: [],
name: "flip",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [],
name: "getValue",
outputs: [
{
internalType: "bool",
name: "",
type: "bool",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "value",
outputs: [
{
internalType: "bool",
name: "",
type: "bool",
},
],
stateMutability: "view",
type: "function",
},
] as const;
[
{
"inputs": [
{
"internalType": "address",
"name": "_flipperAddress",
"type": "address"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"inputs": [],
"name": "callFlip",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "callGetValue",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "flipperAddress",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
}
]
\ No newline at end of file
export const FlipperCallerAbi = [
{
inputs: [
{
internalType: "address",
name: "_flipperAddress",
type: "address",
},
],
stateMutability: "nonpayable",
type: "constructor",
},
{
inputs: [],
name: "callFlip",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [],
name: "callGetValue",
outputs: [
{
internalType: "bool",
name: "",
type: "bool",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "flipperAddress",
outputs: [
{
internalType: "address",
name: "",
type: "address",
},
],
stateMutability: "view",
type: "function",
},
] as const;
[
{
"inputs": [],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"inputs": [],
"name": "deposit",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "payable",
"type": "function"
},
{
"inputs": [],
"name": "getDeposit",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "owner",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "withdrawAmount",
"type": "uint256"
}
],
"name": "withdraw",
"outputs": [
{
"internalType": "uint256",
"name": "remainingBal",
"type": "uint256"
}
],
"stateMutability": "nonpayable",
"type": "function"
}
]
\ No newline at end of file
export const RevertExampleAbi = [
{
inputs: [],
stateMutability: "nonpayable",
type: "constructor",
},
{
inputs: [],
name: "doRevert",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
] as const;
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment