Skip to content

Commit cbef637

Browse files
committed
chore(editor): fixed build types
1 parent 7af0e4b commit cbef637

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

172 files changed

+1494
-1365
lines changed

components/Editor/index.tsx

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -252,13 +252,6 @@ const Editor = ({ readOnly = false }: Props) => {
252252
// eslint-disable-next-line react-hooks/exhaustive-deps
253253
}, [])
254254

255-
useEffect(() => {
256-
if (solcWorkerRef && solcWorkerRef.current) {
257-
// @ts-ignore change the worker message, when value and args changed.
258-
solcWorkerRef.current?.onmessage = handleWorkerMessage
259-
}
260-
}, [solcWorkerRef, handleWorkerMessage])
261-
262255
useEffect(() => {
263256
if (deployedContractAddress) {
264257
log(`Contract deployed at address: ${deployedContractAddress}`)

components/KBar/Results.tsx

Lines changed: 9 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,29 @@
11
import { useMemo } from 'react'
22

33
import { KBarResults, useMatches } from 'kbar'
4-
import type { ActionImpl } from 'kbar'
54

65
import ResultItem from './ResultItem'
76

87
const NO_GROUP = 'none'
98

109
const Results = () => {
11-
const { results } = useMatches()
10+
const groups = useMatches()
1211

1312
const flattened = useMemo(() => {
14-
const flattenActions = (actions: (string | ActionImpl)[]) => {
15-
return actions.reduce((acc: any[], curr: string | ActionImpl) => {
16-
if (typeof curr === 'string') {
17-
acc.push(curr)
18-
} else {
19-
acc.push(curr)
20-
21-
if (curr.children && curr.children.length > 0) {
22-
acc.push(...flattenActions(curr.children))
23-
}
24-
}
13+
if (groups && Array.isArray(groups)) {
14+
return groups.reduce((acc: any, curr: any) => {
15+
acc.push(curr.name)
16+
acc.push(...curr.actions)
2517
return acc
2618
}, [])
19+
} else {
20+
return []
2721
}
28-
29-
return flattenActions(results)
30-
}, [results])
22+
}, [groups])
3123

3224
return (
3325
<KBarResults
34-
items={flattened.filter(
35-
(i: any) => typeof i !== 'string' || i !== NO_GROUP,
36-
)}
26+
items={flattened.filter((i: string) => i !== NO_GROUP)}
3727
onRender={({ item, active }) =>
3828
typeof item === 'string' ? (
3929
<div className="px-4 py-2 text-2xs uppercase text-gray-400 dark:text-gray-600 bg-white dark:bg-black-600">

docs/opcodes/01.mdx

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ fork: Frontier
33
group: Stop and Arithmetic Operations
44
---
55

6-
*Index 1 is top of the stack. See [PUSH](/#60).*
6+
_Index 1 is top of the stack. See [PUSH](/#60)._
77

88
## Stack input
99

@@ -16,15 +16,16 @@ group: Stop and Arithmetic Operations
1616

1717
## Examples
1818

19-
| * | Input | Output | * | * | Input | Output |
20-
|--:|------:|-------:|--:|--:|------:|-------:|
21-
| `1` | `10` | `20` | * | `1` | `0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF` | `0` |
22-
| `2` | `10` | | * | `2` | `1` | |
19+
| \* | Input | Output | \* | \* | Input | Output |
20+
| --: | ----: | -----: | --: | --: | -------------------------------------------------------------------: | -----: |
21+
| `1` | `10` | `20` | \* | `1` | `0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF` | `0` |
22+
| `2` | `10` | | \* | `2` | `1` | |
2323

2424
[Reproduce in playground](/playground?unit=Wei&codeType=Mnemonic&code='y1z0z0twwy2v32%200xsssszt'~uuuuzv1%201y%2F%2F%20Example%20w%5CnvwPUSHuFFtwADDs~~%01stuvwyz~_).
2525

2626
## Error cases
2727

2828
The state changes done by the current context are [reverted](#FD) in those cases:
29+
2930
- Not enough gas.
3031
- Not enough values on the stack.

docs/opcodes/02.mdx

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ fork: Frontier
33
group: Stop and Arithmetic Operations
44
---
55

6-
*Index 1 is top of the stack. See [PUSH](/#60).*
6+
_Index 1 is top of the stack. See [PUSH](/#60)._
77

88
## Stack input
99

@@ -16,20 +16,21 @@ group: Stop and Arithmetic Operations
1616

1717
## Examples
1818

19-
| * | Input | Output |
20-
|--:|------:|-------:|
21-
| `1` | `10` | `100` |
22-
| `2` | `10` | |
19+
| \* | Input | Output |
20+
| --: | ----: | -----: |
21+
| `1` | `10` | `100` |
22+
| `2` | `10` | |
2323

24-
| * | Input | Output |
25-
|--:|------:|-------:|
24+
| \* | Input | Output |
25+
| --: | -------------------------------------------------------------------: | -------------------------------------------------------------------: |
2626
| `1` | `0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF` | `0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE` |
27-
| `2` | `2` | |
27+
| `2` | `2` | |
2828

2929
[Reproduce in playground](/playground?unit=Wei&codeType=Mnemonic&code='y1z10z10twwy2v32%200xssssz2t'~uuuuzv1%20y%2F%2F%20Example%20w%5CnvwPUSHuFFtwMULs~~%01stuvwyz~_).
3030

3131
## Error cases
3232

3333
The state changes done by the current context are [reverted](#FD) in those cases:
34+
3435
- Not enough gas.
3536
- Not enough values on the stack.

docs/opcodes/03.mdx

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ fork: Frontier
33
group: Stop and Arithmetic Operations
44
---
55

6-
*Index 1 is top of the stack. See [PUSH](/#60).*
6+
_Index 1 is top of the stack. See [PUSH](/#60)._
77

88
## Stack input
99

@@ -16,15 +16,16 @@ group: Stop and Arithmetic Operations
1616

1717
## Examples
1818

19-
| * | Input | Output | * | * | Input | Output |
20-
|--:|------:|-------:|--:|--:|------:|-------:|
21-
| `1` | `10` | `0` | * | `1` | `0` | `0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF` |
22-
| `2` | `10` | | * | `2` | `1` | |
19+
| \* | Input | Output | \* | \* | Input | Output |
20+
| --: | ----: | -----: | --: | --: | ----: | -------------------------------------------------------------------: |
21+
| `1` | `10` | `0` | \* | `1` | `0` | `0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF` |
22+
| `2` | `10` | | \* | `2` | `1` | |
2323

2424
[Reproduce in playground](/playground?unit=Wei&codeType=Mnemonic&code='z1~10~1wyyz2~1~w'~yPUSH1%20z%2F%2F%20Example%20y%5Cnw0ySUB%01wyz~_).
2525

2626
## Error cases
2727

2828
The state changes done by the current context are [reverted](#FD) in those cases:
29+
2930
- Not enough gas.
3031
- Not enough values on the stack.

docs/opcodes/04.mdx

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ fork: Frontier
33
group: Stop and Arithmetic Operations
44
---
55

6-
*Index 1 is top of the stack. See [PUSH](/#60).*
6+
_Index 1 is top of the stack. See [PUSH](/#60)._
77

88
## Stack input
99

@@ -16,15 +16,16 @@ group: Stop and Arithmetic Operations
1616

1717
## Examples
1818

19-
| * | Input | Output | * | * | Input | Output |
20-
|--:|------:|-------:|--:|--:|------:|-------:|
21-
| `1` | `10` | `1` | * | `1` | `1` | `0` |
22-
| `2` | `10` | | * | `2` | `2` | |
19+
| \* | Input | Output | \* | \* | Input | Output |
20+
| --: | ----: | -----: | --: | --: | ----: | -----: |
21+
| `1` | `10` | `1` | \* | `1` | `1` | `0` |
22+
| `2` | `10` | | \* | `2` | `2` | |
2323

2424
[Reproduce in playground](/playground?unit=Wei&codeType=Mnemonic&code='z1~10~10wyyz2~2~1w'~yPUSH1%20z%2F%2F%20Example%20y%5CnwyDIV%01wyz~_).
2525

2626
## Error cases
2727

2828
The state changes done by the current context are [reverted](#FD) in those cases:
29+
2930
- Not enough gas.
3031
- Not enough values on the stack.

docs/opcodes/05.mdx

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ fork: Frontier
33
group: Stop and Arithmetic Operations
44
---
55

6-
*Index 1 is top of the stack. See [PUSH](/#60).*
6+
_Index 1 is top of the stack. See [PUSH](/#60)._
77

88
## Notes
99

@@ -20,15 +20,16 @@ All values are treated as two’s complement signed 256-bit integers. Note the o
2020

2121
## Examples
2222

23-
| * | Input | Output | * | * | Input | Output |
24-
|--:|------:|-------:|--:|--:|------:|-------:|
25-
| `1` | `10` | `1` | * | `1` | `0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE` | `2` |
26-
| `2` | `10` | | * | `2` | `0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF` | |
23+
| \* | Input | Output | \* | \* | Input | Output |
24+
| --: | ----: | -----: | --: | --: | -------------------------------------------------------------------: | -----: |
25+
| `1` | `10` | `1` | \* | `1` | `0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE` | `2` |
26+
| `2` | `10` | | \* | `2` | `0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF` | |
2727

2828
[Reproduce in playground](/playground?unit=Wei&codeType=Mnemonic&code='y1vvszzy2wrFwrEs'~uuuz%5Cny%2F%2F%20Example%20wt32%200xr~vt1%2010uFFFtzPUSHszSDIVr~~~%01rstuvwyz~_).
2929

3030
## Error cases
3131

3232
The state changes done by the current context are [reverted](#FD) in those cases:
33+
3334
- Not enough gas.
3435
- Not enough values on the stack.

docs/opcodes/06.mdx

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ fork: Frontier
33
group: Stop and Arithmetic Operations
44
---
55

6-
*Index 1 is top of the stack. See [PUSH](/#60).*
6+
_Index 1 is top of the stack. See [PUSH](/#60)._
77

88
## Stack input
99

@@ -16,15 +16,16 @@ group: Stop and Arithmetic Operations
1616

1717
## Examples
1818

19-
| * | Input | Output | * | * | Input | Output |
20-
|--:|------:|-------:|--:|--:|------:|-------:|
21-
| `1` | `10` | `1` | * | `1` | `17` | `2` |
22-
| `2` | `3` | | * | `2` | `5` | |
19+
| \* | Input | Output | \* | \* | Input | Output |
20+
| --: | ----: | -----: | --: | --: | ----: | -----: |
21+
| `1` | `10` | `1` | \* | `1` | `17` | `2` |
22+
| `2` | `3` | | \* | `2` | `5` | |
2323

2424
[Reproduce in playground](/playground?unit=Wei&codeType=Mnemonic&code='z1~3~10wyyz2~5~17w'~yPUSH1%20z%2F%2F%20Example%20y%5CnwyMOD%01wyz~_).
2525

2626
## Error cases
2727

2828
The state changes done by the current context are [reverted](#FD) in those cases:
29+
2930
- Not enough gas.
3031
- Not enough values on the stack.

docs/opcodes/07.mdx

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ fork: Frontier
33
group: Stop and Arithmetic Operations
44
---
55

6-
*Index 1 is top of the stack. See [PUSH](/#60).*
6+
_Index 1 is top of the stack. See [PUSH](/#60)._
77

88
## Notes
99

@@ -20,20 +20,21 @@ All values are treated as two’s complement signed 256-bit integers. Note the o
2020

2121
## Examples
2222

23-
| * | Input | Output |
24-
|--:|------:|-------:|
25-
| `1` | `10` | `1` |
26-
| `2` | `3` | |
23+
| \* | Input | Output |
24+
| --: | ----: | -----: |
25+
| `1` | `10` | `1` |
26+
| `2` | `3` | |
2727

28-
| * | Input | Output |
29-
|--:|------:|-------:|
28+
| \* | Input | Output |
29+
| --: | -------------------------------------------------------------------: | -------------------------------------------------------------------: |
3030
| `1` | `0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF8` | `0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE` |
31-
| `2` | `0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFD` | |
31+
| `2` | `0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFD` | |
3232

3333
[Reproduce in playground](/playground?unit=Wei&codeType=Mnemonic&code='y1s3s10tzzy2wrDwr8t'~uuuz%5Cny%2F%2F%20Example%20wv32%200xr~vzPUSHuFFFtzSMODsv1%20r~~~%01rstuvwyz~_).
3434

3535
## Error cases
3636

3737
The state changes done by the current context are [reverted](#FD) in those cases:
38+
3839
- Not enough gas.
3940
- Not enough values on the stack.

docs/opcodes/08.mdx

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ fork: Frontier
33
group: Stop and Arithmetic Operations
44
---
55

6-
*Index 1 is top of the stack. See [PUSH](/#60).*
6+
_Index 1 is top of the stack. See [PUSH](/#60)._
77

88
## Notes
99

@@ -21,16 +21,17 @@ All intermediate calculations of this operation are not subject to the 2<sup>256
2121

2222
## Examples
2323

24-
| * | Input | Output | * | * | Input | Output |
25-
|--:|------:|-------:|--:|--:|------:|-------:|
26-
| `1` | `10` | `4` | * | `1` | `0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF` | `1` |
27-
| `2` | `10` | | * | `2` | `2` | |
28-
| `3` | `8` | | * | `2` | `2` | |
24+
| \* | Input | Output | \* | \* | Input | Output |
25+
| --: | ----: | -----: | --: | --: | -------------------------------------------------------------------: | -----: |
26+
| `1` | `10` | `4` | \* | `1` | `0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF` | `1` |
27+
| `2` | `10` | | \* | `2` | `2` | |
28+
| `3` | `8` | | \* | `2` | `2` | |
2929

3030
[Reproduce in playground](/playground?unit=Wei&codeType=Mnemonic&code='y1z8z10z10vwwy2z2z2u32%200xssssv'~ttttzu1%20y%2F%2F%20Example%20w%5CnvwADDMODuwPUSHtFFs~~%01stuvwyz~_).
3131

3232
## Error cases
3333

3434
The state changes done by the current context are [reverted](#FD) in those cases:
35+
3536
- Not enough gas.
3637
- Not enough values on the stack.

0 commit comments

Comments
 (0)