Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

shield some code #1

Open
wants to merge 1 commit into
base: filecoin-signing-tools
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions src/multisigHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -152,19 +152,19 @@ export default class FilecoinMultisigHandler {
Requester: this.envParamsProvider.getFilecoinMainNodeAddress(),
To: to,
Value: amount,
Method: 0,
Method: '3844450837',
Params: '',
};

const proposalHash = filecoin_signer.computeProposalHash(proposal_params);
const receiptMessage = await this.waitTransactionReceipt(txCid);
const recpt = JSON.parse(JSON.stringify(receiptMessage));
// const receiptMessage = await this.waitTransactionReceipt(txCid);
// const recpt = JSON.parse(JSON.stringify(receiptMessage));

const txnid = recpt['ReturnDec']['TxnID'];
console.log(`txnid: ${txnid}`);
// const txnid = recpt['ReturnDec']['TxnID'];
// console.log(`txnid: ${txnid}`);

let approve_params = {
ID: txnid,
ID: txCid,
ProposalHash: proposalHash.toString('base64'),
};

Expand Down
25 changes: 19 additions & 6 deletions src/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,24 +32,37 @@ async function main() {

let minerId = 'f02064263';
let encodeParams = 'RACH/30=';
let txnid = 1;
let txnid = '2019';

// 主节点发起变更owner请求
// let rs = await multisigHandler.initNewMultisigChangeOwner2(
// minerId,
// encodeParams
// );

// 副节点同意变更owner请求
let rs = await multisigHandler.approveMultisigChangeOwner2(
minerId,
txnid,
encodeParams
//
let rs = await multisigHandler.approveMultisigTransfer(
'f02097134',
'1000000000000000000000',
'2019',

);


// let minerId= 'f02182258'
// let encodedParam = 'glgxA6iB70GipHYFgVEQeldoHr/p5Yg1gLQDwlqjKeVoRm45IZSSAZLdNen6iwljqNT02YFYMQOLXt3QCH6aMUjevr+TXUBzrw7lduDNzMDW6vBQG2BEbmzbrzCo8qKEG2u/IftwfEs='

// let rs = await multisigHandler.approveMultisigChangeWorker(
// minerId,
// 1951,
// encodedParam,

// );

console.log(`result is: ${rs}`);
}


main()
.then()
.catch(err => console.log(err))
Expand Down