Skip to content

Commit

Permalink
Merge pull request #52 from arcana-network/production-release-v0.1.1
Browse files Browse the repository at this point in the history
Production release v0.1.1
  • Loading branch information
shrinathprabhu authored Feb 15, 2022
2 parents 8b47677 + 8ef3dd1 commit 274503e
Show file tree
Hide file tree
Showing 13 changed files with 239 additions and 225 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "arcana-developer-dashboard",
"version": "0.1.0",
"version": "0.1.1",
"private": true,
"scripts": {
"dev": "vite",
Expand Down
197 changes: 62 additions & 135 deletions public/tx-sign.js
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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,
Expand All @@ -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";
Expand Down Expand Up @@ -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",
Expand All @@ -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){
Expand Down
56 changes: 14 additions & 42 deletions src/components/app-configure/AppChain.vue
Original file line number Diff line number Diff line change
Expand Up @@ -34,39 +34,12 @@
justify="space-between"
class="flex-grow"
>
<v-stack
direction="row"
justify="space-between"
class="width-100"
>
<span class="body-1"> Ethereum </span>
<v-switch
:value="chainType === 'ethereum'"
@checked="changeChainType($event, 'ethereum')"
/>
</v-stack>
<v-stack
direction="row"
justify="space-between"
class="width-100"
>
<span class="body-1"> Polygon </span>
<v-switch
:value="chainType === 'polygon'"
@checked="changeChainType($event, 'polygon')"
/>
</v-stack>
<v-stack
direction="row"
justify="space-between"
class="width-100"
>
<span class="body-1"> Binance </span>
<v-switch
:value="chainType === 'binance'"
@checked="changeChainType($event, 'binance')"
/>
</v-stack>
<v-radio-group
:options="chains"
v-model="selectedChain"
name="ChainSelection"
@update:modelValue="changeChainType"
/>
</v-stack>
</v-card>
</v-stack>
Expand Down Expand Up @@ -97,23 +70,24 @@ import { useStore } from "vuex";
import VButton from "../lib/VButton/VButton.vue";
import VCard from "../lib/VCard/VCard.vue";
import VStack from "../lib/VStack/VStack.vue";
import VSwitch from "../lib/VSwitch/VSwitch.vue";
import VRadioGroup from "../lib/VRadioGroup/VRadioGroup.vue";
import { chains } from "../../utils/constants";
export default {
name: "ConfigureAppChainType",
props: {
isConfigured: Boolean,
store: Object,
},
components: { VCard, VButton, VSwitch, VStack },
components: { VCard, VButton, VRadioGroup, VStack },
setup(props) {
const store = useStore();
const env = computed(() => {
return store.getters.env;
});
let chainType = computed(() => {
let selectedChain = computed(() => {
return store.getters[env.value + "/chainType"];
});
Expand All @@ -125,18 +99,16 @@ export default {
});
}
function changeChainType({ value: isSelected }, chainType) {
store.dispatch(
env.value + "/updateChainType",
isSelected ? chainType : ""
);
function changeChainType(selectedChain) {
store.dispatch(env.value + "/updateChainType", selectedChain);
if (props.isConfigured && !store.getters.onConfigChange) {
store.dispatch("configChangeDetected");
}
}
return {
chainType,
chains,
selectedChain,
changeChainType,
onLearnMoreClicked,
};
Expand Down
Loading

0 comments on commit 274503e

Please sign in to comment.