near / near-cli

General purpose command line tools for interacting with NEAR Protocol
https://docs.near.org
MIT License
193 stars 94 forks source link

The near cli does not have an option to specify a key eg. --key, How we can sign transactions manually using signer private key #1070

Closed madhavbitzees closed 7 months ago

madhavbitzees commented 9 months ago

I am working on NEAR multisig transactions and i deplyed multisig contract using 3 of 3 signer keys. And these 3 signer keys are associated with same account_id witch is samirbitzees.testnet So when we have to call confirm method that time we have to confir an transaction using all 3 signer account_id but in my case all 3 keys are associates with same account_id. So first time my when i call confirm method first time using samirbitzees.testnet and command was this

(near call multisig.samirbitzees.testnet confirm '{"request_id": 0}' --accountId samirbitzees.testnet --gas=300000000000000)

So I got this response :-

(Transaction Id Btqm1pzmojttH7wtJuqRUMveNo2s67SqoCRXLY6z15Yj To see the transaction in the transaction explorer, please open this url in your browser https://explorer.testnet.near.org/transactions/Btqm1pzmojttH7wtJuqRUMveNo2s67SqoCRXLY6z15Yj true)

means this has been conform first time but when i am trying it for second confirmation it is telling ("Smart contract panicked: Already confirmed this request with this key") And near token has not been transfered I think We need to confirm for other two signers also but I cant. Can you guise guide me how i can cofirm this multisig transaction. or any correction for my steps.

gagdiez commented 7 months ago

near call now has the option --privateKey to pass a private key to be used to sign