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

[DO NOT MERGE] Amendment XLS-34d #514

Closed
wants to merge 385 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
385 commits
Select commit Hold shift + click to select a range
585ec1c
edit changelog
mvadari Aug 3, 2022
05ef240
update RPCs
mvadari Aug 15, 2022
ea69752
make claim attestation destination optional
mvadari Aug 16, 2022
b933860
make signature reward optional for modify bridge
mvadari Aug 18, 2022
ee090af
update to new rippled changes
mvadari Aug 26, 2022
250bcbb
one more fix
mvadari Aug 26, 2022
484be97
Update definitions.json
mvadari Aug 29, 2022
52d8794
fix spacing
mvadari Aug 29, 2022
7d4ce7f
update definitions.json to avoid conflict with amm
mvadari Aug 30, 2022
6deebb0
Update definitions.json
mvadari Aug 31, 2022
5fb3234
more updates
mvadari Aug 31, 2022
7428433
fix fixtures
mvadari Aug 31, 2022
4a11a1f
update rpcs
mvadari Sep 1, 2022
d3c5842
use NestedModel
mvadari Sep 30, 2022
477cb29
make test easier to read
mvadari Sep 30, 2022
75bf040
respond to comments
mvadari Sep 30, 2022
cae8be3
fix mypy
mvadari Sep 30, 2022
463b7d9
add destination tag to XChainClaim
mvadari Oct 4, 2022
bb8a10e
Merge branch 'sidechain-2.5' into beta
mvadari Oct 13, 2022
400495f
update definitions.json
mvadari Jul 11, 2022
08ace2f
add XChainCreateBridge test
mvadari Jul 11, 2022
5144ad7
get XChainCreateBridge test working
mvadari Jul 11, 2022
1ccd1e4
add XChainCreateClaimID tx
mvadari Jul 11, 2022
bd946c0
get XChainCommit working
mvadari Jul 11, 2022
bc4927e
add XChainClaim tx
mvadari Jul 11, 2022
91ef854
add models
mvadari Jul 11, 2022
358618b
comment out unwritten txs
mvadari Jul 11, 2022
05ecbf2
add test for xchain conversion, fix bugs
mvadari Jul 11, 2022
ea2d3f7
Update definitions.json
mvadari Jul 12, 2022
53dac78
fix typo
mvadari Jul 18, 2022
4656e3c
update to handle XChainAddAttestation (and fix everything else)
mvadari Jul 18, 2022
cf73554
fix bugs
mvadari Jul 18, 2022
31124b3
fix unused variable
mvadari Jul 18, 2022
7ffff0e
rename Bridge -> XChainBridge in models
mvadari Jul 18, 2022
662dbaf
add XChainAddAttestation model(s)
mvadari Jul 18, 2022
4970368
fix import
mvadari Jul 18, 2022
2b99048
rename file
mvadari Jul 19, 2022
8be206f
fix existing tests w/updated rippled, add AccountCreate test
mvadari Jul 29, 2022
d826418
add CreateAccount AddAttestation test
mvadari Jul 31, 2022
8411afd
add/update models
mvadari Jul 31, 2022
93668b2
export new tx
mvadari Jul 31, 2022
b886c4c
fix XChainCommit
mvadari Aug 2, 2022
31cca37
fix XChainAddAttestation
mvadari Aug 2, 2022
92511eb
add XChainModifyBridge tx model
mvadari Aug 2, 2022
7ae710b
rename field
mvadari Aug 2, 2022
4d56518
actually export tx
mvadari Aug 2, 2022
575d138
Update definitions.json
mvadari Aug 3, 2022
c214b55
add XChainModifyBridge binary codec test
mvadari Aug 3, 2022
01bfb01
edit changelog
mvadari Aug 3, 2022
8a9d963
update RPCs
mvadari Aug 15, 2022
27e65dc
make claim attestation destination optional
mvadari Aug 16, 2022
741015d
make signature reward optional for modify bridge
mvadari Aug 18, 2022
16d8c89
update to new rippled changes
mvadari Aug 26, 2022
a8004a6
one more fix
mvadari Aug 26, 2022
454dbd6
Update definitions.json
mvadari Aug 29, 2022
4f0591c
fix spacing
mvadari Aug 29, 2022
3851333
update definitions.json to avoid conflict with amm
mvadari Aug 30, 2022
fd56caf
Update definitions.json
mvadari Aug 31, 2022
04fdee3
more updates
mvadari Aug 31, 2022
7975997
fix fixtures
mvadari Aug 31, 2022
2334449
update rpcs
mvadari Sep 1, 2022
062081a
use NestedModel
mvadari Sep 30, 2022
51a90a0
make test easier to read
mvadari Sep 30, 2022
0969f13
respond to comments
mvadari Sep 30, 2022
9d7cbfa
fix mypy
mvadari Sep 30, 2022
b704fdd
add destination tag to XChainClaim
mvadari Oct 4, 2022
1b5fd29
fix import
mvadari Oct 26, 2022
a40e44b
rename IssuedCurrency -> Issue to match rippled
mvadari Nov 8, 2022
e850d8e
Merge branch 'master' into amm
khancode Nov 9, 2022
18e440f
Change amm_info asset parameters to Currency type
khancode Nov 9, 2022
71a389e
API name changes with updated definitions.json
khancode Nov 9, 2022
f6b1d23
rename amm_info param asset1 -> asset
khancode Nov 9, 2022
37ea649
change AMM_MAX_TRADING_FEE to 1% and rename fee_val to trading_fee
khancode Nov 9, 2022
c02aa8f
rename MinBidPrice -> BidMin and MaxBidPrice -> BidMax
khancode Nov 9, 2022
91fe73e
update definitions to change Asset & Asset2 nth values to 3 & 4
khancode Nov 9, 2022
87cd9ae
Use asset/asset2 instead of amm_id for Deposit/Withdraw/Bid/Vote
khancode Nov 9, 2022
3d19636
Merge branch 'sidechain-2.5' into beta
mvadari Nov 9, 2022
b71681e
update definitions.json
mvadari Jul 11, 2022
9cca021
add XChainCreateBridge test
mvadari Jul 11, 2022
ac0fcbc
get XChainCreateBridge test working
mvadari Jul 11, 2022
0e7a720
add XChainCreateClaimID tx
mvadari Jul 11, 2022
1950355
get XChainCommit working
mvadari Jul 11, 2022
5131143
add XChainClaim tx
mvadari Jul 11, 2022
3266582
add models
mvadari Jul 11, 2022
9d8e1b7
comment out unwritten txs
mvadari Jul 11, 2022
c1159d1
add test for xchain conversion, fix bugs
mvadari Jul 11, 2022
6df9bdd
Update definitions.json
mvadari Jul 12, 2022
5e8cb09
fix typo
mvadari Jul 18, 2022
61d7feb
update to handle XChainAddAttestation (and fix everything else)
mvadari Jul 18, 2022
ad1d84f
fix bugs
mvadari Jul 18, 2022
e9da226
fix unused variable
mvadari Jul 18, 2022
43a6581
rename Bridge -> XChainBridge in models
mvadari Jul 18, 2022
0a5be98
add XChainAddAttestation model(s)
mvadari Jul 18, 2022
9b58925
fix import
mvadari Jul 18, 2022
2581b34
rename file
mvadari Jul 19, 2022
5512c94
fix existing tests w/updated rippled, add AccountCreate test
mvadari Jul 29, 2022
4c95a83
add CreateAccount AddAttestation test
mvadari Jul 31, 2022
bea2f14
add/update models
mvadari Jul 31, 2022
de551aa
export new tx
mvadari Jul 31, 2022
2c0b2c4
fix XChainCommit
mvadari Aug 2, 2022
6c87cdd
fix XChainAddAttestation
mvadari Aug 2, 2022
5a5193e
add XChainModifyBridge tx model
mvadari Aug 2, 2022
22de9e2
rename field
mvadari Aug 2, 2022
d1eb446
actually export tx
mvadari Aug 2, 2022
2f76fc8
Update definitions.json
mvadari Aug 3, 2022
940fd36
add XChainModifyBridge binary codec test
mvadari Aug 3, 2022
3402047
edit changelog
mvadari Aug 3, 2022
0e5b14d
update RPCs
mvadari Aug 15, 2022
edd0f45
make claim attestation destination optional
mvadari Aug 16, 2022
c9c8b2f
make signature reward optional for modify bridge
mvadari Aug 18, 2022
801c593
update to new rippled changes
mvadari Aug 26, 2022
47e11bd
one more fix
mvadari Aug 26, 2022
ceaa988
Update definitions.json
mvadari Aug 29, 2022
7e1f244
fix spacing
mvadari Aug 29, 2022
abccc09
update definitions.json to avoid conflict with amm
mvadari Aug 30, 2022
b012c38
Update definitions.json
mvadari Aug 31, 2022
b249cb1
more updates
mvadari Aug 31, 2022
05b3372
fix fixtures
mvadari Aug 31, 2022
62c2143
update rpcs
mvadari Sep 1, 2022
46159cf
use NestedModel
mvadari Sep 30, 2022
386fd01
make test easier to read
mvadari Sep 30, 2022
665c401
respond to comments
mvadari Sep 30, 2022
45b1698
fix mypy
mvadari Sep 30, 2022
947cf5d
add destination tag to XChainClaim
mvadari Oct 4, 2022
dab092e
fix import
mvadari Oct 26, 2022
93e5cb4
rename IssuedCurrency -> Issue to match rippled
mvadari Nov 8, 2022
20e6a0c
add xchain bridge to account objects
mvadari Nov 10, 2022
055d057
fix account objects filters
mvadari Nov 10, 2022
97ee5ef
fix nestedmodel typing
mvadari Nov 10, 2022
3f28513
update Issue form
mvadari Nov 16, 2022
8569e5d
fix models
mvadari Nov 16, 2022
7390e4a
fix test
mvadari Nov 16, 2022
02d5c89
update definitions
khancode Nov 16, 2022
559a8dc
add Issue type
khancode Nov 17, 2022
10a242a
add flags to AMM deposit & withdraw
khancode Nov 17, 2022
64dfe9e
add Issue model
khancode Nov 17, 2022
15234d2
add Issue type to models with asset & asset2; remove amm_id
khancode Nov 17, 2022
1f4e8ca
resolve lint errors
khancode Nov 17, 2022
f07f5e5
Merge branch 'master' into amm
khancode Nov 17, 2022
e71e37e
rename LPToken in amm deposit & withdraw
khancode Nov 17, 2022
08a32df
update docstrings
khancode Nov 17, 2022
be51e5c
Merge branch 'sidechain-2.5' into beta
mvadari Nov 17, 2022
d2339ad
add AMM codec-fixtures
khancode Nov 17, 2022
5654b90
Merge branch 'amm' into beta
khancode Nov 17, 2022
f47d6e5
add one asset withdraw & withdraw all tests
khancode Nov 17, 2022
b1b3315
Merge branch 'amm' into beta
khancode Nov 17, 2022
bf93a3f
updated CHANGELOG and pyproject.toml
khancode Nov 17, 2022
7688fa0
update definitions.json
mvadari Jul 11, 2022
1e117cd
add XChainCreateBridge test
mvadari Jul 11, 2022
19589d1
get XChainCreateBridge test working
mvadari Jul 11, 2022
cac0d76
add XChainCreateClaimID tx
mvadari Jul 11, 2022
7a97417
get XChainCommit working
mvadari Jul 11, 2022
9a832d0
add XChainClaim tx
mvadari Jul 11, 2022
5abc9f8
add models
mvadari Jul 11, 2022
34bea91
comment out unwritten txs
mvadari Jul 11, 2022
00b2461
add test for xchain conversion, fix bugs
mvadari Jul 11, 2022
3203549
Update definitions.json
mvadari Jul 12, 2022
057e807
fix typo
mvadari Jul 18, 2022
6629b4b
update to handle XChainAddAttestation (and fix everything else)
mvadari Jul 18, 2022
58a0b02
fix bugs
mvadari Jul 18, 2022
3d34552
fix unused variable
mvadari Jul 18, 2022
1769b10
rename Bridge -> XChainBridge in models
mvadari Jul 18, 2022
cff03e1
add XChainAddAttestation model(s)
mvadari Jul 18, 2022
a7a45fc
fix import
mvadari Jul 18, 2022
4c5c9af
rename file
mvadari Jul 19, 2022
729b20a
fix existing tests w/updated rippled, add AccountCreate test
mvadari Jul 29, 2022
15e298a
add CreateAccount AddAttestation test
mvadari Jul 31, 2022
c35447b
add/update models
mvadari Jul 31, 2022
90dc8ed
export new tx
mvadari Jul 31, 2022
e21ed03
fix XChainCommit
mvadari Aug 2, 2022
bbb09c4
fix XChainAddAttestation
mvadari Aug 2, 2022
c34afed
add XChainModifyBridge tx model
mvadari Aug 2, 2022
1e36a2e
rename field
mvadari Aug 2, 2022
a5b26a4
actually export tx
mvadari Aug 2, 2022
8cfd601
Update definitions.json
mvadari Aug 3, 2022
4863320
add XChainModifyBridge binary codec test
mvadari Aug 3, 2022
573faea
edit changelog
mvadari Aug 3, 2022
98be541
update RPCs
mvadari Aug 15, 2022
ac805d1
make claim attestation destination optional
mvadari Aug 16, 2022
78a2ac3
make signature reward optional for modify bridge
mvadari Aug 18, 2022
c4e591e
update to new rippled changes
mvadari Aug 26, 2022
b31526d
one more fix
mvadari Aug 26, 2022
02d8fc3
Update definitions.json
mvadari Aug 29, 2022
dbd0781
fix spacing
mvadari Aug 29, 2022
eedc445
update definitions.json to avoid conflict with amm
mvadari Aug 30, 2022
d187b3b
Update definitions.json
mvadari Aug 31, 2022
5c0e9a4
more updates
mvadari Aug 31, 2022
7c333ff
fix fixtures
mvadari Aug 31, 2022
75a43ec
update rpcs
mvadari Sep 1, 2022
98b807d
use NestedModel
mvadari Sep 30, 2022
042fb26
make test easier to read
mvadari Sep 30, 2022
677876e
respond to comments
mvadari Sep 30, 2022
fdba19d
fix mypy
mvadari Sep 30, 2022
decdc59
add destination tag to XChainClaim
mvadari Oct 4, 2022
b20d0a7
fix import
mvadari Oct 26, 2022
c500d99
rename IssuedCurrency -> Issue to match rippled
mvadari Nov 8, 2022
debdd23
add xchain bridge to account objects
mvadari Nov 10, 2022
b65f755
fix account objects filters
mvadari Nov 10, 2022
fbdd483
update Issue form
mvadari Nov 16, 2022
1c96853
fix models
mvadari Nov 16, 2022
9eb38c1
fix test
mvadari Nov 16, 2022
6a3d089
add validations for XChainCreateBridge
mvadari Dec 12, 2022
aa1a09e
add validations for XChainModifyBridge
mvadari Dec 12, 2022
02404e9
validate XChainClaim
mvadari Dec 12, 2022
75dfc28
add validations for XChainCreateClaimID
mvadari Dec 12, 2022
a351c92
add validations for XChainAddAttestation
mvadari Dec 12, 2022
6373441
fix tests
mvadari Dec 12, 2022
783c2e2
add validations for XChainAccountCreateCommit
mvadari Dec 12, 2022
3f03f27
fix more Literal["XRP"] issues
mvadari Dec 13, 2022
c113cfb
simplify initializing attestation lists
mvadari Jan 5, 2023
d85d5e9
Merge branch 'sidechain-2.5' into beta
mvadari Jan 9, 2023
6a0ab4a
fix attestation list creation
mvadari Jan 9, 2023
7e6cddf
Merge branch 'sidechain-2.5' into beta
mvadari Jan 9, 2023
dd20cd1
update definitions.json with refactored error codes
khancode Jan 9, 2023
cba66ef
Merge branch 'master' into amm
khancode Jan 9, 2023
9095bbf
Merge branch 'amm' into beta
khancode Jan 9, 2023
3a6034c
bump version
khancode Jan 10, 2023
d2cd4b2
fix version
khancode Jan 10, 2023
1694f81
Update definitions.json
mvadari Jan 30, 2023
32152d6
fix tests
mvadari Jan 30, 2023
1a6487b
rename XChainAddAttestation -> XChainAddAttestationBatch
mvadari Jan 30, 2023
cdd474b
add XChainAddClaimAttestation tx
mvadari Jan 30, 2023
ca369d2
add XChainAddAccountCreateAttestation tx
mvadari Jan 30, 2023
c6390ce
Merge branch 'master' into sidechain-2.5
mvadari Jan 30, 2023
d663b30
export new txs
mvadari Jan 30, 2023
b6f19bf
fix types in WasLockingChainSend
mvadari Feb 2, 2023
7ce5b87
Merge branch 'master' into sidechain-2.5
mvadari Feb 2, 2023
cfdf7db
fix typo
mvadari Feb 6, 2023
71d5d6c
remove XChainAddAttestationBatch
mvadari Feb 6, 2023
2377118
fix tests
mvadari Feb 6, 2023
acb5803
update definitions
mvadari Feb 7, 2023
abec1c3
update to latest version of rippled
mvadari Feb 14, 2023
9a49057
Merge branch 'master' into sidechain-2.5
mvadari Feb 14, 2023
167c921
add XChainModifyBridge flag
mvadari Feb 14, 2023
8864f3e
Update definitions.json
mvadari Feb 15, 2023
261fd52
Merge branch 'sidechain-2.5' into beta
mvadari Feb 15, 2023
c3c6385
amendment-xls34d
dangell7 Jan 9, 2023
ff923aa
fix reusable values
dangell7 Feb 6, 2023
4747383
update docstrings
dangell7 Feb 6, 2023
968105c
remove integration testing
dangell7 Feb 6, 2023
5ea77d3
lint
dangell7 Feb 6, 2023
d27b891
refactor `encode_for_signing_claim`
dangell7 Feb 9, 2023
4d42db8
refactor encode signing claim
dangell7 Feb 15, 2023
1ef854d
add faucet test
dangell7 Feb 15, 2023
9d2c0e2
replace references of `XRP` with `amount`
dangell7 Feb 15, 2023
5e87240
integration test for faucet wallet
dangell7 Feb 15, 2023
fc51476
nit: update docstring
dangell7 Feb 15, 2023
a624503
reverse else order
dangell7 Feb 15, 2023
4f0b45b
remove faucet wallet
dangell7 Feb 15, 2023
5251a4c
Merge branch 'beta' into denis-iouescrow
dangell7 Feb 15, 2023
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
4 changes: 3 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,11 @@
"altnet",
"asyncio",
"binarycodec",
"isnumeric",
"nftoken",
"rippletest",
"ripplex",
"xaddress"
"xaddress",
"xchain"
],
}
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Created function alias to `safe_sign_and_autofill_transaction` called `autofill_and_sign` to reflect order of operations
- Created function alias to `submit_transaction` called `submit`
- Created function alias to `safe_sign_and_submit_transaction` called `sign_and_submit`
- Support for cross-chain bridge proposal

