Skip to content

Commit

Permalink
添加和智能合约交互的时候用哪个地址交互
Browse files Browse the repository at this point in the history
  • Loading branch information
robotchangzhang committed Oct 15, 2022
1 parent f6d0978 commit f10cc4f
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ node_modules
duoxiancheng - 副本.js
*.prikey
cmd.exe.lnk
img/11.jpg_temp.bmp
22 changes: 20 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,17 @@ <h3 class="card-title">4. 按照合约信息交互</h3>
</select>
<div id="paralist" class="mb-2">
</div>

<div class="mb-2">
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" name="webjiaohuaddress" value="address2" id="webjiaohuaddress2"
>使用2的地址交互</input>
</div>
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" name="webjiaohuaddress" value="address4" id="webjiaohuaddress4"
>使用4的地址交互</input>
</div>
</div>
<button class="btn btn-warning" onclick="exce()">执行</button>
</div>
</div>
Expand Down Expand Up @@ -190,6 +201,8 @@ <h4 class="card-title">日志</h4>

document.querySelector("#contractmodel").checked = true;
changejiaohutype("contractmodel");
document.querySelector("#webjiaohuaddress2").checked = true;


}
init();
Expand Down Expand Up @@ -508,9 +521,14 @@ <h4 class="card-title">日志</h4>

//给后台提交数组
if (useabi != null) {


const nftaddress = document.querySelector('#nftaddress').value;

var nftaddress = document.querySelector('#nftaddress').value;
const address2 = document.querySelector("#webjiaohuaddress2").checked ;
if(address2== false)
{
nftaddress = document.querySelector('#Contractaddress').value;
}
const gas = document.querySelector('#qianggougas').value;
const gaslimit = document.querySelector('#qianggougaslimit').value;
const neth = document.querySelector('#neth').value;
Expand Down

0 comments on commit f10cc4f

Please sign in to comment.