-
Notifications
You must be signed in to change notification settings - Fork 141
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
Deprecation: Add deprecation warnings on v1 algod API and old transaction format #381
Changes from 2 commits
6821cb4
0201350
51a9bdf
82c484d
d8921b2
54a76fb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,10 @@ | ||
from urllib.request import Request, urlopen | ||
from urllib import parse | ||
import urllib.error | ||
import json | ||
import base64 | ||
from . import encoding | ||
from . import error | ||
from . import transaction | ||
from . import constants | ||
import json | ||
import urllib.error | ||
from urllib import parse | ||
from urllib.request import Request, urlopen | ||
|
||
from . import constants, encoding, error, future | ||
|
||
api_version_path_prefix = "/v1" | ||
|
||
|
@@ -383,7 +381,7 @@ def export_multisig(self, handle, address): | |
result = self.kmd_request("POST", req, data=query) | ||
pks = result["pks"] | ||
pks = [encoding.encode_address(base64.b64decode(p)) for p in pks] | ||
msig = transaction.Multisig( | ||
msig = future.transaction.Multisig( | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The old and new |
||
result["multisig_version"], result["threshold"], pks | ||
) | ||
return msig | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,9 @@ | |
|
||
|
||
class Template: | ||
""" | ||
NOTE: This class is deprecated | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. note: |
||
""" | ||
def get_address(self): | ||
""" | ||
Return the address of the contract. | ||
|
@@ -18,6 +21,8 @@ def get_program(self): | |
|
||
class Split(Template): | ||
""" | ||
NOTE: This class is deprecated | ||
|
||
Split allows locking algos in an account which allows transfering to two | ||
predefined addresses in a specified ratio such that for the given ratn and | ||
ratd parameters we have: | ||
|
@@ -164,6 +169,8 @@ def get_split_funds_transaction( | |
|
||
class HTLC(Template): | ||
""" | ||
NOTE: This class is deprecated | ||
|
||
Hash Time Locked Contract allows a user to recieve the Algo prior to a | ||
deadline (in terms of a round) by proving knowledge of a special value | ||
or to forfeit the ability to claim, returning it to the payer. | ||
|
@@ -433,6 +440,8 @@ def sign_dynamic_fee(self, private_key, gh): | |
|
||
class PeriodicPayment(Template): | ||
""" | ||
NOTE: This class is deprecated | ||
|
||
PeriodicPayment contract enables creating an account which allows the | ||
withdrawal of a fixed amount of assets every fixed number of rounds to a | ||
specific Algrorand Address. In addition, the contract allows to add | ||
|
@@ -543,6 +552,8 @@ def get_withdrawal_transaction(contract, first_valid, gh, fee): | |
|
||
class LimitOrder(Template): | ||
""" | ||
NOTE: This class is deprecated | ||
|
||
Limit Order allows to trade Algos for other assets given a specific ratio; | ||
for N Algos, swap for Rate * N Assets. | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't have much objection here, just a minor question: since encode-decode is coupled, do we want to mark encode as deprecated? Or it is because of
Transaction
had a structural change (i.e., some new fields)?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Serializing into
msgpack
is okay - the oldTransaction
and newTransaction
can both be serialized into msgpack as long as the fields are ordered and can be represented by a key-value map/dict. Decoding msgpack into the oldTransaction
does not seem preferable, so marked it with the deprecation warning here.