Socket
Socket
Sign inDemoInstall

@iexec/generic-oracle-contracts

Package Overview
Dependencies
2
Maintainers
3
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @iexec/generic-oracle-contracts

Contracts for Iexec generic DOracle


Version published
Weekly downloads
1
decreased by-75%
Maintainers
3
Install size
2.75 MB
Created
Weekly downloads
 

Readme

Source

Generic Oracle Contracts

Overview

 +-----------------------------+ +----------------------------+
 |                             | |                            |
 |        Target chain 1       | |       Target chain 2       |
 |  +------------------------+ | | +------------------------+ |
 |  |                        | | | |                        | |
 |  | +--------------------+ | | | | +--------------------+ | |
 |  | |                    | | | | | |                    | | |4t.Read value
 |  | |   GenericOracle    | | | | | |   GenericOracle    <-+-+-----
 |  | |                    | | | | | |                    | | |
 |  | +--------------------+ | | | | +--------------------+ | |
 |  |                        | | | |                        | |
 |  |  SingleReporterOracle  | | | |  SingleReporterOracle  | |
 |  |                        | | | |                        | |
 |  | +--------------------+ | | | | +--------------------+ | |
 |  | |                    | | | | | |                    | | |
 |  | |   IOracleConsumer  | | | | | |   IOracleConsumer  | | |
 |  | |                    | | | | | |                    | | |
 |  | +---------^----------+ | | | | +---------^----------+ | |
 |  |           |            | | | |           |            | |
 |  +-----------+------------+ | | +-----------+------------+ |
 |              |              | |             |              |
 |  +-----------+------------+ | | +-----------+------------+ |
 |  |                        | | | |                        | |
 |  |      SaltyForwarder    | | | |      SaltyForwarder    | |
 |  |                        | | | |                        | |
 |  +------------------^-----+ | | +------^-----------------+ |
 |           on-chain  |       | |        | on-chain          |
 +---------------------+-------+ +--------+-------------------+
                       |                  |
                       +--------+---------+
                      3t.Publish|value
          +---------------------+-----------------------+
          |                     |                       |
          |           +---------+----------+            |
1.Request |           |                    |            |
  update  |           |   2.off-chain      |            |
      ----+----------->      Compute       |            |
          |           |                    |            |
          |           +---------+----------+  off-chain |
          +-- -- -- --3s.Publish|value      -- -- -- -- |
          |                     |              on-chain |
          |         +-----------+------------+          |
          |         |           |            |          |
          |         | +---------v----------+ |          |
          |         | |                    | |          |
          |         | |   IOracleConsumer  | |          |
          |         | |                    | |          |
          |         | +--------------------+ |          |
          |         |                        |          |
          |         |  VerifiedResultOracle  |          |
          |         |                        |          |
          |         | +--------------------+ |          |
          |         | |                    | |          |4s.Read value
          |         | |    GenericOracle   <-+----------+------
          |         | |                    | |          |
          |         | +--------------------+ |          |
          |         |                        |          |
          |         +------------------------+          |
          |                   Source                    |
          +---------------------------------------------+

Build

npx hardhat compile
npx hardhat coverage

Deploy

npx hardhat run scripts/deploy.ts --network goerli

Verify

  • Automatic
npx hardhat verify --network <network> <SaltyForwarderAddress>
npx hardhat verify --network <network> <SingleReporterOracleAddress> "0x767A2D69D7278F200ae1F79a00Ac2CaE299dD784" "<SaltyForwarderAddress>"

See: https://mumbai.polygonscan.com/

  • Manual
npx hardhat flatten contracts/VerifiedResultOracle.sol  > VerifiedResultOracle_flat.sol

with couple updates to clean imported interfaces, pragmas, licenses (SPDX-License-Identifier: X AND Y), ..

NPM publish

npm publish --access public

Dev deployments

  • Polygon Mumbai
SaltyForwarder deployed to: 0xa715674ecf9D14141421190b6f8Acf20686b54d7
SingleReporterOracle deployed to: 0x330031CF7e6E2C318Dba230fe25A7f39fD3644EA
  • Goerli
SaltyForwarder deployed to: 0x2aD6aD4F35cf7354fE703da74F459690dBcC12bf
SingleReporterOracle deployed to: 0x8dFf608952ADCDa4cF7320324Db1ef44001BE79b
  • Bellecour
VerifiedResultOracle deployed to: 0xc83b0110F91aD082b580D894BE6c8660cf1FB26d

Production deployments

  • Polygon Mumbai
SaltyForwarder: 0xc684E8645c8414812f22918146d72d1071E722AE
SingleReporterOracle: 0x36dA71ccAd7A67053f0a4d9D5f55b725C9A25A3E
  • Polygon Mainnet
SaltyForwarder: 0xc684E8645c8414812f22918146d72d1071E722AE
SingleReporterOracle: 0x36dA71ccAd7A67053f0a4d9D5f55b725C9A25A3E
  • Goerli
SaltyForwarder: 0xc684E8645c8414812f22918146d72d1071E722AE
SingleReporterOracle: 0x36dA71ccAd7A67053f0a4d9D5f55b725C9A25A3E 
  • Bellecour
VerifiedResultOracle:0x36dA71ccAd7A67053f0a4d9D5f55b725C9A25A3E 

FAQs

Last updated on 17 Nov 2022

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc