Security News
Supply Chain Attack Detected in Solana's web3.js Library
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
@streamr/network-contracts
Advanced tools
Solidity files plus Typescript interfaces for the Streamr Network smart contracts.
Exported interfaces are Ethers v5 format for versions 7.x.x and below, and Ethers v6 format for versions 8.0.0 and above.
Listed by file path:
Snippet from the Operator client:
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}`)
})
The functions that end with ForUserId
take an arbitrary bytes
argument for the user ID. Addresses can also be given to these functions but they need to be padded to 32 bytes first, e.g.: ethers.utils.hexZeroPad("0x1234567890123456789012345678901234567890", 32)
=> 0x0000000000000000000000001234567890123456789012345678901234567890
.
The package exports all of the artifacts needed to interact with the contracts, and also a class that deploys them into a chain and then gives an object with all addresses and with all contract objects.
An example of how to use it can be seen in network-contracts/packages/network-contracts/scripts/tatum/streamrEnvDeployer.ts, that can be run with the streamrEnvDeployer npm task
The proxy enables upgradability of contract code without the need to change all addresses in software that talks to the contract and without the need to migrate data that is inside the old contract, that is being upgraded. Also the upgrade can only be controlled by a ProxyAdmin contract. To find out more visit https://docs.openzeppelin.com/contracts/3.x/api/proxy and https://docs.openzeppelin.com/upgrades-plugins/1.x/proxies
To deploy the contract with a proxy into a locally running eth environment run
npm run localDeployProxy
then copy the Proxy and Proxyadmin addresses to the upgradeProxy.ts script and run it with
npm run localUpgradeImpl
StreamRegistryV5: added functions for arbitrary bytes user IDs (they can only publish and subscribe, not grant/edit/delete) 8.0.0 switch ethers v5 -> v6 7.0.8 export ENS type 4.2.0 export ERC677 ABI and type
npm version [major/minor]
npm run clean
npm run build
npm publish --dry-run
npm publish
git add .
git commit -m"release(network-contracts): vx.x.x"
git tag network-contracts/vx.x.x
git push
git push --tags
FAQs
Smart contracts for Streamr Network
The npm package @streamr/network-contracts receives a total of 29,598 weekly downloads. As such, @streamr/network-contracts popularity was classified as popular.
We found that @streamr/network-contracts demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.