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

sending from multisig tron address failed #70

Closed
ikamran opened this issue Jan 20, 2023 · 9 comments
Closed

sending from multisig tron address failed #70

ikamran opened this issue Jan 20, 2023 · 9 comments

Comments

@ikamran
Copy link

ikamran commented Jan 20, 2023

Hello,

I have an issue sending from a multisign address, what cause to get that error?
on the web i can send by using that private key but using tronpy, It seems i miss something
what is the correct way?

contract.functions.transfer(TC2r7dPEfMaMt8ToJ3rQ7SuVhX391cFhv5, 100_000_000)
.with_owner("TGihHToJJ9B1NFi2Vx5bTM8muRmsbdAaJ8")  # address of the private key
.fee_limit(20_000_000)
.build()
.sign(priv_key)

print(txn.txid)
print(txn.broadcast().wait())
tronpy.exceptions.BadKey: ('provided private key is not in the permission list', 'provided TGihHToJJ9B1NFi2Vx5bTM8muRmsbdAaJ8', "required {'keys': [{'address': '4163cdf133fcf4beb05881fb4b5d2b0ccf938a52af', 'w
eight': 1}], 'threshold': 1, 'permission_name': 'owner'}")
@MrNaif2018
Copy link
Collaborator

Is it a special address, not a regular one? Could you provide me with the steps on how to create one to test it?

@MrNaif2018
Copy link
Collaborator

Closing in favour of #50

@ikamran
Copy link
Author

ikamran commented Feb 3, 2023

Is it a special address, not a regular one? Could you provide me with the steps on how to create one to test it?

first I created a multi signature address by and set 2 of 3 for sending funds
now I have a multi signature address which nobody can send money,
I want to know how can I send money from multi signature address by using tronpy?

@ikamran
Copy link
Author

ikamran commented Feb 3, 2023

Is it a special address, not a regular one? Could you provide me with the steps on how to create one to test it?

first I changed the owner of

@MrNaif2018
Copy link
Collaborator

I want to know how can I send money from multi signature address by using tronpy?

I think you can craft a tx, i.e. tx = somecommand.build()
Then do
tx=tx.sign(FIRST_PRIVATE_KEY).sign(SECOND_PRIVATE_KEY)

@ikamran
Copy link
Author

ikamran commented Feb 3, 2023

actually I did it by sign it by one of PRIVATE_KEYs which result was what i sent above
but as you know I can not sign from other ones
I want to sign it myself broadcast it and wait until my coworkers sign it manually
it's what I am looking for

@MrNaif2018
Copy link
Collaborator

Erm, no, that's not how it works...

You can only broadcast finalized transaction with all signatures
What you can do, is .sign() with your key, then use .to_json() or similar to send to your colleagues, they will do Transaction.from_json(json).sign(THEIR_KEY) and then broadcast

@ikamran
Copy link
Author

ikamran commented Feb 3, 2023

Like I am understanding it now!!! maybe :)
so how things work on tronscan website, in there after you create new transaction
others can see there are transactions to sign in their account

@MrNaif2018
Copy link
Collaborator

They just store this json for later signing by other parties

@MrNaif2018 MrNaif2018 mentioned this issue Feb 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants