New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@owlprotocol/web3-redux

Package Overview
Dependencies
Maintainers
5
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@owlprotocol/web3-redux

  • 1.2.0
  • unpublished
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
5
Created
Source

Web3 Redux

Core Redux Library. See README.md for more info.

Models

In total we have 13 data models.

Simple Primary Key

These models have a single id as a primary key.

  • 4Byte: signatureHash
  • Config: id
  • ContractSend: uuid generated randomly
  • Error: id
  • HTTPCache
  • IPFSCache
  • Network: networkId
  • Sync

Compound Primary Key

These models use a compound primary key that is computed based on multiple properties.

  • Block: [networkId+blockNumber]
  • Contract: [networkId+address]
  • ContractEvent: [networkId+blockNumber+logIndex]
  • EthCall: [networkId+to+data]
  • Transaction: [networkId+hash]

IndexedDB

Compound Index

https://dexie.org/docs/Compound-Index https://stackoverflow.com/questions/23806635/searching-for-compound-indexes-in-indexeddb https://stackoverflow.com/questions/16501459/javascript-searching-indexeddb-using-multiple-indexes

MultiEntry Index

https://dexie.org/docs/MultiEntry-Index

IndexedDB Limitations

https://dexie.org/docs/The-Main-Limitations-of-IndexedDB

Adding Model

  • Copy an existing base template (eg. nftgenerativeitem)
  • Replace all instances of NFTGenerativeItem with MyClass
  • Update interface, index, and validation in myclass/model/inteface.ts
  • Update redux-orm model myclass/model/orm.ts (optional, only required if model uses hydration)
  • Update sagas.ts
  • Update db.ts
  • Update reducer.ts (optional, only required if model uses hydration)
  • Update orm.ts (optional, only required if model uses hydration)
  • Update index.ts to export model
  • Update state.ts redux state type (optional, only if using hydration, and only for convenience)

TODO

  • getBalance/getNonce... hook tests
  • useEvents hook test
  • useEvents pagination
  • component integrations (table, display)
  • ContractEvent getPastEvents query cache

FAQs

Package last updated on 11 Nov 2022

Did you know?

Socket

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.

Install

Related posts

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