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
pragma solidity ^0.8.8; | |
import "@openzeppelin/contracts/access/Ownable.sol"; | |
import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; | |
interface IRoundsManager { | |
// Events | |
event NewRound(uint256 indexed round, bytes32 blockHash); | |
// Deprecated events |
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
// SPDX-License-Identifier: MIT | |
pragma solidity ^0.8.0; | |
import "../utils/Context.sol"; | |
/** | |
* @dev Contract module which provides a basic access control mechanism, where | |
* there is an account (an owner) that can be granted exclusive access to | |
* specific functions. |
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
// SPDX-License-Identifier: MIT | |
pragma solidity ^0.8.0; | |
import "../utils/Context.sol"; | |
/** | |
* @dev Contract module which provides a basic access control mechanism, where | |
* there is an account (an owner) that can be granted exclusive access to | |
* specific functions. |
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
{ | |
"contractName": "Wallet", | |
"abi": [ | |
{ | |
"inputs": [ | |
{ | |
"name": "_master", | |
"type": "address" | |
} | |
], |
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
'use strict' | |
const TestHarness = require('../src/index') | |
let th = new TestHarness() | |
th.run({ | |
name: 'testnet', // specify unique config name here | |
discordUserId: null, // id of Discord user to send alert from Prometheus to (use `Copy ID` on profile to get) | |
// should be string |
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
// listCmd represents the read command | |
var listCmd = &cobra.Command{ | |
Use: "list", | |
Short: "List all blog posts", | |
RunE: func(cmd *cobra.Command, args []string) error { | |
// Create the request (this can be inline below too) | |
req := &blogpb.ListBlogsReq{} | |
// Call ListBlogs that returns a stream | |
stream, err := client.ListBlogs(context.Background(), req) | |
// Check for errors |
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
var deleteCmd = &cobra.Command{ | |
Use: "delete", | |
Short: "Delete a Blog post by its ID", | |
Long: `Delete a blog post by it's mongoDB Unique identifier. | |
If no blog post is found for the ID it will return a 'Not Found' error`, | |
RunE: func(cmd *cobra.Command, args []string) error { | |
id, err := cmd.Flags().GetString("id") | |
if err != nil { | |
return err |
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
var updateCmd = &cobra.Command{ | |
Use: "update", | |
Short: "Find a Blog post by its ID", | |
Long: `Find a blog post by it's mongoDB Unique identifier. | |
If no blog post is found for the ID it will return a 'Not Found' error`, | |
RunE: func(cmd *cobra.Command, args []string) error { | |
// Get the flags from CLI | |
id, err := cmd.Flags().GetString("id") | |
author, err := cmd.Flags().GetString("author") |
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
var readCmd = &cobra.Command{ | |
Use: "read", | |
Short: "Find a Blog post by its ID", | |
Long: `Find a blog post by it's mongoDB Unique identifier. | |
If no blog post is found for the ID it will return a 'Not Found' error`, | |
RunE: func(cmd *cobra.Command, args []string) error { | |
id, err := cmd.Flags().GetString("id") | |
if err != nil { | |
return err |
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
func init() { | |
readCmd.Flags().StringP("id", "i", "", "The id of the blog") | |
readCmd.MarkFlagRequired("id") | |
rootCmd.AddCommand(readCmd) | |
} |