Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@streamr/network-contracts

Package Overview
Dependencies
Maintainers
12
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@streamr/network-contracts - npm Package Compare versions

Comparing version 2.6.1 to 2.6.2

dist/artifacts/contracts/NodeRegistry/NodeRegistry.sol/NodeRegistry.json

14

dist/src/exports.d.ts

@@ -5,1 +5,15 @@ export { abi as operatorABI, bytecode as operatorBytecode } from "../artifacts/contracts/OperatorTokenomics/Operator.sol/Operator.json";

export type { Sponsorship } from "../typechain/contracts/OperatorTokenomics/Sponsorship";
export { abi as operatorFactoryABI, bytecode as operatorFactoryBytecode } from "../artifacts/contracts/OperatorTokenomics/OperatorFactory.sol/OperatorFactory.json";
export type { OperatorFactory } from "../typechain/contracts/OperatorTokenomics/OperatorFactory";
export { abi as sponsorshipFactoryABI, bytecode as sponsorshipFactoryBytecode } from "../artifacts/contracts/OperatorTokenomics/SponsorshipFactory.sol/SponsorshipFactory.json";
export type { SponsorshipFactory } from "../typechain/contracts/OperatorTokenomics/SponsorshipFactory";
export { abi as streamrConfigABI, bytecode as streamrConfigBytecode } from "../artifacts/contracts/OperatorTokenomics/StreamrConfig.sol/StreamrConfig.json";
export type { StreamrConfig } from "../typechain/contracts/OperatorTokenomics/StreamrConfig";
export { abi as streamRegistryABI, bytecode as streamRegistryBytecode } from "../artifacts/contracts/StreamRegistry/StreamRegistryV4.sol/StreamRegistryV4.json";
export type { StreamRegistryV4 as StreamRegistry } from "../typechain/contracts/StreamRegistry/StreamRegistryV4";
export { abi as streamStorageRegistryABI, bytecode as streamStorageRegistryBytecode } from "../artifacts/contracts/StreamStorageRegistry/StreamStorageRegistryV2.sol/StreamStorageRegistryV2.json";
export type { StreamStorageRegistryV2 as StreamStorageRegistry } from "../typechain/contracts/StreamStorageRegistry/StreamStorageRegistryV2";
export { abi as nodeRegistryABI, bytecode as nodeRegistryBytecode } from "../artifacts/contracts/NodeRegistry/NodeRegistry.sol/NodeRegistry.json";
export type { NodeRegistry } from "../typechain/contracts/NodeRegistry/NodeRegistry";
export { abi as tokenABI } from "../artifacts/contracts/OperatorTokenomics/IERC677.sol/IERC677.json";
export type { IERC677 } from "../typechain/contracts/OperatorTokenomics/IERC677";

22

dist/src/exports.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.sponsorshipBytecode = exports.sponsorshipABI = exports.operatorBytecode = exports.operatorABI = void 0;
exports.tokenABI = exports.nodeRegistryBytecode = exports.nodeRegistryABI = exports.streamStorageRegistryBytecode = exports.streamStorageRegistryABI = exports.streamRegistryBytecode = exports.streamRegistryABI = exports.streamrConfigBytecode = exports.streamrConfigABI = exports.sponsorshipFactoryBytecode = exports.sponsorshipFactoryABI = exports.operatorFactoryBytecode = exports.operatorFactoryABI = exports.sponsorshipBytecode = exports.sponsorshipABI = exports.operatorBytecode = exports.operatorABI = void 0;
var Operator_json_1 = require("../artifacts/contracts/OperatorTokenomics/Operator.sol/Operator.json");

@@ -10,1 +10,21 @@ Object.defineProperty(exports, "operatorABI", { enumerable: true, get: function () { return Operator_json_1.abi; } });

