Coder Social home page Coder Social logo

pedroduartecosta / blockchain-oracle Goto Github PK

View Code? Open in Web Editor NEW
89.0 89.0 41.0 108 KB

Implementation of a multi-party self-hosted ethereum blockchain oracle. This project is a part of my master thesis on Trustable Blockchain Oracles.

License: The Unlicense

JavaScript 100.00%
blockchain ethereum

blockchain-oracle's Introduction

Get started building your personal website

Showcase your software development skills

This repository gives you the code you'll need to kickstart a personal website that showcases your work as a software developer. And when you manage the code in a GitHub repository, it will automatically render a webpage with the owner's profile information, including a photo, bio, and repositories.

Your personal website is waiting to be personalized, though. It includes space to highlight your specific areas of interest in software development, like languages or industries. And it's standing by to publish your next great blog post.

It's all possible using the combination of Jekyll (for building your website), GitHub Pages (for hosting your website), and GitHub's API (for automatically populating your website with content).

Installation

Fork the github/personal-website repo

You'll be making your own copy of the "personal website starter" repository so you have your own project to customize. A "fork" is a copy of a repository. So select "Fork" atop the github/personal-website repository.

Once you've found a home for your forked repository, it's yours. You're the owner, so you're ready to publish, if you wish.

Install in your local development environment

If you want to manage your website in a local web development environment, you'll be using Ruby.

Once you've found a home for your forked repository, clone it.

Install Jekyll

Jekyll is a Ruby Gem that can be installed on most systems.

  1. Install a full Ruby development environment
  2. Install Jekyll and bundler gems
gem install jekyll bundler
  1. Change into your new directory
cd personal-website
  1. Install missing gems
bundle install
  1. Build the site and make it available on a local server
bundle exec jekyll serve

You should see something like:

Configuration file: /octocat/personal-website/_config.yml
            Source: /octocat/personal-website
       Destination: /octocat/_site
 Incremental build: disabled. Enable with --incremental
      Generating...
   GitHub Metadata: No GitHub API authentication could be found. Some fields may be missing or have incorrect data.
                    done in 14.729 seconds.
 Auto-regeneration: enabled for '/octocat/personal-website'
    Server address: http://127.0.0.1:4000
  Server running... press ctrl-c to stop.

Don't worry about the "No GitHub API authentication could be found" message. API authentication is only necessary if you intend to display more detailed metadata, like a branch name.

  1. Now browse to http://localhost:4000

Publish

When you host your personal website's code on GitHub, you get the support of free hosting through GitHub Pages.

The fastest approach is to rename your repository username.github.io, where username is your GitHub username (or organization name). Then, the next time you push any changes to your repository's master branch, they'll be accessible on the web at your username.github.io address.

If you want to use a custom domain, you'll want to add it to your repository's "Custom domain" settings on github.com. And then register and/or configure your domain with a DNS provider.

Customization

It's your website, and you control the source code. So you can customize everything, if you like. But we've provided a handful of quick customizations for you to consider as you get your website off the ground.

Quick configuration changes

Most customizations can be done in a matter of seconds, by revising your repository's _config.yml file. Just remember to restart your local server each time you save new changes so your Jekyll-powered website rebuilds correctly:

  1. Shut down your server by entering the keyboard command CTRL+c
  2. Restart your server: bundle exec jekyll serve

Layout

Your website will display in a two-column layout by default on larger-screen devices, with your photo, name, and basic information displayed in a left-aligned "sidebar." You can quickly switch to a "stacked" single-column layout by changing the line in your _config.yml file that reads layout: sidebar to layout: stacked.

Style

Your website appears with a "light" white and gray background by default, with dark text. You can quickly switch to a "dark" background with white text by changing the line in your _config.yml file that reads style: light to style: dark.

Projects

The "My Projects" section of your website is generated by default with your nine most recently "pushed" repositories. It also excludes repositories that you forked, by default. But each of these parameters can be quickly customized in your repository's _config.yml file, under the projects dictionary line.