### Changed:
- `check_fee` now has a higher limit that is less likely to be hit
- When connected to nft devnet or hooks v2 testnet generate_faucet_wallet now defaults to using the faucet instead of requiring specification
- Deprecated `get_account_info`, `get_transaction_from_hash`, `get_account_payment_transactions` for direct requests
- Private function `request_impl` has been renamed to `_request_impl`. Users should always use `request` over `request_impl`.
- Support for cross-chain bridge proposal
- New AMM API signature changes

### Fixed:
- Properly type the instance functions of NestedModel
Expand All @@ -29,8 +32,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Function to parse the final account balances from a transaction's metadata
- Function to parse order book changes from a transaction's metadata
- Support for Ed25519 seeds that don't use the `sEd` prefix
- Support for cross-chain bridge proposal
- Support for Automated Market Maker (AMM) transactions and requests as defined in XLS-30.
- Add docs to`get_account_transactions` explaining how to allow pagination through all transaction history [#462]
- Common field `ticket_sequence` to Transaction class
- Support for cross-chain bridge proposal

### Fixed:
- Typing for factory classmethods on models
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "xrpl-py"
version = "1.7.0"
version = "1.9.0-beta.0"
description = "A complete Python library for interacting with the XRP ledger"
readme = "README.md"
repository = "https://github.com/XRPLF/xrpl-py"
Expand Down
357 changes: 344 additions & 13 deletions tests/unit/core/binarycodec/fixtures/data/codec-fixtures.json

Large diffs are not rendered by default.

28 changes: 23 additions & 5 deletions tests/unit/core/binarycodec/test_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -331,14 +331,14 @@ def test_xaddress_xaddr_and_matching_source_tag(self):


class TestMainFixtures(TestCase):
maxDiff = 1000
maxDiff = None

def _check_binary_and_json(self, test):
test_binary = test["binary"]
test_json = test["json"]
with self.subTest(test_binary=test_binary, test_json=test_json):
self.assertEqual(encode(test_json), test_binary)
self.assertEqual(decode(test_binary), test_json)
self.assertEqual(encode(test_json), test_binary)

def _check_xaddress_jsons(self, test):
x_json = test["xjson"]
Expand Down Expand Up @@ -390,14 +390,32 @@ def test_single_signing(self):
)
self.assertEqual(encode_for_signing(signing_json), expected)

def test_claim(self):
def test_native_claim(self):
channel = "43904CBFCDCEC530B4037871F86EE90BF799DF8D2E0EA564BC8A3F332E4F5FB1"
amount = "1000"
json = {"amount": amount, "channel": channel}

expected = (
"434C4D0043904CBFCDCEC530B4037871F86EE90BF799DF8D2E0EA564BC8A3F332E"
"4F5FB100000000000003E8"
"434C4D00"
"43904CBFCDCEC530B4037871F86EE90BF799DF8D2E0EA564BC8A3F332E4F5FB1"
"00000000000003E8"
)
self.assertEqual(encode_for_signing_claim(json), expected)

def test_ic_claim(self):
channel = "43904CBFCDCEC530B4037871F86EE90BF799DF8D2E0EA564BC8A3F332E4F5FB1"
amount = {
"issuer": "rJZdUusLDtY9NEsGea7ijqhVrXv98rYBYN",
"currency": "USD",
"value": "10",
}
json = {"amount": amount, "channel": channel}

expected = (
"434C4D00"
"43904CBFCDCEC530B4037871F86EE90BF799DF8D2E0EA564BC8A3F332E4F5FB1"
"D4C38D7EA4C680000000000000000000000000005553440000000000C0A5ABEF"
"242802EFED4B041E8F2D4A8CC86AE3D1"
)
self.assertEqual(encode_for_signing_claim(json), expected)

Expand Down
16 changes: 16 additions & 0 deletions tests/unit/models/requests/test_amm_info.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
from unittest import TestCase

from xrpl.models.currencies.issue import Issue
from xrpl.models.requests import AMMInfo

_ASSET = Issue(currency="XRP")
_ASSET_2 = Issue(currency="USD", issuer="rN6zcSynkRnf8zcgTVrRL8K7r4ovE7J4Zj")


class TestAMMInfo(TestCase):
def test_asset_asset2(self):
request = AMMInfo(
asset=_ASSET,
asset2=_ASSET_2,
)
self.assertTrue(request.is_valid())
Loading