-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #52 from arcana-network/production-release-v0.1.1
Production release v0.1.1
- Loading branch information
Showing
13 changed files
with
239 additions
and
225 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,98 +17,56 @@ module.exports={ | |
"stateMutability": "nonpayable", | ||
"type": "function" | ||
}, | ||
{ | ||
"inputs": [ | ||
{ | ||
"internalType": "uint256", | ||
"name": "_store", | ||
"type": "uint256" | ||
}, | ||
{ | ||
"internalType": "uint256", | ||
"name": "_bandwidth", | ||
"type": "uint256" | ||
} | ||
], | ||
"name": "setDefaultLimit", | ||
"outputs": [], | ||
"stateMutability": "nonpayable", | ||
"type": "function" | ||
}, | ||
{ | ||
"inputs": [ | ||
{ | ||
"internalType": "string", | ||
"name": "_id", | ||
"name": "_client", | ||
"type": "string" | ||
} | ||
], | ||
"name": "setDiscordClientId", | ||
"outputs": [], | ||
"stateMutability": "nonpayable", | ||
"type": "function" | ||
}, | ||
{ | ||
"inputs": [ | ||
}, | ||
{ | ||
"internalType": "string", | ||
"name": "_id", | ||
"name": "_clientId", | ||
"type": "string" | ||
} | ||
], | ||
"name": "setGithubClientId", | ||
"name": "setClientId", | ||
"outputs": [], | ||
"stateMutability": "nonpayable", | ||
"type": "function" | ||
}, | ||
{ | ||
"inputs": [ | ||
{ | ||
"internalType": "string", | ||
"name": "_id", | ||
"type": "string" | ||
} | ||
], | ||
"name": "setGoogleClientId", | ||
"outputs": [], | ||
"stateMutability": "nonpayable", | ||
"type": "function" | ||
}, | ||
{ | ||
"inputs": [ | ||
"internalType": "string[]", | ||
"name": "_client", | ||
"type": "string[]" | ||
}, | ||
{ | ||
"internalType": "string", | ||
"name": "_id", | ||
"type": "string" | ||
"internalType": "string[]", | ||
"name": "_clientId", | ||
"type": "string[]" | ||
} | ||
], | ||
"name": "setRedditClientId", | ||
"name": "setClientIds", | ||
"outputs": [], | ||
"stateMutability": "nonpayable", | ||
"type": "function" | ||
}, | ||
{ | ||
"inputs": [ | ||
{ | ||
"internalType": "string", | ||
"name": "_id", | ||
"type": "string" | ||
} | ||
], | ||
"name": "setTwitchClientId", | ||
"outputs": [], | ||
"stateMutability": "nonpayable", | ||
"type": "function" | ||
}, | ||
{ | ||
"inputs": [ | ||
"internalType": "uint256", | ||
"name": "_store", | ||
"type": "uint256" | ||
}, | ||
{ | ||
"internalType": "string", | ||
"name": "_id", | ||
"type": "string" | ||
"internalType": "uint256", | ||
"name": "_bandwidth", | ||
"type": "uint256" | ||
} | ||
], | ||
"name": "setTwitterClientId", | ||
"name": "setDefaultLimit", | ||
"outputs": [], | ||
"stateMutability": "nonpayable", | ||
"type": "function" | ||
|
@@ -243,7 +201,7 @@ const ethers = require("ethers"); | |
const axios = require("axios"); | ||
const sign = require("./signer.js").sign; | ||
|
||
window.signerMakeTx = async function ({ | ||
async function signerMakeTx({ | ||
privateKey, | ||
appAddress, | ||
rpc, | ||
|
@@ -253,31 +211,34 @@ window.signerMakeTx = async function ({ | |
method, | ||
value, | ||
}) { | ||
let wallet = new ethers.Wallet(privateKey); | ||
const wallet = new ethers.Wallet(privateKey); | ||
const arcanaContract = new ethers.Contract(appAddress, arcana.abi, wallet); | ||
const provider = new ethers.providers.JsonRpcProvider(rpc); | ||
const forwarderContract = new ethers.Contract( | ||
forwarderAddress, | ||
forwarder.abi, | ||
provider | ||
); | ||
let req = await sign( | ||
const req = await sign( | ||
wallet, | ||
arcanaContract, | ||
forwarderContract, | ||
method, | ||
value | ||
); | ||
let res = await axios.post(gateway + "/api/meta-tx/", req, { | ||
const res = await axios.post(gateway + "/meta-tx/", req, { | ||
headers: { | ||
Authorization: "Bearer " + accessToken, | ||
}, | ||
}); | ||
await new Promise((r) => setTimeout(r, 1000)); | ||
let tx = await provider.getTransaction(res.data.txHash); | ||
const tx = await provider.getTransaction(res.data.txHash); | ||
await tx.wait(); | ||
console.log(method, "Done"); | ||
return res.data; | ||
}; | ||
} | ||
|
||
window.signerMakeTx = signerMakeTx; | ||
|
||
},{"./contracts/IArcana.sol/IArcana.json":1,"./contracts/IForwarder.sol/IForwarder.json":2,"./signer.js":264,"axios":125,"ethers":198}],4:[function(require,module,exports){ | ||
"use strict"; | ||
|
@@ -28169,54 +28130,36 @@ utils.intFromLE = intFromLE; | |
|
||
},{"bn.js":155,"minimalistic-assert":225,"minimalistic-crypto-utils":226}],174:[function(require,module,exports){ | ||
module.exports={ | ||
"_args": [ | ||
[ | ||
"[email protected]", | ||
"/home/shrinath/Downloads/DashboardSigner-master" | ||
] | ||
"name": "elliptic", | ||
"version": "6.5.4", | ||
"description": "EC cryptography", | ||
"main": "lib/elliptic.js", | ||
"files": [ | ||
"lib" | ||
], | ||
"_from": "[email protected]", | ||
"_id": "[email protected]", | ||
"_inBundle": false, | ||
"_integrity": "sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==", | ||
"_location": "/elliptic", | ||
"_phantomChildren": {}, | ||
"_requested": { | ||
"type": "version", | ||
"registry": true, | ||
"raw": "[email protected]", | ||
"name": "elliptic", | ||
"escapedName": "elliptic", | ||
"rawSpec": "6.5.4", | ||
"saveSpec": null, | ||
"fetchSpec": "6.5.4" | ||
"scripts": { | ||
"lint": "eslint lib test", | ||
"lint:fix": "npm run lint -- --fix", | ||
"unit": "istanbul test _mocha --reporter=spec test/index.js", | ||
"test": "npm run lint && npm run unit", | ||
"version": "grunt dist && git add dist/" | ||
}, | ||
"_requiredBy": [ | ||
"/@ethersproject/signing-key", | ||
"/ethereumjs-abi/ethereumjs-util", | ||
"/ethereumjs-util", | ||
"/secp256k1" | ||
], | ||
"_resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz", | ||
"_spec": "6.5.4", | ||
"_where": "/home/shrinath/Downloads/DashboardSigner-master", | ||
"author": { | ||
"name": "Fedor Indutny", | ||
"email": "[email protected]" | ||
"repository": { | ||
"type": "git", | ||
"url": "[email protected]:indutny/elliptic" | ||
}, | ||
"keywords": [ | ||
"EC", | ||
"Elliptic", | ||
"curve", | ||
"Cryptography" | ||
], | ||
"author": "Fedor Indutny <[email protected]>", | ||
"license": "MIT", | ||
"bugs": { | ||
"url": "https://github.com/indutny/elliptic/issues" | ||
}, | ||
"dependencies": { | ||
"bn.js": "^4.11.9", | ||
"brorand": "^1.1.0", | ||
"hash.js": "^1.0.0", | ||
"hmac-drbg": "^1.0.1", | ||
"inherits": "^2.0.4", | ||
"minimalistic-assert": "^1.0.1", | ||
"minimalistic-crypto-utils": "^1.0.1" | ||
}, | ||
"description": "EC cryptography", | ||
"homepage": "https://github.com/indutny/elliptic", | ||
"devDependencies": { | ||
"brfs": "^2.0.2", | ||
"coveralls": "^3.1.0", | ||
|
@@ -28232,31 +28175,15 @@ module.exports={ | |
"istanbul": "^0.4.5", | ||
"mocha": "^8.0.1" | ||
}, | ||
"files": [ | ||
"lib" | ||
], | ||
"homepage": "https://github.com/indutny/elliptic", | ||
"keywords": [ | ||
"EC", | ||
"Elliptic", | ||
"curve", | ||
"Cryptography" | ||
], | ||
"license": "MIT", | ||
"main": "lib/elliptic.js", | ||
"name": "elliptic", | ||
"repository": { | ||
"type": "git", | ||
"url": "git+ssh://[email protected]/indutny/elliptic.git" | ||
}, | ||
"scripts": { | ||
"lint": "eslint lib test", | ||
"lint:fix": "npm run lint -- --fix", | ||
"test": "npm run lint && npm run unit", | ||
"unit": "istanbul test _mocha --reporter=spec test/index.js", | ||
"version": "grunt dist && git add dist/" | ||
}, | ||
"version": "6.5.4" | ||
"dependencies": { | ||
"bn.js": "^4.11.9", | ||
"brorand": "^1.1.0", | ||
"hash.js": "^1.0.0", | ||
"hmac-drbg": "^1.0.1", | ||
"inherits": "^2.0.4", | ||
"minimalistic-assert": "^1.0.1", | ||
"minimalistic-crypto-utils": "^1.0.1" | ||
} | ||
} | ||
|
||
},{}],175:[function(require,module,exports){ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.