Parameters include:

  • sort_by: The method by which repositories are sorted. Options include pushed and stars.
  • limit: The maximum number of repositories that will be displayed in the "My Projects" section of your website. Out of the box, this number is set to 9.
  • exclude:
    • forks: When true, repositories you've forked will be excluded from the listing.
    • projects: A list the repository names you want to exclude from the listing.

Topics

Your website comes pre-configured with three topics (e.g. "Web design" and "Sass") that appear in a section titled "My Interests." These are also stored in your repository's _config.yml file, where you can define each topic's name and two other optional details:

  • web_url: The web address you'd like to your topic to link to (e.g. https://github.com/topics/sass).
  • image_url: The web address of an (ideally square) image that you'd like to appear with your topic.

Social media

Your website supports linking and sharing to social media services you're using, including Behance, Dribbble, Facebook, LinkedIn, Medium, Stack Overflow, Twitter, and YouTube. To identify the services you use:

  1. Edit your repository's _config.yml file.
  2. Edit the social_media dictionary line, and represent the services you like in a simple key: value form:
social_media:
  behance: your_username
  dribbble: your_username  
  facebook: your_username
  hackerrank: your_username
  instagram: your_username
  keybase: your_username
  linkedin: your_username
  medium: your_username
  stackoverflow: your_user_id
  telegram: your_username
  twitter: your_username
  unsplash: your_username
  vk: your_username
  website: http://your_website_url
  youtube: your_username

Links to your profile for each of the services you define will appear in the <header> of your website, appended to your bio. And if those services support sharing, any blog posts that you publish will include links to share that post using each social media service.

Note: This feature is supported by two files in your repository:

  • /_data/social_media.yml: Defines each of the supported services, including variable name, display name, URL path, and SVG icon.
  • /_includes/social_media_share_url.html: Outputs the share URL required for any of the supported social media services that support sharing URLs.

If you're interested in adding a social media service that's not already supported in this repo, you can edit these two files to build that support.

Adding pages

To add a page to your website (e.g. detailed resume):

  1. Create a new .html or .md file at the root of your repository.
  2. Give it a filename that you want to be used in the page's URL (e.g. http://yoursite.dev/filename).
  3. At the start of your file, include the following front matter:
---
layout: default
---

Adding blog posts

To add a blog post to your website:

  1. Create a new .md file in your repository's /_posts/ directory.
  2. Give it a filename using the following format:
YEAR-MONTH-DAY-title.MARKUP
  1. At the start of your file, include the following front matter:
---
title: "The title of my blog post"
---

Your website comes with a placeholder blog post that you can reference. Notably, its front matter declares published as false, so that it won't appear on your website.

While you can define a layout in the front matter, your website is pre-configured to assign the post layout to all of the posts in your /_posts/ directory. So you don't have to declare that in your posts.

Jekyll's conventions for authoring and managing blog posts is very flexible. You can learn more in Jekyll's documentation for "Posts."

Content and templates

To give you a sound foundation to start your personal website, your repository includes a handful of "includes" -- dynamic .html files that are re-used throughout your website. They're all stored in the /_includes/ directory.

There are the usual suspects, like header.html and footer.html. But there are few more worth pointing out:

  • interests.html: A heading and dynamic list of "My Interests," which is populated with the topics you list in your _config.yml.
  • masthead.html: A collection of your avatar, name, bio, and other metadata that's displayed prominently on all your webpages to help identify what the website is about.
  • post-card.html: A compact, summarized presentation of a blog post, re-used to display a listing of your latest blog posts.
  • projects.html: A heading and dynamic list of "My Projects," which is populated with a listing of your newest GitHub repositories.
  • repo-card.html: A compact, summarized presentation of a repository, re-used to display a listing of your GitHub repositories.
  • thoughts.html: A heading and dynamic list of "My Thoughts," which is populated with a listing of your latest blog posts.
  • topic-card.html: A compact, summarized presentation of a topic (defined in your _config.yml), re-used to display a listing of your interests.

Layouts

Your repository comes with three layouts:

  • default: Not used by any of the built-in pages or posts, but useful for any new pages you create.
  • home: Used by your index.html homepage to display listings of your projects, interests, and (optionally) your blog posts.
  • post: Used by default by the posts in your /_posts/ directory.

Jekyll's convention for defining layouts is very flexible. You can learn more about customizing your layouts in the Jekyll "Layouts" docs.

Styles

Your website is pre-configured to use GitHub's very flexible CSS framework called "Primer,". It's currently referenced within your styles.scss file, using the CSS import at-rule:

@import url('https://unpkg.com/primer/build/build.css');

You are, of course, welcome to remove it or replace it with another framework. Just bear in mind that the HTML that your website came pre-packaged with references multiple Primer "utility classes" to define things like column widths, margins, and background colors.

You also have the option to add on to and extend Primer's styles by adding custom CSS to your /assets/styles.scss Sass stylesheet. By editing this file, you can customize your website's color scheme, typography, and more.

License

The theme is available as open source under the terms of the MIT License.

blockchain-oracle's People

Contributors

pedroduartecosta avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

blockchain-oracle's Issues

Error: Exceeds block gas limit

I'm completely blocked with this issue

Error: Exceeds block gas limit
at Object.InvalidResponse (/Users/alvaro.martin/bsc/blockchain-oracle/off-chain-oracle/node_modules/web3/lib/web3/errors.js:38:16)
at /Users/alvaro.martin/bsc/blockchain-oracle/off-chain-oracle/node_modules/web3/lib/web3/requestmanager.js:86:36
at XMLHttpRequest.request.onreadystatechange (/Users/alvaro.martin/bsc/blockchain-oracle/off-chain-oracle/node_modules/web3/lib/web3/httpprovider.js:129:7)
at XMLHttpRequestEventTarget.dispatchEvent (/Users/alvaro.martin/bsc/blockchain-oracle/off-chain-oracle/node_modules/xhr2-cookies/xml-http-request-event-target.ts:44:13)
at XMLHttpRequest._setReadyState (/Users/alvaro.martin/bsc/blockchain-oracle/off-chain-oracle/node_modules/xhr2-cookies/xml-http-request.ts:219:8)
at XMLHttpRequest._onHttpResponseEnd (/Users/alvaro.martin/bsc/blockchain-oracle/off-chain-oracle/node_modules/xhr2-cookies/xml-http-request.ts:345:8)
at IncomingMessage. (/Users/alvaro.martin/bsc/blockchain-oracle/off-chain-oracle/node_modules/xhr2-cookies/xml-http-request.ts:311:39)
at emitNone (events.js:111:20)
at IncomingMessage.emit (events.js:208:7)
at endReadableNT (_stream_readable.js:1064:12)

understand ABI variable

Hi, unfortunately I get many errors using a json input for the ABI .env variable.

Can I know an exampl fo a proper input?

Hardcoded oracles address ?

In order to make this thing work, there are no comments about where are those address coming from?

.../on-chain-oracle/contracts/Oracle.sol
r.quorum[address(0x6c2339b46F41a06f09CA0051ddAD54D1e582bA77)] = 1;
r.quorum[address(0xb5346CF224c02186606e5f89EACC21eC25398077)] = 1;
r.quorum[address(0xa2997F1CA363D11a0a35bB1Ac0Ff7849bc13e914)] = 1;

Please provide a complete running code of blockchain oracle repo because I have spent 3 days on this code but not able to run it properly.

Please provide a .zip file with complete packages installed. I have spent 3 days on this code and still 70% of time code is working fine. and 30% of times I receive errors. like unhandles promises reject. tx fee overpassed limit etc.

Also tell the version of node on which it was made.

I will be very thankful to you for this favor.

my email is [email protected]
my whatsapp +923014440289

Broken, impossible to build

yarn install
โฏ cd "~/bsc/blockchain-oracle/on-chain-oracle/"
โฏ yarn install
yarn install v1.22.10
[1/4] ๐Ÿ”  Resolving packages...
[2/4] ๐Ÿšš  Fetching packages...
[3/4] ๐Ÿ”—  Linking dependencies...
warning "ganache-cli > [email protected]" has unmet peer dependency "webpack@^4.0.0".
[4/4] ๐Ÿ”จ  Building fresh packages...
[1/4] โ „ sha3
[2/4] โ „ secp256k1
[3/4] โ „ scrypt
error ~/bsc/blockchain-oracle/on-chain-oracle/node_modules/sha3: Command failed.
Exit code: 1
Command: node-gyp rebuild
Arguments: 
Directory: ~/bsc/blockchain-oracle/on-chain-oracle/node_modules/sha3
Output:
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | darwin | x64
gyp info find Python using Python version 3.8.2 found at "/Library/Frameworks/Python.framework/Versions/3.8/bin/python3"
(node:84353) [DEP0150] DeprecationWarning: Setting process.config is deprecated. In the future the property will be read-only.
(Use `node --trace-deprecation ...` to show where the warning was created)
gyp info spawn /Library/Frameworks/Python.framework/Versions/3.8/bin/python3
gyp info spawn args [
gyp info spawn args   '~/.nvm/versions/node/v16.6.0/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'make',
gyp info spawn args   '-I',
gyp info spawn args   '~/bsc/blockchain-oracle/on-chain-oracle/node_modules/sha3/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '~/.nvm/versions/node/v16.6.0/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '~/Library/Caches/node-gyp/16.6.0/include/node/common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=~/Library/Caches/node-gyp/16.6.0',
gyp info spawn args   '-Dnode_gyp_dir=~/.nvm/versions/node/v16.6.0/lib/node_modules/npm/node_modules/node-gyp',
gyp info spawn args   '-Dnode_lib_file=~/Library/Caches/node-gyp/16.6.0/<(target_arch)/node.lib',
gyp info spawn args   '-Dmodule_root_dir=~/bsc/blockchain-oracle/on-chain-oracle/node_modules/sha3',
gyp info spawn args   '-Dnode_engine=v8',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--no-parallel',
gyp info spawn args   '--generator-output',
gyp info spawn args   'build',
gyp info spawn args   '-Goutput_dir=.'
gyp info spawn args ]
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
  CXX(target) Release/obj.target/sha3/src/addon.o
In file included from ../src/addon.cpp:4:
In file included from ../../nan/nan.h:202:
In file included from ../../nan/nan_converters.h:67:
../../nan/nan_converters_43_inl.h:22:1: error: no viable conversion from 'Local<v8::Context>' to 'v8::Isolate *'
X(Boolean)
^~~~~~~~~~
../../nan/nan_converters_43_inl.h:18:23: note: expanded from macro 'X'
      val->To ## TYPE(isolate->GetCurrentContext())                            \
                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../../../../Library/Caches/node-gyp/16.6.0/include/node/v8.h:3073:37: note: passing argument to parameter 'isolate' here
  Local<Boolean> ToBoolean(Isolate* isolate) const;
                                    ^
In file included from ../src/addon.cpp:4:
In file included from ../../nan/nan.h:202:
In file included from ../../nan/nan_converters.h:67:
../../nan/nan_converters_43_inl.h:40:1: error: no viable conversion from 'Local<v8::Context>' to 'v8::Isolate *'
X(bool, Boolean)
^~~~~~~~~~~~~~~~
../../nan/nan_converters_43_inl.h:37:29: note: expanded from macro 'X'
  return val->NAME ## Value(isolate->GetCurrentContext());                     \
                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../../../../Library/Caches/node-gyp/16.6.0/include/node/v8.h:3083:30: note: passing argument to parameter 'isolate' here
  bool BooleanValue(Isolate* isolate) const;
                             ^
