-
Notifications
You must be signed in to change notification settings - Fork 188
Create (raw) Transaction builder class #886
Comments
@ixje Could you take a look at https://github.com/jseagrave21/neo-python/blob/raw-transaction-class/neo/Core/TX/RawTransaction.py and let me know what you think? You can see from the commit description that I haven't included any coverage but I wanted to get your initial reaction before I kept working. |
At first glance looks good. I can't say if the function names might need to be renamed later on though to be inline with the rest of the exposed lightweight API. I had intentionally put #885 above this issue on the project board because I expected to learn from there the API's and naming style we want to support (I don't have the full picture as this point either). Some random things I noticed in your current code:
|
@ixje Thank you for the quick feedback. I will keep working on this and hopefully I will be able to merge it with the exposed lightweight API when it is ready. |
Token Transfers are now supported. See ac92993 |
Some things I believe we should do at minimum
To me,
Other things that we have to keep in mind until the other objective is realised:
|
Hello, I agree with @ixje, specially about this:
I think almost everyone should develop using their own private network, so I think this feature is absolutely important. Also:
I'm still having trouble when I use it in a loop statement, @jseagrave21 please contact me in slack! It's probably my fault, but I could use some help to find out what is going on. |
- every comment from CityOfZion#886 (comment) is addressed - since each instance is a RawTransaction, I needed to reference the unique methods from the ClaimTransaction and InvocationTransaction classes, which includes SerializeExclusiveData and DeserializeExclusiveData - from CityOfZion#886 (comment) - I have not yet found a suitable replacement for the name `SourceAddress` - I have not yet found a suitable method for integrating the TxType into the constructor as I am unsure where I would put TransactionType.ContractTransaction - WIF is already supported. Swapped variable name to NEP2orWIF per feedback
- every comment from CityOfZion#886 (comment) is addressed - since each instance is a RawTransaction, I needed to reference the unique methods from the ClaimTransaction and InvocationTransaction classes, which includes SerializeExclusiveData and DeserializeExclusiveData - from CityOfZion#886 (comment) - I have not yet found a suitable replacement for the name `SourceAddress` - I have not yet found a suitable method for integrating the TxType into the constructor as I am unsure where I would put TransactionType.ContractTransaction - WIF is already supported. Swapped variable name to NEP2orWIF per feedback
- every comment from CityOfZion#886 (comment) is addressed - since each instance is a RawTransaction, I needed to reference the unique methods from the ClaimTransaction and InvocationTransaction classes, which includes SerializeExclusiveData and DeserializeExclusiveData - from CityOfZion#886 (comment) - I have not yet found a suitable replacement for the name `SourceAddress` - I have not yet found a suitable method for integrating the TxType into the constructor as I am unsure where I would put TransactionType.ContractTransaction - WIF is already supported. Swapped variable name to NEP2orWIF per feedback
- every comment from CityOfZion#886 (comment) is addressed - since each instance is a RawTransaction, I needed to reference the unique methods from the ClaimTransaction and InvocationTransaction classes, which includes SerializeExclusiveData and DeserializeExclusiveData - from CityOfZion#886 (comment) - I have not yet found a suitable replacement for the name `SourceAddress` - I have not yet found a suitable method for integrating the TxType into the constructor as I am unsure where I would put TransactionType.ContractTransaction - WIF is already supported. Swapped variable name to NEP2orWIF per feedback
- every comment from CityOfZion#886 (comment) is addressed - since each instance is a RawTransaction, I needed to reference the unique methods from the ClaimTransaction and InvocationTransaction classes, which includes SerializeExclusiveData and DeserializeExclusiveData - from CityOfZion#886 (comment) - I have not yet found a suitable replacement for the name `SourceAddress` - I have not yet found a suitable method for integrating the TxType into the constructor as I am unsure where I would put TransactionType.ContractTransaction - WIF is already supported. Swapped variable name to NEP2orWIF per feedback
- every comment from CityOfZion#886 (comment) is addressed - since each instance is a RawTransaction, I needed to reference the unique methods from the ClaimTransaction and InvocationTransaction classes, which includes SerializeExclusiveData and DeserializeExclusiveData - from CityOfZion#886 (comment) - I have not yet found a suitable replacement for the name `SourceAddress` - I have not yet found a suitable method for integrating the TxType into the constructor as I am unsure where I would put TransactionType.ContractTransaction - WIF is already supported. Swapped variable name to NEP2orWIF per feedback
@ixje offline multi-sig is now fully supported and most feedback was implemented in ceb0918. |
I think that all we can address now is there 👍. I'm not so sure about
|
This is a TODO for a project (see side bar)
As part of the Lightweight SDK API we would like to have a class that eases creation of (raw) transactions. A raw transaction can be understood as a serialised
Transaction
that can be send to the network via a RPC node or directly on the TCP network.The available
Transaction
s and their possible attributes are described in the documentation. There are 2 existing examples on how to manually build raw transactions in python here. From that code you can see there is enough room to simplify this for the end user. e.g. adding a description attribute to the transaction is currently done as followsa simplified interface could be
Some ideas:
TransactionOutput
s (ref) using script hashes and alike. Instead we could support an API likecontract_tx.set_destination_addr("neo address")
CertUrl, DescriptionUrl, Description, Remark series
do not exceed 255 chars (see docs)ContractHash, ECDH series, Hash series
does not exceed 32 bytes (see docs)For the first iteration we should only support the following transactions
The text was updated successfully, but these errors were encountered: