This commit is contained in:
Frank.R.Wu 2021-12-11 19:15:13 +08:00
parent 37476bd506
commit 0dfa8a555a

View File

@ -174,7 +174,7 @@ function importContractInstanceCodeByDOI() {
function openInClient() { function openInClient() {
let path = document.location.pathname.lastIndexOf("/ide"); let path = document.location.pathname.lastIndexOf("/ide");
if (path>0) if (path > 0)
path = document.location.pathname.substr(0, path + 1); path = document.location.pathname.substr(0, path + 1);
else path = "/"; else path = "/";
window.open(isBaaS ? window.open(isBaaS ?
@ -222,15 +222,15 @@ function executeContract() {
request.contractID = contract.id; request.contractID = contract.id;
request.operation = contract.exportedFunctions[selectedFunction.value].functionName; request.operation = contract.exportedFunctions[selectedFunction.value].functionName;
const arg = executeContractArgInput.value; const arg = executeContractArgInput.value;
const gasLimit = $('#gasLimit').val()/1; const gasLimit = $('#gasLimit').val() / 1;
request.pubkey = sm2Key.publicKey; request.pubkey = sm2Key.publicKey;
var toSign = request.contractID + "|" let toSign = request.contractID + "|"
+ request.operation + "|" + arg ; + request.operation + "|" + arg;
if (gasLimit>0){ if (gasLimit > 0) {
request.gasLimit = gasLimit; request.gasLimit = gasLimit;
toSign+= "|" + gasLimit; toSign += "|" + gasLimit;
} }
toSign+= "|" + sm2Key.publicKey; toSign += "|" + sm2Key.publicKey;
request.signature = sm2.doSignature( request.signature = sm2.doSignature(
toSign, toSign,
sm2Key.privateKey, sm2Key.privateKey,