-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
27 changed files
with
61 additions
and
866 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import { createRpcUrlClaim } from '@celo/metadata-claims/lib/claim' | ||
import { Flags } from '@oclif/core' | ||
import { ClaimCommand } from '../../utils/identity' | ||
export default class ClaimRpcUrl extends ClaimCommand { | ||
static description = 'Claim a domain and add the claim to a local metadata file' | ||
static flags = { | ||
...ClaimCommand.flags, | ||
rpcUrl: Flags.string({ | ||
required: true, | ||
description: 'The RPC URL you want to claim', | ||
}), | ||
} | ||
static args = ClaimCommand.args | ||
static examples = [ | ||
'claim-rpc-url ~/metadata.json --rpc-url example.com --from 0x5409ED021D9299bf6814279A6A1411A7e866A631', | ||
] | ||
|
||
async run() { | ||
const res = await this.parse(ClaimRpcUrl) | ||
const metadata = await this.readMetadata() | ||
|
||
await this.addClaim(metadata, createRpcUrlClaim(res.flags.rpcUrl)) | ||
|
||
await this.writeMetadata(metadata) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
lib/ |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.