Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
7c41b7a
Bump decode-uri-component from 0.2.0 to 0.2.2
dependabot[bot] Dec 9, 2022
c2cf978
Bump qs from 6.5.2 to 6.5.3
dependabot[bot] Dec 9, 2022
083b664
Bump express from 4.17.1 to 4.18.2
dependabot[bot] Dec 15, 2022
0416fb7
Bump json5 from 2.1.0 to 2.2.3
dependabot[bot] Jan 4, 2023
14bc1b6
Bump cookiejar from 2.1.2 to 2.1.4
dependabot[bot] Jan 24, 2023
9fcaa80
Bump http-cache-semantics from 4.0.3 to 4.1.1
dependabot[bot] Feb 3, 2023
d0a627c
Create .github/dependabot.yml
lilsunny243 Mar 1, 2023
6c06014
Merge pull request #1 from lilsunny243/dependabot/npm_and_yarn/decode…
lilsunny243 Mar 1, 2023
225fdbb
Merge pull request #2 from lilsunny243/dependabot/npm_and_yarn/qs-6.5.3
lilsunny243 Mar 1, 2023
e0c7ecf
Merge pull request #3 from lilsunny243/dependabot/npm_and_yarn/expres…
lilsunny243 Mar 1, 2023
7eae41b
Merge pull request #4 from lilsunny243/dependabot/npm_and_yarn/json5-…
lilsunny243 Mar 1, 2023
fb99465
Merge pull request #5 from lilsunny243/dependabot/npm_and_yarn/cookie…
lilsunny243 Mar 1, 2023
d345038
Merge pull request #6 from lilsunny243/dependabot/npm_and_yarn/http-c…
lilsunny243 Mar 1, 2023
1565f3f
Update get.ts
leopardracer Feb 28, 2025
1055571
Update Proxy.sol
leopardracer Feb 28, 2025
a665fb2
Merge pull request #1 from leopardracer/master
Windows81 Oct 12, 2025
e69fb91
Update network.ts
Windows81 Oct 12, 2025
0fd2e23
Update networks.ts
Windows81 Oct 12, 2025
4c5de9c
Merge pull request #2 from lilsunny243/master
Windows81 Oct 13, 2025
1deefcc
2025-10-13T0335Z
Windows81 Oct 13, 2025
863c042
2025-10-13T0339Z
Windows81 Oct 13, 2025
0417a4f
2025-10-13T2152Z
Windows81 Oct 13, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: "" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "weekly"
5 changes: 0 additions & 5 deletions bin/run

This file was deleted.

7 changes: 7 additions & 0 deletions bin/run.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env node

// eslint-disable-next-line unicorn/prefer-top-level-await
(async () => {
const oclif = await import('@oclif/core')
await oclif.execute({dir: __dirname})
})()
39 changes: 16 additions & 23 deletions src/base/network.ts
Original file line number Diff line number Diff line change
@@ -1,25 +1,27 @@
import { Command, flags } from '@oclif/command'

import { configService } from '../helpers/config-service'
import { defaultNetworks } from '../helpers/networks'

const defaultNetworkNames = Object.keys(defaultNetworks)

