Socket
Socket
Sign inDemoInstall

@colony/events

Package Overview
Dependencies
4
Maintainers
4
Versions
22
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

@colony/events


Version published
Maintainers
4
Created

Readme

Source

🎫 Colony event contract bindings

Discord

@colony/events

This package contains pre-compiled Colony event contract bindings. These bindings contain types and ABIs for all events for all contracts across all versions in the Colony Network. You could use them in conjunction with the EventManger from Colony SDK:

import { providers } from 'ethers';
import { IColonyEvents__factory as ColonyEventsFactory } from '@colony/events';

import {
  type ColonyEvent,
  ColonyEventManager,
  ColonyRpcEndpoint,
  MetadataType,
} from '@colony/sdk';

const provider = new providers.JsonRpcProvider(ColonyRpcEndpoint.Gnosis);

const manager = new ColonyEventManager(provider);
const colonyEventSource = manager.createEventSource(ColonyEventsFactory);

// Filter all events that signal the creation of a new team within a Colony
const domainEvents = manager.createFilter(
    colonyEventSource,
    'DomainAdded(address,uint256)',
    colonyAddress,
);

manager.provider.on('block', async (no) => {
    const events = await manager.getMultiEvents(domainEvents);
    if (events.length) {
        console.log(events);
    }
});

Building

To build this package, run pnpm run build in this directory. See the general development instructions for more information.

Contributing

All contributions are welcome. Please read the Contributing Guidelines and review our Code of Conduct before submitting a PR.

License

GPL-3.0

FAQs

Last updated on 22 Jan 2024

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc