Git Product home page Git Product logo

cljs-solidity-sha3's Introduction

cljs-solidity-sha3

Build Status

Clojurescript implementation of Solidity sha3 function. Web3.js sha3 function works bit differently that one in Solidity, that's why this is needed.

Installation

Add Clojars Project into your project.clj
Include [cljs-solidity-sha3.core] in your CLJS file

Usage

(ns my.namespace
  (:require
    [cljs-web3-next.core :as web3]
    [cljs-solidity-sha3.core :refer [solidity-sha3]]))

(def provider (web3/create-web3 "http://localhost:8549"))
    
(solidity-sha3 provider "0x7d10b16dd1f9e0df45976d402879fb496c114936" 6 "abc")
;; => "0x789357bc7419b62048fc1339ce448db0836603d3c0738082337b68e2b17d26a6"

Development

  1. Setup local testnet
  • spin up a testnet instance in a separate shell
    • npx truffle develop
  1. Run test suite:
  • Browser
    • npx shadow-cljs watch test-browser
    • open https://d0x-vm:6502
    • tests refresh automatically on code change
  • CI (Headless Chrome, Karma)
    • npx shadow-cljs compile test-ci
    • CHROME_BIN=`which chromium-browser` npx karma start karma.conf.js --single-run
  1. Build
  • on merging pull request to master on GitHub, CI builds & publishes new version automatically
  • update version in build.clj
  • to build: clj -T:build jar
  • to release: clj -T:build deploy (needs CLOJARS_USERNAME and CLOJARS_PASSWORD env vars to be set)

cljs-solidity-sha3's People

Contributors

ginesdt avatar madvas avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

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.