Skip to content

Commit 10a4ca8

Browse files
Merge pull request #21 from RoboVault/feat/factory-source
Feat/factory source
2 parents 90a06c6 + c1a988c commit 10a4ca8

33 files changed

+1746
-152
lines changed

CHANGELOG.md

+35
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,38 @@
1+
# v0.4.19
2+
- Adds factory sources. added an example factory-source to showcase this. API looks like:
3+
```typescript
4+
new Manifest('factory-source')
5+
.addChain('ethereum', (ethereum) =>
6+
ethereum
7+
.setOptions({
8+
blockRange: 100n,
9+
})
10+
.addContract({
11+
abi: UNISWAP_V2_FACTORY,
12+
name: 'UniswapV2Factory',
13+
sources: {
14+
'0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f': 17736650n,
15+
},
16+
})
17+
.addContract({
18+
abi: UNISWAP_V2_PAIR,
19+
name: 'UniswapV2Pair',
20+
factorySources: {
21+
UniswapV2Factory: {
22+
PairCreated: 'pair',
23+
},
24+
},
25+
eventHandlers: {
26+
Swap: onSwap,
27+
},
28+
}))
29+
.build()
30+
```
31+
- remove deprecated overloads to `addContract`. this wont break compatibility because the function implementation stays the same
32+
- move lib exports from `mod.ts` to a new top-level `libs.ts` file
33+
- add polygonZkEvm to supportedChains
34+
- add top-level `utils.ts` file which export some useful utility function
35+
136
# v0.4.18
237
- fix: fix version of arktype to fix export error
338

cli.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import {
1717
} from './cli/mod.ts'
1818
import 'https://deno.land/std@0.179.0/dotenv/load.ts'
1919

20-
export const version = 'v0.4.18'
20+
export const version = 'v0.4.19'
2121

2222
const command = new Command()
2323
.name('arkiver')

cli/init/mod.ts

+2
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,8 @@ export const action = async () => {
112112
.cwd(newDir)
113113
.quiet('stdout')
114114
}
115+
116+
await $`deno cache --reload deps.ts`.cwd(newDir).quiet('stdout')
115117
} catch (e) {
116118
$.logError(`Error initializing arkive: ${e}`)
117119
return

cli/start/mod.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,7 @@ export const action = async (
125125
'mongodb://admin:password@localhost:27017'
126126
await mongoose.connect(connectionString, {
127127
dbName: '0-0',
128-
// deno-lint-ignore no-explicit-any
129-
} as any)
128+
})
130129
logger('arkiver').debug(`Connected to database`)
131130

132131
if (!options.gqlOnly) {

deno.lock

+95-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)