Skip to content

Commit

Permalink
misc
Browse files Browse the repository at this point in the history
  • Loading branch information
simke9445 committed Mar 2, 2024
1 parent 8e7d2dd commit 7c2b4ae
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,5 @@ yarn-error.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*

types.d.ts
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"bot-neutron": "esbuild src/bot.ts --bundle --platform=node --outdir=dist --outbase=src && node ./dist/bot.js ./config.neutron.json",
"bot-injective": "esbuild src/bot.ts --bundle --platform=node --outdir=dist --outbase=src && node ./dist/bot.js ./config.injective.json",
"bot-nibiru": "esbuild src/bot.ts --bundle --platform=node --outdir=dist --outbase=src && node ./dist/bot.js ./config.nibiru.json",
"generate-dts": "dts-bundle-generator -o types.d.ts src/index.ts",
"format": "prettier --write \"src/**/*.{js,ts,tsx}\"",
"generate-types": "node --experimental-specifier-resolution=node --loader ts-node/esm ./scripts/generate-types.js warp-protocol",
"postinstall": "husky install",
Expand Down Expand Up @@ -67,6 +68,7 @@
"@types/big.js": "^6.1.6",
"@types/jest": "^29.5.1",
"@types/lodash": "^4.14.191",
"dts-bundle-generator": "^9.3.1",
"esbuild": "^0.14.54",
"esbuild-node-externals": "^1.6.0",
"husky": "^8.0.2",
Expand Down
2 changes: 1 addition & 1 deletion src/composers/variable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ class StaticVariableComposer {
private variable: warp_resolver.StaticVariable;

constructor() {
this.variable = { kind: 'string', name: '', value: '', encode: false, init_fn: null, reinitialize: false };
this.variable = { kind: 'string', name: '', encode: false, init_fn: null, reinitialize: false };
}

kind(kind: warp_resolver.VariableKind): StaticVariableComposer {
Expand Down
6 changes: 5 additions & 1 deletion src/examples/example_eris.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,11 @@ const nextExecution = variable
.static()
.kind('uint')
.name('next_execution')
.value(ts.date(new Date('2023-04-10T12:30:00.000Z')))
.onInit({
uint: {
simple: ts.date(new Date('2023-04-10T12:30:00.000Z')),
},
})
.onSuccess(fn.uint(uint.expr(uint.simple(ts.days(1)), 'add', uint.env('time'))))
.onError(fn.uint(uint.expr(uint.simple(ts.hours(1)), 'add', uint.env('time'))))
.compose();
Expand Down
15 changes: 14 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2016,6 +2016,14 @@ dotenv@^16.0.1:
resolved "https://registry.npmjs.org/dotenv/-/dotenv-16.0.3.tgz"
integrity sha512-7GO6HghkA5fYG9TYnNxi14/7K9f5occMlp3zXAuSxn7CKCxt9xbNWG7yF8hTCSUchlfWSe3uLmlPfigevRItzQ==

dts-bundle-generator@^9.3.1:
version "9.3.1"
resolved "https://registry.yarnpkg.com/dts-bundle-generator/-/dts-bundle-generator-9.3.1.tgz#dfc2b20b2ceb5afe4b3deed516b997e8782219df"
integrity sha512-1/nMT7LFOkXbrL1ZvLpzrjNbfX090LZ64nLIXVmet557mshFCGP/oTiQiZenafJZ6GsmRQLTYKSlQnkxK8tsTw==
dependencies:
typescript ">=5.0.2"
yargs "^17.6.0"

eastasianwidth@^0.2.0:
version "0.2.0"
resolved "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz"
Expand Down Expand Up @@ -4428,6 +4436,11 @@ typeforce@^1.11.5:
resolved "https://registry.npmjs.org/typeforce/-/typeforce-1.18.0.tgz"
integrity sha512-7uc1O8h1M1g0rArakJdf0uLRSSgFcYexrVoKo+bzJd32gd4gDy2L/Z+8/FjPnU9ydY3pEnVPtr9FyscYY60K1g==

typescript@>=5.0.2:
version "5.3.3"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.3.3.tgz#b3ce6ba258e72e6305ba66f5c9b452aaee3ffe37"
integrity sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==

typescript@^4.8.2:
version "4.9.3"
resolved "https://registry.npmjs.org/typescript/-/typescript-4.9.3.tgz"
Expand Down Expand Up @@ -4586,7 +4599,7 @@ yargs-parser@^21.0.1, yargs-parser@^21.1.1:
resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-21.1.1.tgz#9096bceebf990d21bb31fa9516e0ede294a77d35"
integrity sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==

yargs@^17.3.1:
yargs@^17.3.1, yargs@^17.6.0:
version "17.7.2"
resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.7.2.tgz#991df39aca675a192b816e1e0363f9d75d2aa269"
integrity sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==
Expand Down

0 comments on commit 7c2b4ae

Please sign in to comment.