In file included from ../src/addon.cpp:4:
In file included from ../../nan/nan.h:203:
In file included from ../../nan/nan_new.h:189:
../../nan/nan_implementation_12_inl.h:103:42: error: no viable conversion from 'v8::Isolate *' to 'Local<v8::Context>'
  return scope.Escape(v8::Function::New( isolate
                                         ^~~~~~~
../../../../../../Library/Caches/node-gyp/16.6.0/include/node/v8.h:199:7: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'v8::Isolate *' to 'const v8::Local<v8::Context> &' for 1st argument
class Local {
      ^
../../../../../../Library/Caches/node-gyp/16.6.0/include/node/v8.h:199:7: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'v8::Isolate *' to 'v8::Local<v8::Context> &&' for 1st argument
../../../../../../Library/Caches/node-gyp/16.6.0/include/node/v8.h:203:13: note: candidate template ignored: could not match 'Local<type-parameter-0-0>' against 'v8::Isolate *'
  V8_INLINE Local(Local<S> that)
            ^
../../../../../../Library/Caches/node-gyp/16.6.0/include/node/v8.h:347:22: note: explicit constructor is not a candidate
  explicit V8_INLINE Local(T* that) : val_(that) {}
                     ^
../../../../../../Library/Caches/node-gyp/16.6.0/include/node/v8.h:4738:22: note: passing argument to parameter 'context' here
      Local<Context> context, FunctionCallback callback,
                     ^
In file included from ../src/addon.cpp:4:
In file included from ../../nan/nan.h:203:
In file included from ../../nan/nan_new.h:189:
../../nan/nan_implementation_12_inl.h:337:37: error: too few arguments to function call, expected 2, have 1
  return v8::StringObject::New(value).As<v8::StringObject>();
         ~~~~~~~~~~~~~~~~~~~~~      ^
../../../../../../Library/Caches/node-gyp/16.6.0/include/node/v8.h:6174:23: note: 'New' declared here
  static Local<Value> New(Isolate* isolate, Local<String> value);
                      ^
In file included from ../src/addon.cpp:4:
../../nan/nan.h:1034:53: error: too few arguments to function call, single argument 'context' was not specified
      v8::Local<v8::String> string = from->ToString();
                                     ~~~~~~~~~~~~~~ ^
../../../../../../Library/Caches/node-gyp/16.6.0/include/node/v8.h:3035:44: note: 'ToString' declared here
  V8_WARN_UNUSED_RESULT MaybeLocal<String> ToString(
                                           ^
In file included from ../src/addon.cpp:4:
../../nan/nan.h:1044:37: error: cannot initialize a parameter of type 'v8::Isolate *' with an lvalue of type 'char *'
        length_ = string->WriteUtf8(str_, static_cast<int>(len), 0, flags);
                                    ^~~~
../../../../../../Library/Caches/node-gyp/16.6.0/include/node/v8.h:3264:26: note: passing argument to parameter 'isolate' here
  int WriteUtf8(Isolate* isolate, char* buffer, int length = -1,
                         ^
In file included from ../src/addon.cpp:4:
../../nan/nan.h:1818:28: error: no matching member function for call to 'Set'
    New(persistentHandle)->Set(New(key).ToLocalChecked(), value);
    ~~~~~~~~~~~~~~~~~~~~~~~^~~
../../../../../../Library/Caches/node-gyp/16.6.0/include/node/v8.h:3948:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
                                    ^
../../../../../../Library/Caches/node-gyp/16.6.0/include/node/v8.h:3951:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
                                    ^
In file included from ../src/addon.cpp:4:
../../nan/nan.h:1824:28: error: no matching member function for call to 'Set'
    New(persistentHandle)->Set(key, value);
    ~~~~~~~~~~~~~~~~~~~~~~~^~~
../../../../../../Library/Caches/node-gyp/16.6.0/include/node/v8.h:3948:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
                                    ^
../../../../../../Library/Caches/node-gyp/16.6.0/include/node/v8.h:3951:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
                                    ^
In file included from ../src/addon.cpp:4:
../../nan/nan.h:1830:28: error: no matching member function for call to 'Set'
    New(persistentHandle)->Set(index, value);
    ~~~~~~~~~~~~~~~~~~~~~~~^~~
../../../../../../Library/Caches/node-gyp/16.6.0/include/node/v8.h:3948:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
                                    ^
../../../../../../Library/Caches/node-gyp/16.6.0/include/node/v8.h:3951:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
                                    ^
In file included from ../src/addon.cpp:4:
../../nan/nan.h:1836:32: error: no matching member function for call to 'Get'
        New(persistentHandle)->Get(New(key).ToLocalChecked()));
        ~~~~~~~~~~~~~~~~~~~~~~~^~~
../../../../../../Library/Caches/node-gyp/16.6.0/include/node/v8.h:3994:43: note: candidate function not viable: requires 2 arguments, but 1 was provided
  V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
                                          ^
../../../../../../Library/Caches/node-gyp/16.6.0/include/node/v8.h:3997:43: note: candidate function not viable: requires 2 arguments, but 1 was provided
  V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
                                          ^
In file included from ../src/addon.cpp:4:
../../nan/nan.h:1842:48: error: no matching member function for call to 'Get'
    return scope.Escape(New(persistentHandle)->Get(key));
                        ~~~~~~~~~~~~~~~~~~~~~~~^~~
../../../../../../Library/Caches/node-gyp/16.6.0/include/node/v8.h:3994:43: note: candidate function not viable: requires 2 arguments, but 1 was provided
  V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
                                          ^
../../../../../../Library/Caches/node-gyp/16.6.0/include/node/v8.h:3997:43: note: candidate function not viable: requires 2 arguments, but 1 was provided
  V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
                                          ^
In file included from ../src/addon.cpp:4:
../../nan/nan.h:1847:48: error: no matching member function for call to 'Get'
    return scope.Escape(New(persistentHandle)->Get(index));
                        ~~~~~~~~~~~~~~~~~~~~~~~^~~
../../../../../../Library/Caches/node-gyp/16.6.0/include/node/v8.h:3994:43: note: candidate function not viable: requires 2 arguments, but 1 was provided
  V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
                                          ^
../../../../../../Library/Caches/node-gyp/16.6.0/include/node/v8.h:3997:43: note: candidate function not viable: requires 2 arguments, but 1 was provided
  V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
                                          ^
In file included from ../src/addon.cpp:4:
In file included from ../../nan/nan.h:2657:
../../nan/nan_object_wrap.h:24:25: error: no member named 'IsNearDeath' in 'Nan::Persistent<v8::Object>'
    assert(persistent().IsNearDeath());
           ~~~~~~~~~~~~ ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/assert.h:93:25: note: expanded from macro 'assert'
    (__builtin_expect(!(e), 0) ? __assert_rtn(__func__, __FILE__, __LINE__, #e) : (void)0)
                        ^
In file included from ../src/addon.cpp:4:
In file included from ../../nan/nan.h:2657:
../../nan/nan_object_wrap.h:67:18: error: no member named 'MarkIndependent' in 'Nan::Persistent<v8::Object>'
    persistent().MarkIndependent();
    ~~~~~~~~~~~~ ^
../../nan/nan_object_wrap.h:124:26: error: no member named 'IsNearDeath' in 'Nan::Persistent<v8::Object>'
    assert(wrap->handle_.IsNearDeath());
           ~~~~~~~~~~~~~ ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/assert.h:93:25: note: expanded from macro 'assert'
    (__builtin_expect(!(e), 0) ? __assert_rtn(__func__, __FILE__, __LINE__, #e) : (void)0)
                        ^
In file included from ../src/addon.cpp:4:
In file included from ../../nan/nan.h:2753:
../../nan/nan_typedarray_contents.h:34:43: warning: 'GetContents' is deprecated: Use GetBackingStore. See http://crbug.com/v8/9908. [-Wdeprecated-declarations]
      data   = static_cast<char*>(buffer->GetContents().Data()) + byte_offset;
                                          ^
../../../../../../Library/Caches/node-gyp/16.6.0/include/node/v8.h:5592:3: note: 'GetContents' has been explicitly marked deprecated here
  V8_DEPRECATED("Use GetBackingStore. See http://crbug.com/v8/9908.")
  ^
../../../../../../Library/Caches/node-gyp/16.6.0/include/node/v8config.h:409:35: note: expanded from macro 'V8_DEPRECATED'
# define V8_DEPRECATED(message) [[deprecated(message)]]
                                  ^
In file included from ../src/addon.cpp:9:
In file included from ../src/KeccakNISTInterface.h:17:
../src/KeccakSponge.h:23:9: warning: 'ALIGN' macro redefined [-Wmacro-redefined]
#define ALIGN __attribute__ ((aligned(32)))
        ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/i386/param.h:83:9: note: previous definition is here
#define ALIGN(p)        __DARWIN_ALIGN(p)
        ^
../src/addon.cpp:36:64: error: too few arguments to function call, single argument 'context' was not specified
                hashlen = info[0]->IsUndefined() ? 512 : info[0]->Int32Value();
                                                         ~~~~~~~~~~~~~~~~~~~ ^
../../../../../../Library/Caches/node-gyp/16.6.0/include/node/v8.h:3094:40: note: 'Int32Value' declared here
  V8_WARN_UNUSED_RESULT Maybe<int32_t> Int32Value(Local<Context> context) const;
                                       ^
../src/addon.cpp:76:36: error: too few arguments to function call, single argument 'context' was not specified
                constructor.Reset(t->GetFunction());
                                  ~~~~~~~~~~~~~~ ^
../../../../../../Library/Caches/node-gyp/16.6.0/include/node/v8.h:6780:46: note: 'GetFunction' declared here
  V8_WARN_UNUSED_RESULT MaybeLocal<Function> GetFunction(
                                             ^
../src/addon.cpp:77:77: error: too few arguments to function call, single argument 'context' was not specified
                target->Set(Nan::New<String>("SHA3Hash").ToLocalChecked(), t->GetFunction());
                                                                           ~~~~~~~~~~~~~~ ^
../../../../../../Library/Caches/node-gyp/16.6.0/include/node/v8.h:6780:46: note: 'GetFunction' declared here
  V8_WARN_UNUSED_RESULT MaybeLocal<Function> GetFunction(
                                             ^
../src/addon.cpp:97:49: error: too few arguments to function call, single argument 'context' was not specified
                        Local<Object> buffer_obj = info[0]->ToObject();
                                                   ~~~~~~~~~~~~~~~~~ ^
../../../../../../Library/Caches/node-gyp/16.6.0/include/node/v8.h:3047:44: note: 'ToObject' declared here
  V8_WARN_UNUSED_RESULT MaybeLocal<Object> ToObject(
                                           ^
2 warnings and 19 errors generated.
make: *** [Release/obj.target/sha3/src/addon.o] Error 1
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (~/.nvm/versions/node/v16.6.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (node:events:394:28)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12)
gyp ERR! System Darwin 20.5.0
gyp ERR! command "~/.nvm/versions/node/v16.6.0/bin/node" "~/.nvm/versions/node/v16.6.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd ~/bsc/blockchain-oracle/on-chain-oracle/node_modules/sha3
gyp ERR! node -v v16.6.0

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.