Skip to content

Commit

Permalink
fix: switch abi to js files
Browse files Browse the repository at this point in the history
  • Loading branch information
satello committed Oct 22, 2020
1 parent 6d61107 commit a9538b2
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 40 deletions.
21 changes: 0 additions & 21 deletions package-lock.json

This file was deleted.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,6 @@
"js-sha3": "^0.8.0",
"lodash": "^4.17.4",
"multihashes": "^0.4.14",
"web3": "^1.3.0"
"web3": "^1.2.11"
}
}
2 changes: 1 addition & 1 deletion src/abis/arbitrable.json → src/abis/arbitrable.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
export default {
"abi": [
{
"constant": true,
Expand Down
2 changes: 1 addition & 1 deletion src/abis/arbitrator.json → src/abis/arbitrator.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
export default {
"abi": [
{
"constant": true,
Expand Down
8 changes: 5 additions & 3 deletions src/standards/Arbitrable.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import ArbitrableJSONInterface from '../abis/arbitrable.json'
import ArbitrableJSONInterface from '../abis/arbitrable'

import * as errorConstants from '../constants/error'
import EventListener from '../utils/EventListener'
Expand All @@ -21,8 +21,10 @@ class Arbitrable extends StandardContract {
* @param {string} contractAddress - Address of the Arbitrable contract.
* @returns {object} web3 contract instance
*/
_loadContractInstance = contractAddress =>
new this.web3.eth.Contract(ArbitrableJSONInterface.abi, contractAddress)
_loadContractInstance = contractAddress => {
console.log(ArbitrableJSONInterface.abi)
return new this.web3.eth.Contract(ArbitrableJSONInterface.abi, contractAddress)
}

/**
* Fetch all Evidence submitted to the contract.
Expand Down
2 changes: 1 addition & 1 deletion src/standards/Arbitrator.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import ArbitratorContractInterface from '../abis/arbitrator.json'
import ArbitratorContractInterface from '../abis/arbitrator'

import EventListener from '../utils/EventListener'
import isRequired from '../utils/isRequired'
Expand Down
2 changes: 0 additions & 2 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@ module.exports = {
umdNamedDefine: true,
library: 'Archon'
},

devtool: 'source-map',

module: {
rules: [
{
Expand Down
20 changes: 10 additions & 10 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -681,14 +681,14 @@
integrity sha1-aaI6OtKcrwCX8G7aWbNh7i8GOfY=

"@types/node@*":
version "14.14.1"
resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.1.tgz#b8d6e8a84b119ae51fd0593c71eb3a9dd31fea4e"
integrity sha512-D2/Xwp9c49JhIWq7SIrdvoYyGdq6yXkr5FTldN4rus9XljYFBul6P2epAID8xepOpL4ffcx09C05FZGK/1AIkw==
version "14.14.2"
resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.2.tgz#d25295f9e4ca5989a2c610754dc02a9721235eeb"
integrity sha512-jeYJU2kl7hL9U5xuI/BhKPZ4vqGM/OmK6whiFAXVhlstzZhVamWhDSmHyGLIp+RVyuF9/d0dqr2P85aFj4BvJg==

"@types/node@^12.12.6":
version "12.12.70"
resolved "https://registry.yarnpkg.com/@types/node/-/node-12.12.70.tgz#adf70b179c3ee17620215ee4cb5c68c95f7c37ec"
integrity sha512-i5y7HTbvhonZQE+GnUM2rz1Bi8QkzxdQmEv1LKOv4nWyaQk/gdeiTApuQR3PDJHX7WomAbpx2wlWSEpxXGZ/UQ==
version "12.19.0"
resolved "https://registry.yarnpkg.com/@types/node/-/node-12.19.0.tgz#a0f841c195bdbe0b5070da9278b3e22189e8c8f6"
integrity sha512-4BVAE9yp5DU3ISqBInsaRp9J474HWNaNVs8eZ1Far3dI1MwS3Wk0EvBRMM4xBh3Oz+c05hUgJmcbtAVmG8bv7w==

"@types/normalize-package-data@^2.4.0":
version "2.4.0"
Expand Down Expand Up @@ -8162,9 +8162,9 @@ nano-json-stream-parser@^0.1.2:
integrity sha1-DMj20OK2IrR5xA1JnEbWS3Vcb18=

nanoid@^3.1.12:
version "3.1.12"
resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.1.12.tgz#6f7736c62e8d39421601e4a0c77623a97ea69654"
integrity sha512-1qstj9z5+x491jfiC4Nelk+f8XBad7LN20PmyWINJEMRSf3wcAjAWysw1qaA8z6NSKe2sjq1hRSDpBH5paCb6A==
version "3.1.13"
resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.1.13.tgz#7f4f0729ab8a824291deb72b0d10cf357bc7563c"
integrity sha512-oYL7jWZUdScASxYOrcwE8EvISFGzO3/1g+t56vCyR0s2nrpmBcOc7hTAFJaVf6HMyEPJrnNelnjRnMN6KZnCPA==

nanomatch@^1.2.9:
version "1.2.13"
Expand Down Expand Up @@ -12085,7 +12085,7 @@ web3-utils@1.3.0:
underscore "1.9.1"
utf8 "3.0.0"

web3@^1.3.0:
web3@^1.2.11:
version "1.3.0"
resolved "https://registry.yarnpkg.com/web3/-/web3-1.3.0.tgz#8fe4cd6e2a21c91904f343ba75717ee4c76bb349"
integrity sha512-4q9dna0RecnrlgD/bD1C5S+81Untbd6Z/TBD7rb+D5Bvvc0Wxjr4OP70x+LlnwuRDjDtzBwJbNUblh2grlVArw==
Expand Down

0 comments on commit a9538b2

Please sign in to comment.