Object.defineProperty(exports, "sponsorshipBytecode", { enumerable: true, get: function () { return Sponsorship_json_1.bytecode; } });
var OperatorFactory_json_1 = require("../artifacts/contracts/OperatorTokenomics/OperatorFactory.sol/OperatorFactory.json");
Object.defineProperty(exports, "operatorFactoryABI", { enumerable: true, get: function () { return OperatorFactory_json_1.abi; } });
Object.defineProperty(exports, "operatorFactoryBytecode", { enumerable: true, get: function () { return OperatorFactory_json_1.bytecode; } });
var SponsorshipFactory_json_1 = require("../artifacts/contracts/OperatorTokenomics/SponsorshipFactory.sol/SponsorshipFactory.json");
Object.defineProperty(exports, "sponsorshipFactoryABI", { enumerable: true, get: function () { return SponsorshipFactory_json_1.abi; } });
Object.defineProperty(exports, "sponsorshipFactoryBytecode", { enumerable: true, get: function () { return SponsorshipFactory_json_1.bytecode; } });
var StreamrConfig_json_1 = require("../artifacts/contracts/OperatorTokenomics/StreamrConfig.sol/StreamrConfig.json");
Object.defineProperty(exports, "streamrConfigABI", { enumerable: true, get: function () { return StreamrConfig_json_1.abi; } });
Object.defineProperty(exports, "streamrConfigBytecode", { enumerable: true, get: function () { return StreamrConfig_json_1.bytecode; } });
var StreamRegistryV4_json_1 = require("../artifacts/contracts/StreamRegistry/StreamRegistryV4.sol/StreamRegistryV4.json");
Object.defineProperty(exports, "streamRegistryABI", { enumerable: true, get: function () { return StreamRegistryV4_json_1.abi; } });
Object.defineProperty(exports, "streamRegistryBytecode", { enumerable: true, get: function () { return StreamRegistryV4_json_1.bytecode; } });
var StreamStorageRegistryV2_json_1 = require("../artifacts/contracts/StreamStorageRegistry/StreamStorageRegistryV2.sol/StreamStorageRegistryV2.json");
Object.defineProperty(exports, "streamStorageRegistryABI", { enumerable: true, get: function () { return StreamStorageRegistryV2_json_1.abi; } });
Object.defineProperty(exports, "streamStorageRegistryBytecode", { enumerable: true, get: function () { return StreamStorageRegistryV2_json_1.bytecode; } });
var NodeRegistry_json_1 = require("../artifacts/contracts/NodeRegistry/NodeRegistry.sol/NodeRegistry.json");
Object.defineProperty(exports, "nodeRegistryABI", { enumerable: true, get: function () { return NodeRegistry_json_1.abi; } });
Object.defineProperty(exports, "nodeRegistryBytecode", { enumerable: true, get: function () { return NodeRegistry_json_1.bytecode; } });
var IERC677_json_1 = require("../artifacts/contracts/OperatorTokenomics/IERC677.sol/IERC677.json");
Object.defineProperty(exports, "tokenABI", { enumerable: true, get: function () { return IERC677_json_1.abi; } });

4

package.json
{
"name": "@streamr/network-contracts",
"version": "2.6.1",
"version": "2.6.2",
"description": "Smart contracts for Streamr Network",

@@ -16,3 +16,3 @@ "author": "Streamr Network AG",

"scripts": {
"build": "hardhat compile && rm -rf dist && tsc -p tsconfig.build.json",
"build": "rm -rf artifacts && hardhat compile && rm -rf dist && tsc -p tsconfig.build.json",
"clean": "rm -rf artifacts dist cache coverage typechain deployments .openzeppelin/unknown-31337.json",

@@ -19,0 +19,0 @@ "test": "npm run test:fast && npm run test:slow",

@@ -1,5 +0,36 @@

<h3>Deploy Streamregistry and connect the Graph</h3>
# Streamr Network contracts
Just run
Solidity files plus Typescript interfaces for the Streamr Network smart contracts.
## Contracts
Listed by file path:
* [StreamRegistry](./contracts/StreamRegistry/StreamRegistryV4.sol): Streams are added here along with metadata how to join them
* [NodeRegistry](./contracts/NodeRegistry/NodeRegistry.sol): Storage nodes can register themselves here
* [StreamStorageRegistry](./contracts/StreamStorageRegistry/StreamStorageRegistryV2.sol): Connects storage nodes to streams that they store
* OperatorTokenomics: [Operator](./contracts/OperatorTokenomics/Operator.sol) and [Sponsorship](./contracts/OperatorTokenomics/Sponsorship.sol) contracts that govern how to pay for better service in the Network, and how to get paid for providing it
* Spoiler: you '''sponsor''' streams by deploying a Sponsorship and sending DATA tokens to it, and operators '''stake''' into that Sponsorship to receive that DATA over time
* if operators stake but don't actually provide service, they get kicked out and their stake gets slashed
* additionally, 3rd parties can '''delegate''' their DATA tokens to the Operator contracts and receive a share of the operator's earnings. This way the operator gets more DATA to stake to more Sponsorships, in order to more fully utilize their network resources to earn more DATA.
## Usage from Typescript
Snippet from the [Operator client]():
```typescript
import { operatorABI, sponsorshipABI } from "@streamr/network-contracts"
import type { Operator, Sponsorship } from "@streamr/network-contracts"
...
const contract = new Contract(operatorContractAddress, operatorABI, this.provider) as unknown as Operator
contract.on("Staked", async (sponsorship: string) => {
log(`got Staked event ${sponsorship}`)
})
```
## Developer notes
To deploy StreamRegistry and deploy the subgraph, run:
```
npm ci

@@ -6,0 +37,0 @@ npm run build

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc