update rightmenu.js

This commit is contained in:
root 2021-06-29 17:12:04 +08:00
parent ce3609904e
commit 66e50b677b
4 changed files with 2114 additions and 2115 deletions

View File

@ -35,6 +35,11 @@
<!--script src="./js/echartsTheme.js"></script -->
<!-- script src="./js/echarts-gl.min.js"></script -->
<script src="./js/sm2.js"></script>
<script src="./js/sm3.js"></script>
<script src="./js/sm4.js"></script>
<script src="./js/sm/index.js"></script>
<script src="./js/d3.v5.min.js"></script>
<!-- script src="./js/dagre-d3.min.js"></script -->
<script src="./js/tipsy/jquery.tipsy.min.js"></script>

View File

@ -215,31 +215,24 @@ var executeContract = function () {
}
var key = pubkeyDialogVue.sm2KeyList[pubkeyDialogVue.selectedSM2Key];
var sm2Key = JSON.parse(key.sm2Key);
var request = {};
request.action = "executeContract";
request.requestID = new Date().getTime() + "_"
+ Math.floor(Math.random() * 10000);
var contract = mainVue.contracts[selectedContractAtExecute.value];
request.contractID = contract.id;
var arg = {};
arg.action = contract.exportedFunctions[selectedFunction.value].functionName;
arg.arg = executeContractArgInput.value;
request.operation = contract.exportedFunctions[selectedFunction.value].functionName;
arg = executeContractArgInput.value;
if ($('#gasLimit').val() == undefined || $('#gasLimit').val() == "") {
arg.gasLimit = '1000';
request.gasLimit = '1000';
} else {
arg.gasLimit = $('#gasLimit').val();
request.gasLimit = $('#gasLimit').val();
}
// console.log("[arg.gasLimit]"+arg.gasLimit);
request.pubkey = sm2Key.publicKey;
// request.isDebug = executeContractAsDebug.checked;
request.signature = sm2.doSignature(request.contractID + "|" + arg.action
+ "|" + arg.arg + "|" + sm2Key.publicKey, sm2Key.privateKey, {hash: true, der: true});
request.arg = JSON.stringify(arg);
request.signature = sm2.doSignature(request.contractID + "|" + request.operation
+ "|" + arg + "|" + sm2Key.publicKey, sm2Key.privateKey, {hash: true, der: true});
request.arg = arg;
localStorage.setItem("persisArg", JSON.stringify(request));
global.wssocket.send(JSON.stringify(request));
};

2102
js/sm2.js

File diff suppressed because one or more lines are too long

2101
js/sm2.js.back Executable file

File diff suppressed because it is too large Load Diff