/**
* Base command that handles the flags used for specifying the desired network.
*/
export abstract class NetworkCommand extends Command {
static defaultUrl = 'http://localhost:8545'

static flags = {
network: flags.string({
char: 'n',
default: NetworkCommand.defaultUrl,
description: 'URL to connect to, or name of a known network',
}),
mainnet: flags.boolean({ hidden: true }),
ropsten: flags.boolean({ hidden: true }),
rinkeby: flags.boolean({ hidden: true }),
goerli: flags.boolean({ hidden: true }),
kovan: flags.boolean({ hidden: true }),
}
static flags = Object.assign(
{},
{
network: flags.string({
char: 'n',
default: NetworkCommand.defaultUrl,
description: 'URL to connect to, or name of a known network',
}),
},
Object.fromEntries(defaultNetworkNames.map(i => [i, flags.boolean()])),
)

getNetworkUrl(flags: { [key in keyof typeof NetworkCommand.flags]: any }): string {
const [, url] = this.getNetworkUrlAndKind(flags)
Expand All @@ -29,18 +31,9 @@ export abstract class NetworkCommand extends Command {
getNetworkUrlAndKind(
flags: { [key in keyof typeof NetworkCommand.flags]: any },
): ['name' | 'url', string, string?] {
const name = defaultNetworkNames.find(i => flags[i]) ?? flags.network

const networks = configService.getNetworks()
const name = flags.mainnet
? 'mainnet'
: flags.ropsten
? 'ropsten'
: flags.rinkeby
? 'rinkeby'
: flags.goerli
? 'goerli'
: flags.kovan
? 'kovan'
: flags.network
if (networks[name]) {
return ['name', networks[name].url, name]
}
Expand Down
4 changes: 2 additions & 2 deletions src/commands/event/get.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ export default class GetCommand extends NetworkCommand {
required: false,
default: '1',
description:
'Start of the block number. Can be a positive number, a negative number, or "latest" (1 by default). A negative number is interpreted as substracted from the current block number.',
'Start of the block number. Can be a positive number, a negative number, or "latest" (1 by default). A negative number is interpreted as subtracted from the current block number.',
}),
to: flags.string({
char: 't',
required: false,
default: 'latest',
description:
'End of the block range. Can be a positive number, a negative number, or "latest" (default). A negative number is interpreted as substracted from the current block number.',
'End of the block range. Can be a positive number, a negative number, or "latest" (default). A negative number is interpreted as subtracted from the current block number.',
}),
json: flags.boolean({
description: 'Print events in JSON format',
Expand Down
28 changes: 8 additions & 20 deletions src/helpers/networks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,17 @@ import { NetworkInfo } from '../types'
export type Networks = { [name: string]: NetworkInfo }

export const defaultNetworks: Networks = {
// https://github.com/dojimanetwork/dapps-ethereum/blob/89858f9c3fbf33dde10253009635d03e7eae9a3d/readMe.md?plain=1#L4
mainnet: {
url: 'https://mainnet.infura.io/v3/76fb6c10f1584483a45a0a28e91b07ad',
url: 'https://mainnet.infura.io/v3/6e17f48a8c3f45bc879f13ad82a1ca2d',
id: 1,
label: 'Mainnet',
},
ropsten: {
url: 'https://ropsten.infura.io/v3/76fb6c10f1584483a45a0a28e91b07ad',
id: 3,
label: 'Ropsten',
},
rinkeby: {
url: 'https://rinkeby.infura.io/v3/76fb6c10f1584483a45a0a28e91b07ad',
id: 4,
label: 'Rinkeby',
},
goerli: {
url: 'https://goerli.infura.io/v3/76fb6c10f1584483a45a0a28e91b07ad',
id: 5,
label: 'Görli',
},
kovan: {
url: 'https://kovan.infura.io/v3/76fb6c10f1584483a45a0a28e91b07ad',
id: 42,
label: 'Kovan',

// https://github.com/talhazullfiqar/IOT-and-Blockchain-Based-E-VOTING-System/blob/595cb335f8d019c4389308a2b20f54e7d9ba012e/Hardhat/hardhat.config.js#L23
sepolia: {
url: 'https://sepolia.infura.io/v3/518eda9b13c849eaae85752808262a20',
id: 2,
label: 'Sepolia',
},
}
2 changes: 1 addition & 1 deletion test/files/contracts/Proxy.sol
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ contract Proxy {
}
// If no returned message exists, emit a default error message. Otherwise, emit the error message
if (bytes(message).length == 0)
emit StorageException(app_exec_id, "No error recieved");
emit StorageException(app_exec_id, "No error received");
else
emit StorageException(app_exec_id, message);
}
Expand Down
9 changes: 6 additions & 3 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,12 @@
"outDir": "lib",
"rootDir": "src",
"strict": true,
"target": "es2017",
"target": "es2024",
"composite": true,
"resolveJsonModule": true
},
"include": ["src/**/*", "src/**/*.json"]
}
"include": [
"src/**/*",
"src/**/*.json"
]
}
Loading