Skip to content

Commit 643edd7

Browse files
committed
modify smartContractTest.js files
1 parent 03cd1e6 commit 643edd7

3 files changed

Lines changed: 5 additions & 7 deletions

File tree

src/index.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -391,9 +391,7 @@ ChainsqlAPI.prototype.grant = function (name, user, flags, publicKey) {
391391

392392
ChainsqlAPI.prototype.getTransactions = function (address, opts, cb) {
393393
if (!opts) {
394-
opts = {
395-
396-
}
394+
opts = {}
397395
};
398396
if ((typeof cb) != 'function') {
399397
return this.api.getTransactions(address, opts)

test/smartContractTest.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ function callContract(){
4747
//callContractWithMsgValue(myContract);
4848

4949
/*get function encodeABI*/
50-
//getFuncEncodeABI(myContract);
50+
// getFuncEncodeABI(myContract);
5151

5252
/*get contract value*/
5353
//getContractValue(myContract);
@@ -99,7 +99,7 @@ function deployContract(){
9999
}, function (err, res) {
100100
err ? console.log(err) : console.log(res);
101101

102-
// myContract.methods.setMem(16).send({
102+
// myContract.methods.setMem(16).submit({
103103
// Gas: 500000
104104
// }, (err, res) => {
105105
// err ? console.log(err) : console.log(res);
@@ -119,7 +119,7 @@ async function deployContractAwait(){
119119
});
120120

121121
console.log(deployRes);
122-
myContract.methods.setMem(16).send({
122+
myContract.methods.setMem(16).submit({
123123
Gas:500000
124124
}, (err, res) => {
125125
err ? console.log(err) : console.log(res);

test/test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ async function main(){
3737
try {
3838
await c.connect('ws://127.0.0.1:6008');
3939

40-
console.log('连接成功')
40+
console.log('连接成功');
4141

4242
c.as(owner);
4343

0 commit comments

Comments
 (0)