Skip to content

Commit

Permalink
Merge pull request #439 from irisnet/develop
Browse files Browse the repository at this point in the history
Merge  Develop into Master
  • Loading branch information
hangts authored Aug 15, 2024
2 parents 63e10c3 + 36abc12 commit bb6bf44
Show file tree
Hide file tree
Showing 6 changed files with 113 additions and 112 deletions.
16 changes: 8 additions & 8 deletions dist/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,24 +40,24 @@
"@babel/preset-env": "^7.24.3",
"@babel/preset-typescript": "^7.9.0",
"@types/jest": "^29.5.11",
"@types/node": "^20.11.30",
"@types/node": "^22.3.0",
"babel-loader": "^9.1.2",
"eslint": "^6.8.0",
"eslint-loader": "^4.0.0",
"gts": "^5.3.1",
"jest": "29.7.0",
"rimraf": "^5.0.7",
"rimraf": "^6.0.1",
"ts-loader": "^9.4.4",
"tslint": "^6.1.0",
"typedoc": "^0.25.7",
"typedoc": "^0.26.5",
"typescript": "^5.4.5"
},
"dependencies": {
"@babel/runtime": "^7.23.8",
"@cosmjs/crypto": "^0.32.3",
"@types/mathjs": "6.0.11",
"@cosmjs/crypto": "^0.32.4",
"@types/mathjs": "^9.4.2",
"@types/ws": "^8.5.10",
"axios": "^1.7.2",
"axios": "^1.7.4",
"bcryptjs": "^2.4.3",
"bech32": "^1.1.3",
"buffer": "^6.0.3",
Expand All @@ -67,14 +67,14 @@
"grpc-web": "^1.2.1",
"is_js": "^0.9.0",
"isomorphic-ws": "^5.0.0",
"mathjs": "12.3.0",
"mathjs": "13.0.3",
"ndjson": "^2.0.0",
"pumpify": "^2.0.1",
"secure-random": "^1.1.2",
"sha256": "^0.2.0",
"sm-crypto-bj": "0.2.2",
"tslib": "^2.6.2",
"tweetnacl": "^1.0.3",
"uuid": "^9.0.0"
"uuid": "^10.0.0"
}
}
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"@babel/preset-env": "^7.24.3",
"@babel/preset-typescript": "^7.9.0",
"@types/jest": "^29.5.11",
"@types/node": "^22.2.0",
"@types/node": "^22.3.0",
"babel-loader": "^9.1.2",
"eslint": "^6.8.0",
"eslint-loader": "^4.0.0",
Expand All @@ -57,7 +57,7 @@
"@cosmjs/crypto": "^0.32.4",
"@types/mathjs": "^9.4.2",
"@types/ws": "^8.5.10",
"axios": "^1.7.2",
"axios": "^1.7.4",
"bcryptjs": "^2.4.3",
"bech32": "^1.1.3",
"buffer": "^6.0.3",
Expand All @@ -77,4 +77,4 @@
"tweetnacl": "^1.0.3",
"uuid": "^10.0.0"
}
}
}
86 changes: 43 additions & 43 deletions test/gov.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { BaseTest } from './basetest';
import * as types from '../src/types';

const timeout = 9999;
describe('Gov Tests', () => {
describe('Query', () => {
test('query proposal', async () => {
Expand All @@ -15,7 +15,7 @@ describe('Gov Tests', () => {
});
test('query proposals', async () => {
await BaseTest.getClient().gov
.queryProposals({},{
.queryProposals({}, {
page_number: 1,
page_size: 100
})
Expand Down Expand Up @@ -102,21 +102,21 @@ describe('Gov Tests', () => {
await BaseTest.getClient().gov
.submitProposal(
{
type:types.ProposalType.Text_Proposal,
value:{
title:'test3',
description:'test3'
type: types.ProposalType.Text_Proposal,
value: {
title: 'test3',
description: 'test3'
}
},
initDeposit,
initDeposit,
BaseTest.baseTx)
.then(res => {
console.log(JSON.stringify(res));
})
.catch(error => {
console.log(error);
});
}
}, timeout
);
});

Expand All @@ -127,11 +127,11 @@ describe('Gov Tests', () => {
await BaseTest.getClient().gov
.submitProposal(
{
type:types.ProposalType.Parameter_Change_Proposal,
value:{
title:'3333',
description:'3333',
changes:[
type: types.ProposalType.Parameter_Change_Proposal,
value: {
title: '3333',
description: '3333',
changes: [
{
subspace: 'staking',
key: 'MaxValidators',
Expand All @@ -140,15 +140,15 @@ describe('Gov Tests', () => {
]
}
},
initDeposit,
initDeposit,
BaseTest.baseTx)
.then(res => {
console.log(JSON.stringify(res));
})
.catch(error => {
console.log(error);
});
}
}, timeout
);
});

Expand All @@ -159,23 +159,23 @@ describe('Gov Tests', () => {
await BaseTest.getClient().gov
.submitProposal(
{
type:types.ProposalType.Community_Pool_Spend_Proposal,
value:{
title:'1111',
description:'1111',
type: types.ProposalType.Community_Pool_Spend_Proposal,
value: {
title: '1111',
description: '1111',
recipient: 'iaa176dd0tgn38grpc8hpxfmwl6sl8jfmkneg8mkxr',
amount: [{denom: 'udev',amount: '100'}]
amount: [{ denom: 'udev', amount: '100' }]
}
},
initDeposit,
initDeposit,
BaseTest.baseTx)
.then(res => {
console.log(JSON.stringify(res));
})
.catch(error => {
console.log(error);
});
}
}, timeout
);
});

Expand All @@ -186,29 +186,29 @@ describe('Gov Tests', () => {
await BaseTest.getClient().gov
.submitProposal(
{
type:types.ProposalType.Software_Upgrade_Proposal,
value:{
title:'6666',
description:'6666',
plan:{
name:'6666',
time:{
seconds: new Date().getTime()/1000 + 3000,
nanos:0
type: types.ProposalType.Software_Upgrade_Proposal,
value: {
title: '6666',
description: '6666',
plan: {
name: '6666',
time: {
seconds: new Date().getTime() / 1000 + 3000,
nanos: 0
},
info:'123123',
info: '123123',
}
}
},
initDeposit,
initDeposit,
BaseTest.baseTx)
.then(res => {
console.log(JSON.stringify(res));
})
.catch(error => {
console.log(error);
});
}
}, timeout
);
});

Expand All @@ -219,21 +219,21 @@ describe('Gov Tests', () => {
await BaseTest.getClient().gov
.submitProposal(
{
type:types.ProposalType.Cancel_Software_Upgrade_Proposal,
value:{
title:'5555',
description:'5555'
type: types.ProposalType.Cancel_Software_Upgrade_Proposal,
value: {
title: '5555',
description: '5555'
}
},
initDeposit,
initDeposit,
BaseTest.baseTx)
.then(res => {
console.log(JSON.stringify(res));
})
.catch(error => {
console.log(error);
});
}
}, timeout
);
});

Expand All @@ -253,7 +253,7 @@ describe('Gov Tests', () => {
.catch(error => {
console.log(error);
});
}
}, timeout
);
});

Expand All @@ -269,7 +269,7 @@ describe('Gov Tests', () => {
.catch(error => {
console.log(error);
});
}
}, timeout
);
});

Expand Down Expand Up @@ -302,7 +302,7 @@ describe('Gov Tests', () => {
.catch(error => {
console.log(error);
});
}
}, timeout
);
});
});
17 changes: 9 additions & 8 deletions test/staking.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { BaseTest } from './basetest';

let timeout = 9999;
describe('Staking Tests', () => {
describe('Query', () => {
test('query delegation', async () => {
Expand Down Expand Up @@ -311,7 +312,7 @@ describe('Staking Tests', () => {
.catch(error => {
console.log(error);
});
});
}, timeout);
});
describe('Unbond', () => {
test('unbond', async () => {
Expand All @@ -327,7 +328,7 @@ describe('Staking Tests', () => {
.catch(error => {
console.log(error);
});
});
}, timeout);
});
describe('Redelegate', () => {
test('redelegate', async () => {
Expand All @@ -344,7 +345,7 @@ describe('Staking Tests', () => {
.catch(error => {
console.log(error);
});
});
}, timeout);
});
describe('TokenizeShares', () => {
test('tokenizeShares', async () => {
Expand Down Expand Up @@ -387,7 +388,7 @@ describe('Staking Tests', () => {
.catch(error => {
console.log(error);
});
});
}, timeout);
});
describe('DisableTokenizeShares', () => {
test('disableTokenizeShares', async () => {
Expand All @@ -401,7 +402,7 @@ describe('Staking Tests', () => {
.catch(error => {
console.log(error);
});
});
}, timeout);
});
describe('EnableTokenizeShares', () => {
test('enableTokenizeShares', async () => {
Expand All @@ -415,7 +416,7 @@ describe('Staking Tests', () => {
.catch(error => {
console.log(error);
});
});
}, timeout);
});
describe('ValidatorBond', () => {
test('validatorBond', async () => {
Expand All @@ -430,7 +431,7 @@ describe('Staking Tests', () => {
.catch(error => {
console.log(error);
});
});
}, timeout);
});
describe('UnbondValidator', () => {
test('unbondValidator', async () => {
Expand All @@ -444,6 +445,6 @@ describe('Staking Tests', () => {
.catch(error => {

})
})
}, timeout)
})
});
Loading

0 comments on commit bb6bf44

Please sign in to comment.